Daily Archives

Articles indexed Monday April 9 2012

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

  • Issue with MOUSE_MOVE and MOUSE_OUT applied to stage

    - by poepje
    I'm having an issue with MOUSE_OUT being called while it shouldn't. What I'm doing is quite simple: two images are shown when I move the mouse across the stage, and when the mouse leaves the stage they are hidden. The problem is, that whenever the mouse hits the border of any movieclip on the stage, the MOUSE_OUT function gets called, hiding the two images. This means that whenever I move the mouse My code (only the relevant parts are shown): public class Slider extends MovieClip { var img1:Img1 = new Img1; var img2:Img2 = new Img2; var img1_hover:Img1_hover = new Img1_hover; var img2_hover:Img2_hover = new Img2_hover; public function Slider() { img1.alpha = 0; img2.alpha = 0; stage.addEventListener(MouseEvent.MOUSE_MOVE, showArrows); } function showArrows(e:MouseEvent) { img1.alpha = 1; img2.alpha = 1; stage.addEventListener(MouseEvent.MOUSE_OUT, hideArrows); } function hideArrows(e:MouseEvent) { img1.alpha = 0; img2.alpha = 0; } } Flash throws no errors. I am using a separate .as file (just one) and have no code inside of the action panel in the .fla. Where there's stage.addEventListener, I also tried this., root. and nothing instead of stage.

    Read the article

  • Can I check the validity of a single DataMapper property?

    - by Nathan Long
    In a custom DataMapper setter, I'd like to check whether the value I'm setting is valid or not. For instance: class ToastMitten include DataMapper::Resource property :id, Serial property :wearer, Enum['Chuck Norris', 'Jon Skeet'] property :first_worn_at, DateTime def wearer=(name) super if wearer.valid? # How can I do this? first_worn_at = Time.now end end end t = ToastMitten.new t.wearer = 'Nathan Long' # invalid value; do NOT set first_worn_at t.wearer = 'Jon Skeet' # valid value; set first_worn_at Can I check the validity of a single property like this without calling valid? on the object itself and looking through all the errors?

    Read the article

  • Graceful termination of NSApplication with Core Data and Grand Central Dispatch (GCD)

    - by Vincent Mac
    I have an Cocoa Application (Mac OS X SDK 10.7) that is performing some processes via Grand Central Dispatch (GCD). These processes are manipulating some Core Data NSManagedObjects (non-document-based) in a manner that I believe is thread safe (creating a new managedObjectContext for use in this thread). The problem I have is when the user tries to quit the application while the dispatch queue is still running. The NSApplication delegate is being called before actually quitting. - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender I get an error "Could not merge changes." Which is somewhat expected since there are still operations being performed through the different managedObjectContext. I am then presented with the NSAlert from the template that is generated with a core data application. In the Threading Programming Guide there is a section called "Be Aware of Thread Behaviors at Quit Time" which alludes to using replyToApplicationShouldTerminate: method. I'm having a little trouble implementing this. What I would like is for my application to complete processing the queued items and then terminate without presenting an error message to the user. It would also be helpful to update the view or use a sheet to let the user know that the app is performing some action and will terminate when the action is complete. Where and how would I implement this behavior?

    Read the article

  • Writing PHP extension - Unable to load dynamic library

    - by Luke
    I'm writing a PHP extension similar to V8JS. The goal, like V8JS, is to embed the V8 engine into PHP so I can execute sandboxed JavaScript code in PHP. (The implementation is different.) The extension compiles fine, but when I attempt to run it I get: PHP Warning: PHP Startup: Unable to load dynamic library '/phpdev/lib/php/extensions/debug-zts-20090626/v8php.so' - dlopen(/phpdev/lib/php/extensions/debug-zts-20090626/v8php.so, 9): Symbol not found: __ZN2v88internal8Snapshot13context_size_E Referenced from: /phpdev/lib/php/extensions/debug-zts-20090626/v8php.so Expected in: flat namespace PHP is compiled with the prefix /phpdev (with debug and maintainer flags). v8 is compiled in /v8/ with gyp with the commands make dependencies and make x64 which produced /v8/out/x64.release and /v8/out/x64.debug. I soft-linked the header files from /v8/include to /phpdev/include and libv8_base.a from /v8/out/x64.release/libv8_base.a to /phpdev/lib/libv8.a. This is my config.m4 file: PHP_ARG_ENABLE(v8php, [V8PHP], [--enable-v8php Include V8 JavaScript Engine]) if test $PHP_V8PHP != "no"; then SEARCH_PATH="$prefix /usr/local /usr" SEARCH_FOR="/include/v8.h" if test -r $PHP_V8PHP/$SEARCH_FOR; then V8_DIR=$PHP_V8PHP else AC_MSG_CHECKING([for V8 files in default path]) for i in $SEARCH_PATH ; do if test -r $i/$SEARCH_FOR; then V8_DIR=$i AC_MSG_RESULT(found in $i) fi done fi if test -z "$V8_DIR"; then AC_MSG_RESULT([not found]) AC_MSG_ERROR([Unable to locate V8]) fi PHP_ADD_INCLUDE($V8_DIR/include) PHP_SUBST(V8PHP_SHARED_LIBADD) PHP_ADD_LIBRARY_WITH_PATH(v8, $V8_DIR/$PHP_LIBDIR, V8PHP_SHARED_LIBADD) PHP_REQUIRE_CXX() PHP_NEW_EXTENSION(v8php, v8php.cc v8_class.cc, $ext_shared) fi What am I doing wrong?

    Read the article

  • How to prevent the copying of text from a textarea?

    - by think123
    I have an online typing software, which I'm currently working on. In the typing software, all is running good but I have come across the problem of dishonest users who might possibly type the text into the textarea, copy it, then reload the page (therefore resetting the timer) and pasting it in straightaway. So I was thinking along the lines of using something like evt.preventDefault(); when javascript detects the pressing of the ctrl / cmd button. But then again I realized that the user could go to the menu bar to press copy. So is there a cross-browser method to do both methods of disabling? Thanks, Lucas EDIT: Please forgive me if I wasn't clear. Please comment on where I wasn't, and I will strive to improve the quality of my questions.

    Read the article

  • SQLAlchemy - select for update example

    - by Mark
    I'm looking for a complete example of using select for update in SQLAlchemy, but haven't found one googling. I need to lock a single row and update a column, the following code doesn't work (blocks forever): s = table.select(table.c.user=="test",for_update=True) u = table.update().where(table.c.user=="test") u.execute(email="foo") Do I need a commit? How do I do that? As far as I know you need to: begin transaction select ... for update update commit

    Read the article

  • Difference between SRC and HREF

    - by Vijey
    The SRC and HREF attributes are used to include some external entities like an image, a CSS file, a html file, any other web page or a javascript file. Is there a clear differentiation between SRC and HREF? where/when to use SRC or HREF? I think they can't be used interchangeably. I'm giving below few examples where these attributes are used: To refer a CSS file: href="cssfile.css" inside the link tag To refer a js file: src="myscript.js" inside the script tag To refer an image file: src="mypic.jpg" inside an image tag To refer another webpage: href="http://www.webpage.com" inside an anchor tag

    Read the article

  • Getting <divs>'s to align next to each other

    - by user1322845
    I have the following code I am trying to get working correctly: <div id="newspost_bg"> <article> <p> <header><h3>The fast red fox!</h3></header> This is where the article resides in the article tag. This is good for SEO optimization. <footer>Read More..</footer> </p> </article> </div> <div id="newspost_bg"> hello </div> <div id="newspost_bg"> hello </div> <div id="advertisement"> <script type="text/javascript"><!-- google_ad_client = "ca-pub-2139701283631933"; /* testing site */ google_ad_slot = "4831288817"; google_ad_width = 120; google_ad_height = 600; //--> </script> </div> Here is the css that goes with it: #newspost_bg{ position: relative; background-color: #d9dde1; width:700px; height:250px; margin: 10px; margin-left: 20px; border: solid 10px #1d2631; float:left; } #newspost_bg article{ position: relative; margin-left: 20px; } #advertisement{ float: left; background-color: #d9dde1; width: 125px; height: 605px; margin: 10px; } The problem I'm experiencing is that the advertisements im trying to get setup will align with the last with the id of newspost_bg but im looking to havce it align to the top of the container it is in. I dont know if this is enough info, if not please let me know what you might need. Im new to the web coding scene so any and all critiques help me.

    Read the article

  • Silverlight Tree View with Multiple Levels

    - by psheriff
    There are many examples of the Silverlight Tree View that you will find on the web, however, most of them only show you how to go to two levels. What if you have more than two levels? This is where understanding exactly how the Hierarchical Data Templates works is vital. In this blog post, I am going to break down how these templates work so you can really understand what is going on underneath the hood. To start, let’s look at the typical two-level Silverlight Tree View that has been hard coded with the values shown below: <sdk:TreeView>  <sdk:TreeViewItem Header="Managers">    <TextBlock Text="Michael" />    <TextBlock Text="Paul" />  </sdk:TreeViewItem>  <sdk:TreeViewItem Header="Supervisors">    <TextBlock Text="John" />    <TextBlock Text="Tim" />    <TextBlock Text="David" />  </sdk:TreeViewItem></sdk:TreeView> Figure 1 shows you how this tree view looks when you run the Silverlight application. Figure 1: A hard-coded, two level Tree View. Next, let’s create three classes to mimic the hard-coded Tree View shown above. First, you need an Employee class and an EmployeeType class. The Employee class simply has one property called Name. The constructor is created to accept a “name” argument that you can use to set the Name property when you create an Employee object. public class Employee{  public Employee(string name)  {    Name = name;  }   public string Name { get; set; }} Finally you create an EmployeeType class. This class has one property called EmpType and contains a generic List<> collection of Employee objects. The property that holds the collection is called Employees. public class EmployeeType{  public EmployeeType(string empType)  {    EmpType = empType;    Employees = new List<Employee>();  }   public string EmpType { get; set; }  public List<Employee> Employees { get; set; }} Finally we have a collection class called EmployeeTypes created using the generic List<> class. It is in the constructor for this class where you will build the collection of EmployeeTypes and fill it with Employee objects: public class EmployeeTypes : List<EmployeeType>{  public EmployeeTypes()  {    EmployeeType type;            type = new EmployeeType("Manager");    type.Employees.Add(new Employee("Michael"));    type.Employees.Add(new Employee("Paul"));    this.Add(type);     type = new EmployeeType("Project Managers");    type.Employees.Add(new Employee("Tim"));    type.Employees.Add(new Employee("John"));    type.Employees.Add(new Employee("David"));    this.Add(type);  }} You now have a data hierarchy in memory (Figure 2) which is what the Tree View control expects to receive as its data source. Figure 2: A hierachial data structure of Employee Types containing a collection of Employee objects. To connect up this hierarchy of data to your Tree View you create an instance of the EmployeeTypes class in XAML as shown in line 13 of Figure 3. The key assigned to this object is “empTypes”. This key is used as the source of data to the entire Tree View by setting the ItemsSource property as shown in Figure 3, Callout #1. Figure 3: You need to start from the bottom up when laying out your templates for a Tree View. The ItemsSource property of the Tree View control is used as the data source in the Hierarchical Data Template with the key of employeeTypeTemplate. In this case there is only one Hierarchical Data Template, so any data you wish to display within that template comes from the collection of Employee Types. The TextBlock control in line 20 uses the EmpType property of the EmployeeType class. You specify the name of the Hierarchical Data Template to use in the ItemTemplate property of the Tree View (Callout #2). For the second (and last) level of the Tree View control you use a normal <DataTemplate> with the name of employeeTemplate (line 14). The Hierarchical Data Template in lines 17-21 sets its ItemTemplate property to the key name of employeeTemplate (Line 19 connects to Line 14). The source of the data for the <DataTemplate> needs to be a property of the EmployeeTypes collection used in the Hierarchical Data Template. In this case that is the Employees property. In the Employees property there is a “Name” property of the Employee class that is used to display the employee name in the second level of the Tree View (Line 15). What is important here is that your lowest level in your Tree View is expressed in a <DataTemplate> and should be listed first in your Resources section. The next level up in your Tree View should be a <HierarchicalDataTemplate> which has its ItemTemplate property set to the key name of the <DataTemplate> and the ItemsSource property set to the data you wish to display in the <DataTemplate>. The Tree View control should have its ItemsSource property set to the data you wish to display in the <HierarchicalDataTemplate> and its ItemTemplate property set to the key name of the <HierarchicalDataTemplate> object. It is in this way that you get the Tree View to display all levels of your hierarchical data structure. Three Levels in a Tree View Now let’s expand upon this concept and use three levels in our Tree View (Figure 4). This Tree View shows that you now have EmployeeTypes at the top of the tree, followed by a small set of employees that themselves manage employees. This means that the EmployeeType class has a collection of Employee objects. Each Employee class has a collection of Employee objects as well. Figure 4: When using 3 levels in your TreeView you will have 2 Hierarchical Data Templates and 1 Data Template. The EmployeeType class has not changed at all from our previous example. However, the Employee class now has one additional property as shown below: public class Employee{  public Employee(string name)  {    Name = name;    ManagedEmployees = new List<Employee>();  }   public string Name { get; set; }  public List<Employee> ManagedEmployees { get; set; }} The next thing that changes in our code is the EmployeeTypes class. The constructor now needs additional code to create a list of managed employees. Below is the new code. public class EmployeeTypes : List<EmployeeType>{  public EmployeeTypes()  {    EmployeeType type;    Employee emp;    Employee managed;     type = new EmployeeType("Manager");    emp = new Employee("Michael");    managed = new Employee("John");    emp.ManagedEmployees.Add(managed);    managed = new Employee("Tim");    emp.ManagedEmployees.Add(managed);    type.Employees.Add(emp);     emp = new Employee("Paul");    managed = new Employee("Michael");    emp.ManagedEmployees.Add(managed);    managed = new Employee("Sara");    emp.ManagedEmployees.Add(managed);    type.Employees.Add(emp);    this.Add(type);     type = new EmployeeType("Project Managers");    type.Employees.Add(new Employee("Tim"));    type.Employees.Add(new Employee("John"));    type.Employees.Add(new Employee("David"));    this.Add(type);  }} Now that you have all of the data built in your classes, you are now ready to hook up this three-level structure to your Tree View. Figure 5 shows the complete XAML needed to hook up your three-level Tree View. You can see in the XAML that there are now two Hierarchical Data Templates and one Data Template. Again you list the Data Template first since that is the lowest level in your Tree View. The next Hierarchical Data Template listed is the next level up from the lowest level, and finally you have a Hierarchical Data Template for the first level in your tree. You need to work your way from the bottom up when creating your Tree View hierarchy. XAML is processed from the top down, so if you attempt to reference a XAML key name that is below where you are referencing it from, you will get a runtime error. Figure 5: For three levels in a Tree View you will need two Hierarchical Data Templates and one Data Template. Each Hierarchical Data Template uses the previous template as its ItemTemplate. The ItemsSource of each Hierarchical Data Template is used to feed the data to the previous template. This is probably the most confusing part about working with the Tree View control. You are expecting the content of the current Hierarchical Data Template to use the properties set in the ItemsSource property of that template. But you need to look to the template lower down in the XAML to see the source of the data as shown in Figure 6. Figure 6: The properties you use within the Content of a template come from the ItemsSource of the next template in the resources section. Summary Understanding how to put together your hierarchy in a Tree View is simple once you understand that you need to work from the bottom up. Start with the bottom node in your Tree View and determine what that will look like and where the data will come from. You then build the next Hierarchical Data Template to feed the data to the previous template you created. You keep doing this for each level in your Tree View until you get to the last level. The data for that last Hierarchical Data Template comes from the ItemsSource in the Tree View itself. NOTE: You can download the sample code for this article by visiting my website at http://www.pdsa.com/downloads. Select “Tips & Tricks”, then select “Silverlight TreeView with Multiple Levels” from the drop down list.

    Read the article

  • Implementing Master-Detail functionality with the ASPxGridView control

    - by nikolaosk
    I have been involved with a ASP.Net project recently and I have implemented using the awesome DevExpress ASP.Net controls. In this post I will show you how to implement Master-Detail functionality using the ASPxGridView control. If you want to implement this example you need to download the trial version of these controls unless you are a licensed holder of DevExpress products. We will need a database to work with.I will use the AdventureWorkLT database. If you need the installation scripts for the...(read more)

    Read the article

  • Gallery of Exoplanets

    - by TATWORTH
    Space.com have put together a gallery of exoplanets (planets outside our solar system) at http://www.space.com/13986-gallery-smallest-alien-planets-exoplanets.htmlSome exoplanets have been discovered by monitoring the red/blue shift of the star, whereas others have been found by the transit method. The kepler space telescope is continuously monitoring a small patch of the sky for transits.Here are some of the more interesting (and eye-catching pictures). Remember so far the best image of an extra-solar planets has been a diffraction blur, but even just as artist's impressions based upon the best current evidence, they are very impressive. Have a look at the Gallery at http://www.space.com/13986-gallery-smallest-alien-planets-exoplanets.html, it is very impressive.

    Read the article

  • Enabling Google Webmaster Tools With Your GWB Blog

    - by ToStringTheory
    I’ll be honest and save you some time, if you don’t have your own domain for your GWB blog, this won’t help, you may just want to move on…  I don’t want to waste your time……… Still here?  Good.  How great are Google’s website tools?  I don’t just mean Analytics which rocks, but also their Webmaster Tools (https://www.google.com/webmasters/tools/) which gives you a glimpse into the queries that provide you your website traffic, search engine behavior on your site, and important keywords, just to name a few.   Pictured Above: Cool statistics. Problem Thanks to svickn over at wtfnext.com (another GeeksWithBlogs blog), we already have the knowledge on how to setup Google Analytics (wtfnext.com - How to: Set up Google Analytics on your GeeksWithBlogs blog).  However, one of the questions raised in the post, and even semi-answered in the questions, was how to setup Google Webmaster Tools with your blog as well. At first glance, it seems like it can’t be done.  Google graciously gives you several different options on how to authorize that you own a site.  The authentication options are: 1. (Recommended) – Upload an HTML file to your server 2. Add a meta tag to your site’s home page 3. Use your Google Analytics account 4. Add a DNS record to your domain’s configuration Since you don’t have access to the base path, you can’t do #1.  Same goes for #2 since you can’t edit the master/index page.  As for #3, they REQUIRE the Analytics code to be in the <head> section of your page, so even though we can use the workaround of hosting it in the news section, it won’t allow it since it isn’t in the correct place. Solution Last I checked, I didn’t see the DNS record option for Webmaster Tools.  Maybe this was recently added, or maybe I don’t remember it since I was always able to use some other method to authorize it.  In this case though, this is the option that we need.  My registrar wasn’t in their list, but they provide detailed enough instructions for the ‘Other’ option: Simply create a TXT record with your domain hoster (mine is DynDns), fill in the tag information, and then click verify.  My entry was able to be resolved immediately, but since you are working with DNS, it may take longer.  If after 24 hours you still aren’t able to verify, you can use a site such as mxtoolbox.com, and in the searchbox type “txt: {domain-name-here}”, to see if your TXT record was entered successfully. It is pretty simple to setup the TXT entry in DynDns, but if you have questions/comments, feel free to post them. Conclusion With this simple workaround (not really a workaround, but feature since they offer it..), you are now able to see loads of information regarding your standings in the world of the Google Search Engine.  No critical issues?  Did I do something wrong?! As an aside, you can do the same thing with the Bing Webmaster Tools by adding a CNAME record to bing.verify.com…  Instructions can be found on the ‘Add Site’ popup when adding your site. If you don’t have your own domain, but continued, to read to this point – thank you!

    Read the article

  • Nginx Server with Ruby on Rails application SMTP Authentication Error

    - by Spoons
    I'm developing a Rails app which when I run it locally, it's able to send emails through a gmail account via smtp. When I moved it to my sever (running Nginx), it comes up with the following error for example when I try to create a new user. Net::SMTPAuthenticationError in UsersController#create 535-5.7.1 Username and Password not accepted. The nginx.conf file remains the same from when I set it up.

    Read the article

  • Why don't I have write permission to my vmware virtual network device?

    - by Robert Martin
    I want to allow my VMWare machine to force the virtual network it's on into promiscuous mode so I can play around with honeyd. I received an error message that told me to go to http://vmware.com/info?id=161 to allow this behavior. Based on their advice, I did: $ groupadd promiscuous $ cat /etc/group | grep promiscuous promiscuous:x:1002:robert $ usermod -a -G promiscuous robert $ id robert uid=1000(robert) gid=1000(robert) groups=1000(robert),....,1002(promiscuous) $ chgrp newgroup /dev/vmnet8 $ chmod g+rw /dev/vmnet8 $ ls -l /dev/vmnet8 crw-rw---- 1 root promiscuous 119, 8 2012-03-29 10:29 /dev/vmnet8 Looks like I gave RW permission to the promiscuous group, and added myself. Except that VMWare still gives me an error message that says I cannot enter promiscuous mode. To try out the group thing, I tried: $ echo "1" >/dev/vmnet8 bash: /dev/vmnet8: Permission denied That really surprised me: It makes me think that I still haven't properly given myself the correct permissions... What am I missing?

    Read the article

  • Install-SPSolution : This solution contains no resources scoped for a Web appli cation and cannot be deployed to a particular Web application

    - by Josh
    I have a PowerShell script that deploys about 12 web parts. They have all been created through Visual Studio 2010 and are being deployed to SharePoint 2010. I am getting the following error when running Install-SPSolution for one of my web parts: Install-SPSolution : This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application. Can someone help me debug this? Every other Install-SPSolution command uses -AllWebApplications, and I do not want to specify the web application directly using -URL. Here is the command that is breaking (this is the same command used to successfully deploy all 11 other web parts): Install-SPSolution –Identity PortalSelector.wsp -AllWebApplications -GACDeployment

    Read the article

  • Karmic iptables missing kernel moduyles on OpenVZ container

    - by luison
    After an unsuccessful p2v migration of my Ubuntu server to an OpenVZ container which I am stack with I thought I would give a try to a reinstall based on a clean OpenVZ template for Ubuntu 9.10 (from the OpenVZ wiki) When I try to load my iptables rules on the VM machine I've been getting errors which I believe are related to kernel modules not being loaded on the VM from the /vz/XXX.conf template model. I've been testing with a few post I've found but I was stack with the error: WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. FATAL: Could not load /lib/modules/2.6.24-10-pve/modules.dep: No such file or directory iptables-restore v1.4.4: iptables-restore: unable to initialize table 'raw' Error occurred at line: 2 Try `iptables-restore -h' or 'iptables-restore --help' for more information. I read about the template not loading all iptables modules so I added modules to the XXX.conf of the VZ virtual machine like this: IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ip_conntrack_irc ipt_conntrack ipt_state ipt_helper iptable_nat ip_nat_ftp ip_nat_irc" As the error remained I read that I should build dependencies again on the virtual machine: depmod -a but this returned an error: WARNING: Couldn't open directory /lib/modules/2.6.24-10-pve: No such file or directory FATAL: Could not open /lib/modules/2.6.24-10-pve/modules.dep.temp for writing: No such file or directory So I read again about creating the directory empty and redoing "depmod -a" it. I now don't get the dependancies error but get this and I don't have a clue how to proceed: WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/. FATAL: Module ip_tables not found. iptables-restore v1.4.4: iptables-restore: unable to initialize table 'raw' Error occurred at line: 2 Try `iptables-restore -h' or 'iptables-restore --help' for more information. I understand that iptables rules have to be different on the VM machine and perhaps some of the rules we are trying to apply (from our physical server) are not compatible but these are just source IP and destination port checks that I would like to be able to have available . I've heard that on the CentOS template there are no issues with this, so I understand is to do with VM config. Any help would be greatly appreciated.

    Read the article

  • What's the advantage of using a bash script for cron jobs?

    - by AlxVallejo
    From my understanding you can write your crons by editing crontab -e I've found several sources that instead refer to a bash script in the cron job, rather than writing a job line for line. Is the only benefit that you can consolidate many tasks into one cron job using a bash script? Additional question for a newbie: Editing crontab -e refers to one file correct? I've noticed that if I open crontab -e and close without editing, when I open the file again there is a different numerical extension such as: "/tmp/crontab.XXXXk1DEaM" 0L, 0C I though the crontab is stored in /var/spool/cron or /etc/crontab ?? Why would it store the cron in the tmp folder?

    Read the article

  • Can I use CNAME with ip address? Why If works (sometimes)?

    - by Maciek Sawicki
    I believe that the easiest answer for the first question is "No, You have "A" for this", but I accidentally setup some subdomain using CNAME pointing to ip address and it worked on few computers in my office. I wonder how it was possible? Now, when I'm checking it from home I have following error: beast:~ viroos$ host somesubdomain.somedomain.com Host somesubdomain.somedomain.com not found: 3(NXDOMAIN) I'm 100% it used to work at my office (currently it looks like it doesn't, but I'm checking it on different machine). Therefore I'm not 100% if it worked due to some special network setup or because I tested it just after adding DNS entry. I know this story sounds, a little crazy/incredibly, but can someone help me solve this puzzle. //edit: I'm adding dig output ; <<>> DiG 9.6-ESV-R4-P3 <<>> somesubdomain.somedomain.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 60224 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;somesubdomain.somedomain.com. IN A ;; ANSWER SECTION: somesubdomain.somedomain.com. 67 IN CNAME xxx.xxx.xxx.xx1. ;; AUTHORITY SECTION: . 1800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2012040901 1800 900 604800 86400 ;; Query time: 72 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Tue Apr 10 00:11:01 2012 ;; MSG SIZE rcvd: 136

    Read the article

  • How do you keep up with Nagios/Capistrano configs when using EC2?

    - by imaginative
    I use Amazon EC2 for my mobile app. Depending on load of the application at a given time, I might spawn new instances and then take them down when load is lower to save costs. How does one keep up with Nagios configurations for such a dynamic environment? When one deals with managed hardware, configuration files are predictable. In this case Nagios, Capistrano and a bunch of other configuration files would need to be added. Capistrano needs to know where to deploy a new build to for an app server. Nagios needs to know to remove an existing instance or add a new instance for monitoring. Nagios also needs to know if a node was intentionally taken down or if the host is down due to error. How is this done with the wonderful world of VPS/dynamic instances?

    Read the article

  • How do I read multiple lines from STDIN into a variable?

    - by The Wicked Flea
    I've been googling this question to no avail. I'm automating a build process here at work, and all I'm trying to do is get version numbers and a tiny description of the build which may be multi-line. The system this runs on is OSX 10.6.8. I've seen everything from using CAT to processing each line as necessary. I can't figure out what I should use and why. Attempts read -d '' versionNotes Results in garbled input if the user has to use the backspace key. Also there's no good way to terminate the input as ^D doesn't terminate and ^C just exits the process. read -d 'END' versionNotes Works... but still garbles the input if the backspace key is needed. while read versionNotes do echo " $versionNotes" >> "source/application.yml" done Doesn't properly end the input (because I'm too late to look up matching against an empty string).

    Read the article

  • SNMP keeps crashing

    - by jldugger
    We're using OpsView/Nagios to monitor our servers. We've added the SNMP service to all our servers and deployed the configuration via GPO, but one win2k3 server seems to have a problem; it crashes pretty regularly. The event log carries messages like: Event Type: Error Event Source: Service Control Manager Event Category: None Event ID: 7034 Date: 6/11/2009 Time: 7:11:49 PM User: N/A Computer: HOSTNNAME Description: The SNMP Service service terminated unexpectedly. It has done this 2 time(s). and also Event Type: Error Event Source: Application Error Event Category: (100) Event ID: 1000 Date: 6/11/2009 Time: 7:11:18 PM User: N/A Computer: HOSTNAME Description: Faulting application snmp.exe, version 5.2.3790.3959, faulting module ntdll.dll, version 5.2.3790.3959, fault address 0x000417af. Now, I could probably set it to simply restart on crash in perpetuity, but I think it's better to fix problems like this. Is this a known problem? If not, what should I do to diagnose it?

    Read the article

  • Exim: send every emails with a predefined sender

    - by Gregory MOUSSAT
    We use Exim on our servers to send emails only from local automated users, as root, cron, etc. We have to specify every possible users into /etc/email-addresses. For example: root: [email protected] cron: [email protected] backup: [email protected] This allow us te receive every email generated. The problem is when we add a user for whatever reason (for example when we add a package, some add a user), we can forget to add this user to /etc/email-addresses. Most of the time it's not a problem, but this is not clean. And the overall method is not clean. We'd like to configure Exim to send every emails with the same source address. i.e. every sent email comes from [email protected] One way could be to use a wildcard or a regular expression into /etc/email-addresses but this is not supported. I don't currently understand Exim enought to figure out how to modify this in a way or another. Ideally, Exim should look into /etc/email-addresses first, and if no match it use the predefined address. But this is very secondary. There are two places where this address is used: 1. when Exim send the FROM: command to the smtp server 2. inside the header edit: The rewrite section is the original one from Debian begin rewrite .ifndef NO_EAA_REWRITE_REWRITE *@+local_domains "${lookup{${local_part}}lsearch{/etc/email-addresses} \ {$value}fail}" Ffrs *@ETC_MAILNAME "${lookup{${local_part}}lsearch{/etc/email-addresses} \ {$value}fail}" Ffrs .endif (comments removed)

    Read the article

  • How can I move mysites to a new location

    - by Bob
    I recently restored my content and was instructed to create mysites in a different location than was originally used. Now I have several users mysites in /personal. The new desired location is /mysites. From what I found in the documentation I should back them up and restore them to the new location. Here's what I've done: Backup individual site collection for user mysite stsadm -o backup -url "https://myUrl/personal/john_smith" -filename johnsmith.bkup Restore individual site collection for user mysite stsadm -o restore -url "https://myUrl/mysites/john_smith" -filename johnsmith.bkup -overwrite The result of this and the problem is when i enumerate sites i end up with this: <Site Url="https://myUrl/mysites" Owner="domainname\john.smith" ContentDatabase="WSS_Content_MySites" StorageUsedMB="1.6" StorageWarningMB="90000" StorageMaxMB="100000" /> it leaves off the username part of the url. and if I restore more that one they want to overwrite each other.

    Read the article

  • php-fpm: very high server load

    - by Derp Derpington
    Since today my webserver (nginx + php-fpm + mysql on a VPS) is very slow. htop says: 1 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Tasks: 63 total, 13 running 2 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Load average: 11.67 10.95 6.95 3 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Uptime: 00:18:40 4 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] 5 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] 6 [|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Mem[||||||||||| 137/1280MB] Swp[ 0/0MB] PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 6802 www 20 0 76232 12320 5716 R 27.0 0.9 0:06.48 php-fpm: pool www 7048 www 20 0 75200 12136 5700 R 52.0 0.9 0:03.64 php-fpm: pool www 6699 www 20 0 74176 11124 5700 R 27.0 0.8 0:07.36 php-fpm: pool www 7029 www 20 0 73668 10380 5676 R 42.0 0.8 0:03.52 php-fpm: pool www 6995 www 20 0 76228 12456 5644 R 42.0 1.0 0:03.98 php-fpm: pool www 6858 www 20 0 74172 10684 5620 R 35.0 0.8 0:05.52 php-fpm: pool www 6998 www 20 0 75200 12072 5620 R 37.0 0.9 0:03.95 php-fpm: pool www 7098 www 20 0 75200 12052 5616 R 42.0 0.9 0:02.33 php-fpm: pool www 7093 www 20 0 76228 12496 5612 R 37.0 1.0 0:03.02 php-fpm: pool www 7226 www 20 0 74692 11080 5588 R 32.0 0.8 0:00.66 php-fpm: pool www CPU: (cat /proc/cpuinfo | grep model) model : 44 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz model : 44 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz model : 44 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz model : 44 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz model : 44 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz model : 44 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz I think a load of 10 and 100% cpu usage is not normal... How can i fix that?

    Read the article

  • 1000 HZ linux kernel necessary if I have tickless and high resolution timer?

    - by Bob
    I am trying to improve performance on my server. I have a few processes that need low jitter (less than 10ms variance). I have a load average of 4 maximum on an i7-920 (4 physical cores, 8 with HT). There are about 10 processes ranging from 40% to 90% of a core user mode. System usage is 3% total. Total CPU usage is 80% max. Will setting the kernel from 100hz to 1000hz improve the jitter if tickless and high resolution timers are already set? This page seems to indicate it still does something. https://lkml.org/lkml/2009/4/28/401 How about changing from voluntary (PREEMPT_VOLUNTARY) to preemptible (PREEMPT)?

    Read the article

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