Search Results

Search found 5175 results on 207 pages for 'simon child'.

Page 7/207 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • NHibernate tutorial #6 - Parent-Child Relationships

    - by BobPalmer
    I've finally had a chance to continue my NHibernate tutorial series after a series of vacations and events.  In this tutorial, I cover one of the most common relationships, that of the parent-child, in NHibernate.  I also go through some optimization refactoring along the way. You can view the entire Google Docs article here: http://docs.google.com/Doc?docid=0AUP-rKyyUMKhZGczejdxeHZfMzBmdjdzZDlkaA&hl=en   As always, feedback is appreciate! -Bob

    Read the article

  • Parent-child hierarchies and unary operators in PowerPivot

    - by Marco Russo (SQLBI)
    Alberto wrote an excellent post describing how to implement the Unary Operator feature (which is present in Analysis Services) in PowerPivot (there was a previous post about parent-child hierarchies, too). I have to say that the solution is not so easy to implement as in Analysis Services, but it just works and, from a practical point of view, it is not so difficult to implement if you understand how it works and accept its limitations (only sum and subtractions are supported). I think that many...(read more)

    Read the article

  • How to use pthread_atfork() and pthread_once() to reinitialize mutexes in child processes

    - by Blair Zajac
    We have a C++ shared library that uses ZeroC's Ice library for RPC and unless we shut down Ice's runtime, we've observed child processes hanging on random mutexes. The Ice runtime starts threads, has many internal mutexes and keeps open file descriptors to servers. Additionally, we have a few of mutexes of our own to protect our internal state. Our shared library is used by hundreds of internal applications so we don't have control over when the process calls fork(), so we need a way to safely shutdown Ice and lock our mutexes while the process forks. Reading the POSIX standard on pthread_atfork() on handling mutexes and internal state: Alternatively, some libraries might have been able to supply just a child routine that reinitializes the mutexes in the library and all associated states to some known value (for example, what it was when the image was originally executed). This approach is not possible, though, because implementations are allowed to fail *_init() and *_destroy() calls for mutexes and locks if the mutex or lock is still locked. In this case, the child routine is not able to reinitialize the mutexes and locks. On Linux, the this test C program returns EPERM from pthread_mutex_unlock() in the child pthread_atfork() handler. Linux requires adding _NP to the PTHREAD_MUTEX_ERRORCHECK macro for it to compile. This program is linked from this good thread. Given that it's technically not safe or legal to unlock or destroy a mutex in the child, I'm thinking it's better to have pointers to mutexes and then have the child make new pthread_mutex_t on the heap and leave the parent's mutexes alone, thereby having a small memory leak. The only issue is how to reinitialize the state of the library and I'm thinking of reseting a pthread_once_t. Maybe because POSIX has an initializer for pthread_once_t that it can be reset to its initial state. #include <pthread.h> #include <stdlib.h> #include <string.h> static pthread_once_t once_control = PTHREAD_ONCE_INIT; static pthread_mutex_t *mutex_ptr = 0; static void setup_new_mutex() { mutex_ptr = malloc(sizeof(*mutex_ptr)); pthread_mutex_init(mutex_ptr, 0); } static void prepare() { pthread_mutex_lock(mutex_ptr); } static void parent() { pthread_mutex_unlock(mutex_ptr); } static void child() { // Reset the once control. pthread_once_t once = PTHREAD_ONCE_INIT; memcpy(&once_control, &once, sizeof(once_control)); setup_new_mutex(); } static void init() { setup_new_mutex(); pthread_atfork(&prepare, &parent, &child); } int my_library_call(int arg) { pthread_once(&once_control, &init); pthread_mutex_lock(mutex_ptr); // Do something here that requires the lock. int result = 2*arg; pthread_mutex_unlock(mutex_ptr); return result; } In the above sample in the child() I only reset the pthread_once_t by making a copy of a fresh pthread_once_t initialized with PTHREAD_ONCE_INIT. A new pthread_mutex_t is only created when the library function is invoked in the child process. This is hacky but maybe the best way of dealing with this skirting the standards. If the pthread_once_t contains a mutex then the system must have a way of initializing it from its PTHREAD_ONCE_INIT state. If it contains a pointer to a mutex allocated on the heap than it'll be forced to allocate a new one and set the address in the pthread_once_t. I'm hoping it doesn't use the address of the pthread_once_t for anything special which would defeat this. Searching comp.programming.threads group for pthread_atfork() shows a lot of good discussion and how little the POSIX standards really provides to solve this problem. There's also the issue that one should only call async-signal-safe functions from pthread_atfork() handlers, and it appears the most important one is the child handler, where only a memcpy() is done. Does this work? Is there a better way of dealing with the requirements of our shared library?

    Read the article

  • Javascript parent and child window functions

    - by Mike Thornley
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Lab 9-3</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function myFunction(){ myWin = open("","","width=200,height=200"); with(myWin.document){ open(); write("<HTML><HEAD><TITLE>Child Window</TITLE>"); write("<SCRIPT>function myTest(){"); write("alert('This function is defined in the child window "); write("and is called from the parent window.'); this.focus();}"); write("</SCRIPT></HEAD><BODY><H3>Child Window</H3><HR>"); write("<FORM><INPUT TYPE='button' VALUE='parent window function' "); // Use opener property write("onClick='opener.winFunction();'>"); write("<P><INPUT TYPE='button' VALUE='close window' "); write("onClick='window.close();'>"); write("</FORM></BODY></HTML>"); close(); } } function winFunction(){ alert("This function is defined in the parent window\n" + "and is called from the child window."); myWin.focus(); } //--> </SCRIPT> </HEAD> <BODY> <H3>CIW Web Languages</H3> <HR> <FORM NAME="myForm"> <INPUT TYPE="button" VALUE="open new window" onClick="myFunction();"> <!-- Invoke child window function --> <input type="button" value="Click to open child window" onclick="javascript:void(myWin.myTest());"/> </FORM> <P> </BODY> </HTML> To explain further what my initial query was, the code above, should open the child window (myWin) with the second button, the 'Open child window' button without the need to open the window with the first button or do anything else. It should simply call the myWin.myTest()function The child window will open when the second button is pressed but needs to have the child window open first (first button push) before it'll work. This is not the intended purpose, the 'Open child window' button should work without anything else needing to be done. For some reason the parent window isn't communicating with the myWin window and myTest fucntion. It's not homework, it's part of a certification course lab and is coded in the manner I have been shown to understand as correct. DTD isn't included as the focus is the JavaScript. I code correctly with regards to that and other W3C requirements.

    Read the article

  • SQL Query to update parent record with child record values

    - by Wells
    I need to create a Trigger that fires when a child record (Codes) is added, updated or deleted. The Trigger stuffs a string of comma separated Code values from all child records (Codes) into a single field in the parent record (Projects) of the added, updated or deleted child record. I am stuck on writing a correct query to retrieve the Code values from just those child records that are the children of a single parent record. -- Create the test tables CREATE TABLE projects ( ProjectId varchar(16) PRIMARY KEY, ProjectName varchar(100), Codestring nvarchar(100) ) GO CREATE TABLE prcodes ( CodeId varchar(16) PRIMARY KEY, Code varchar (4), ProjectId varchar(16) ) GO -- Add sample data to tables: Two projects records, one with 3 child records, the other with 2. INSERT INTO projects (ProjectId, ProjectName) SELECT '101','Smith' UNION ALL SELECT '102','Jones' GO INSERT INTO prcodes (CodeId, Code, ProjectId) SELECT 'A1','Blue', '101' UNION ALL SELECT 'A2','Pink', '101' UNION ALL SELECT 'A3','Gray', '101' UNION ALL SELECT 'A4','Blue', '102' UNION ALL SELECT 'A5','Gray', '102' GO I am stuck on how to create a correct Update query. Can you help fix this query? -- Partially working, but stuffs all values, not just values from chile (prcodes) records of parent (projects) UPDATE proj SET proj.Codestring = (SELECT STUFF((SELECT ',' + prc.Code FROM projects proj INNER JOIN prcodes prc ON proj.ProjectId = prc.ProjectId ORDER BY 1 ASC FOR XML PATH('')),1, 1, '')) The result I get for the Codestring field in Projects is: ProjectId ProjectName Codestring 101 Smith Blue,Blue,Gray,Gray,Pink ... But the result I need for the Codestring field in Projects is: ProjectId ProjectName Codestring 101 Smith Blue,Pink,Gray ... Here is my start on the Trigger. The Update query, above, will be added to this Trigger. Can you help me complete the Trigger creation query? CREATE TRIGGER Update_Codestring ON prcodes AFTER INSERT, UPDATE, DELETE AS WITH CTE AS ( select ProjectId from inserted union select ProjectId from deleted )

    Read the article

  • MDI WinForm application and duplicate child form memory leak

    - by Steve
    This is a WinForm MDI application problem (.net framework 3.0). It will be described in C#. Sorry it is a bit long because I try to make things as clear as possible. I have a MDI application. At some point I find that one MDI child form is never released. There is a menu that creates the MDI child form and show it. When the MDI child form is closed, it is supposed to be destroyed and the memory taken by it should be given back to .net. But to my surprise, this is not true. All the MDI child form instances are kept in memory. This is obviously a "memory leak". Well, it is not a real leak in .net. It is just that I think the closed form should be dead but somehow there is at least one unknown reference from outside world that still connect with the closed form. I read some articles on the Web. Some says that when the MDI child form is closing, I should unwire all the event handlers, otherwise some event handlers may keep my form alive. Some says that DataBindings should be cleaned before the form is closing otherwise the DataBindings will add references to some global Hashtable and thus keep my form alive. My form contains quite a lot things. Many event handlers and many DataBindings and many BindingSources and few suspected controls containing user control and HelpProvider. I create a big method that unwires all the event handlers from all the relevant controls, clear all the DataBindings and DataSources. The HelpProvider and user controls are disposed carefully. At the end, I find that, I don't have to clear DataBindings and DataSources. Event handlers are definitely causing the problem. And MDI form structure also contributes to something. During my experiments, I find that, if you create a MDI child form, even if you close it, there will still be one instance in the memory. The reference is from PropertyStore of the main form. This means, unless the main form is closed (application ends), there will always be one instance of MDI child form in the memory. The good news is that, no matter how many times you open and close the child form, there will be only one instance, not a big "leak". When it comes to event handlers, things become more tricky. I have to address that, all the event handlers on my form are anonymous event handlers. Here is an example code: //On MDI child form's design code... Button btnSave = new Button(); btnSave.Click += new System.EventHandler(btnSave_Click); Where btnSave_Click is also a method in MDI child form. The above is always the case for various controls and various types of event. To me, this is a bi-directional circular reference. btnSave keeps a reference of MDI child form via the event handler. MDI child form keeps a reference of btnSave instance. To me again, such bi-directional circular reference should not cause any problem for .net's garbage collector. This means that I do not have to explicitly unwire the event when the form is being disposed: btnSave.Click -= btnSave_Click; But the truth is not so. For some event handlers, they are safe. Ignoring them do not cause any duplicate instance. For some other event handlers, they will cause one instance remaining in the memory (similar effect as the MDI form structure, but this time caused by the hanging event handlers). For some other event handlers, they will cause every instance opened in the memory. I am totally confused about the differences between these three types of event handlers. The controls are created in the same way and the event is attached in the same way. What is the difference? (Don't tell me it is the event handle methods that make difference.) Anyone has experience of this wired scenario and has an answer for me? Thanks a lot. So now, for safety issue, I will have to unwire all the event handlers when the form is being disposed. That will be a long list of similar code for each control. Is there a general way of removing events from controls in recursive way using reflection? What about performance issue? That's the end of my story and I am still in the middle of my problem. For any help, I thank you.

    Read the article

  • CSS How to apply child:hover but not parent:hover

    - by CNelson
    With the following html, when I hover over child, I get a green background on parent. How can I stop that from happening? I do want the green background if I am hovering outside of the child element. CSS3 is fine. <style> .parent { padding: 100px; width: 400px; height:400px; } .parent:hover { background-color: green; } .child { padding: 100px; width: 200px; height:200px; } .child:hover { background-color: blue; } </style> <div class="parent"> <div class="child">Child</div> </div>

    Read the article

  • Can i override an abstract method written in a parent class, with a different name in a child class?

    - by Ranhiru
    abstract class SettingSaver { public abstract void add(string Name, string Value); public abstract void remove(string SettingName); } class XMLSettings : SettingSaver { public override void add(string Name, string Value) { throw new NotImplementedException(); } public override void remove(string SettingName) { throw new NotImplementedException(); } } Is there anyway that I can change the name of the add function in XMLSettings class to addSetting but make sure it overrides the add function in the SettingSaver? I know it should be definitely overridden in derived classes but just want to know whether I can use a different name :) Thanx in advance :D

    Read the article

  • How to select certain child node in TreeView, C#

    - by Caslav
    I am having a problem with selecting a certain child node. What I want to achieve: I you have this treeview for example (one parent with two child nodes): Parent -Child with a value 5 -Child with a value 2. I want to add these two values and assign them to Parent node: Parent result 7 -Child 5 -Child 2. Of course, a bigger treeview would have several parents and lots of children and they will all add up to one root node. How can I do this?? pls help. thx, Caslav

    Read the article

  • MongoDB - how to join parent and child products by reference

    - by Jaro
    my mongo collection stores products. There are two product types: child and parent. Parent product holds array of its child as reference. Use case: use mydb; child1 = { _id: 1, name: "Child 1", is_child: true, is_parent: false, children : [] } child2 = { _id: 2, name: "Child 2", is_child: true, is_parent: false, children : [] } parent = { _id: 3, name: "Parent product", is_child: false, is_parent: true, children : [1, 2] } db.product.insert( [child1, child2, parent] ); And I'm looking for any query returning { _id: 3, name: "Parent product", is_child: false, is_parent: true, children: [ { _id: 1, name: "Child 1", is_child: true, is_parent: false, children : [] }, { _id: 2, name: "Child 2", is_child: true, is_parent: false, children : [] } ] } I'm newbie to mongodb, but I guess an usage of map-reduce could solve the problem. Can anyone advice? Thx

    Read the article

  • Why can't I override WP's 'excerpt_more' filter via my child theme functions?

    - by Osu
    I can't seem to get my functions to work for changing the excerpt_more filter of the Twenty Eleven parent theme. I suspect it might actually be add_action( 'after_setup_theme', 'twentyeleven_setup' ); that's the problem, but I've even tried remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ) to get rid Twenty Eleven's function and still my functions aren't changing anything... Can you help? Here's the functions.php code in full: http://pastie.org/3758708 Here's the functions I've added to /mychildtheme/functions.php function clientname_continue_reading_link() { return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Read more... <span class="meta-nav">&rarr;</span>', 'clientname' ) . '</a>'; } function clientname_auto_excerpt_more( $more ) { return ' &hellip;' . clientname_continue_reading_link(); } add_filter( 'excerpt_more', 'clientname_auto_excerpt_more' ); Thanks, Osu

    Read the article

  • Fastest way of creating XML from parent-child table in c#?

    - by rudnev
    Assume we have some DataTable or IEnumerable with ChildID, ParentID and Title. We need to serialize it to XML like <Entity title=""> <Entity title=""></Entity> <Entity title=""></Entity> </Entity> As i found out, standard DataTable.GetXML() returns something different. I thought about initializing class tree like Entity e = new Entity(ID, Title, ParentEntityID) and then serializing it. Table is about 3000 elems. Is there faster way?

    Read the article

  • Me As Child Type In General Function

    - by Steven
    I have a MustInherit Parent class with two Child classes which Inherit from the Parent. How can I use (or Cast) Me in a Parent function as the the child type of that instance? EDIT: My actual goal is to be able to serialize (BinaryFormatter.Serialize(Stream, Object)) either of my child classes. However, "repeating the code" in each child "seems" wrong. EDIT2: This is my Serialize function. Where should I implement this function? Copying and pasting to each child doesn't seem right, but casting the parent to a child doesn't seem right either. Public Function Serialize() As Byte() Dim bFmt As New BinaryFormatter() Dim mStr As New MemoryStream() bFmt.Serialize(mStr, Me) Return mStr.ToArray() End Function

    Read the article

  • Cant get the child dir in django hosting (alwaysdata.com) .

    - by zjm1126
    this is my file : mysite templates homepage.html accounts a.html login_view.html i can get the homepage.html and accounts\a.html on 127.0.0.1:8000 but in http://zjm1126.alwaysdata.net , i can only get the homepage.html ,and cant get the account\a.html , this is my code : return render_to_response('accounts/login_view.html') and the accounts/login_view.html is : {% include "accounts\a.html" %} what can i do , thanks ,

    Read the article

  • Why can't I SELECT a parent field that doesn't have a child?

    - by myaccount
    (rest_branches) is the table of restaurants. (phone_numbers) is another table which contains the restaurants phone_numbers, and it has a field called (branch_id) which references the restaurant id. When I try: SELECT * FROM rest_branches NATURAL JOIN phone_numbers I only get the restaurants which have a phone_number. What should I do to get all restaurants even if they don't have a phone number?

    Read the article

  • Calling child constructor by casting (ChildClass)parentObject; to track revisions

    - by FreshCode
    To track revisions of a Page class, I have a PageRevision class which inherits from Page and adds a revision ID (Guid RevisionID;). If possible, how should I cast an existing Page object to a PageRevision and ensure that the PageRevision constructor is called to create a new revision ID? I could could have a PageRevision(Page page) constructor which generates the Guid and copies all the Page attributes, but I want to automate it, especially if a Page class has many attributes (and I later add one, and forget to modify the copy constructor). Desired use Page page = new Page(123, "Page Title", "Page Body"); // where 123 is page ID PageRevision revision = (PageRevision)page; // now revision.RevisionID should be a new Guid. Page, PageRevision classes: public class Page { public int ID { get; set; } public string Title { get; set; } public string Body { get; set; } } public class PageRevision : Page { public Guid RevisionID { get; set; } public PageRevision() { this.RevisionID = Guid.NewGuid(); } }

    Read the article

  • Is there a way to make sure a background process spawned by my program is killed when my process ter

    - by Davy8
    Basically the child process runs indefinitely until killed in the background, and I want to clean it up when my program terminates for any reason, i.e. via the Taskmanager. Currently I have a while (Process.GetProcessesByName("ParentProcess").Count() 0) loop and exit if the parent process isn't running, but it seems pretty brittle, and if I wanted it to work under debugger in Visual Studio I'd have to add "ParentProcess.vshost" or something. Is there any way to make sure that the child process end without requiring the child process to know about the parent process? I'd prefer a solution in managed code, but if there isn't one I can PInvoke. Edit: Passing the PID seems like a more robust solution, but for curiosity's sake, what if the child process was not my code but some exe that I have no control over? Is there a way to safeguard against possibly creating orphaned child processes?

    Read the article

  • FBX SDK Not Converting Child Node Coordinate Systems

    - by Al Bundy
    I am trying to import a scene into my application from an fbx file. In 3DS Max, the scene and it’s local translations are as follows: Root (0, 0, 0) '-Sphere001 (-15, 30, 0) ' '-Sphere002 (-2, -30, 0) ' '-Sphere003 (-30, -20, 0) '-Cube001 (35, -15, 0) This is the code that I am using to get the translations of each node: FbxDouble3 fbxPosition = pChild->LclTranslation.Get(); FbxDouble3 fbxRotation = pChild->LclRotation.Get(); FbxDouble3 fbxScale = pChild->LclScaling.Get(); When I try to import the scene, the first node from the scene is getting converted to a right handed system, using this conversion: (X, Z, -Y), but none of their child nodes are. after importing the scene, the local translations I get are as follows: Root (0, 0, 0) --Sphere001 (-15, 0, -30) - converted ----Sphere002 (-2, -30, 0) - not converted ------Sphere003 (-30, -20, 0) - not converted --Cube001 (35, 0, 15) - converted Can anybody help me make sense of this? Thanks

    Read the article

  • Child object free movement on Parent object

    - by The415
    Just to be straightforward, I am completely new to many aspects of coding and am searching for different specs and guidelines to aid me on my journey to crafting a wonderful game in Epic Games' Unreal Engine 4. Okay, I know upon viewing this, some may have little to no clue what I mean, so I'll put it like this to explain what I mean : Imagine a third person game with a simple model of a character. Now, say I have an object as a torso of a character in a game. Now Say I have an object as a head of the character. How could I keep the head as a child of the torso, but at the same time, allow it to move with the camera angle.

    Read the article

  • dynatree: how can i select child node programmatically

    - by Muhammad Adeel Zahid
    hello everyone i m using jquery's dynaTree in my application and i want to select the all the child nodes programmably when a node is selected. the structure of my tree is as follows <div id = "tree"> <ul> <li>package 1 <ul> <li>module 1.1 <ul> <li> document 1.1.1</li> <li> document 1.1.2</li> </ul> </li> <li>module 1.2 <ul> <li>document 1.2.1</li> <li>document 1.2.2</li> </ul> </li> </ul> </li> <li> package 2 <ul> <li> module 2.1 <ul> <li>document 2.1.1</li> <li>document 2.1.1</li> </ul> </li> </ul> </li> </ul> </div> now what i want is that when i click on tree node with title "package 1" all its child nodes i.e (module 1.1, document 1.1.1, document 1.1.2, module 1.2, document 1.2.1, document 1.2.2) should also be selected below is the approach i tried to use $("#tree").dynatree({ onSelect: function(flag, dtnode) { // This will happen each time a check box is selected/deselected var selectedNodes = dtnode.tree.getSelectedNodes(); var selectedKeys = $.map(selectedNodes, function(node) { //alert(node.data.key); return node.data.key; }); // Set the hidden input field's value to the selected items $('#SelectedItems').val(selectedKeys.join(",")); if (flag) { child = dtnode.childList; alert(child.length); for (i = 0; i < child.length; i++) { var x = child[i].select(true); alert(i); } } }, checkbox: true, onActivate: function(dtnode) { //alert("You activated " + dtnode.data.key); } }); in the if(flag) condition i get all the child nodes of element that is selected by user and it gives me the correct value that i can see from alert(child.length) statement. then i run the loop to select all the children but loop never goes beyond the statement var x = child[i].select(true); and i can never see the statement alert(i) being executed. the result of above statement is that if i select package 1, module 1.1 and document 1.1.1 is also selected but never does it execute alert(i) statement neither other children of package 1 are selected. in my view when first time child[i].select(true) statement is executed it also triggers the on select event of its children thus making a recursion kind of thing is my thinking correct? no matter recursion or what why on earth does it not complete the loop and execute very next instruction alert(i). please help me in solving this problem. i m dying to see that alert any suggestion and help is highly appriciated thanks Adeel

    Read the article

  • How to delete child object in NHibernate?

    - by Mark Struzinski
    I have a parent object which has a one to many relationship with an IList of child objects. What is the best way to delete the child objects? I am not deleting the parent. My parent object contains an IList of child objects. Here is the mapping for the one to many relationship: <bag name="Tiers" cascade="all"> <key column="mismatch_id_no" /> <one-to-many class="TGR_BL.PromoTier,TGR_BL"/> </bag> If I try to remove all objects from the collection using clear(), then call SaveOrUpdate(), I get this exception: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column If I try to delete the child objects individually then remove them from the parent, I get an exception: deleted object would be re-saved by cascade This is my first time dealing with deleting child objects in NHibernate. What am I doing wrong? edit: Just to clarify - I'm NOT trying to delete the parent object, just the child objects. I have the relationship set up as a one to many on the parent. Do I also need to create a many-to-one relationship on the child object mapping?

    Read the article

  • Adding an user to samba

    - by JustMaximumPower
    I'm trying to setup some samba shares in my home network on an Ubuntu 12.04 machine. Everything works fine for my user account (max) but I can not add any new user. Every time I try to add new user they can not use the shares. It's likely that the error is very basic to the concept of samba but please don't just tell me to read the docs. I've been trying that for about 2 weeks now. I've set up the server with my user max who can mount transfer and the share max. Than I added the user simon with sudo adduser --no-create-home --disabled-login --shell /bin/false simon because the user should not be able to ssh into the machine. I did an sudo smbpasswd -a simon and set an (samba) password for simon and added an share for simon. I also added simon to transferusers to give him access to the share transfer. But simon can't connect to transfer or simons. ---- output of testparam: ------- Load smb config files from /etc/samba/smb.conf rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) Processing section "[printers]" Processing section "[print$]" Processing section "[max]" Processing section "[simons]" Processing section "[transfer]" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions [global] server string = %h server (Samba, Ubuntu) map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No usershare allow guests = Yes panic action = /usr/share/samba/panic-action %d idmap config * : backend = tdb [printers] comment = All Printers path = /var/spool/samba create mask = 0700 printable = Yes print ok = Yes browseable = No [print$] comment = Printer Drivers path = /var/lib/samba/printers [max] comment = Privater share von Max path = /media/Main/max read only = No create mask = 0700 [simons] comment = Privater share von Simon path = /media/Main/simon read only = No create mask = 0700 [transfer] comment = Transferlaufwerk path = /media/Main/transfer read only = No create mask = 0755 ---- The files in /media/Main: ------ drwxrwxr-x 17 max max 4096 Oct 4 19:13 max/ drwx------ 5 simon max 4096 Aug 4 15:18 simon/ drwxrwxr-x 7 max transferusers 258048 Oct 1 22:55 transfer/

    Read the article

  • Possible to give one connection to each IP?

    - by Alice
    I am having overloading problems. Too many connections, and some IP has more than 20 connection at once. I do this command. netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n To get total of connection and this is the output: 1 106.3.98.81 1 106.3.98.82 1 108.171.251.2 1 110.85.103.207 1 111.161.30.217 1 113.53.103.55 1 119.235.237.20 1 124.106.19.34 1 157.55.32.166 1 157.55.33.49 1 157.55.34.28 1 175.141.103.239 1 180.76.5.59 1 180.76.5.61 1 188.235.165.216 1 205.213.195.70 1 216.157.222.25 1 218.93.205.100 1 222.77.209.105 1 27.153.148.109 1 27.159.194.242 1 27.159.253.71 1 54.242.122.201 1 61.172.50.99 1 65.55.24.239 1 71.179.78.5 1 74.125.136.27 1 74.125.182.30 1 74.125.182.36 1 79.112.225.39 1 93.190.139.208 2 124.227.191.67 2 157.55.33.84 2 157.55.35.34 2 190.66.3.107 2 203.87.153.38 2 220.161.119.3 2 221.6.15.156 2 27.153.148.116 2 27.159.197.0 2 96.47.224.42 3 202.14.70.1 3 218.6.15.42 3 222.77.218.226 3 222.77.224.187 3 37.59.66.100 3 46.4.181.244 3 87.98.254.192 3 91.207.8.62 4 188.143.233.222 4 218.108.168.166 4 221.12.154.18 4 93.182.157.8 4 94.142.128.183 5 180.246.170.187 5 8.21.6.226 6 178.137.94.87 6 218.93.205.112 7 199.15.234.222 9 9 125.253.97.6 10 178.137.17.196 11 46.118.192.179 12 212.79.14.14 21 72.201.187.135 27 0.0.0.0 Can anyone give me some directions, my server crashed few times this week because of this. Thanks. EDIT: Alright, my error logs says: [Thu Oct 18 12:17:39 2012] [error] could not make child process 4842 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4843 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4855 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4856 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4861 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4869 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4872 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4873 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4874 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4875 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4876 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4880 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4882 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4885 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4897 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4900 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4901 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4906 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4907 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4925 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4926 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4927 exit, attempting to continue anyway [Thu Oct 18 12:17:39 2012] [error] could not make child process 4931 exit, attempting to continue anyway [Thu Oct 18 12:17:40 2012] [notice] caught SIGTERM, shutting down PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/curl.iso' - /usr/lib/php5/20060613+lfs/curl.iso: cannot open shared object file: No such file or directory in Unknown on line 0 [Thu Oct 18 12:17:45 2012] [notice] Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny10 with Suhosin-Patch configured -- resuming normal operations And I have over thousands of line saying:(each has different process id) [Thu Oct 18 12:17:38 2012] [error] child process 4906 still did not exit, sending a SIGKILL And I also have line saying: [Wed Oct 17 09:44:58 2012] [error] server reached MaxClients setting, consider raising the MaxClients setting <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 50 MaxClients 300 MaxRequestsPerChild 5000 </IfModule>

    Read the article

  • Me As Child Type

    - by Steven
    I have a MustInherit Parent class with two Child classes which Inherit from the Parent. How can I use (or Cast) Me in a Parent function as the the child type of that instance? EDIT: My actual goal is to be able to serialize (BinaryFormatter.Serialize(Stream, Object)) either of my child classes. However, "repeating the code" in each child "seems" wrong.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >