Daily Archives

Articles indexed Sunday April 18 2010

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

  • SQL Server Blocking Issue

    - by Robin Weston
    We currently have an issue that occurs roughly once a day on SQL 2005 database server, although the time it happens is not consistent. Basically, the database grinds to a halt, and starts refusing connections with the following error message. This includes logging into SSMS: A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) Our CPU usage for SQL is usually around 15%, but when the DB is in it's broken state it's around 70%, so it's clearly doing something, even if no-one can connect. Even if I disable the web app that uses the database the CPU still doesn't go down. I am unable to restart the SQLSERVER process as it is unresponsive, so I have to end up killing the process manually, which then puts the DB into Suspect/Recovery mode (which I can fix but it's a pain). Below are some PerfMon stats I gathered when the DB was in it's broken state which might help. I have a bunch more if people want to request them: Active Transactions: 2 (Never Changes) Logical Connections: 34 (NC) Process Blocked: 16 (NC) User Connections: 30 (NC) Batch Request: 0 (NC) Active Jobs: 2 (NC) Log Truncations: 596 (NC) Log Shrinks: 24 (NC) Longest Running Transaction Time: 99 (NC) I guess they key is finding out what the DB is using it's CPU on, but as I can't even log into SSMS this isn't possible with the standard methods. Disturbingly, I can't even use the dedicated admin connection to get into SSMS. I get the same timout as with all other requests. Any advice, reccomendations, or even sympathy, is much appreciated!

    Read the article

  • how do addressing modes work on a physical level?

    - by altvali
    I'm trying to learn this basic thing about processors that should be taught in every CS department of every university. Yet i can't find it on the net (Google doesn't help) and i can't find it in my class materials either. Do you know any good resource on how addressing modes work on a physical level? I'm particularly interested in Intel processors.

    Read the article

  • Piping input to a Java app with Perl

    - by user319479
    I need to write a Perl script that pipes input into a Java program. This is related to this, but that didn't help me. My issue is that the Java app doesn't get the print statements until I close the handle. What I found online was that $| needs to be set to something greater than 0, in which case newline characters will flush the buffer. This still doesn't work. This is the script: #! /usr/bin/perl -w use strict; use File::Basename; $|=1; open(TP, "| java -jar test.jar") or die "fail"; sleep(2); print TP "this is test 1\n"; print TP "this is test 2\n"; print "tests printed, waiting 5s\n"; sleep(5); print "wait over. closing handle...\n"; close TP; print "closed.\n"; print "sleeping for 5s...\n"; sleep(5); print "script finished!\n"; exit And here is a sample Java app: import java.util.Scanner; public class test{ public static void main( String[] args ){ Scanner sc = new Scanner( System.in ); int crashcount = 0; while( true ){ try{ String input = sc.nextLine(); System.out.println( ":: INPUT: " + input ); if( "bananas".equals(input) ){ break; } } catch( Exception e ){ System.out.println( ":: EXCEPTION: " + e.toString() ); crashcount++; if( crashcount == 5 ){ System.out.println( ":: Looks like stdin is broke" ); break; } } } System.out.println( ":: IT'S OVER!" ); return; } } The Java app should respond to receiving the test prints immediately, but it doesn't until the close statement in the Perl script. What am I doing wrong? Note: the fix can only be in the Perl script. The Java app can't be changed. Also, File::Basename is there because I'm using it in the real script.

    Read the article

  • rails search nested set (categories and sub categories)

    - by bob
    Hello, I am using the http://github.com/collectiveidea/awesome_nested_set awesome nested set plugin and currently, if I choose a sub category as my category_id for an item, I can not search by its parent. Category.parent Category.Child I choose Category.child as the category that my item is in. So now my item has category_id of 4 stored in it. If I go to a page in my rails application, lets say teh Category page and I am on the Category.parent's page, I want to show products that have category_id's of all the descendants as well. So ideally i want to have a find method that can take into account the descendants. You can get the descendants of a root by calling root.descendants (a built in plugin method). How would I go about making it so I can query a find that gets the descendants of a root instead of what its doing now which is binging up nothing unless the product had a specific category_id of the Category.parent. I hope I am being clear here. I either need to figure out a way to create a find method or named_scope that can query and return an array of objects that have id's corresponding tot he descendants of a root OR if I have any other options, what are they? I thought about creating a field in my products table like parent_id which can keep track of the parent so i can then create two named scopes one finding the parent stuff and one finding the child stuff and chaining them. I know I can create a named scope for each child and chain them together for multiple children but this seems a very tedious process and also, if you add more children, you would need to specify more named scopes.

    Read the article

  • Refresh DOM with jquery after AJAX call

    - by Pim
    I'm working on a new project http://www.hotwirerevealed.com which reveals / identifies hotels on hotwire.com. After inputting a state and a destination I have a javascript functions that uses jquery's .post method to post. The post request goes to an php page which outputs html, I se jquery's html method to place the content on the page. like so function post(){ $.post("lookup.php", {action: "find", area: area, stars: stars, amenities: amenities, state: $('#state').val()}, function(data){ $("#details").html(data); }); } I have hyperlinks to hotels which I like to use in a light box <a class="hotel" href="http://google.com/search?btnI=1&amp;q=Amerisuites+Northeast+Orlando+(Airport+MCO)">Amerisuites Northeast</a> im trying to use jquery's fancy box but fancy box $(document).ready(function(){ $(".hotel").fancybox({ 'width' : '75%', 'height' : '75%', 'type' : 'iframe' }); }); but it doesn't seem to work, im guessing because jquery doesn't know the element it there? I've tried to use jquery live() method with little success, any help would be appreciated, thanks ahead of time

    Read the article

  • SQLAuthority News – Free eBook Download – Introducing Microsoft SQL Server 2008 R2

    - by pinaldave
    Microsoft Press has published FREE eBook on the most awaiting release of SQL Server 2008 R2. The book is written by Ross Mistry and Stacia Misner. Ross is my personal friend and one of the most active book writer in SQL Server Domain. When I see his name on any book, I am sure that it will be high quality and easy to read book. The details about the book is here: Introducing Microsoft SQL Server 2008 R2, by Ross Mistry and Stacia Misner The book contains 10 chapters and 216 pages. PART I   Database Administration CHAPTER 1   SQL Server 2008 R2 Editions and Enhancements CHAPTER 2   Multi-Server Administration CHAPTER 3   Data-Tier Applications CHAPTER 4   High Availability and Virtualization Enhancements CHAPTER 5   Consolidation and Monitoring PART II   Business Intelligence Development CHAPTER 6   Scalable Data Warehousing CHAPTER 7   Master Data Services CHAPTER 8   Complex Event Processing with StreamInsight CHAPTER 9   Reporting Services Enhancements CHAPTER 10   Self-Service Analysis with PowerPivot More detail about the book is listed here. You can download the ebook in XPS format here and in PDF format here. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Business Intelligence, Pinal Dave, SQL, SQL Authority, SQL Download, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology

    Read the article

  • Fast Remote PHP Technique To Detect Image 404

    - by Volomike
    What PHP script technique runs the fastest in detecting if a remote image does not exist before I include the image? I mean, I don't want to download all the bytes of the remote image -- just enough to detect if it exists. And while on the subject but with just a slight deviation, I'd like to download just enough bytes to determine a JPEG's width and height information. Speed is very important in my concern here on this system design I'm working on.

    Read the article

  • Where should JavaScript be put?

    - by NessDan
    I've been doing a little JavaScript (well, more like jQuery) for a while now and one thing I've always been confused about is where I should put my scripts, in the <head> tag or in the <body> tag. If anyone could clarify this issue, that'd be great. An example of what should go where would be perfect.

    Read the article

  • Defining InputBindings within a Style

    - by Brent
    I'm creating a WPF app using the MVVM design pattern, and I'm trying to extend the TabItem control so that it closes the tab when the user clicks the middle mouse button. I'm trying to achieve this using InputBindings, and it works very well until I try to define it within a style. I've learned that you cannot add InputBindings to a style unless you attach it using a DependencyProperty. So I followed this similar post here... and it works... almost. I can close one tab using the middle mouse button, but it won't work on any of the other tabs (all of the tabs are added at runtime and inherit the same style). So I need some help. Why would this only be working the first time, and not after? Obviously I could create a custom control that inherits from a TabItem and make it work, but I'd like to figure this out as I can see this being expanded in my projects. I'm no expert on DependencyProperties, so please help me out. Thanks! Style: <Style TargetType="{x:Type TabItem}"> <Setter Property="w:Attach.InputBindings"> <Setter.Value> <InputBindingCollection> <MouseBinding MouseAction="MiddleClick" Command="{Binding CloseCommand}"/> </InputBindingCollection> </Setter.Value> </Setter> ... </Style> Class public class Attach { public static readonly DependencyProperty InputBindingsProperty = DependencyProperty.RegisterAttached("InputBindings", typeof(InputBindingCollection), typeof(Attach), new FrameworkPropertyMetadata(new InputBindingCollection(), (sender, e) => { var element = sender as UIElement; if (element == null) return; element.InputBindings.Clear(); element.InputBindings.AddRange((InputBindingCollection)e.NewValue); })); public static InputBindingCollection GetInputBindings(UIElement element) { return (InputBindingCollection)element.GetValue(InputBindingsProperty); } public static void SetInputBindings(UIElement element, InputBindingCollection inputBindings) { element.SetValue(InputBindingsProperty, inputBindings); } }

    Read the article

  • Is this a cache problem? (JQUERY)

    - by Scarface
    Hey guys quick question. I have this code that brings in data from a php script and it works fine some of the time. However, once in a while the information will not appear at all in opera if I keep refreshing. About Is every 3 refreshes. It seems to be fine in firefox. Is this a cache problem and can it be fixed? Thanks in advance for any assistance. $.getJSON(files+"comments.php?action=view&load=initial&topic_id="+topic_id+"&t=" + (new Date()), function(json) { if(json.length) { for(i=0; i < json.length; i++) { $('#comment-list').prepend(prepare(json[i])); $('#list-' + count).fadeIn(1500); } } });

    Read the article

  • Firefox default download per extension

    - by Michael
    Is there any extension or way to make firefox silently download files to designated locations based on their extensions? I know I can use download managers in order to accomplish this, however, I want to know if there is such way without them, just using firefox+extension.

    Read the article

  • CSS : z-index failed to make popup container ?

    - by justjoe
    i got this css stylesheet code #nav li ul { position: absolute; visibility: hidden; float: none; top: 42px; left: 0px; width: 150px; margin: 0; padding: 5px 10px 6px 10px; z-index: 10000; border: 1px solid #C0ACB2; border-bottom-width: 2px; border-bottom-color: #AF9DA3; border-top: 0; background-color: #fff; opacity: 0.97; } #nav li:hover ul, #nav li.iehover ul { visibility: visible; } i want to make every #nav to be hidden and then displayed when cursor hover around it. But the problem is everytime is show, it's overlapped by other div. it's seem z-index is not working to make the #nav li ul becoming the front container. i'm testing it in firefox and flock.

    Read the article

  • Multiple languages used in one eclipse project

    - by tipu
    I was wondering whether it was possible for projects in Eclipse to have multiple languages associated with them, specifically PHP and Java. The purpose of this is that I'd like a common 'properties' file for the two projects. If instead there's a way to hold a relative reference to a file so that both projects can reference the properties file, that will work too.

    Read the article

  • Using an array as parameter to a class.

    - by Gabriel A. Zorrilla
    I have created an array Man: public main blah blah{ man = man[10]; } Man has fields such as Man.name; Man.age; ... In Man class, there is a OnClick method that opens a new window showing its name and age. public Man(){ Onclick(){ InfoWindow showinfo = new InfoWindow(this.getid()) // If this is Man[2] the id would be 2. } And in InfoWindow class: public class InfoWindow extends JFrame{ public InfoWindow(Man selectedMan){ setSize(300, 200); JLabel info = new JLabel(selectedMan.getname()); add(info); info.setVisible(true); } } Basically, that's wanna acomplish (show in pseudocode), pass a Man[i] into a class that when a window is created, shows the info related to that man. This is how i'm actualy trying to implement it but it's not working, i'm pretty sure there is a misconception from me in some part. Any help?

    Read the article

  • i have two mpmovieplayercontrollers and two separate subviews that they utilze... except that only o

    - by theprojectabot
    I would like to have both movies playing at once in their two separate sub views. They are both accessing different media. this is on an ipad with a superview and two little views 320x240 right by eachother on the xib. -(IBAction)playLeft:(id)sender{ if ([self.playerRight playbackState] == MPMoviePlaybackStatePlaying); [self.playerRight stop]; [self.playerLeft play]; } -(IBAction)playRight:(id)sender{ if ([self.playerLeft playbackState] == MPMoviePlaybackStatePlaying); [self.playerLeft stop]; [self.playerRight play]; } - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor]; self.playerLeft = [[MPMoviePlayerController alloc] init]; self.playerLeft.contentURL = [self movieURL]; NSLog(@"self.playerLeft %@", self.playerLeft); self.playerRight = [[MPMoviePlayerController alloc] init]; self.playerRight.contentURL = [self movieURL2]; NSLog(@"self.playerRight %@", self.playerRight); // START_HIGHLIGHT self.playerLeft.view.frame = self.leftView.bounds; self.playerLeft.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.playerRight.view.frame = self.rightView.bounds; self.playerRight.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.rightView addSubview:playerRight.view]; [self.leftView addSubview:playerLeft.view]; //[self.playerRight play]; //[self.playerLeft play]; //[self clickedOpenMovie:nil]; } -(NSURL *)movieURL { NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"720p5994-prores-hq_iPhone_320x240 two" ofType:@"m4v"]; //NSString *moviePath = [NSString stringWithFormat:@"http://localhost:1935/live/aStream/playlist.m3u8"]; if (moviePath) { return [NSURL fileURLWithPath:moviePath]; //return [NSURL URLWithString:moviePath]; } else { return nil; } } -(NSURL *)movieURL2 { NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"720p5994-prores-hq_iPhone_320x240" ofType:@"m4v"]; if (moviePath) { return [NSURL fileURLWithPath:moviePath]; } else { return nil; } }

    Read the article

  • newbie question -- how does one override show for a newtype?

    - by gatoatigrado
    I want to override the default integer constructors in Haskell so they produce strings (mostly for curiosity, but temporarily to make a nice input alternative for LaTeX's \frac{}{} inconvenience). I wanted to be able to use the language itself, instead of a special parser, but I guess that's probably not going to work out... module Main where import Prelude hiding ((+)) newtype A = A Int deriving (Eq, Show, Num) default (A) (+) :: A -> (A -> String) (A a) + (A b) = (show a) ++ " + " ++ (show b) main2 = 3+4 main :: IO () main = putStrLn main2 The problem with the above is that the + function only works for (A, A) instead of (A, String), etc. If one simply leaves out the pattern match "(A a)" and writes "a" instead, then the show() function prepends "A " so "3" becomes "A 3" instead of just "3". I want to override Show for A, but it seems to be quite a headache...

    Read the article

  • Suppress/Override application.html.erb

    - by user310628
    Is there any way to suppress the default js and css loaded by application.html.erb on a view by view basis? I'm finding it incredibly difficult to manage a global css and js includes configuration when certain views need different js libraries that for some reason seem to be conflicting with one another. For example, I might want jquery 1.3 for one view and 1.4.2 for another. I don't necessarily want to have to have an include for every view (I do want to have a global site-wide default), but I would also like to be able to override those for any view I want. Thanks!

    Read the article

  • Corrupted Views when migrating document libraries from SharePoint 2003 to 2007

    - by Kelly Jones
    A coworker of mine ran into this error recently, while migrating a document library from SharePoint 2003 to 2007: “A WebPartZone can only exist on a page which contains a SPWebPartManager. The SPWebPartManager must be placed before any WebPartZones on the page.” He saw this when he tried to see the All Documents view for the library. After looking into it, we figured out what had happened.  He was migrating documents using the Explorer View in SharePoint.  He had copied the contents of the library from one server (a remote server that we didn’t have administrative access to) to his desktop.  He then opened an Explorer View of the new library and copied the files to it.  Well, it turns out he had copied the hidden “Forms” folder, which contained the files necessary to display the different views for the library. (He had set his explorer to show hidden files, which made them visible.) So, he had copied the 2003 forms to the 2007 library, which are incompatible. We fixed it, by simply deleting the new document library, recreating it, and then copied everything except that hidden Forms folder.  Another option might have been to create a new document library on 2007, and copy the Forms folder from it to the broken library.  Since we didn’t need to save anything in the broken BTW, I confirmed my suspicion with this blog post: http://palmettotq.com/blog/?p=54

    Read the article

  • Random directories in c:\ that I cannot delete

    - by chris
    I just noticed a few directories in C:\ with long, random hex values. Each of these contains an update directory. When I click on the update directory, I get an access denied message, even though my account has admin privileges (XP Home). Two questions: How can I delete these folders, and how is it possible to restrict a folder this way?

    Read the article

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