Search Results

Search found 16927 results on 678 pages for 'little child'.

Page 12/678 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Big O and Little o

    - by hyperdude
    If algorithm A has complexity O(n) and algorithm B has complexity o(n^2), what, if anything, can we say about the relationship between A and B? Note: the complexity of A is expressed using big-Oh, and the complexity of B is expressed using little-Oh.

    Read the article

  • PHP-FPM Pool, Child Processes and Memory Consumption

    - by Jhilke Dai
    In my PHP-FPM configuration I have 3 Pools, the eg: Config is: ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 1 ; ;;;;;;;;;;;;;;;;;;;;;;; [www1] user = www group = www listen = /tmp/php-fpm1.sock; listen.backlog = -1 listen.owner = www listen.group = www listen.mode = 0666 pm = dynamic pm.max_children = 40 pm.start_servers = 6 pm.min_spare_servers = 6 pm.max_spare_servers = 12 pm.max_requests = 250 slowlog = /var/log/php/$pool.log.slow request_slowlog_timeout = 5s request_terminate_timeout = 120s rlimit_files = 131072 ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 2 ; ;;;;;;;;;;;;;;;;;;;;;;; [www2] user = www group = www listen = /tmp/php-fpm2.sock; listen.backlog = -1 listen.owner = www listen.group = www listen.mode = 0666 pm = dynamic pm.max_children = 40 pm.start_servers = 6 pm.min_spare_servers = 6 pm.max_spare_servers = 12 pm.max_requests = 250 slowlog = /var/log/php/$pool.log.slow request_slowlog_timeout = 5s request_terminate_timeout = 120s rlimit_files = 131072 ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 3 ; ;;;;;;;;;;;;;;;;;;;;;;; [www3] user = www group = www listen = /tmp/php-fpm3.sock; listen.backlog = -1 listen.owner = www listen.group = www listen.mode = 0666 pm = dynamic pm.max_children = 40 pm.start_servers = 6 pm.min_spare_servers = 6 pm.max_spare_servers = 12 pm.max_requests = 250 slowlog = /var/log/php/$pool.log.slow request_slowlog_timeout = 5s request_terminate_timeout = 120s rlimit_files = 131072 I calculated the pm.max_children processes according to some example calculations on the web like 40 x 40 Mb = 1600 Mb. I have separated 4 GB of RAM for PHP, now according to the calculations 40 Child Processes via one socket, and I have total of 3 sockets in my Nginx and FPM configuration. My doubt is about the amount of memory consumption by those child processes. I tried to create high load in the server via httperf hog and siege but I could not calculate the accurate memory usage by all the PHP processes (other processes like MySQL and Nginx were also running). And all the sockets were in use, So, I seek guidance from anyone who have done this before or know how exactly the pm.max_children in PHP Works. Since I have 3 Pools/sockets with 40 child processes does that count to 3 x 40 x 40 Mb of Memory usage ? or it is just like 40 Max. Child processes sharing 3 sockets (and the total memory usage is just 40 x 40 Mb) ?

    Read the article

  • Windows 7: "Replace All Child Object Permissions" Doesn't Stay Checked

    - by raywood
    I right-click on a top-level folder in Windows Explorer. I choose Properties Security tab Advanced Change Permissions. I check "Replace all child object permissions with inheritable permissions from this object" Apply. I get a Windows Security dialog that says, "Setting security information on" the list of objects that flashes by. But now the "Replace all child object permissions" box is unchecked. What is happening here?

    Read the article

  • How to pass value from child window to parent window without refreshing the page using MasterPage

    - by Suthish Nair
    Parent Window (1.aspx) <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <script type ="text/javascript"> function popup() { window.open('2.aspx', '', "height=500, width=500,resizable=no, toolbar =no"); } </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> Text Box1:&nbsp;<asp:TextBox ID...(read more)

    Read the article

  • WIX 3.5 Unexpected Child Element iis:Certificate

    - by Wil Peck
    Came across this today when I switched from WIX 3.0 and VS 2008 to WIX 3.5 and VS 2010.  The solution ended up being pretty simple.  Just need to update the Wix Project Properties to provide an additional parameter to the compiler and linker. These can be found at Wix Installer Project Properties > Tool Settings > Additional Parameters Compiler and Wix Installer Project Properties > Tool Settings > Additional Parameters Linker.  Just make sure to add ‘-ext WixIIsExtension’ in the fields and recompile.   Technorati Tags: WIX,WIX 3.5,Help

    Read the article

  • Google Chrome calling nypost.com every ~5 seconds

    - by TonyM
    I'm using Chrome 21.0.1180.49 beta on Mac OS X 10.7.4. Did some Googling and can't figure this out. I visited a page on nypost.com earlier this morning. Just noticed that Little Snitch is reporting that nypost.com is being called every 4-6 seconds or so. I closed the tab after reading the story, a few hours ago. I created a rule in Little Snitch denying access to nypost.com, but Chrome is apparently still connecting to it. (1) Why? and (2) How can I put an end to this? Thanks in advance for any thoughts.

    Read the article

  • how to transform child elements position into a world position

    - by MrGreg
    So Im making a 2d space game and I have a bunch of spaceships that have turrets. Objects have a position and orientation, the ships being in world coordinates while the turrets are children and coordinates are relative to their parents. How do I efficiently calculate the position of a turret in world coordinates (i.e. when it fires and I need to know where to place a bullet in the world)? Calculating the turrets orientation is trivial - I just add the turrets relative angle to its parents. For position though, I guess I could do a bunch of trigonometry but this MUST be a common problem with a good/fast general solution? Should I be relearning how to do matrix math again? :) btw - Im creating the game in javascript+canvas but its the math/algorithm im interested in here Cheers, Greg

    Read the article

  • JS closures - Passing a function to a child, how should the shared object be accessed

    - by slicedtoad
    I have a design and am wondering what the appropriate way to access variables is. I'll demonstrate with this example since I can't seem to describe it better than the title. Term is an object representing a bunch of time data (a repeating duration of time defined by a bunch of attributes) Term has some print functionality but does not implement the print functions itself, rather they are passed in as anonymous functions by the parent. This would be similar to how shaders can be passed to a renderer rather than defined by the renderer. A container (let's call it Box) has a Schedule object that can understand and use Term objects. Box creates Term objects and passes them to Schedule as required. Box also defines the print functions stored in Term. A print function usually takes an argument and uses it to return a string based on that argument and Term's internal data. Sometime the print function could also use data stored in Schedule, though. I'm calling this data shared. So, the question is, what is the best way to access this shared data. I have a lot of options since JS has closures and I'm not familiar enough to know if I should be using them or avoiding them in this case. Options: Create a local "reference" (term used lightly) to the shared data (data is not a primitive) when defining the print function by accessing the shared data through Schedule from Box. Example: var schedule = function(){ var sched = Schedule(); var t1 = Term( function(x){ // Term.print() return (x + sched.data).format(); }); }; Bind it to Term explicitly. (Pass it in Term's constructor or something). Or bind it in Sched after Box passes it. And then access it as an attribute of Term. Pass it in at the same time x is passed to the print function, (from sched). This is the most familiar way for my but it doesn't feel right given JS's closure ability. Do something weird like bind some context and arguments to print. I'm hoping the correct answer isn't purely subjective. If it is, then I guess the answer is just "do whatever works". But I feel like there are some significant differences between the approaches that could have a large impact when stretched beyond my small example.

    Read the article

  • Using Python to traverse a parent-child data set

    - by user132748
    I have a dataset of two columns in a csv file. Th purpose of this dataset is to provide a linking between two different id's if they belong to the same person. e.g (2,3,5 belong to 1) e.g COLA COLB 1 2 ; 1 3 ; 1 5 ; 2 6 ; 3 7 ; 9 10 In the above example 1 is linked to 2,3,5 and 2 is the linked to 6 and 3 is linked to 7. What I am trying to achieve is to identify all records which are linked to 1 directly (2,3,5) or indirectly(6,7) and be able to say that these id's in column B belong to same person in column A and then either dedupe or add a new column to the output file which will have 1 populated for all rows that link to 1 e.g of expected output colA colB GroupField 1 2 1; 1 3 1; 1 5 1 ; 2 6 1 ;3 7 1; 9 10 9; 10 11 9 I am a newbie and so am not sure on how to approach this problem.Appreciate any inputs you'll can provide.

    Read the article

  • Oracle is Child&rsquo;s Play&hellip;in NSW

    - by divya.malik
    A few weeks ago, my colleague Michael Seback posted a blog entry on Oracle’s acquisition of Haley.  We recently read  an interesting report from Down Under, and here was our press release on the  implementation of Oracle’s Policy automation software in New South Wales, which I thought I would share. We always love hearing about our software “at work”, and especially in the Public Sector- social services area, where it makes a big difference to people’s lives. Here were some of the reasons, why NSW chose Oracle software: “One of the things Oracle’s Policy Automation system is good at is allowing you take decision  trees and rules that are obviously written in English and code them up using very much a natural language approach,” said Holling (CIO for Human Services). “So it was quite a short process to translate the final set of rules that were written on paper into business rules that were actually embedded in the system.” “Another reason why we chose Oracle’s Automation tool is because with future versions of Siebel it comes very tightly integrated with that. It allows us to then to basically take the results of the Policy Automation survey and actually populate our client management system database with that information,” said Holling. As per Surend Dayal, North America VP, Oracle’s Policy automation has applications across a wide range of industries, including public sector—especially health and human services—also financial services, insurance, and even airline rewards programs. In other words, any business process that requires consistent, accurate decision-making where complex legislation and/or internal policies are involved. Click here to read more about Oracle and Haley.

    Read the article

  • Avoid overwriting all the methods in the child class

    - by Heckel
    The context I am making a game in C++ using SFML. I have a class that controls what is displayed on the screen (manager on the image below). It has a list of all the things to draw like images, text, etc. To be able to store them in one list I created a Drawable class from which all the other drawable class inherit. The image below represents how I would organize each class. Drawable has a virtual method Draw that will be called by the manager. Image and Text overwrite this method. My problem is that I would like Image::draw method to work for Circle, Polygon, etc. since sf::CircleShape and sf::ConvexShape inherit from sf::Shape. I thought of two ways to do that. My first idea would be for Image to have a pointer on sf::Shape, and the subclasses would make it point onto their sf::CircleShape or sf::ConvexShape classes (Like on the image below). In the Polygon constructor I would write something like ptr_shape = &polygon_shape; This doesn't look very elegant because I have two variables that are, in fact, just one. My second idea is to store the sf::CircleShape and sf::ConvexShape inside the ptr_shape like ptr_shape = new sf::ConvexShape(...); and to use a function that is only in ConvexShape I would cast it like so ((sf::ConvexShape*)ptr_shape)->convex_method(); But that doesn't look very elegant either. I am not even sure I am allowed to do that. My question I added details about the whole thing because I thought that maybe my whole architecture was wrong. I would like to know how I could design my program to be safe without overwriting all the Image methods. I apologize if this question has already been asked; I have no idea what to google.

    Read the article

  • Botnet Malware Sleeps Eight Months Activation, Child Concerns

    Daily Safety Check experts used a computer forensic analysis of a significant botnet that consisted of Carberp and SpyEye malware to come up with the details for their report. The analysis found that the botnet profiled the behavior of the slave computers it infected, similar to surveillance techniques used by law enforcement agencies, for an average of eight months. During the eight months, the botnet analyzed each computer's users and assigned ratings to certain activities to form a complete profile for each. Doing so allowed those behind the scheme to determine which were the most favora...

    Read the article

  • Developing a Website is Not Child's Play

    Creating a web page is not an easy job. Because a website holds a lot of importance for making your presence felt online. Hiring professionals for website development will always be fruitful as you will be able to avail the best services from them.

    Read the article

  • WPF4 Unleashed - how does converting child elements work?

    - by Kapol
    In chapter 2 of the book WPF4 Unleashed the author shows an example of how XAML processes type conversion. He states that <SolidColorBrush>White</SolidColorBrush> is equivalent to <SolidColorBrush Color="White"/> , because a string can be converted into a SolidColorBrush object. But how is that enough? It doesn't make sense to me. How does XAML know to which property should the value White be assigned?

    Read the article

  • How to find rows between other rows w/ID then add class

    - by Ravex
    Hi guys. i'm stuck with my table. need create toggle rows function. but i no idea how to find sub rows in table. Some one can help me? I have table with many rows 500 All Rows have class="row-1,row-2.....row-600 etc" And all main rows also have class="parent" between each "parent" rows i have 6 rows So i need for toggle/collapse purposes find all (sub)rows betwen parent rows. and add class with id like in prevous parent row. For example: parent have class="row-1 parent" all sub must have - class="child-row-1" default table <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table> in the end it should look like this: <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even child-row-1"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd child-row-1"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table>

    Read the article

  • A little help with MVC

    - by s0mmer
    Hi everyone, I'm working on a cocoa app for syncing data between two folders. It have profiles (so you can have multiple setups) It's possible to analyze data It's possible to sync the data Im a little confused. First of all i cant really see where to have a model? And how many controller would you suggest? 1 WindowController or AnalyzeController, SyncController etc. Its quite a while since i have worked with MVC. I've read some articles but i'm missing concrete examples on how to divide it. Best regards.

    Read the article

  • Bit/Byte adressing - Little/Big-endnian

    - by code8230
    Consider the 16-Bit data packet below, which is sent through the network in network byte order ie Big Endian: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 (Byte num) 34 67 89 45 90 AB FF 23 65 37 56 C6 56 B7 00 00 (Value) Lets say 8945 is a 16 bit value. All others are 8 bit data bytes. On my system, which is little endian, how would the data be received and stored? Lets say, we are configured to receive 8 bytes at a time. RxBuff is the Rx buffer where data will be received. Buff is the storage buffer where data would be stored. Please point out which case is correct for data storage after reading 8 bytes at a time: 1) Buff[] = {0x34, 0x67, 0x45, 0x89, 0x90, 0xAB....... 0x00}; 2) Buff[] = {0x00, 0x00, .......0x67, 0x89, 0x45, 0x34}; Would the whole 16 bytes data be reversed or only the 2 bytes value contained in this packet?

    Read the article

  • Setting up DrJava to work through Friedman / Felleisen "A Little Java"

    - by JDelage
    All, I'm going through the Friedman & Felleisen book "A Little Java, A Few Patterns". I'm trying to type the examples in DrJava, but I'm getting some errors. I'm a beginner, so I might be making rookie mistakes. Here is what I have set-up: public class ALittleJava { //ABSTRACT CLASS POINT abstract class Point { abstract int distanceToO(); } class CartesianPt extends Point { int x; int y; int distanceToO(){ return((int)Math.sqrt(x*x+y*y)); } CartesianPt(int _x, int _y) { x=_x; y=_y; } } class ManhattanPt extends Point { int x; int y; int distanceToO(){ return(x+y); } ManhattanPt(int _x, int _y){ x=_x; y=_y; } } } And on the main's side: public class Main{ public static void main (String [] args){ Point y = new ManhattanPt(2,8); System.out.println(y.distanceToO()); } } The compiler cannot find the symbols Point and ManhattanPt in the program. If I precede each by ALittleJava., I get another error in the main, i.e., an enclosing instance that contains ALittleJava.ManhattanPt is required I've tried to find ressources on the 'net, but the book must have a pretty confidential following and I couldn't find much. Thank you all. JDelage

    Read the article

  • Need little assistance

    - by Umaid
    I am iterating in current days, so need little assistance for (int I=-1; I<30; I++) { for (int J=0; J=30; J++) { for (int K=1; K=30; K++) { SELECT rowid,Month, Day, Advice from MainCategory where Month= 'May ' and Day in ((cast(strftime('%d',date('now','I day')) as Integer)),(cast(strftime('%d',date('now','J day')) as Integer)),(cast(strftime('%d',date('now','K day')) as Integer))); } } } What if i want to go in reverse order also for (int I=-1; I<30; I--) { for (int J=0; J=30; J--) { for (int K=1; K=30; K--) { SELECT rowid,Month, Day, Advice from MainCategory where Month= 'May ' and Day in ((cast(strftime('%d',date('now','I day')) as Integer)),(cast(strftime('%d',date('now','J day')) as Integer)),(cast(strftime('%d',date('now','K day')) as Integer))); } } } On every previous click, i want to fetch 3 records so do i need to iterate till 3 or make it on all record 30 in a month from which i want to fetch.

    Read the article

  • A little confused about MVC and where to put a database query

    - by jax
    OK, so my Joomla app is in MVC format. I am still a little confused about where to put certain operations, in the Controller or in the Model. This function below is in the controller, it gets called when &task=remove. Should the database stuff be in the Model? It does not seem to fit there because I have two models editapp (display a single application) and allapps (display all the applications), now which one would I put the delete operation in? /** * Delete an application */ function remove() { global $mainframe; $cid = JRequest::getVar( 'cid', array(), '', 'array' ); $db =& JFactory::getDBO(); //if there are items to delete if(count($cid)){ $cids = implode( ',', $cid ); $query = "DELETE FROM #__myapp_apps WHERE id IN ( $cids )"; $db->setQuery( $query ); if (!$db->query()){ echo "<script> alert('".$db->getErrorMsg()."');window.history.go(-1); </script>\n"; } } $mainframe->redirect( 'index.php?option=' . $option . '&c=apps'); } I am also confused about how the flow works. For example, there is a display() function in the controller that gets called by default. If I pass a task, does the display() function still run or does it go directly to the function name passed by $task?

    Read the article

  • Font for tabs looks a little too big

    - by cf_PhillipSenn
    I'm using the default for jQueryUI, but it looks like the font is a little big. I know that one solution would be "WELL! JUST MAKE IT SMALLER!", but I'm just wondering if I've messed something up or I don't have a value set correctly before I charge in and start changing things. <!DOCTYPE HTML> <html> <head> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1"); </script> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css" type="text/css" media="all" /> <script type="text/javascript"> google.load("jqueryui", "1"); function OnLoadCallbackUI(){ $('#tabs').tabs(); } google.setOnLoadCallback(OnLoadCallbackUI); </script> </head> <body> <div id="tabs"> <ul> <li><a href="#tabs-1">tab1</a></li> <li><a href="#tabs-2">tab2</a></li> </ul> <div id="tabs-1"> tabs-1 </div> <div id="tabs-2"> tabs-2 </div> </div> </body> </html>

    Read the article

  • Wordpress displays posts of category ID

    - by Miker
    Can't seem to find the right answer for what I thought would be trivial. I have some categories arranged like this... Parent Category 1 - Child Category 1 - Child Category 2 - Child Category 3 ...and I have some posts that are in Child Category 2. I want my page to display all posts from the category I am currently in. This is what I am doing right now: <?php query_posts('cat=2&showposts=10'); if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="timeline"> <h3><?php the_title(); ?></h3> <?php the_content();?> <?php endwhile; else: ?> <?php _e('No Posts Sorry.'); ?> <?php endif; ?> </div> As you can see I am having to manually specify the category (cat=2), but instead I want it to automatically detect the category I am already in and display the posts (that way if I'm in a different category it will display those posts). Any suggestions? Thanks in advance. (SO Community = Awesome Sauce).

    Read the article

  • android: How to set a listener that fires when my ViewFlipper shows a new child

    - by Joseph Cheek
    Hi Android gurus, I have a ViewFlipper for which I want a listener to fire when the child displayed is changed. I have set an OnFocusChangeListener to the ViewFlipper but it never fires when I flip from child 0 to child 1 or vice-versa. The ViewFlipper contains two RelativeLayouts and I have tried setting OnFocusChangeListeners for those but I get a ClassCastException when I try to set it. Here's my code: RelativeLayout songsLayout = (RelativeLayout) findViewById(R.id.song_page_layout); songsLayout.setOnFocusChangeListener(new OnFocusChangeListener() { public void onFocusChange(View view, boolean hasFocus) { showPopUp("View " + view.getId() + " now has focus: " + hasFocus); } } ); R.is.song_page_layout is one of my RelativeLayouts and showPopUp() is a function I use to show, well, popups. Does anyone have working code for some sort of trigger that fires when a ViewFlipper changes which child is displayed?

    Read the article

  • ASP.NET MVC 4 async child action

    - by ShadowChaser
    I have an ASP.NET MVC 4 application targeting .NET 4.5. One of our child actions makes a call out to a web service using HttpClient. Since we're blocking on IO waiting for the HttpClient response, it makes a great deal of sense to convert the code to the async/await pattern. However, when MVC 4 attempts to execute the child action, we get the following error message: HttpServerUtility.Execute blocked while waiting for an asynchronous operation to complete. At first glance, it appears as though MVC 4 does not support async/await within a child action. The only remaining option is to run using synchronous code and force a "Wait" on the async task. As we all know, touching .Result or .Wait() on an async task in an ASP.NET context will cause an immediate deadlock. My async logic is wrapped in a class library, so I can't use the "await blah.ConfigureAwait(false)" trick. Remember, tagging "async" on the child action and using await causes an error, and that prevents me from configuring the await. I'm painted into a corner at this point. Is there any way to consume async methods in an MVC 4 child action? Seems like a flat out bug with no workarounds.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >