Search Results

Search found 11640 results on 466 pages for 'figure'.

Page 19/466 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • multiple form submission with one submit

    - by skylab
    I've been trying to think this through and figure out if it is possible or not. I'm using zen-cart as shopping cart software, but what I'd like to do, is hard code a page that is basically a list of 7-9 products, next to each product is a checkbox, so I'd like to figure out a way, via html,javascript or jquery to submit whichever forms(products) are checked to the cart. The typical form submission for a product looks something like this(sometimes there may be one or two additional hidden fields): <form name="cart_quantity" action="index.php?action=add_product" method="post" enctype="multipart/form-data"> <input type="hidden" name="cart_quantity" value="1"> <input type="hidden" name="products_id" value="7"> <input type="hidden" name="id[6]" value="9" id="attrib-6-9"> <input type="image" src="buy_button.png" alt="Add to Cart" title="Instructional Video Part 1: Add to Cart"> </form> There would be 7-9 of these on the page, each with a checkbox, so I'm assuming a script would need to figure out which ones where checked and submit them via the form action? Maybe there is a better way of going about this that I'm not thinking of because a)it's over my head or b)just haven't figured it out yet. Anyway is something like this possible?

    Read the article

  • Can I set NHibernate's default "OrderBy" to be "CreatedDate" not "Id"?

    - by Chris F
    This is an oddball question I figure. Can I get NHibernate to ask SQL to sort data by CreatedDate by default unless I set an OrderBy in my HQL or Criteria? I'm interested in knowing whether this sort can be accomplished at the DB level to avoid bringing in LINQ. The reason is that I use GUIDs for Ids and when I do something like this: Sheet sheet = sheetRepository.Get(_someGUID); IList<SheetLineItems> lineItems = sheet.LineItems; to fetch all of the lineItems, they come back in whatever arbitrary way that SQL sorts that fetch, which I figure is GUID. At some point I'll add ordinals to my line items, but for now, I just want to use CreatedDate as the sort criteria. I don't want to be forced to do: IList<SheetLineItem> lineItems = sheetLineItemRepository.GetAll(_sheetGUID); and then writing that method to sort by CreatedDate. I figure if everything is just sorted on CreatedDate by default, that would be fine, unless specifically requested otherwise.

    Read the article

  • How to select "child" entities in subview?

    - by Andy
    I am trying to manage a drill-down list of data. I've got an entity, Contact, that has a to-many relationship with another entity, Rule. In my root view controller, I use a fetched results controller to manage and display the list of Contacts. When a Contact is tapped, I push a new view controller onto the stack with a list of the Contact's Rules. I have not been able to figure out how to use a second fetched results controller to display the Rules, so I'm using the following: // create a set of the contact's rules rules = [NSMutableSet set]; rules = [self.contact mutableSetValueForKey:@"rule"]; // create an array of rules from the set arrayOfRules = [NSMutableArray arrayWithCapacity:[rules count]]; for (id oneObject in rules) [arrayOfRules addObject:oneObject]; // sort the array of rules NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"phoneLabel" ascending:YES]; [arrayOfRules sortUsingDescriptors:[NSArray arrayWithObject:descriptor]]; [descriptor release]; I create a set of Rules, then use that to create an array of Rules for sorting. I then use these two collections to populate the grouped table view. All of this appears to be working correctly. Here's my problem: There are several different actions a user can take in this view, and most of them require that I know which Rule was tapped. But I can't figure out how to get that. For instance, say a user wants to delete a Rule. It seems to me the proper approach is something like... [rules removeObject:ruleObjectToBeRemoved] ...but I can't figure out how to specifiy ruleObjectToBeRemoved. I hope all of this makes sense. As usual, thanks in advance for any advice you can offer.

    Read the article

  • Merging rows with uniqueness constraints

    - by Flambino
    I've got a little time-tracking web app (implemented in Rails 3.2.8 & MySQL). The app has several users who add their time to specific tasks, on a given date. The system is set up so a user can only have 1 time entry (i.e. row) per task per date. I.e. if you add time twice on the same task and date, it'll add time to the existing row, rather than create a new one. Now I'm looking to merge 2 tasks. In the simplest terms, merging task ID 2 into task ID 1 would take this time | user_id | task_id | date ------+----------+----------+----------- 10 | 1 | 1 | 2012-10-29 15 | 2 | 1 | 2012-10-29 10 | 1 | 2 | 2012-10-29 5 | 3 | 2 | 2012-10-29 and change it into this time | user_id | task_id | date ------+----------+----------+----------- 20 | 1 | 1 | 2012-10-29 <-- time values merged (summed) 15 | 2 | 1 | 2012-10-29 <-- no change 5 | 3 | 1 | 2012-10-29 <-- task_id changed (no merging necessary) I.e. merge by summing the time values, where the given user_id/date/task combo would conflict. I figure I can use a unique constraint to do a ON DUPLICATE KEY UPDATE ... if I do an insert for every task_id=2 entry. But that seems pretty inelegant. I've also tried to figure a way to first update all the rows in task 1 with the summed-up times, but I can't quite figure that one out. Any ideas?

    Read the article

  • Can someone help me with this Java Chess game please?

    - by Chris Edwards
    Hey guys, Please can someone have a look at this code and let me know whether I am on the right track with the "check_somefigure_move"s and the "check_black/white_promotion"s please? And also any other help you can give would be greatly appreciated! Thanks! P.S. I know the code is not the best implementation, but its a template I have to follow :( Code: class Moves { private final Board B; private boolean regular; public Moves(final Board b) { B = b; regular = regular_position(); } public boolean get_regular_position() { return regular; } public void set_regular_position(final boolean new_reg) { regular = new_reg; } // checking whether B represents a "normal" position or not; // if not, then only simple checks regarding move-correctness should // be performed, only checking the direct characteristics of the figure // moved; // checks whether there is exactly one king of each colour, there are // no more figures than promotions allow, and there are no pawns on the // first or last rank; public boolean regular_position() { int[] counts = new int[256]; for (char file = 'a'; file <= 'h'; ++file) for (char rank = '1'; rank <= '8'; ++rank) ++counts[(int) B.get(file,rank)]; if (counts[Board.white_king] != 1 || counts[Board.black_king] != 1) return false; if (counts[Board.white_pawn] > 8 || counts[Board.black_pawn] > 8) return false; int count_w_promotions = 0; count_w_promotions += Math.max(counts[Board.white_queen]-1,0); count_w_promotions += Math.max(counts[Board.white_rook]-2,0); count_w_promotions += Math.max(counts[Board.white_bishop]-2,0); count_w_promotions += Math.max(counts[Board.white_knight]-2,0); if (count_w_promotions > 8 - counts[Board.white_pawn]) return false; int count_b_promotions = 0; count_b_promotions += Math.max(counts[Board.black_queen]-1,0); count_b_promotions += Math.max(counts[Board.black_rook]-2,0); count_b_promotions += Math.max(counts[Board.black_bishop]-2,0); count_b_promotions += Math.max(counts[Board.black_knight]-2,0); if (count_b_promotions > 8 - counts[Board.black_pawn]) return false; for (char file = 'a'; file <= 'h'; ++file) { final char fig1 = B.get(file,'1'); if (fig1 == Board.white_pawn || fig1 == Board.black_pawn) return false; final char fig8 = B.get(file,'8'); if (fig8 == Board.white_pawn || fig8 == Board.black_pawn) return false; } return true; } public boolean check_normal_white_move(final char file0, final char rank0, final char file1, final char rank1) { if (! Board.is_valid_white_figure(B.get(file0,rank0))) return false; if (! B.is_empty(file1,rank1) && ! Board.is_valid_black_figure(B.get(file1,rank1))) return false; if (B.get_active_colour() != 'w') return false; if (! check_move_simple(file0,rank0,file1,rank1)) return false; if (! regular) return true; final Board test_board = new Board(B); test_board.normal_white_move_0(file0,rank0,file1,rank1); final Moves test_move = new Moves(test_board); final char[] king_pos = test_move.white_king_position(); assert(king_pos.length == 2); return test_move.black_not_attacking(king_pos[0],king_pos[1]); } public boolean check_normal_black_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED THE CHECK NORMAL BLACK MOVE BASED ON THE CHECK NORMAL WHITE MOVE if (! Board.is_valid_black_figure(B.get(file0,rank0))) return false; if (! B.is_empty(file1,rank1) && ! Board.is_valid_white_figure(B.get(file1,rank1))) return false; if (B.get_active_colour() != 'b') return false; if (! check_move_simple(file0,rank0,file1,rank1)) return false; if (! regular) return true; final Board test_board = new Board(B); test_board.normal_black_move_0(file0,rank0,file1,rank1); final Moves test_move = new Moves(test_board); final char[] king_pos = test_move.black_king_position(); assert(king_pos.length == 2); return test_move.white_not_attacking(king_pos[0],king_pos[1]); } // for checking a normal move by just applying the move-rules private boolean check_move_simple(final char file0, final char rank0, final char file1, final char rank1) { final char fig = B.get(file0,rank0); if (fig == Board.white_king || fig == Board.black_king) return check_king_move(file0,rank0,file1,rank1); if (fig == Board.white_queen || fig == Board.black_queen) return check_queen_move(file0,rank0,file1,rank1); if (fig == Board.white_rook || fig == Board.black_rook) return check_rook_move(file0,rank0,file1,rank1); if (fig == Board.white_bishop || fig == Board.black_bishop) return check_bishop_move(file0,rank0,file1,rank1); if (fig == Board.white_knight || fig == Board.black_knight) return check_knight_move(file0,rank0,file1,rank1); if (fig == Board.white_pawn) return check_white_pawn_move(file0,rank0,file1,rank1); else return check_black_pawn_move(file0,rank0,file1,rank1); } private boolean check_king_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED KING MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; return fileChange <= 1 && fileChange >= -1 && rankChange <= 1 && rankChange >= -1; } private boolean check_queen_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED QUEEN MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; return fileChange <=8 && fileChange >= -8 && rankChange <= 8 && rankChange >= -8; } private boolean check_rook_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED ROOK MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; return fileChange <=8 || fileChange >= -8 || rankChange <= 8 || rankChange >= -8; } private boolean check_bishop_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED BISHOP MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; return fileChange <= 8 && rankChange <= 8 || fileChange <= 8 && rankChange >= -8 || fileChange >= -8 && rankChange >= -8 || fileChange >= -8 && rankChange <= 8; } private boolean check_knight_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED KNIGHT MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; /* IS THIS THE CORRECT WAY? * return fileChange <= 1 && rankChange <= 2 || fileChange <= 1 && rankChange >= -2 || fileChange <= 2 && rankChange <= 1 || fileChange <= 2 && rankChange >= -1 || fileChange >= -1 && rankChange <= 2 || fileChange >= -1 && rankChange >= -2 || fileChange >= -2 && rankChange <= 1 || fileChange >= -2 && rankChange >= -1;*/ // OR IS THIS? return fileChange <= 1 || fileChange >= -1 || fileChange <= 2 || fileChange >= -2 && rankChange <= 1 || rankChange >= - 1 || rankChange <= 2 || rankChange >= -2; } private boolean check_white_pawn_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED PAWN MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; return fileChange == 0 && rankChange <= 1; } private boolean check_black_pawn_move(final char file0, final char rank0, final char file1, final char rank1) { // ADDED PAWN MOVE int fileChange = file0 - file1; int rankChange = rank0 - rank1; return fileChange == 0 && rankChange >= -1; } public boolean check_white_kingside_castling() { // only demonstration code: final char c = B.get_white_castling(); if (c == '-' || c == 'q') return false; if (B.get_active_colour() == 'b') return false; if (B.get('e','1') != 'K') return false; if (! black_not_attacking('e','1')) return false; if (! free_white('f','1')) return false; // XXX return true; } public boolean check_white_queenside_castling() { // only demonstration code: final char c = B.get_white_castling(); if (c == '-' || c == 'k') return false; if (B.get_active_colour() == 'b') return false; // ADDED BASED ON KINGSIDE CASTLING if (B.get('e','1') != 'Q') return false; if (! black_not_attacking('e','1')) return false; if (! free_white('f','1')) return false; // XXX return true; } public boolean check_black_kingside_castling() { // only demonstration code: final char c = B.get_black_castling(); if (c == '-' || c == 'q') return false; if (B.get_active_colour() == 'w') return false; // ADDED BASED ON CHECK WHITE if (B.get('e','8') != 'K') return false; if (! black_not_attacking('e','8')) return false; if (! free_white('f','8')) return false; // XXX return true; } public boolean check_black_queenside_castling() { // only demonstration code: final char c = B.get_black_castling(); if (c == '-' || c == 'k') return false; if (B.get_active_colour() == 'w') return false; // ADDED BASED ON KINGSIDE CASTLING if (B.get('e','8') != 'Q') return false; if (! black_not_attacking('e','8')) return false; if (! free_white('f','8')) return false; // XXX return true; } public boolean check_white_promotion(final char pawn_file, final char figure) { // XXX // ADDED CHECKING FOR CORRECT FIGURE AND POSITION - ALTHOUGH IT SEEMS AS THOUGH // PAWN_FILE SHOULD BE PAWN_RANK, AS IT IS THE REACHING OF THE END RANK THAT // CAUSES PROMOTION OF A PAWN, NOT FILE if (figure == P && pawn_file == 8) { return true; } else return false; } public boolean check_black_promotion(final char pawn_file, final char figure) { // XXX // ADDED CHECKING FOR CORRECT FIGURE AND POSITION if (figure == p && pawn_file == 1) { return true; } else return false; } // checks whether black doesn't attack the field: public boolean black_not_attacking(final char file, final char rank) { // XXX return true; } public boolean free_white(final char file, final char rank) { // XXX return black_not_attacking(file,rank) && B.is_empty(file,rank); } // checks whether white doesn't attack the field: public boolean white_not_attacking(final char file, final char rank) { // XXX return true; } public boolean free_black(final char file, final char rank) { // XXX return white_not_attacking(file,rank) && B.is_empty(file,rank); } public char[] white_king_position() { for (char file = 'a'; file <= 'h'; ++file) for (char rank = '1'; rank <= '8'; ++rank) if (B.get(file,rank) == Board.white_king) { char[] result = new char[2]; result[0] = file; result[1] = rank; return result; } return new char[0]; } public char[] black_king_position() { for (char file = 'a'; file <= 'h'; ++file) for (char rank = '1'; rank <= '8'; ++rank) if (B.get(file,rank) == Board.black_king) { char[] result = new char[2]; result[0] = file; result[1] = rank; return result; } return new char[0]; } public static void main(final String[] args) { // checking regular_position { Moves m = new Moves(new Board()); assert(m.regular_position()); m = new Moves(new Board("8/8/8/8/8/8/8/8 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("KK6/8/8/8/8/8/8/8 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("kk6/8/8/8/8/8/8/8 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/8/8/8/8/8/8/8 w - - 0 1")); assert(m.regular_position()); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/8 w - - 0 1")); assert(m.regular_position()); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/n7 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/N7 w - - 0 1")); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/b7 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/B7 w - - 0 1")); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/r7 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/R7 w - - 0 1")); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/q7 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/qqqqqqqq/QQQQQQQQ/Q7/q7/rrbbnn2/RRBBNN2/Q7 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kkp5/8/8/8/8/8/8/8 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("KkP5/8/8/8/8/8/8/8 w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/8/8/8/8/8/8/7p w - - 0 1")); assert(!m.regular_position()); m = new Moves(new Board("Kk6/8/8/8/8/8/8/7P w - - 0 1")); assert(!m.regular_position()); } // checking check_white/black_king/queenside_castling { Moves m = new Moves(new Board("4k2r/8/8/8/8/8/8/4K2R w Kk - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("4k2r/8/8/8/8/8/8/4K2R b Kk - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("4k2r/4pppp/8/8/8/8/4PPPP/4K2R w KQkq - 0 1")); assert(m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("4k2r/4pppp/8/8/8/8/4PPPP/4K2R b KQkq - 0 1")); assert(!m.check_white_kingside_castling()); assert(m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("r3k3/8/8/8/8/8/8/R3K3 w Qq - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("r3k3/8/8/8/8/8/8/R3K3 b Qq - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("r3k3/p7/8/8/8/8/8/R3K3 w Qq - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("r3k3/p7/8/8/8/8/8/R3K3 b Qq - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(m.check_black_queenside_castling()); m = new Moves(new Board("r3k3/p7/8/8/8/n7/8/R3K3 w Qq - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); m = new Moves(new Board("r3k3/p7/B7/8/8/8/8/R3K3 b Qq - 0 1")); assert(!m.check_white_kingside_castling()); assert(!m.check_black_kingside_castling()); assert(!m.check_white_queenside_castling()); assert(!m.check_black_queenside_castling()); // XXX } } }

    Read the article

  • Cisco ASA log error "regular translation creation failed for icmp ..."

    - by Martijn Heemels
    Every few seconds our new Cisco ASA 5505 firewall is logging errors that I can't figure out with my limited Cisco experience. Severity Date Time Syslog ID Source IP Destination IP Description 3 Mar 25 2010 17:21:14 305006 8.8.8.8 regular translation creation failed for icmp src inside:10.10.0.200 dst outside:8.8.8.8 (type 3, code 3) 3 Mar 25 2010 17:18:37 305006 8.8.4.4 regular translation creation failed for icmp src inside:10.10.0.200 dst outside:8.8.4.4 (type 3, code 3) The logged inside IP is our internal DNS resolver, and the outside IP's are Google's public DNS servers. ICMP Type 3 Code 3 means "Port Unreachable" Our "outside" interface has a fixed IP and our "inside" interface is in the 10.10.0.0/16 subnet. The 'Inspect DNS' Service Policy is enabled, with the preset DNS inspection map. Furthermore there's an ACL that allows all inbound ICMP on the "outside" interface. I've spent hours trying to figure this one out, so any and all advice is welcome!

    Read the article

  • How to configure Apache so all requests go to single CGI file

    - by fastmonkeywheels
    I'm porting a CGI application from an embedded web server to run under Apache. In the effort of changing the least amount required I'm trying to figure out how to configure Apache so any requests coming in go to my CGI program, which then will use the QueryString environmental variable to determine which file needs to be created. I have Apache working now to where it will process my CGI file if it's requested directly i.e. localhost/cgi-bin/cgi_test.out but I need to figure out how to get my application to be called whenever any file is requested: localhost/ - call my application with QueryString set to "" or "/" localhost/thisFile - call my application with QueryString set to "/thisFile" etc. I have been doing all of my configuration testing under /etc/apache2/sites-available/mysite, which has been enabled and the default disabled. Thanks for any help. I've tried the recommendation from here: http://serverfault.com/questions/56082/configure-apache-to-handle-all-requests-via-single-index-php but I keep getting circular redirects.

    Read the article

  • Mac OS X: How do I disable SSID Broadcasting with Internet Sharing over Airport?

    - by Jack Chu
    I'm currently using Internet Sharing from my Ethernet over Airport on my Macbook Pro, however I don't want my SSID broadcasted†. There doesn't seem to be an option in Sharing/System Preferences to hide my ssid or prevent broadcasting. Any ideas? † My parent's restaurant has a wifi router, but it's on the roof level where the cable was installed. The signal it gets is weak, but works for the macbook. Their iPhones and 802.11G based computers can't get the wifi connection, maybe 802.11N on the macbook gets better penetration. I figure they could use the airport sharing from the laptop. For a restaurant type setting I don't think having WPA or WPA2 is super important. There's nothing sensitive or insecure on the network, so I figure hiding the SSID would be good enough for their purposes. It's not even active 100% of the time.

    Read the article

  • Diagnose Issues with USB External Hard Drive

    - by Chris Lieb
    I have a 1TB SATA hard drive in a third-party USB enclosure hooked up to my computer via USB. The drive has become increasingly unreliable, randomly unmounting and remounting in Windows, making strange noises on occasion, and every once in a while making lots of noise and then unmounting, only fixable by powering down the enclosure, waiting a while, then powering it back up again. I am unsure if the hard drive or the enclosure is to blame. The random unmount/remount could be the enclosure, but the strange sounds are likely related to the hard drive. Given this uncertainty, I want to figure out which of the two items needs to be replaced. However, I do not know of a way to test each item separately since I do not have an extra SATA-to-USB enclosure to test the hard drive with or an extra SATA hard drive to test the enclosure with. Does anyone know how to figure out what's to blame so that I don't have to replace both unless it is absolutely necessary.

    Read the article

  • Setting Timeouts: SQL Server 2008/IIS 7.5

    - by Julie
    We have recently migrated from a Win 2003/SQL Server 2000 system to Win 2008 64 bit R2, SQL Server 2008 R2. Our websites are in classic asp, and this can't be changed to another scripting language at this time. On the old server, if I got stuck in some kind of endless loop, the page would throw an error. On the new server, I have a page that has some sort of looping problem, that even though the SQL SP is called only once (and runs fine run as a query on the server) it pegs SQL server and therefore locks all of our websites. I'll get my code figured out, no biggie. But I need to make sure the server times out when this happens. (The page I'm working on runs fine with certain instances of the query, and locks with others using a different query variable. I can't have something like that sneak up on me on a page I haven't touched for three years.) I can't figure out how an SP that runs once on the server, from an ASP page, is tying up SQL server this way. It's obviously some sort of a timeout issue, but I can't figure out where/which timeout values to change. I actually have to remote desktop to the server and kill the process in SQL server. I'm afraid I'm a generalist, and server management is not my thing, even though it's my responsibility, so I am almost certain to have questions about any answer that I receive. How can I track this down? What settings do I need to change? More info: It's not SQL Server On our test site, I created an ASP file that just did an endless loop (do while 1=1) and had the same problem - the other websites wouldn't load - without SQL server being involved. So I think the reason the process was hanging is that the page wasn't timing out as it should, and so the connection to SQL was never closed. Killing the process in SQL server would reset the page somehow. For my intentional endless loop, I had to refresh the app pool to get rid of it. This points more to either IIS or the ASP settings. The ASP timeouts are set to whatever the default were when the server was first loaded. I still can't figure out why one file is locking up all websites, though. Again, that didn't happen on the old server.

    Read the article

  • Editing tags in bunch of MP3 files?

    - by overtherainbow
    I have a bunch of files whose filename looks like "<Track> - <Title> - <Artist>.mp3". I'd like to rewrite their MP3 Title tag to be "<Track> - <Title>.mp3" so that each song is displayed correctly on my elcheapo MP3 player. Since I rarely edit MP3 files anyway, MP3 Tag Tools 1.2 Build 008 from 2003 was good enough, but I can't figure out how to do this with this application. I just tried MP3Tag 2.46, but couldn't figure out if it can do this (created a new Action, to no avail). I also tried TagScanner 5.1.558, without success. Does someone know of a good, free Windows application that can do this? Thank you.

    Read the article

  • uWSGI and Nginx python file handling

    - by user133507
    I've been trying to figure out how to propertly utilize uWSGI with Nginx and have hit a bit of a design roadblock. I'm trying to figure out how my python files should be accessed via uWSGI. I've been able to find 3 different ways to do so: Create a uWSGI process for each python file and then create locations in nginx that pass to each uWSGI process. Create one instance of uWSGI and create a master python file that handles all the different requests. Create one instance of uWSGI and setup dynamic applications I'm coming from LightTPD where I simply setup rewrites to point at the different python files. I feel like 3 is the closest to that but uWSGI says that it is not the recommended way of going about it.

    Read the article

  • HOSTS ignored when disconnected [closed]

    - by Synetech
    Problem I’m seeing a strange and extremely frustrating problem. Any system that is not connect to the Internet (Windows 7 shows the no Internet access icon because it cannot constantly ping Microsoft’s servers) cannot even access locally hosted servers. Hypothesis The problem appears to be that the HOSTS file is not being used to resolve DNS entries when there are no active NICs. Tests / Reproduction You can reproduce it as so: Disconnect a system from the Internet (make sure all wired and wireless connections are disconnected). If necessary, add an entry to the HOSTS file (e.g., 127.0.0.1 foobar or 127.0.0.1 foobar.com) Open a command-prompt Type ping foobar or ping foobar.com Observations The screenshots below show a clear and demonstrative example. In the first snap, a laptop is connected to a router wirelessly. The HOSTS file has only three entries and they resolve just fine. In the second snap, the wireless radio is turned off, so the entries in the HOSTS file are ignored. Moreover, notice that pinging localhost still works even without any active NICs (as does 127.0.0.1), but it is using the IPv6 address (must be hard-coded). You can see the same results in Windows XP with no IPv6 installed, so it has nothing to do with IPv6. I tried pining what should have resolved to 127.0.0.1 while the desktop system (with no wireless NICs) was connected via its Ethernet adapter, then again after pulling the cable from the router and waiting a couple of seconds, then again after plugging the cable back in. The same thing happens if instead of pulling out the cable, the NIC is disabled through software (the [Disable] button in the NIC’s Status dialog or via Device Manager). Conclusions It looks as though the HOSTS file is only being read and used if there is an active NIC, otherwise it is being ignored. This makes some sense in that if there are no active network adapters, then presumably there will not be any network activity, and thus no need to resolve host names via the HOSTS file. This assumption is specious however because it precludes locally hosted virtual servers. The HOSTS file should be used regardless of external DNS server connectivity, otherwise you cannot use simple/consistent/testing-production names for locally hosted servers when not connected to the Internet (for example web servers; help servers for Visual Studio, 3dsmax, etc.; and so on). Question Does anyone know how to force Windows to use the HOSTS file even if there are no active NICs? Appendix Figure 1: While the wireless NIC is connected to the router (the cable-modem is in standby, so no external Internet connectivity). Figure 2: With the wireless radio turned off (the Ethernet port is not unconnected in both cases). Figure 3: Same results in XP with no IPv6

    Read the article

  • NVIDIA same chipset, but different implementations - what is the difference?

    - by Horst Walter
    I have planned to buy a graphics card. When searching for a particular chipset (e.g. GTX 460) I find cards of different vendors (i.e. Gigabyte, Palit, PNY, ...). I can figure out differences in frequency, memory, and equipment. When I read test reports, usually a particular NVIDIA card is compared with its ATI/AMD "counterpart" - have not really found a comparison of all vendors for a particular NVIDIA chipset. So in order to make a decision: a) Are the drivers all the same for all the cards of a particular chipset (and provided by NVIDIA or the vendor?) b) How to figure out which card actually to buy. OK, I choose chipset, and memory, and check the card has the required ports, but then ....

    Read the article

  • Can't access an internal IIS web site via IP address, only hostname

    - by chris-untrod-com
    I have a machine on my home network running Windows Server 2008 (IIS7) with a web application running under default website called HTCOMNET. The network is just on a Windows Workgroup. The server is named nas1 and has a (dynamically assigned) IPv4 address of 192.168.2.12. I can ping 192.168.2.12. When I ping the machine by name ("nas1"), the hostname resolves to an IPv6 link-local address (as opposed to the ipv4 address). In a browser, I can go to http://nas1/HTCOMNET/ and IIS serves the site, no problem. But if I go to http://192.168.2.12/HTCOMNET, no dice. I have all the windows firewalls turned off. Any idea what's going on? I can't for the life of me figure out why I can't hit IIS via the IP. I feel like it's something really obvious, but i can't figure out what. Thanks!

    Read the article

  • Using AHK PostMessage to send WM_WININICHANGE to Program Manager

    - by SaintWacko
    I've written a script which updates an environment variable, but I need to tell Program Manager to update the computer's programs with this new information. I was given this as the API call that is made within another program to cause this: ::SendMessage(::FindWindow("Progman", NULL), WM_WININICHANGE, 0L, (LPARAM)"Environment"); I am attempting to translate this into an AutoHotKey PostMessage call, but I'm doing something wrong, as it isn't working. Here's where I've gotten so far: PostMessage, 0x1A,, (LPARAM)"Environment", "Program Manager" Here are the AHK resources I've been looking at to do this: List of Windows Messages Send Messages to a Window or Its Controls PostMessage / SendMessage And here are the resources that I used to figure out the original API call: SendMessage function WM_WININICHANGE message Can anyone help me figure out what I'm doing wrong?

    Read the article

  • Configure IIS to rewrite IP Address to Site Name

    - by Bath Man
    So i've started my first web site from home, and I'm trying to get it up and running and google crawlable and the like, but I can't seem to figure out how to have my site name returned in the address bar instead of my IP address. I've purchased a domain name for my site on Godaddy and then set it to redirect to my site. When you type in the domain name, you get redirected to http://0.0.0.0/default.aspx (not my real IP obviously), and that stays in the user's address bar. In order to fix that temporarily, I've set up masking on Go Daddy which keeps the URL in the address bar, but just shows my website in a frame. This is fine for users visiting the site, however any kind of automated robot such as GoogleBot cannot discover my content because of the frame. I've looked into ISAPI filters and server-site-rewriting, and the like... but I just can't quite figure out how to do what I need it to do. Any simple suggestions or links would be appreciated.

    Read the article

  • fedora13 mouse change -I Beam

    - by tom smith
    hi. sorry to have to ask such a basic question!! i've got fedora 13, trying to figure out how to change the "I Beam" pointer. earlier, i had a "thin" "I Beam" pointer in my gedit/term windows. now, I have a "thicker/shadow" kind of "I Beam" pointer when i move the mouse over the gedit/term windows. obviously, i've made some change, but i can't figure out what I changed, or where this attribute is set. i've checked google/irc, as well as looked through the "system-preferences-appearance" with no luck.. i saw the customize part of the gui, and could resize the "arrow" but nothing for the "I-Beam". this isn't critical, but it is anoying!! any thoughts/pointers would be helpful. thanks

    Read the article

  • fedora13 mouse change -I Beam

    - by tom smith
    hi. sorry to have to ask such a basic question!! i've got fedora 13, trying to figure out how to change the "I Beam" pointer. earlier, i had a "thin" "I Beam" pointer in my gedit/term windows. now, I have a "thicker/shadow" kind of "I Beam" pointer when i move the mouse over the gedit/term windows. obviously, i've made some change, but i can't figure out what I changed, or where this attribute is set. i've checked google/irc, as well as looked through the "system-preferences-appearance" with no luck.. i saw the customize part of the gui, and could resize the "arrow" but nothing for the "I-Beam". this isn't critical, but it is anoying!! any thoughts/pointers would be helpful. thanks

    Read the article

  • In Visio 2010, how can I create a mandatory, non-identifying relationship between two database tables

    - by Cam Jackson
    I'm working in MS Visio 2010. This is the relevant part of my ERD: The relationship between Event and Adventure is correct: there's a foreign key from Event to Adventure, and that FK is part of Event's primary key. However, what I can't figure out is how to make the relationship line from Adventure to AccomodationType be the same, without making that relationship part of the PK of adventure. When I look at the 'Miscellaneous' properties of that relationship line, I want it to be: Cardinality: Zero or more Relationship type: Non-identifying Child has parent: Not optional (mandatory) But the checkbox for the third property is greyed out, and toggles between True/False as I make the relationship Non-identifying/Identifying. The only way I could figure out was to disconnect the two columns, from the 'Definition' tab, which then un-grey's the 'Optional' checkbox, but then I lose the foreign key property on the accomType column, and while the relationship symbols are correct, the line remains dotted. Any ideas, anyone?

    Read the article

  • How do I learn IPSec VPN implementation on FreeBSD from pfSense

    - by Lang Hai
    I've been trying to figure out a complete working solution for IPSec VPN implementation on FreeBSD but with no luck till now. pfSense seems did a fantastic job on supporting IPSec and even for mobile clients, so I downloaded and installed pfSense hoping to figure out how it works, or at least see some configuration examples, but I couldn't find anything interesting maybe because I'm not familiar with pfSense, so I'd like to ask for help. How pfSense implements IPSec, what tools are used? Where does pfSense store all its configuration files? And since pfSense has its own kernel mods and acts as a different OS, there's no way for us to install it on top of an existing FreeBSD box, and plus that it is such a great project combining those fantastic features, so my question can kinda be extended as: How do we learn from pfSense, and implement its features on top of a regular FreeBSD server?

    Read the article

  • What is a fairly accepted endpoints to concurrent calls ratio for a PBX?

    - by Logan Bibby
    Hey guys! Not too positive about the relevance of this question to Server Fault, but I'll let you guys poke around at it anyway. :) I'm trying to figure out what an accepted ratio of endpoints to concurrent calls on the "average" office PBX. I'm defining concurrent calls as any call being placed, including internal calls. I'm not going to be considering call centers into this ratio, I'll be looking at those differently, anyway. To give you guys a little history behind the question: I need this ratio to be able to figure out decent specs for a virtual PBX service I'm going to be rolling out within the upcoming months. The ratio will determine the number of trunks needed per PBX system. -- Logan

    Read the article

  • How do I identify which rewrite rule is being trigger on IIS 7.5?

    - by Jordan Reiter
    I have a set of rewrite rules (offhand, I would say around 40-50) for a given server. It's basically to handle and reroute mangled URLs so that bad links still go to where they're supposed to go. I've come across an URL that is redirecting and I can't figure out which rewrite rule it is applying. My background is Apache and in that case I'd simply enable a rewrite log and look at the logged output to figure out what was happening. Is there an equivalent way to do this in IIS? bonus round Any way for me to view & edit the rewrite rules in a text file rather than the GUI interface?

    Read the article

  • Set up DPM to use hardware VSS Provider with EMC Clariion SAN

    - by Ryan
    We recently purchased an EMC Clariion AX4 SAN and we're using it to provide storage for our Hyper-V virtual machines. I've already got the servers registered with it and configured the failover cluster CSV's, etc. I'm wanting to figure out what I have to do to set up the VSS Provider for the SAN, so that Microsoft Data Protection Manager can use it to backup the virtual machines. I'm new when it comes to Clariion SAN's, so I have no idea how to set up the VSS provider. I downloaded something from Powerlink that was labeled VSS Provider and installed it on one of the machines connected to the SAN. It had something to do with a Solutions Enabler (I don't know what that is), but it doesn't really seem like it did anything. I read something that suggested I'd need to have Navisphere Manager to use the VSS Provider on the AX4, but we didn't purchase that - we're just using Navisphere Express. Can anyone help me figure out how to get the VSS Provider up and running?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >