Daily Archives

Articles indexed Tuesday December 18 2012

Page 4/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Usage of CRTP in a call chain

    - by fhw72
    In my widget library I'd like to implement some kind of call chain to initialize a user supplied VIEW class which might(!) be derived from another class which adds some additional functionality like this: #include <iostream> template<typename VIEW> struct App { VIEW view; void init() {view.initialize(); } }; template<typename DERIVED> struct SpecializedView { void initialize() { std::cout << "SpecializedView" << std::endl; static_cast<DERIVED*>(this)->initialize(); } }; struct UserView : SpecializedView<UserView> { void initialize() {std::cout << "UserView" << std::endl; } }; int _tmain(int argc, _TCHAR* argv[]) { // Cannot be altered to: App<SpecializedView<UserView> > app; App<UserView> app; app.init(); return 0; } Is it possible to achieve some kind of call chain (if the user supplied VIEW class is derived from "SpecializedView") such that the output will be: console output: SpecializedView UserView Of course it would be easy to instantiate variable app with the type derived from but this code is hidden in the library and should not be alterable. In other words: The library code should only get the user derived type as parameter.

    Read the article

  • Is it possible to append html code in parts via JQuery?

    - by phpheini
    I am trying to append li elements coming from a php file with JQuery. Problem is that the html code needs to be seperately appended to different html IDs according to the key value. Unfortunately as I understood append() can only append correct html with all elements closed. Otherwise it will automatically close the tags. The following code will NOT work as dval contains code like <div><li class="some">Some value</li> and append() will make <div><li class="some">Some value</li></div> out of it. So I was wondering whether there is another way, maybe a function other than append() to be able to append html parts? $.each(obj, function(key,val) { $.each(obj[key], function(key, dval) { if(key == "text") { $("#" + key).append(dval); } }) });

    Read the article

  • How to continue copying on error with copyDirectory from FileUtils (Apache Commons IO 2.4)

    - by Exocom
    I am trying to copy files from one folder to another using the FileUtils method "static void copyDirectory(File srcDir, File destDir)" from apache commons io (2.4) with the following code: String srcDir = "/sourceDirectory/examples/"; String destDir = "/tmp/examples/"; try{ FileUtils.copyDirectory(new File(srcDir), new File(destDir)); } catch (IOException e){ e.printStackTrace(); } The file structure looks like the following: examples/ (read access) examples/.subdirectory (NO access) examples/file1.txt (read access) examples/file2.txt (read access) examples/subdirectory2/file1.txt (read access) examples/subdirectory2/file2.txt (NO access) The problem is, that in srcDir there are a few files and one subdirectory I don't have access to. FileUtils.copyDirectory throws an "java.io.FileNotFoundException: .subdirectory (Permission denied)" and aborts. Is it possible to ignore those files I don't have permission to and just copy all the other files I can read?

    Read the article

  • Looping the layout that was set up in Interface Builder

    - by Slavenko
    I just need for someone to point me in the right direction of how I should be doing things. I wanted to make an iOS news like app that would have interface resembling Windows Phone. Large and small image tiles that represent one news item each. Now I was thinking to create some basic layout in storyboard, that would consist out of, for example, a title, and a 3 different sized tiles/images (the gray part on the attached image). Now, I would be getting the data as a JSON array that has holds different news categories so I was wondering if somehow the set up layout could be reused in a for loop since the layout will only repeat itself (the red part on the attached image) and oly the data would be different. Can this be done, should I even try doing something like this, or should I try to create an entire layout programmatically? I wouldn't mind doing it programatically, it's just that I don't have much experience in creating layouts that way, and wanted to make sure that I don't do something that I might regret later. Thank you for any help and advice.

    Read the article

  • Data layer refactoring

    - by Joey
    I've taken control of some entity framework code and am looking to refactor it. Before I do, I'd like to check my thoughts are correct and I'm not missing the entity-framework way of doing things. Example 1 - Subquery vs Join Here we have a one-to-many between As and Bs. Apart from the code below being hard to read, is it also inefficient? from a in dataContext.As where ((from b in dataContext.Bs where b.Text.StartsWith(searchText) select b.AId).Distinct()).Contains(a.Id) select a Would it be better, for example, to use the join and do something like this? from a in dataContext.As where a.Bs.Any(b => b.Text.StartsWith(searchText)) select a Example 2 - Explicit Joins vs Navigation Here we have a one-to-many between As and Bs and a one-to-many between Bs and Cs. from a in dataContext.As join b in dataContext.Bs on b.AId equals a.Id join c in dataContext.Cs on c.BId equals b.Id where c.SomeValue equals searchValue select a Is there a good reason to use explicit joins rather than navigating through the data model? For example: from a in dataContext.As where a.Bs.Any(b => b.Cs.Any(c => c.SomeValue == searchValue) select a

    Read the article

  • Validation for Alert dialog

    - by Hossam
    Hi Everyone, Im working in a game and when the player finished the level , Im asking the Player to enter his name on EditText in Alert Dialog : AlertDialog.Builder builder = new Builder(this); LayoutInflater inflater = getLayoutInflater(); // Inflate and set the layout for the dialog // Pass null as the parent view because its going in the dialog layout builder.setView(inflater.inflate(R.layout.dialog_name, null)) // Add action buttons .setPositiveButton(R.string.alertName, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { playerText = (EditText) ((AlertDialog)dialog).findViewById(R.id.username); if(playerText.getText() != null && playerText.getText().length() != 0) Helper.currentPlayer.setName(playerText.getText().toString()); //calculate the score // save in data base PlayerDataSource playerDS = new PlayerDataSource(getApplicationContext()); playerDS.open(); Helper.currentPlayer = playerDS.createPlayer(Helper.currentPlayer.getName(), Helper.currentPlayer.getScore(), Helper.currentPlayer.levels, Helper.currentPlayer.times, LanguageHelper.div); playerDS.close(); saveStmc(); mainScene.setChildScene(choicesMenu, false, true, true); } }) .setTitle("Please Enter Your name") .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); alert = builder.create(); When the Player enters his name and press OK (Positive button) I will check in database if the name exists or not, if the name is exist : show Toast and not dismiss the alert to write another name. How to do that?

    Read the article

  • get iframe property and content

    - by zeroSeven
    is there a way to get the iframe properties and content and be able to display it? example: type it as Rich Text Editor on the iframe and it will be displayed as<b>Rich Text Editor</b> on some part of the page. Rich Text Editor == <b>Rich Text Editor</b> thank you in advance. <html> <head> <title>Rich Text Editor</title> </head> <script type="text/javascript"> function def() { document.getElementById("textEditor").contentWindow.document.designMode="on"; textEditor.document.open(); textEditor.document.write('<head><style type="text/css">body{ font-family:arial; font-size:13px;}</style></head>'); textEditor.document.close(); document.getElementById("fonts").selectedIndex=0; document.getElementById("size").selectedIndex=1; document.getElementById("color").selectedIndex=0; } function fontEdit(x,y) { document.getElementById("textEditor").contentWindow.document.execCommand(x,"",y); textEditor.focus(); } </script> <body onLoad="def()"> <center> <div style="width:500px; text-align:left; margin-bottom:10px "> <input type="button" id="bold" style="height:21px; width:21px; font-weight:bold;" value="B" onClick="fontEdit('bold')" /> <input type="button" id="italic" style="height:21px; width:21px; font-style:italic;" value="I" onClick="fontEdit('italic')" /> <input type="button" id="underline" style="height:21px; width:21px; text-decoration:underline;" value="U" onClick="fontEdit('underline')" /> | <input type="button" style="height:21px; width:21px;"value="L" onClick="fontEdit('justifyleft')" title="align left" /> <input type="button" style="height:21px; width:21px;"value="C" onClick="fontEdit('justifycenter')" title="center" /> <input type="button" style="height:21px; width:21px;"value="R" onClick="fontEdit('justifyright')" title="align right" /> | <select id="fonts" onChange="fontEdit('fontname',this[this.selectedIndex].value)"> <option value="Arial">Arial</option> <option value="Comic Sans MS">Comic Sans MS</option> <option value="Courier New">Courier New</option> <option value="Monotype Corsiva">Monotype</option> <option value="Tahoma">Tahoma</option> <option value="Times">Times</option> </select> <select id="size" onChange="fontEdit('fontsize',this[this.selectedIndex].value)"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> <select id="color" onChange="fontEdit('ForeColor',this[this.selectedIndex].value)"> <option value="black">-</option> <option style="color:red;" value="red">-</option> <option style="color:blue;" value="blue">-</option> <option style="color:green;" value="green">-</option> <option style="color:pink;" value="pink">-</option> </select> | <input type="button" style="height:21px; width:21px;"value="1" onClick="fontEdit('insertorderedlist')" title="Numbered List" /> <input type="button" style="height:21px; width:21px;"value="?" onClick="fontEdit('insertunorderedlist')" title="Bullets List" /> <input type="button" style="height:21px; width:21px;"value="?" onClick="fontEdit('outdent')" title="Outdent" /> <input type="button" style="height:21px; width:21px;"value="?" onClick="fontEdit('indent')" title="Indent" /> </div> <iframe id="textEditor" style="width:500px; height:170px;"> </iframe> </center> </body>

    Read the article

  • Outlook VBA - Find & Replace Incoming Emails

    - by user1912198
    Good morning everyone at Stackoverflow, I am trying to find a VBA script that finds and replaces a certain text in incoming e-mails. So far i've been unable to find such a script that is working. I found several scripts to find and replace stuff in the e-mail but these don't work as a rule on incoming e-mails, they only work on outgoing / creating e-mails. Does anyone have such a script that they can share with me? I would like to find & replace a certain text on every incoming e-mail. I would really apreciate it! Regards, Kris ps: I don't know how to program a whole VBA script, that's why I am asking here :) Current Code: Sub testing(MyMail As MailItem) Dim mail As MailItem Dim Inbox As Outlook.Folder Set Inbox = Session.GetDefaultFolder(olFolderInbox) For Each mail In Inbox.Items 'change subject mail.Subject = "TESTING" 'replace body text If mail.BodyFormat = olFormatHTML Then mail.HTMLBody = Replace(mail.HTMLBody, "Test 123", "TESTING") Else mail.Body = Replace(mail.Body, "Test 123", "TESTING") End If Next mail End Sub

    Read the article

  • j2me: How to use setCommandListener on a TextField?

    - by SmRndGuy
    I wanted to make it so that when I select a specific TextField in a Form, I get a specific list of Commands, for example TextField: OK, CancelTextField2: OK, Back, Help And I succeeded by using addCommand() on each of TextFields but I can't tell it what to happen when when I activate one of these commands since there is no setCommandListener method for them. It throws a NullPointerException when I click it.I also tried to get the commands from their Form but it is receiving only the commands that it contains, not the commands that TextFields have Any help how to get arround this? Thanks in advance

    Read the article

  • How do i find if an object is before or after a waypoint?

    - by BoMann Andersen
    Im working on a racing game for a school project. Using Visual studio 10 pro, and Irrlicht. Sorry for bad grammar ., and its my first question so not sure if its done right. How i want it to work is that i make waypoints at different points on the track, and then i run my waypoint check to see if a car is past its next waypoint (the next it "needs" to go past), if yes then it updates the next waypoint, else nothing. The way i hope this will work is, i make a vector from n to n+1, then find the vector that is perpendicular to the first vector at n. Then i see if the object is in front or behind that vector. I found a Gamedev.net forumpost that helped me make this function: void Engine::checkWaypoint(Vehicle* vehicle) { btVector3 vector = waypoints[vehicle->nextWaypoint]; // n btVector3 nextVector = waypoints[vehicle->nextWaypoint + 1]; // n+1 vector = nextVector - vector; // First vector btVector3 pos = btVector3(vehicle->position.X,vehicle->position.Y,vehicle->position.Z); float product = vector.dot(pos - waypoints[vehicle->nextWaypoint]); // positiv = before, negative = behind if(product < 0) vehicle->nextWaypoint += 1; } Current bugs with this is: Updates the nextwaypoint more then ones without going past a new point. When it gets to the end and resets, it stops triggering on the first waypoints. So my questions: Is this an good way to do this? Did i do it right?

    Read the article

  • WCF Rest Service Date issue

    - by Ranish
    I am working on a WCF Rest service for a iPhone application. I have a WebGet method which returns a “date time”. I am using following code [OperationContract] [WebGet(ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetDate")] DateTime GetDate(); When I tried to call the method using Mozilla rest client I am able to get following result "/Date(1355116291037+0530)/" But the problem is when this method consume from the iPhone side we are getting another date time value( there is around 5:30 hours difference) . Any one have any idea regarding this issue,Please help me Thanks in advance

    Read the article

  • How to reference/link another project in grails workspace without using jar files?

    - by Ivan Alagenchev
    I have a Grails website that references a java core application. I have been successful in adding a .jar dependency to that project; however the java project is in the same workspace as my grails project and I would ultimately like to reference that project directly. I don't want to deal with the added step of creating a new jar file every time that there is a modification to the java project, cleaning and updating my dependencies. I added the java project to my grails' project "Java Build Path" and at first everything seemed to work fine, but when I run grailscompile, the compiler fails to resolve all imports that point to the java project. I am using Spring Source Toolsuite as my IDE.

    Read the article

  • UIImagePickerController Memory Leak

    - by Watson
    I am seeing a huge memory leak when using UIImagePickerController in my iPhone app. I am using standard code from the apple documents to implement the control: UIImagePickerController* imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { switch (buttonIndex) { case 0: imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:imagePickerController animated:YES]; break; case 1: imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:imagePickerController animated:YES]; break; default: break; } } And for the cancel: -(void) imagePickerControllerDidCancel:(UIImagePickerController *)picker { [[picker parentViewController] dismissModalViewControllerAnimated: YES]; [picker release]; } The didFinishPickingMediaWithInfo callback is just as stanard, although I do not even have to pick anything to cause the leak. Here is what I see in instruments when all I do is open the UIImagePickerController, pick photo library, and press cancel, repeatedly. As you can see the memory keeps growing, and eventually this causes my iPhone app to slow down tremendously. As you can see I opened the image picker 24 times, and each time it malloc'd 128kb which was never released. Basically 3mb out of my total 6mb is never released. This memory stays leaked no matter what I do. Even after navigating away from the current controller, is remains the same. I have also implemented the picker control as a singleton with the same results. Here is what I see when I drill down into those two lines: Any help here would be greatly appreciated! Again, I do not even have to choose an image. All I do is present the controller, and press cancel. Update 1 I downloaded and ran apple's example of using the UIIMagePickerController and I see the same leak happening there when running instruments (both in simulator and on the phone). http://developer.apple.com/library/ios/#samplecode/PhotoPicker/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40010196 All you have to do is hit the photo library button and hit cancel over and over, you'll see the memory keep growing. Any ideas? Update 2 I only see this problem when viewing the photo library. I can choose take photo, and open and close that one over and over, without a leak.

    Read the article

  • mongodb segmentation fault(11) macosx

    - by Wish
    I have problem, i cant figure out, how to fix.. So i am on MacOSX machine, running php 5.3.15 version, using mongo 1.3.1 version. When i try to execute php script, in which i try to connect to remote mongodb server, I get segmentation fault(11).. I installed php driver with sudo pecl install mongo I have seen, that this problem is quite popular, but havent found real solution yet.. I dont know if I am asking this question in correct stack site.. If you need anything else, just ask.

    Read the article

  • Alias for Drupal "Sites" folder with Apache on Windows Server 2008

    - by sgtbeano
    I'm having to move a number of sites from a LAMP stack to a WAMP one, provided by Zend, and I've hit a problem. Our architecture is a number of loadbalanced web servers which have their own local webapp drives which are kept in sync with one server performing as the master copy. There is then a separate DFS share provided to all web servers from our pillar san. Usually a Drupal install under our LAMP cluster would have the main Drupal web app in a local HTDOCS mount for each server and the SITES directory within Drupal would then be symlinked out to the DFS or NFS share so that there is a common FILES and TMP directory. The problem I'm having is that there seems to be no equivalent of symlinks on Win Server 2008, shortcuts have a .ink at the end making Apache see them as a distinct file. So I've tried using an alias call in the vhost file like this; <Location /drupal-626/sites> Order deny, allow Allow from all </Location> Alias /drupal-626/sites "Z:\Path to alternate sites directory" The root for this test is; http://main-domain-url/drupal-626/ Unfortunately this isn't work so I'm wondering if any of you have a solution which would work? Many thanks for taking the time to read this.

    Read the article

  • How to rectify FDQN error in mirroring?

    - by krishna chaitanya
    While establishing mirroring without witness at last step i am getting an error: One or more of the server network addresses lacks a fully qualified domain name (FDQN). To start mirroring without using a FQDN, click "yes". To specify the FDQN, click "no". Then specify every TCP address by using the syntax for a fully qualified TCP address, and click Start mirroring again. TCP/IP are in enabled mode in Computer management. How to rectifity this error?

    Read the article

  • NTP configuration in NEXUS Switch

    - by Pandi Durai
    i'm planning to change the NTP peer to 172.29.100.44,but i'm unable to delete the existing and add new peer NTP peer IP in Nexus switch,Please suggest me in removing the existing configuration. i have use the below commands to remove the peer,But still its not getting deleated from running configuration.Even if i add new peer,its not getting reflecting in running configuration. no ntp peer 172.29.100.10 use-vrf management. ntp peer 172.29.100.44 use-vrf management Existing configuration: ntp distribute. ntp peer 172.29.100.10 use-vrf management. ntp source-interface mgmt0. ntp commit. My another nexus is working fine with the below Configuration: ntp peer 172.29.100.10 use-vrf management. ntp peer 172.29.100.44 use-vrf management. ntp source-interface mgmt0.

    Read the article

  • Can't install php5-apc from dotdeb source in Debian 6

    - by YNT
    I can't install php5-apc: ~# apt-get install php5-apc Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php5-apc : Depends: php5-common (= 5.3.19-1~dotdeb.0) but 5.3.8-2 is to be installed E: Broken packages Have fresh Debian 6 and deb http://packages.dotdeb.org squeeze all deb-src http://packages.dotdeb.org squeeze all in source.list. P. S. I'm not very experienced—just trying to set up a server by the tutorial.

    Read the article

  • How to set multiple subdomains in the host file (DNS)?

    - by Milos
    I have a lot of subdomains in the main domain xxx.zzz So, for this domain, I can have aaa.xxx.zzz bbb.xxx.zzz ccc.xxx.zzz ddd.xxx.zzz eee.xxx.zzz ....ETC.... Istead of adding each subdomain in the host file, I would like to add only the main domain xxx.zzz and then to be able to access all the subdomains. I have tryed with *.xxx.zzz but apparently, this will not work (Linux or Windows). Any idea is welcome. Thank you very much.

    Read the article

  • Postfix filter messages and pass to PHP script

    - by John Magnolia
    Each time a user signs up to our website through an external provider we get a basic email with the body contents containing the user details. I want to write a personalised automatic reply to this user. The actual parsing of the email body and reply via PHP I have already wrote but how do I go about configuring this from postfix? At the moment it is configured using a roundcube Sieve plugin where the email gets moved into a folder "Subscribe". Is it possible to create a custom action here? Debain Squeeze, Postfix and Dovecot

    Read the article

  • Error accessing or executing Nagios / Icinga binary '/usr/sbin/nagios'. Cannot run the mandatory syntax check

    - by Zim3r
    I see an error while using NConf interface in Generate Nagios config Error accessing or executing Nagios / Icinga binary '/usr/sbin/nagios'. Cannot run the mandatory syntax check. I checked Apache Error_log and it says: sh: /usr/sbin/nagios: Permission denied I tried changing permissions and ownership but no change. How can I fix this? Edit: ls -l /usr/sbin/nagios -rwxrwxrwx. 1 apache apache 644184 Jul 2 02:10 /usr/sbin/nagios ps -ef | egrep 'httpd|apache' root 4175 1 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4177 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4178 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4179 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4180 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4181 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4182 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4183 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4184 4175 0 10:50 ? 00:00:00 /usr/sbin/httpd apache 4559 4175 0 11:31 ? 00:00:00 /usr/sbin/httpd root 4888 4854 0 12:26 pts/1 00:00:00 egrep httpd|apache

    Read the article

  • Multiple SSL certificates on Apache using multiple public IPs - not working

    - by St. Even
    I need configure multiple SSL certificates on a single Apache server. I already know that I need multiple external IP addresses as I cannot use SNI (only running Apache 2.2.3 on this server). I assumed that I had everything configured correctly, unfortunately things are not working as they should (or maybe I should say, as I expected them to work)... In my httpd.conf I have: NameVirtualHost *:80 NameVirtualHost *:443 Lets say my public IP is 12.0.0.1 and my private IP is 192.168.0.1. When I use the public IP in my vhost my default website is being shown instead the one defined in my vhost, e.g.: <VirtualHost 12.0.0.1:443> ServerAdmin [email protected] ServerName blablabla.site.com DocumentRoot /data/sites/blablabla.site.com ErrorLog /data/sites/blablabla.site.com-error.log #CustomLog /data/sites/blablabla.site.com-access.log common SSLEngine On SSLCertificateFile /etc/httpd/conf/ssl/blablabla.site.com.crt SSLCertificateKeyFile /etc/httpd/conf/ssl/blablabla.site.com.key SSLCertificateChainFile /etc/httpd/conf/ssl/blablabla.site.com.ca-bundle <Location /> SSLRequireSSL On SSLVerifyDepth 1 SSLOptions +StdEnvVars +StrictRequire </Location> </VirtualHost> When I use the private IP in my vhost everything works as it should (the website defined in my vhost is being shown), e.g.: <VirtualHost 192.168.0.1:443> ...same as above... </VirtualHost> My server is listening on all interfaces: [root@grbictwebp02 httpd]# netstat -tulpn | grep :443 tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 5585/httpd What am I doing wrong? If I cannot get this to work I cannot continue to add the second SSL certificate on the other public IP... If more information is required just let me know!

    Read the article

  • How to configure Windows 2008 R2 server for LAN and wireless internet connections

    - by Alchemical
    For special testing purposes, we need a Windows server to allow the following: A team member can log in remotely to the server. When remotely logged in, they can disconnect the wireless connection, perform a few tests, and then reconnect the wireless connection. In general, the LAN connection would just be used for the remote login, the wireless connection would be used for performing tests including using a web browser to test certain web sites, etc. How can we successfully configure the server to support 2 network connections like this? (A regular LAN connection + a wireless connection). And also make sure that the tests we perform using the browser utilize the wireless connection for the outgoing internet activity.

    Read the article

  • Reasons for missing IP info in `last` output on pts logins?

    - by Mike Pennington
    I have five CentOS 6 linux systems at work, and encountered a rather strange issue that only seems to happen with my userid across all the linux systems I have... This is an example of the problem from entries I excepted from the last command... mpenning pts/19 Fri Nov 16 10:32 - 10:35 (00:03) mpenning pts/17 Fri Nov 16 10:21 - 10:42 (00:21) bill pts/15 sol-bill.local Fri Nov 16 10:19 - 10:36 (00:16) mpenning pts/1 192.0.2.91 Fri Nov 16 10:17 - 10:49 (12+00:31) kkim14 pts/14 192.0.2.225 Thu Nov 15 18:02 - 15:17 (4+21:15) gduarte pts/10 192.0.2.135 Thu Nov 15 12:33 - 08:10 (11+19:36) gduarte pts/9 192.0.2.135 Thu Nov 15 12:31 - 08:10 (11+19:38) kkim14 pts/0 :0.0 Thu Nov 15 12:27 - 15:17 (5+02:49) gduarte pts/6 192.0.2.135 Thu Nov 15 11:44 - 08:10 (11+20:25) kkim14 pts/13 192.0.2.225 Thu Nov 15 09:56 - 15:17 (5+05:20) kkim14 pts/12 192.0.2.225 Thu Nov 15 08:28 - 15:17 (5+06:49) kkim14 pts/11 192.0.2.225 Thu Nov 15 08:26 - 15:17 (5+06:50) dspencer pts/8 192.0.2.130 Wed Nov 14 18:24 still logged in mpenning pts/18 alpha-console-1. Mon Nov 12 14:41 - 14:46 (00:04) You can see two of my pts login entries above that do not have a source IP address associated with them. My CentOS machines have as many as six other users that share the systems, but the mpenning userid is the only one that has this issue. Approximately 5% of my logins see this issue, but no other usernames exhibit this behavior. Questions Given the kind of scripts I keep on these systems (which control much of our network infrastructure), I'm a little spooked by this and would like to understand what would cause my logins to occasionally miss source addresses. Is there anything (other than malicious activity) that would reasonably explain the behavior? Other than bash history timestamping, are there other things I can do to track the issue down? Informational Since this started happening, I enabled bash history time-stamping (i.e. HISTTIMEFORMAT="%y-%m-%d %T " in .bash_profile) and also added a few other bash history hacks; however, that does not give clues to what happened during the previous occurrences. All the systems run CentOS 6.3... [mpenning@typo ~]$ uname -a Linux typo.local 2.6.32-279.9.1.el6.x86_64 #1 SMP Tue Sep 25 21:43:11 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux [mpenning@typo ~]$ EDIT If I use last -i mpenning, I see entries like this... mpenning pts/19 0.0.0.0 Fri Nov 16 10:32 - 10:35 (00:03) mpenning pts/17 0.0.0.0 Fri Nov 16 10:21 - 10:42 (00:21)

    Read the article

  • How to route broadcast packets from machine with two network interfaces on same subnet

    - by Syam
    I run RHEL 5 and have two NICs on one machine connected to the same subnet: eth0 192.168.100.10 eth1 192.168.100.11 My application needs to receive and transmit UDP packets (both unicast & broadcast) via these interfaces. I've found the way to handle the ARP problem and I've added routes to handle the routing problem: ip rule add from 192.168.100.10 lookup 10 ip route add table 10 default src 192.168.100.10 dev eth0 (and similarly, table 11 for eth1) The problem is that only unicast packets gets routed properly. Broadcast packets always go out through eth0. I tried removing the rule for 192.168.100.0 & 192.168.100.255 from table 255 and adding them to my tables. But then I see ARP requests being given out for packets to 192.168.100.255 (obviously, no nodes respond and nobody gets any data). Due to several techno-political issues, I'm stuck with this configuration and can't change subnets or try something different. I've tried SO_BINDTODEVICE and it works, but I'd prefer a solution that doesn't need my application to run as root. Is there a way to get this working? Any help is highly appreciated.

    Read the article

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