Search Results

Search found 6420 results on 257 pages for 'mathieu parent'.

Page 48/257 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • How to tell the parent that the thread is done in C++ using pthreads ?

    - by milleroff
    Hi. I have a TCP Server application that serves each client in a new thread using POSIX Threads and C++. The server calls "listen" on its socket and when a client connects, it makes a new object of class Client. The new object runs in its own thread and processes the client's requests. When a client disconnects, i want some way to tell my main() thread that this thread is done, and main() can delete this object and log something like "Client disconnected". My question is, how do i tell to the main thread, that a thread is done ?

    Read the article

  • PHP: How do I rename a directory where the parent directory is variable?

    - by gsquare567
    i would like to move the files inside uploads/pension/#SOME_VARIABLE_NUMBER#/#SOME_CONSTANT_NUMBER#/ here is my code: // move pension statements // located at uploads/pension/%COMPANY_ID%/%USER_ID%/%HASH% // so just move the %USER_ID% folder to the new company $oldPensionDir = "uploads/pension/" . $demo_user[Users::companyID] . "/" . $demo_user[Users::userID] . "/"; $newPensionDir = "uploads/pension/" . $newCompanyID . "/" . $demo_user[Users::userID] . "/"; // see if the user had any files, and if so, move them if(file_exists($oldPensionDir)) { // if it doesnt exist, make it if(!file_exists($newPensionDir)) mkdir($newPensionDir); // move the folder rename($oldPensionDir, $newPensionDir); } however... when i need to make the directory with the "mkdir" function, i get: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: No such file or directory ok, maybe the mkdir won't work, but what about the rename? perhaps that will make the directory if it's not there... nope! rename(uploads/pension/1001/783/,uploads/pension/1000/783/) [<a href='function.rename'>function.rename</a>]: The system cannot find the path specified. (code: 3) so, there are two errors. i'm pretty sure if the renaming works, i won't even need the mkdir, but who knows... can anyone tell me why these are errors and how to fix them? thanks!

    Read the article

  • how to access a label form user control in Parent class ?

    - by haansi
    I have a class UserControlBase that inherits System.Web.UI.UserControl and my user controls inherit UserControlBase class. UserControlBase has some common functions that are used in all user controls. I want to put error display funtion to UserControlBase as well so that I may not have to declare and manage it in all user controls. Error will be displayed in some label in usercontrol. Issue is how to access label which is in usercontrol in UserControlBase in function ? I dont want to pass label as argument. Please guide me on this issue. thanks

    Read the article

  • Recommendations for IPC between parent and child processes in .NET?

    - by Jeremy
    My .NET program needs to run an algorithm that makes heavy use of 3rd party libraries (32-bit), most of which are unmanaged code. I want to drive the CPU as hard as I can, so the code runs several threads in parallel to divide up the work. I find that running all these threads simultaneously results in temporary memory spikes, causing the process' virtual memory size to approach the 2 GB limit. This memory is released back pretty quickly, but occasionally if enough threads enter the wrong sections of code at once, the process crosses the "red line" and either the unmanaged code or the .NET code encounters an out of memory error. I can throttle back the number of threads but then my CPU usage is not as high as I would like. I am thinking of creating worker processes rather than worker threads to help avoid the out of memory errors, since doing so would give each thread of execution its own 2 GB of virtual address space (my box has lots of RAM). I am wondering what are the best/easiest methods to communicate the input and output between the processes in .NET? The file system is an obvious choice. I am used to shared memory, named pipes, and such from my UNIX background. Is there a Windows or .NET specific mechanism I should use?

    Read the article

  • How do I propagate an exception thrown by croak in forked child to parent/foreground process?

    - by Pedro Silva
    Throwing an exception via croak in a forked child process seems to print the error as a background process would. That is, it clobbers the shell prompt. If I die instead of croak, the the error message pops up as a foreground process. I've trying to find out why that is in the Carp documentation without any luck. Here's what I mean. The croak version: $ perl Wrapper.pm $ error: ... does not exist at Wrapper.pm line 624 The die version: $ perl Wrapper.pm error: ... does not exist at Wrapper.pm line 515. I tried trapping the fork and printing $@ to STDERR and exiting, but that didn't have an effect. Any ideas? I'd like to be able to use croak in this particular case.

    Read the article

  • How can a <label> completely fill its parent <td>?

    - by Shawn
    Here is the relevant code (doesn't work): <html> <head> <title>testing td checkboxes</title> <style type="text/css"> td { border: 1px solid #000; } label { border: 1px solid #f00; width: 100%; height: 100% } </style> </head> <body> <table> <tr><td>Some column title</td><td>Another column title</td></tr> <tr><td>Value 1<br>(a bit more info)</td><td><label><input type="checkbox" /> &nbsp;</label></td></tr> <tr><td>Value 2</td><td><input type="checkbox" /></td></tr> </table> </body> </html> The reason is that I want a click anywhere in the table cell to check/uncheck the checkbox.

    Read the article

  • .htaccess not load css file and images and duplicate parent url?

    - by Mahran Elneel
    i have create htaccess and cannot load css file and images but when add ../file.css and images ../ima it work but i want to open in current directory. and when click the link in home page like will be http://localhost/mysite/program/4 but in another page will add http://localhost/mysite/program/program/2 and this wrong location the .htaccess code Options +FollowSymLinks RewriteEngine On # Turn on the rewriting engine RewriteRule ^program/([0-9]+)/?$ get_programs.php?pack_id=$1 [NC,L] RewriteRule ^El-Mensajero/?$ home.php [NC,L] RewriteRule ^Daily-Tours/?$ daily_tours.php [NC,L] RewriteRule ^page/([0-9]+)/?$ get_pages.php?page_id=$1 [NC,L]

    Read the article

  • Why cant Git merge file changes with a modified parent/master.

    - by Andy
    I have a file with one line in it. I create a branch and add a second line to the same file. Save and commit to the branch. I switch back to the master. And add a different, second line to the file. Save and commit to the master. So there's now 3 unique lines in total. If I now try and merge the branch back to the master, it suffers a merge conflict. Why cant Git simple merge each line, one after the other? My attempt at merge behaves something like this: PS D:\dev\testing\test1> git merge newbranch Auto-merging hello.txt CONFLICT (content): Merge conflict in hello.txt Automatic merge failed; fix conflicts and then commit the result. PS D:\dev\testing\test1> git diff diff --cc hello.txt index 726eeaf,e48d31a..0000000 --- a/hello.txt +++ b/hello.txt @@@ -1,2 -1,2 +1,6 @@@ This is the first line. - New line added by master. -Added a line in newbranch. ++<<<<<<< HEAD ++New line added by master. ++======= ++Added a line in newbranch. ++>>>>>>> newbranch Is there a way to make it slot lines in automatically, one after the other?

    Read the article

  • DoubleClick studio thinks I've imported the Enabler component in both my parent and my child asset f

    - by Marijn Huizendveld
    I've just started to work with DoubleClick Studio. I've successfully created a Flash expanding ad with CS4 that is mostly scripted and uses the Document class option. Now for some reason the back end of DoubleClick Studio thinks I've imported the Enabler component twice. I've checked my files numerous of times but can't find the root cause. Any help is much appreciated :)

    Read the article

  • How can I use a parent content control from a sub binding?

    - by MGSoto
    I have the following code currently: <DataTemplate DataType="{x:Type vm:SectionViewModel}"> <ScrollViewer> <ItemsControl ItemsSource="{Binding ViewModels}"> <Grid/> </ItemsControl> </ScrollViewer> </DataTemplate> <DataTemplate DataType="{x:Type vm:StringViewModel}"> <Label Name="Left" Grid.Row="0" Grid.Column="0" Content="{Binding Label}"/> <TextBox Name="Right" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="1" Text="{Binding Value}"/> </DataTemplate> The ViewModels property bound to SectionViewModel ItemsControl is a list of StringViewModel. I want to insert each StringViewModel into some sort of content control in the ItemsControl. Originally I just had each StringViewModel to make its own Grid, but that left things unaligned. I'd like to insert these items into some sort of content control in ItemsControl, it doesn't necessarily have to be a grid, but it should be within the ItemsControl. How can I do this? I'm also following MVVM, using MVVM Light.

    Read the article

  • Using Entity Framework 4.0 with Code-First and POCO: How to Get Parent Object with All its Children

    - by SirEel
    I'm new to EF 4.0, so maybe this is an easy question. I've got VS2010 RC and the latest EF CTP. I'm trying to implement the "Foreign Keys" code-first example on the EF Team's Design Blog, http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-further-enhancements.aspx. public class Customer { public int Id { get; set; public string CustomerDescription { get; set; public IList<PurchaseOrder> PurchaseOrders { get; set; } } public class PurchaseOrder { public int Id { get; set; } public int CustomerId { get; set; } public Customer Customer { get; set; } public DateTime DateReceived { get; set; } } public class MyContext : ObjectContext { public RepositoryContext(EntityConnection connection) : base(connection){} public IObjectSet<Customer> Customers { get {return base.CreateObjectSet<Customer>();} } } I use a ContextBuilder to configure MyContext: { var builder = new ContextBuilder<MyContext>(); var customerConfig = _builder.Entity<Customer>(); customerConfig.Property(c => c.Id).IsIdentity(); var poConfig = _builder.Entity<PurchaseOrder>(); poConfig.Property(po => po.Id).IsIdentity(); poConfig.Relationship(po => po.Customer) .FromProperty(c => c.PurchaseOrders) .HasConstraint((po, c) => po.CustomerId == c.Id); ... } This works correctly when I'm adding new Customers, but not when I try to retrieve existing Customers. This code successfully saves a new Customer and all its child PurchaseOrders: using (var context = builder.Create(connection)) { context.Customers.AddObject(customer); context.SaveChanges(); } But this code only retrieves Customer objects; their PurchaseOrders lists are always empty. using (var context = _builder.Create(_conn)) { var customers = context.Customers.ToList(); } What else do I need to do to the ContextBuilder to make MyContext always retrieve all the PurchaseOrders with each Customer?

    Read the article

  • What's the best approach for readonly property

    - by Patrick Parent
    Hi, I'm using a model UserRepository-User The Repository is used to Save and Load the User. I want to be able to set the ID in the Repository, but I don't want it to be access by UI. The User and Repository are found in a Core project, and the UI in a Web. Is there a way to do this, like a modifier for the property, or should I put the ID in the User contructor ? Thanks

    Read the article

  • Can I get a WPF ListBox to inherit brushes from parent element?

    - by Jay
    My WPF window has its foreground brush set to a brush from a resource dictionary, and I want all text in the window to have this color, so I don't touch the foreground brush in anything else. Textboxes get the color Textblocks get the color Buttons get the color Listboxes do not get the color, and so neither do their contents. Is there any way to get a Listbox to behave like the other controls in this respect? Assuming not, and that this is by design, what is the rationale?

    Read the article

  • jQuery how to add class to a parent div which has a 3rd level child div with a specific class name.

    - by Vikram
    Hello friends I have an issue adding a special class to a couple of my divs. My layout is like this. <div class="container"> <div class="grid-6 push-3 equal" style="height: 999px;"> <div class="block"> <div id="mainbody"> <!-- Body content here --> </div> </div> </div> <div class="grid-2 equal" style="height: 999px;"> <div class="block"> <div id="sidebar-a"> <!-- Sidebar-a content here --> </div> </div> </div> <div class="grid-2 equal" style="height: 999px;"> <div class="block"> <div id="sidebar-b"> <!-- Sidebar-b content here --> </div> </div> </div> <div class="grid-2 equal" style="height: 999px;"> <div class="block"> <div id="sidebar-b"> <!-- Sidebar-c content here --> </div> </div> </div> </div> I want to add a different background color to each of my sidebars via CSS and when I code like: #mainbody { background : #fff; } #sidebar-a { background : #eee; } #sidebar-b { background : #ddd; } #sidebar-c { background : #ccc; } It is applying the background only to that specific class but that specific class is not of equal height. I actually need to apply to this <div class="grid-2 equal" style="height: 999px;"> div. Now the issue is that in this <div class="grid-6 push-3 equal" style="height: 999px;"> and class="grid-2 equal" style="height: 999px;"> the class names grid-6 and grid-2 are generated dynamically by my PHP of 960 Grid System and also the style="height: 999px; is generated by a jQuery script for Equal-Columns. What I want is to add a unique class name like this...... Look for a div with a class of .equal which has a child div with a class of .block and which further has a child div with an ID of sidebar-a. IF TRUE then add a class of .sidebar-a to the maindiv which has a class of .equal So that the result looks like this: <div class="grid-6 equal push-3 mainbody" style="height: 999px;"> <div class="grid-2 equal sidebar-a" style="height: 999px;"> <div class="grid-2 equal sidebar-b" style="height: 999px;"> <div class="grid-2 equal sidebar-c" style="height: 999px;"> Then I'll be able to style it like this: .mainbody { background : #fff; } .sidebar-a { background : #eee; } .sidebar-b { background : #ddd; } .sidebar-c { background : #ccc; } Hence I thought since I am anyway using jQuery in my Template, why not use it to deal with this issue. Please feel free to suggest a better way if you have something else in mind.

    Read the article

  • How to highlight parent li text only on :hover?

    - by metal-gear-solid
    How to highlight Article only on mouse over? current when i hover on Article it highlights all child item also. Is it possible to highlight Articles only see example here http://jsbin.com/ubunu/2 <style> li:hover {background:red} li li:hover {background:yellow} </style> </head> <body> <p id="hello">Hello World</p> <ul> <li>Weblog</li> <li>Articles <ul> <li>How to Beat the Red Sox</li> <li>Pitching Past the 7th Inning <ul> <li>Part I</li> <li>Part II</li> </ul> </li> <li>Eighty-Five Years Isn't All That Long, Really</li> </ul> </li> <li>About</li> </ul>

    Read the article

  • JUnit : Is there a way to skip a test belonging to a Test class's parent?

    - by Jon
    I have two classes: public abstract class AbstractFoobar { ... } and public class ConcreteFoobar extends AbstractFoobar { ... } I have corresponding test classes for these two classes: public class AbstractFoobarTest { ... } and public class ConcreteFoobarTest extends AbstractFoobarTest { ... } When I run ConcreteFoobarTest (in JUnit), the annotated @Test methods in AbstractFoobarTest get run along with those declared directly on ConcreteFoobarTest because they are inherited. Is there anyway to skip them?

    Read the article

  • CSS: position:absolute inside position:relative, but not affecting parent?

    - by JP
    <style> #special p { display:none; } #special:hover p { display:block; } </style> <table> <tr> <td style="width:200px">Things</td> <td style="position:relative; width:220px"> <div style="position:absolute;right:0" id="special"> <img id="shows" /> <p>Variable width upto, say 600px (Will be hidden until this td is :hovered</p> </div> </td> </tr> </table> Can I make this work? Ie, can I make the #special p expand over the top of 'Things'? As I currently have it set up #special won't ever grow outside the 220px wide td. Any ideas?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >