Search Results

Search found 455 results on 19 pages for 'bryan ward'.

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

  • Worst SysAdmin Accident

    - by Ward
    In line with the question about Best sysadmin accident, what's the worst accident you've been involved in? Unlike the previous question, I mean "worst" in the sense of most system damage or actual harm to people. I'll start with mine: We have two remote wiring closets that are at the end of a 100-foot corridor which has a metal grate for the floor. After we had Cat6 cable installed, the contractors cleaned up all the debris that dropped through the grating to the concrete 3 feet below. A co-worker and I entered the corridor to check on the progress one day but were distracted and didn't notice that a piece of grating had been moved aside. My buddy stepped into air and his chest slammed into the steel crossbar. He was winded and sore enough to take a couple days off, but luckily the steel beam had rounded edges and the size of the opening was such that he didn't smack his head into it or the floor below. Obviously we learned that areas where the floor is partially removed need to be flagged.

    Read the article

  • linux hardware raid 10 / lvm / virtual machine partition alignment and filesystem optimization

    - by Jason Ward
    I've been reading everything I can find about partition alignment and filesystem optimization (ext4 and xfs) but still don't know enough to be confident in setting up my current configuration. My remaining confusion comes from the LVM layer and if I should use raid parameters on the filesystem in guest os'es. My main questions are: When I use 'pvcreate --dataalignment' do I use the stripe-width as calculated for a filesystem on RAID (128kB for ext4 in my situation), the Stripe size of the RAID set (256kB), something else altogether, or do I not need this? When I create ext2/3/4 or xfs filesystems in guests on the Logical Volumes, should I add the settings for the underlying RAID (e.g. mkfs.ext4 -b 4096 -E stride=64,stripe-width=128)? Does anyone see any glaring errors in my set up below? I'm running some benchmarks now but haven't done enough to start comparing results. I have four drives in RAID 10 on a 3ware 9750-4i controller (more details on the settings below) giving me a 6.0TB device at /dev/sda. Here is my partition table: Model: LSI 9750-4i DISK (scsi) Disk /dev/sda: 5722024MiB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 1.00MiB 257MiB 256MiB ext4 BOOTPART boot 2 257MiB 4353MiB 4096MiB linux-swap(v1) 3 4353MiB 266497MiB 262144MiB ext4 4 266497MiB 4460801MiB 4194304MiB Partition 1 is to be the /boot partition for my xen host. Partition 2 is swap. Partition 3 is to be the root (/) for my xen host. Partition 4 is to be (the only) physical volume to be used by LVM (for those who are counting, I left about 1.2TB unallocated for now) For my Xen guests, I usually create a Logical Volume of the needed size and present it to the guests for them to partition as needed. I know there are other ways of handling that but this method works best for my situation. Here's the hardware of interest on my CentOS 6.3 Xen Host: 4x Seagate Barracuda 3TB ST3000DM001 Drives (sector size: 512 logical/4096 physical) 3ware 9750-4i w/BBU (sector size reported: 512 logical/512 physical) All four drives make up a RAID 10 array. Stripe: 256kB Write Cache enabled Read Cache: intelligent StoreSave: Balance Thanks!

    Read the article

  • how to I change the owner of a folder on my server?

    - by Ashley Ward
    OK I'll be more specific - I have uploaded a bunch of folders via ftp. These now all have the the owner name of the account which I logged into FTP using. How do I change the owner to be the server name? and How do I find out what name the server is using? I'm pretty new to server permissions and the like, so please be gentle :) BTW, I'm using a linux server.

    Read the article

  • Hosted application, DNS server setup?

    - by Ward Loockx
    Currently I'm allowing users to have an hosted application. Currently they have to point A-records to our servers (sometimes this is to hard or get's messy). I've seen other players using 2 dns servers, so that the user only needs to change these. I'm willing to implement this, but a lot of questions come up. What should I use for this? Can I use bind? The records need to be generated from a mysql database What type of servers do I need? Is a DNS server taking a lot of load? Currently having around 80K daily visitors. Thanks!

    Read the article

  • Mysql - innoDb - is in the future! Current system log sequence number

    - by Ward Loockx
    I have this error in my syslog. I restored an older dump to solve this problem, after some reading. Now The errors in syslog are far less than before. But still a few times an hour I get Sep 1 14:23:29 homer mysqld: 120901 14:23:29 InnoDB: Error: page 96637 log sequence number 7 1223357717 Sep 1 14:23:29 homer mysqld: InnoDB: is in the future! Current system log sequence number 6 647303887. Sep 1 14:23:29 homer mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 14:23:29 homer mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 14:23:29 homer mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html Sep 1 14:23:29 homer mysqld: InnoDB: for more information. Sep 1 14:23:29 homer mysqld: 120901 14:23:29 InnoDB: Error: page 96638 log sequence number 8 150027924 Sep 1 14:23:29 homer mysqld: InnoDB: is in the future! Current system log sequence number 6 647303887. Sep 1 14:23:29 homer mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 14:23:29 homer mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 14:23:29 homer mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html Sep 1 14:23:29 homer mysqld: InnoDB: for more information. Sep 1 14:23:29 homer mysqld: 120901 14:23:29 InnoDB: Error: page 96639 log sequence number 7 4208567151 Sep 1 14:23:29 homer mysqld: InnoDB: is in the future! Current system log sequence number 6 647303887. Sep 1 14:23:29 homer mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 14:23:29 homer mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 14:23:29 homer mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html Sep 1 14:23:29 homer mysqld: InnoDB: for more information. Anybody that knows how I can track what database is causing this issue? And how to fix?

    Read the article

  • .htaccess to restrict access to only select files

    - by Bryan Ward
    I have a directory in my webserver for which I would like to serve up only pdf files. I found I can restrict access using the .htaccess, and using something like <FilesMatch "\.(text,doc)"> Order allow,deny Deny from all Satisfy All </FilesMatch> to serve up everything except a regular expression. Is it possible to instead restrict access to only files which meet some regular expression?

    Read the article

  • lvm mirroring space unavailable.

    - by Bryan Ward
    I am trying to migrate my data on lvm to two new disks, and setup mirroring between the two. I have successfully migrated all of the data to the first of the two disks, leaving the second one completely available as a mirror. I verified this using pvdisplay -m /dev/sd{g,h}1 --- Physical volume --- PV Name /dev/sdg1 VG Name vg PV Size 931.51 GiB / not usable 3.19 MiB Allocatable yes PE Size 4.00 MiB Total PE 238466 Free PE 82866 Allocated PE 155600 PV UUID v2nc3j-EFBR-QpuG-xgro-Rm59-fmu6-IB3QcR --- Physical Segments --- Physical extent 0 to 49999: Logical volume /dev/vg/videos Logical extents 0 to 49999 Physical extent 50000 to 99999: Logical volume /dev/vg/home Logical extents 0 to 49999 Physical extent 100000 to 129999: Logical volume /dev/vg/music Logical extents 0 to 29999 Physical extent 130000 to 155599: Logical volume /dev/vg/videos Logical extents 50000 to 75599 Physical extent 155600 to 238465: FREE --- Physical volume --- PV Name /dev/sdh1 VG Name vg PV Size 931.51 GiB / not usable 3.19 MiB Allocatable yes PE Size 4.00 MiB Total PE 238466 Free PE 238466 Allocated PE 0 PV UUID LuTrem-WcsZ-qw7l-2CDS-lLKI-wdq0-QEXhLf --- Physical Segments --- Physical extent 0 to 238465: FREE Then when I try to mirror the home logical volume for example, it says that I do not have sufficient space. I used lvconvert -m1 vg/home and the output was: Insufficient suitable allocatable extents for logical volume : 50000 more required Unable to allocate extents for mirror(s). This puzzling to me because it appears as if there is plenty of space on the second disk to mirror. Is there something I have done wrong here? Or is there a way to explicitly tell LVM where to put each leg of the mirror? I'm using lvm2.

    Read the article

  • Upgrade Ubuntu linux-virtual on EC2

    - by James Ward
    I have an Ubuntu 10.10 EBS boot server on EC2. There are new updates available for it: linux-image-virtual linux-virtual Is it even ok to upgrade those packages on an EC2 server? When I do try to upgrade them I get: The following packages have been kept back: linux-image-virtual linux-virtual Should I do a dist-upgrade or something to force it? Will my instance be able to be rebooted?

    Read the article

  • Mysql innoDB corruption after server crash

    - by Ward Loockx
    Yesterday my server died because an outage in the data center. Today it's back up, but having some problems with mysql. First of all my mysql server was not able to start. For this reason I deleted the files ib_logfile0 and ib_logfile1 in /var/lib/mysql folder (I still have the old failing files). After this my server was able to startup again. But now I see a lot of issues in the mysql log file. Sep 1 09:43:55 * mysqld: 120901 9:43:55 InnoDB: Error: page 70944 log sequence number 8 1483471899 Sep 1 09:43:55 * mysqld: InnoDB: is in the future! Current system log sequence number 5 612394935. Sep 1 09:43:55 * mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB Sep 1 09:43:55 * mysqld: InnoDB: tablespace but not the InnoDB log files. See Sep 1 09:43:55 * mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html When I check the docs on mysql.com, I found that I need to recover my database with backups. I have a backup but not sure what's the good way on importing it. Or is there a way to recover without having to re-import the database again? So if I'm correct I need to put innodb_force_recovery to 4 in mysql and delete all current data and re-import? Is there a way to do this without having downtime? I also have one slave running. This slave has the current status now: Last_Error: Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. How can I totally reset the slave after the new import on the master has happend? Hopefully we can find a solution without not to much downtime. Thanks!

    Read the article

  • Limit user to one CPU core in windows 7

    - by Dean Ward
    I let my family members use my pc over rdp to play their flash-based games as their laptops overheat if they use them directly. I have it setup so I can use the pc at the same time as them. The pc has a quad core cpu and I would like to be able to assign one of those cores to the user logged in via RDP so that the other 3 cores are left alone. Is this possible? They login via a specific user account setup for the purpose. Thanks for any advice!

    Read the article

  • Squid - Logging to MySQL without empty rows/skipped records?

    - by Lee Ward
    I'm trying to figure out how to make Squid proxy log to MySQL. I know ACL order is pretty important but I'm not sure if I understand exactly what ACLs are or do, it's difficult to explain, but hopefully you'll see where I'm going with this as you read! I have created the lines to make Squid interact with a helper in squid.conf as follows: external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log The external ACL helper (mysql_lg.php) is a PHP script and is as follows: error_reporting(0); if (! defined(STDIN)) { define("STDIN", fopen("php://stdin", "r")); } $res = mysql_connect('localhost', 'squid', 'testsquidpw'); $dbres = mysql_select_db('squid', $res); while (!feof(STDIN)) { $line = trim(fgets(STDIN)); $fields = explode(' ', $line); $user = rawurldecode($fields[0]); $cli_ip = rawurldecode($fields[1]); $protocol = rawurldecode($fields[2]); $uri = rawurldecode($fields[3]); $q = "INSERT INTO logs (id, user, cli_ip, protocol, url) VALUES ('', '".$user."', '".$cli_ip."', '".$protocol."', '".$uri."');"; mysql_query($q) or die (mysql_error()); if ($fault) { fwrite(STDOUT, "ERR\n"); }; fwrite(STDOUT, "OK\n"); } The configuration I have right now looks like this: ## Authentication Handler auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp auth_param ntlm children 30 auth_param negotiate program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic auth_param negotiate children 5 # Allow squid to update log external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log acl localnet src 172.16.45.0/24 acl AuthorizedUsers proxy_auth REQUIRED acl SSL_ports port 443 acl Safe_ports port 80 # http acl Safe_ports port 21 # ftp acl Safe_ports port 443 # https acl CONNECT method CONNECT acl blockeddomain url_regex "/etc/squid3/bl.acl" http_access deny blockeddomain deny_info ERR_BAD_GENERAL blockeddomain # Deny requests to certain unsafe ports http_access deny !Safe_ports # Deny CONNECT to other than secure SSL ports http_access deny CONNECT !SSL_ports # Allow the internal network access to this proxy http_access allow localnet # Allow authorized users access to this proxy http_access allow AuthorizedUsers # FINAL RULE - Deny all other access to this proxy http_access deny all From testing, the closer to the bottom I place the logging lines the less it logs. Oftentimes, it even places empty rows in to the MySQL table. The file-based logs in /var/log/squid3/access.log are correct but many of the rows in the access logs are missing from the MySQL logs. I can't help but think it's down to the order I'm putting lines in because I want to log everything to MySQL, unauthenticated requests, blocked requests, which category blocked a specific request. The reason I want this in MySQL is because I'm trying to have everything managed via a custom web-based frontend and want to avoid using any shell commands and access to system log files if I can help it. The end result is to make it as easy as possible to maintain without keeping staff waiting on the phone whilst I add a new rule and reload the server! Hopefully someone can help me out here because this is very much a learning experience for me and I'm pretty stumped. Many thanks in advance for any help!

    Read the article

  • Can a USB/IDE/SATA adapter be flaky?

    - by Ward
    I use USB/IDE/SATA converters a lot and on the two that I have now, I sometimes get errors copying files to drives. It only happens when I'm copying big files to the drive (big can mean as little as 100MB, I think it happens more often with bigger files - 300MB or more), and basically the copy will fail and I'll get one or more error messages about "Delayed write failed." But if I disconnect the drive and re-connect it, I'll usually be able to continue. (The file that was being copied will be corrupt, but otherwise the drive is fine.) I just noticed a new type of flakiness: the data transfer rate can vary widely. I copied one set of files (5x300MB files) and it took 10+minutes, then I copied another set (approx. the same sizes) and it took less than a minute. I haven't done systematic testing, the other things I'm doing on my laptop at the same time might have some impact, and I haven't cross-checked the two adapters I have and the 3 hard drives I'm working with to see if there's a pattern. I'm more wondering if anyone else has seen anything like this.

    Read the article

  • Error mounting samba share, cannot mount block device xxxx read-only

    - by Jeff Ward
    After installing Ubuntu 12.04, I'm trying to mount a samba share from Windows under Linux, using a scripted command that's always worked, and the server hasn't changed. The error is as follows: $ mount -t cifs //<host>/<share> /media/<share> -o username=<user>,password=<pass> mount: block device //<host>/<share> is write-protected, mounting read-only mount: cannot mount block device //<host>/<share> read-only $ I've read a lot of discussions about permissions, but unfortunately, that wasn't the issue. I'm submitting my own answer below for reference, hope this helps someone else.

    Read the article

  • How do I transfer videos from DV camera to divx?

    - by Ward
    I have a videocamera that uses mini-dv tapes. In the past, I've transferred the files and made DVDs, but that was time- and disk-space- consuming. I wanted to find new tools and to figure out how to convert the videos to something smaller like divx but I didn't know enough about all the different formats to answer a previous question. Well, now I've done a bunch of research and I understand some of the details of video encoding, and in the process I wrote up some notes on the different formats involved in going from a DV videocam to divx or H.264 They're a bit rambling, but in case it's of any use, I'm going to post them as an answer. I'd be very interested in anyone else's answer as well.

    Read the article

  • Solr performance (tomcat) - High load

    - by Ward Loockx
    I'm relatively new to solr. I have a production site running on a VPS, but now I'm having serious load issues. I don't know where to start in order to get the load down... VPS specs (linode.com 512) 512 MB RAM 4 CPU (1x priority) Looks like my solr server (tomcat) is using a lot of CPU power You can find my solrconfig.xml on http://pastebin.com/qdfi8Med and my schema.xml on http://pastebin.com/rRusDP8b I've tried to increaese the cache size, but this didn't do anything on the load. You can see the stats page below. EDIT - Because the screenshot was unclear, I took smaller screenshots if what (I think) is important. Dismax query handler stats Caches stats Thanks for the help!

    Read the article

  • Podcast Show Notes: The Red Room Interview &ndash; Part 2

    - by Bob Rhubart
    Room bloggers Sean Boiling, Richard Ward, and Mervin Chaing bring their in-the-trenches perspective to the conversation once again in this week’s edition of the OTN ArchBeat Podcast. Listen. (Missed last week? No problemo: Listen to Part 1) In this segment the conversation turns to SOA governance and balancing the need for reuse against the need for speed.  It’s no mystery that many people react to the term “SOA Governance” in much the same way as they would to the sound of Darth Vader’s respirator. But Mervin explains how a simple change in terminology can go a long way toward lowering blood pressure. Those interested in connecting with Sean, Richard, or Mervin can do so via the links listed below: Sean Boiling - Sales Consulting Manager for Oracle Fusion Middleware LinkedIn | Twitter | Blog Richard Ward - SOA Channel Development Manager at Oracle LinkedIn | Blog Mervin Chiang - Consulting Principal at Leonardo Consulting LinkedIn | Twitter | Blog And you’ll find the complete list of the Red Room SOA Best Practice Posts in last week’s show notes. The third and final segment of the Red Room series runs next week.  I have enough material from the original interview for a fourth program,  but it’ll have to wait. Also, as mentioned last week, the podcast name change is now complete, from Arch2Arch, to ArchBeat. As WPBH-TV9 weatherman Phil Connors says, “Anything different is good.”   Technorati Tags: archbeat,podcast. arch2arch,soa,soa governance,oracle,otn Flickr Tags: archbeat,podcast. arch2arch,soa,soa governance,oracle,otn

    Read the article

  • Podcast Show Notes: Red Room Interview &ndash; Part 3: Ninja BPM

    - by Bob Rhubart
    The third and final segment of my conversation with Red Room bloggers Sean Boiling, Richard Ward, and Mervin Chaing is now available. Listen to Part 1 Listen to Part 2 Listen to Part 3 As you’ll hear, this segment gets its title from another example of Mervin’s tactic for tweaking terminology to make it easier to sell stakeholders on certain SOA concepts. These are some very bright, very knowledgeable guys, so I encourage you to connect with them via the links below to pick their brains on any SOA or related issues that might have you reaching for the aspirin bottle. Sean Boiling - Sales Consulting Manager for Oracle Fusion Middleware LinkedIn | Twitter | Blog Richard Ward - SOA Channel Development Manager at Oracle LinkedIn | Blog Mervin Chiang - Consulting Principal at Leonardo Consulting LinkedIn | Twitter | Blog Once again, you’ll find the complete list of Red Room SOA Best Practice Posts in here. Up Next Next week’s program features another panel discussion recorded during a virtual min meet-up. The panel includes Oracle ACE Directors Mike van Alst (IT-Eye) and Jordan Braunstein (TUSC) along with The Definitive Guide to SOA: Oracle Service Bus author Jeff Davies. Stay tuned: RSS   Technorati Tags: oracle technology network,oracle,archbeat,podcast. arch2arch,soa,bpm del.icio.us Tags: oracle technology network,oracle,archbeat,podcast. arch2arch,soa,bpm

    Read the article

  • When mapping the surface of a sphere with tiles, how might you deal with polar distortion?

    - by clweeks
    It's easy to deal with the way locations interact on a clean Cartesian grid. It's just vanilla math. And you can kind of ignore the geometry of the sphere's surface for a bunch of it if you want to just truncate the poles or something. But I keep coming up with ideas for games where the polar space matters. Geo-coded ARGs and global roguelikes and stuff. I want square(ish?) locations -- reasonably representable by square tiles of the same size across the globe, anyway. This has to be a solved problem, right? What are the solutions? ETA: At the equator -- and assuming that your square locations are reasonably small, it's close enough to true that you can get away with having one square in the rows north and south of the most equatorial row. And you could probably get away with that by just hand-waving the difference up to like 45-degrees or so. But eventually, you need to have fewer squares in a pole-ward circumferential row. If I reduce the length of the row by one and offset the squares by 1/2 then they're just like hexes and it's relatively easy to do the coding to keep track of the connections. But as you get pole-ward, it gets more and more extreme. Projecting the surface of the world onto the surface of a cube is tempting. But I figured there must be more elegant solutions already in use. If I did the cube thing (not dissecting it further through geodesy) Are there any pros and cons related to placing the pole at the center of a face or at the vertex of three sides?

    Read the article

  • Formatting Telerik Chart and Legend Labels in Silverlight

    - by Bryan
    I am trying to format a column called 'Month' using the 3-character month abbreviation in my data grid which is bound to a bar chart. My grid and chart are based on this demo example: http://demos.telerik.com/silverlight/#Chart/Aggregates. Basically, the grid compiles data and summarizes by Year, Quarter, Month, and then some other categories as well. For the Month column, I tried two different methods (for sorting purposes, I have to use an integer or some date value for the month). First, I just made Month an integer field and then used a converter mapped in the xaml for the 'Month' field to display 'JAN', 'FEB', etc. This worked fine for the grid, but the chart would display 1, 2, etc. instead of the month abbreviation. I researched this and was not able to come up with a solution to map the converter to the chart. So, I tried making the Month field a datetime and then set the value to 1/1/1900, 2/1/1900, etc. and specified the format of the field to 'MMM' in the xaml for the grid. I then used the following statement to set the the format in the chart when the user grouped by month: SalesAnalysisChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "MMM"; This partially worked in that when the months were displayed across the x-axis they were labeled properly, but not when they appeared in the legend (the user, of course, can group by any of the columns which may or may not include month). I've tried setting LegendItemLabelFormat, ItemLabelFormat, etc. but without success. I'm not sure of the element on which to set the property. I only need to change the default format for just the Month column - all other columns should display normally when grouped. I also came across a class called 'LegendItemFormatConverter' which looks promising but I can't find any examples as to how to implement it. I would actually prefer the converter method because the converter I wrote displays the month abbreviation in all caps, whereas the 'MMM' format displays in upper/lower case. Here is the converter code that I originally used for the grid: using System; using System.Net; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Ink; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Shapes; using System.Windows.Data; namespace ApolloSL { public class MonthConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { DateTime date = new DateTime(1900, (Int32)value, 1); return date.ToString("MMM").ToUpper(); } else { return ""; } } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value.ToString(); } } } Please help... Thanks in advance for your assistance, Bryan

    Read the article

  • Qthread - trouble shutting down threads

    - by Bryan Greenway
    For the last few days, I've been trying out the new preferred approach for using QThreads without subclassing QThread. The trouble I'm having is when I try to shutdown a set of threads that I created. I regularly get a "Destroyed while thread is still running" message (if I'm running in Debug mode, I also get a Segmentation Fault dialog). My code is very simple, and I've tried to follow the examples that I've been able to find on the internet. My basic setup is as follows: I've a simple class that I want to run in a separate thread; in fact, I want to run 5 instances of this class, each in a separate thread. I have a simple dialog with a button to start each thread, and a button to stop each thread (10 buttons). When I click one of the "start" buttons, a new instance of the test class is created, a new QThread is created, a movetothread is called to get the test class object to the thread...also, since I have a couple of other members in the test class that need to move to the thread, I call movetothread a few additional times with these other items. Note that one of these items is a QUdpSocket, and although this may not make sense, I wanted to make sure that sockets could be moved to a separate thread in this fashion...I haven't tested the use of the socket in the thread at this point. Starting of the threads all seem to work fine. When I use the linux top command to see if the threads are created and running, they show up as expected. The problem occurs when I begin stopping the threads. I randomly (or it appears to be random) get the error described above. Class that is to run in separate thread: // Declaration class TestClass : public QObject { Q_OBJECT public: explicit TestClass(QObject *parent = 0); QTimer m_workTimer; QUdpSocket m_socket; Q_SIGNALS: void finished(); public Q_SLOTS: void start(); void stop(); void doWork(); }; // Implementation TestClass::TestClass(QObject *parent) : QObject(parent) { } void TestClass::start() { connect(&m_workTimer, SIGNAL(timeout()),this,SLOT(doWork())); m_workTimer.start(50); } void TestClass::stop() { m_workTimer.stop(); emit finished(); } void TestClass::doWork() { int j; for(int i = 0; i<10000; i++) { j = i; } } Inside my main app, code called to start the first thread (similar code exists for each of the other threads): mp_thread1 = new QThread(); mp_testClass1 = new TestClass(); mp_testClass1->moveToThread(mp_thread1); mp_testClass1->m_socket.moveToThread(mp_thread1); mp_testClass1->m_workTimer.moveToThread(mp_thread1); connect(mp_thread1, SIGNAL(started()), mp_testClass1, SLOT(start())); connect(mp_testClass1, SIGNAL(finished()), mp_thread1, SLOT(quit())); connect(mp_testClass1, SIGNAL(finished()), mp_testClass1, SLOT(deleteLater())); connect(mp_testClass1, SIGNAL(finished()), mp_thread1, SLOT(deleteLater())); connect(this,SIGNAL(stop1()),mp_testClass1,SLOT(stop())); mp_thread1->start(); Also inside my main app, this code is called when a stop button is clicked for a specific thread (in this case thread 1): emit stop1(); Sometimes it appears that threads are stopped and destroyed without issue. Other times, I get the error described above. Any guidance would be greatly appreciated. Thanks, Bryan

    Read the article

  • Deployment Error: Silverlight 4.0 w/WCF RIA Services in ASP.NET MVC 2 App

    - by Dennis Ward
    I've got an MVC 2 App with an RIA Services link to a Silverlight Application. On my local machine, all is well, but when I deploy to Discount ASP servers, neither the MVC controller nor the WCF RIA services called from silverlight function: A silverlight datagrid gets a load error: System.ServiceModel.DomainServices.Client.DomainOperationException: Load operation failed for query... The remote server returned an error NotFound. In the MVC page where I had a simple table that worked prior to adding an EF model and DomainDataSource, I now get the error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. This is very similar to an issue I had before, but after upgrading from the betas of WCF/Silverlight 4, but the fix I had added there doesn't seem to work any longer. The link for that issue is: SL4/MVC2/WCF RIA Services = Load Error I'm really struggling with deploying, and could use some help if anybody can shed any light on this. Thanks! Dennis

    Read the article

  • WCF "DataContext accessed after Dispose"

    - by David Ward
    I have an application with numerous WCF services that make use of LINQ-To-SQL as the data access model. I am having lots of problems with the "DataContext accessed after Dispose" exception. I understand what this exception is and that it is occurring because I have not "initialised" the data that is trying to be accessed. I've read many articles that suggest that I called ToList() on any arrays before the parent object is returned by the service. My issue is that I am getting this exception and I don't know where it is originating from and therefore I don't know what hasn't been initialised. Can anyone advise how best to identify the root cause? (I have used the MS Service Trace Viewer and this doesn't seem to give me any further information)

    Read the article

  • python numpy roll with padding

    - by Marshall Ward
    I'd like to roll a 2D numpy in python, except that I'd like pad the ends with zeros rather than roll the data as if its periodic. Specifically, the following code import numpy as np x = np.array([[1, 2, 3],[4, 5, 6]]) np.roll(x,1,axis=1) returns array([[3, 1, 2],[6, 4, 5]]) but what I would prefer is array([[0, 1, 2], [0, 4, 5]]) I could do this with a few awkward touchups, but I'm hoping that there's a way to do it with fast built-in commands. Thanks

    Read the article

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