Search Results

Search found 13356 results on 535 pages for 'index buffers'.

Page 8/535 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Should I create a unique clustered index, or non-unique clustered index on this SQL 2005 table?

    - by Bremer
    I have a table storing millions of rows. It looks something like this: Table_Docs ID, Bigint (Identity col) OutputFileID, int Sequence, int …(many other fields) We find ourselves in a situation where the developer who designed it made the OutputFileID the clustered index. It is not unique. There can be thousands of records with this ID. It has no benefit to any processes using this table, so we plan to remove it. The question, is what to change it to… I have two candidates, the ID identity column is a natural choice. However, we have a process which does a lot of update commands on this table, and it uses the Sequence to do so. The Sequence is non-unique. Most records only contain one, but about 20% can have two or more records with the same Sequence. The INSERT app is a VB6 piece of crud throwing thousands insert commands at the table. The Inserted values are never in any particular order. So the Sequence of one insert may be 12345, and the next could be 12245. I know that this could cause SQL to move a lot of data to keep the clustered index in order. However, the Sequence of the inserts are generally close to being in order. All inserts would take place at the end of the clustered table. Eg: I have 5 million records with Sequence spanning 1 to 5 million. The INSERT app will be inserting sequence’s at the end of that range at any given time. Reordering of the data should be minimal (tens of thousands of records at most). Now, the UPDATE app is our .NET star. It does all UPDATES on the Sequence column. “Update Table_Docs Set Feild1=This, Field2=That…WHERE Sequence =12345” – hundreds of thousands of these a day. The UPDATES are completely and totally, random, touching all points of the table. All other processes are simply doing SELECT’s on this (Web pages). Regular indexes cover those. So my question is, what’s better….a unique clustered index on the ID column, benefiting the INSERT app, or a non-unique clustered index on the Sequence, benefiting the UPDATE app?

    Read the article

  • block z-positioning without z-index

    - by Peter
    Please, have a look at: http://twitter.github.com/bootstrap/base-css.html There are many examples like this one: if you look closer to the block borders, you can see that the gray block is under the white one. Using the browser's developer tools you can see that both boxes have an inherited z-index: auto; I can't reproduce this effect on my website (without using z-index). So, my question is: Why is the gray block under the white one?

    Read the article

  • MySQL: how to index an "OR" clause

    - by JoséMi
    I'm executing the following query SELECT COUNT(*) FROM table WHERE field1='value' AND (field2 = 1000 OR field3 = 2000) There is one index over field1 and another composited over field2&field3. I see MySQL always selects the field1 index and then makes a join using the other two fields which is quite bad because it needs to join 146.000 rows. Suggestions on how to improve this? Thanks

    Read the article

  • Vim's relativenumber setting and multiple buffers

    - by connrs
    I like the relative number setting. I'm refactoring code at the moment (translation: explodicating 5 year old terrible methods and replacing them with nice code) and I find it useful to have the setting active on files as I open them I frequently either open multiple buffers or use a client/server vim to contain all my open buffers/files and have noticed that the relative number only seems to apply to the first buffer (and not the remaining buffers when I have set rnu in my .vimrc file.) Is it expected behaviour for rnu to only initially apply to the first buffer until you manually set it?

    Read the article

  • Vim - dynamic list of open buffers in a window

    - by asfallows
    I've investigated a few ways to maintain a list of open buffers in Vim, and some of them are very good, but none of them seem to behave the way I'd like. It's very possible that nothing like what I want exists, and it can't hurt to ask. I've been using NERDTree in GVim, and I like the idea of putting the information in a slender left-hand window. I've put together a handy diagram for how I'd like my environment to look: |--------|---------------------------------------| | | | | | | |NERDTree| Windows | | | | | | | | | | |--------| | | | | | | | | List | | | of | | | Open | | | Buffers| | | | | | | | |--------|---------------------------------------| So my question is: Is there a vim-native or plugin-enabled way to maintain a list of currently open buffers and select/edit/close from that list, inside a window similar to NERDTree? I understand that this approach may be incongruous with the Vim way of doing things, and if you feel like I'm missing something about how to manage multiple files in a Vim session, please leave a comment with suggestions!

    Read the article

  • Z-index broken in IE8?

    - by Anna
    Hi there This code works in every other browser I've tried, except IE8. IE8 appears to ignore the z-index - and the pop-up becomes a pop-under. It's in the right place, just renders underneath the thumbnail. Anyone? Thanks! HTML: <a class="thumbnail" href="#thumb"> <img src="/images/comic_a3_thumb.jpg" height="300" width="212" border="0" style="float:right; margin-top:10px;margin-bottom:10px;" alt="description" /> <span> <img src="/images/comic_a3_popup.jpg" /> /span> </a> CSS: .thumbnail{ position: relative; z-index: 0; } .thumbnail:hover{ background-color: transparent; z-index: 50; } .thumbnail span{ /*CSS for enlarged image*/ position: absolute; background-color: lightyellow; padding: 5px; left: 0px; border: 1px dashed gray; visibility: hidden; color: black; text-decoration: none; } .thumbnail span img{ /*CSS for enlarged image*/ border-width: 0; padding: 2px; } .thumbnail:hover span{ /*CSS for enlarged image on hover*/ visibility: visible; top: -140px; /*position where enlarged image should offset horizontally */ left: -500px; }

    Read the article

  • calculating the index of an array C#

    - by Kerry G
    I want to display a list of the answers a student entered incorrectly. How do I identify the index of these questions? I am hoping to change the contents of a textbox to a list of the questions answered incorrectly, which would require calculating the index of each incorrect question. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication5 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } //return a pass/fail //return number of correct answers //return number of incorrect answers //return index figures of incorrect values public void examResults () { string[] correctAnswers = {B,D,A,A,C,A,B,A,C,D,B,C,D,A,D,C,C,B,D,A}; string[] studentResults = File.ReadAllLines("studentResults.txt"); var c = correctAnswers.Where((x, i) => x.Equals(studentResults[i])).Count(); if ( c <= 14) passFailBox.Text = "Student has failed the exam"; else passFailBox.Text = "Student has passed the exam"; numberCorrectBox.Text = "Student has answered" + c + "answers correctly"; int f; f= 21-c; numberIncorrectBox.Text = "Student has answered" + f + "answers incorrectly"; } } }

    Read the article

  • Index question: Select * with WHERE clause. Where and how to create index

    - by Mestika
    Hi, I’m working on optimizing some of my queries and I have a query that states: select * from SC where c_id ="+c_id” The schema of ** SC** looks like this: SC ( c_id int not null, date_start date not null, date_stop date not null, r_t_id int not null, nt int, t_p decimal, PRIMARY KEY (c_id, r_t_id, date_start, date_stop)); My immediate bid on how the index should be created is a covering index in this order: INDEX(c_id, date_start, date_stop, nt, r_t_id, t_p) The reason for this order I base on: The WHERE clause selects from c_id thus making it the first sorting order. Next, the date_start and date_stop to specify a sort of “range” to be defined in these parameters Next, nt because it will select the nt Next the r_t_id because it is a ID for a specific type of my r_t table And last the t_p because it is just a information. I don’t know if it is at all necessary to order it in a specific way when it is a SELECT ALL statement. I should say, that the SC is not the biggest table. I can say how many rows it contains but a estimate could be between <10 and 1000. The next thing to add is, that the SC, in different queries, inserts the data into the SC, and I know that indexes on tables which have insertions can be cost ineffective, but can I somehow create a golden middle way to effective this performance. Don't know if it makes a different but I'm using IBM DB2 version 9.7 database Sincerely Mestika

    Read the article

  • Is there a standard mapping between JSON and Protocol Buffers?

    - by Daniel Earwicker
    From a comment on the announcement blog post: Regarding JSON: JSON is structured similarly to Protocol Buffers, but protocol buffer binary format is still smaller and faster to encode. JSON makes a great text encoding for protocol buffers, though -- it's trivial to write an encoder/decoder that converts arbitrary protocol messages to and from JSON, using protobuf reflection. This is a good way to communicate with AJAX apps, since making the user download a full protobuf decoder when they visit your page might be too much. It may be trivial to cook up a mapping, but is there a single "obvious" mapping between the two that any two separate dev teams would naturally settle on? If two products supported PB data and could interoperate because they shared the same .proto spec, I wonder if they would still be able to interoperate if they independently introduced a JSON reflection of the same spec. There might be some arbitrary decisions to be made, e.g. should enum values be represented by a string (to be human-readable a la typical JSON) or by their integer value? So is there an established mapping, and any open source implementations for generating JSON encoder/decoders from .proto specs?

    Read the article

  • How can I pare down Vim's buffer list to only include active buffers

    - by nelstrom
    How can I pare down my buffer list to only include buffers that are currently open in a window/tab? When I've been running Vim for a long time, the list of buffers revealed by the :ls command is too large to work with. Ideally, I would like to delete all of the buffers which are not currently visible in a tab or window by running a custom command such as :Only. Can anybody suggest how to achieve this? It looks like the :bdelete command can accept a list of buffer numbers, but I'm not sure how to translate the output from :ls to a format that can be consumed by the :bdelete command. Any help would be appreciated. Clarification Lets say that in my Vim session I have opened 4 files. The :ls command outputs: :ls 1 a "abc.c" 2 h "123.c" 3 h "xyz.c" 4 a "abc.h" Buffer 1 is in the current tab, and and buffer 4 is in a separate tab, but buffers 2 and 3 are both hidden. I would like to run the command :Only, and it would wipe buffers 2 and 3, so the :ls command would output: :ls 1 a "abc.c" 4 a "abc.h" This example doesn't make the proposed :Only command look very useful, but if you have a list of 40 buffers it would be very welcome.

    Read the article

  • rewrite all .html extension and remove index in Nginx

    - by Pardoner
    How would I remove all .html extensions as well as any occurrences of index.html from a url string in Nginx http://www.mysite/index.html to http://www.mysite http://www.mysite/articles/index.html to http://www.mysite/articles http://www.mysite/contact.html to http://www.mysite/contact http://www.mysite/foo/bar/index.html to http://www.mysite/foo/bar EDIT: Here is my conf file: server { listen 80; server_name staging.mysite.com; root /var/www/staging.mysite.com; index index.html index.htm; access_log /var/log/nginx/staging.mysite.com.log spiegle; #error_page 404 /404.html; #error_page 500 503 /500.html; rewrite ^(.*/)index\.html$ $1; rewrite ^(/.+)\.html$ $1; rewrite ^(.*/)index\.html$ $scheme://$host$1 permanent; rewrite ^(/.+)\.html$ $scheme://$host$1 permanent; location / { rewrite ^/about-us /about permanent rewrite ^/contact-us /contact permanent; try_files $uri.html $uri/ /index.html; } }

    Read the article

  • In Joomla In htaccess REQUEST_URI is always returning index.php instead of SEF URL

    - by Saumil
    I have installed joomsef version 3.9.9 with the Joomla 1.5.25. Now I want to set https for some of the section of my site(e.g URI starts with /events/) while wanting rest of all urls on http.I am setting rules in .htaccess file but not getting output as expected. I am checking REQUEST_URI of the SEF urls but always getting index.php as URI. Here is my htaccess code. ########## Begin - Custom redirects # # If you need to redirect some pages, or set a canonical non-www to # www redirect (or vice versa), place that code here. Ensure those # redirects use the correct RewriteRule syntax and the [R=301,L] flags. # ########## End - Custom redirects # Uncomment following line if your webserver's URL # is not directly related to physical file paths. # Update Your Joomla! Directory (just / for root) # RewriteBase / ########## Begin - Joomla! core SEF Section # RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # # If the requested path and file is not /index.php and the request # has not already been internally rewritten to the index.php script RewriteCond %{REQUEST_URI} !^/index\.php # and the request is for root, or for an extensionless URL, or the # requested URL ends with one of the listed extensions RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC] # and the requested path and file doesn't directly match a physical file RewriteCond %{REQUEST_FILENAME} !-f # and the requested path and file doesn't directly match a physical folder RewriteCond %{REQUEST_FILENAME} !-d # internally rewrite the request to the index.php script RewriteRule .* index.php [L] # ########## End - Joomla! core SEF Section # Here is my code e.g site url is http://mydomain.com/events RewriteCond %{REQUEST_URI} ^/(events)$ RewriteCond %{HTTPS} !ON RewriteRule (.*) https://%{REQUEST_HOST}%{REQUEST_URI}/$1 [L,R=301] I am not getting why REQUEST_URI is reffering index.php even though my url in address bar is like this http://mydomain.com/events . I am using JOOMSEF(Joomla extension for SEF URLS).If I am removing other rules from the htaccess file then joomla stops working. I am not getting a way to handle this as I am not expert.Please let me know if someone has passed through same situation and have solution or suggest some work around. Thanks

    Read the article

  • .htaccess do not work without index.php on CodeIgniter

    - by Mattia
    I have read a lot of topic with the same problem but I do not find the solution. I have a LAMP into Ubuntu server. My document root is /home/utente/ into this dir I have another dir (turni) with a CodeIgniter web app. The web app works fine with the index.php into the URL, but I want to eliminate it. I have this configuration: config.php into CodeIgniter: $config['index_page'] = ''; .htaccess: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] /etc/apache2/sites-available/default: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/utente <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/utente/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> When I open a link of the web app without index.php into the URL, the server show me this error: The requested URL /turni/auth/login was not found on this server. Why? If I put the index.php like /turni/index.php/auth/login all works fine.

    Read the article

  • IE dropdown z-index bug

    - by Justine
    I'm having a problem with a dropdown menu under IE (6 and 7). http://www.amaconsulting.pl/promocje.html As you can see, the dropdown hides behind the main content area in IE. It's a known bug and general advice is to set a z-index for header and content areas, so IE knows their "place", explained in the article here: http://bit.ly/coSPcI I've set the z-index of .header div to 20 and .featured, .content, .primary, .main to 1, trying to find the right div to fix the problem. While the dropdown stopped hiding behind the .featured div, it still hides behind the main content divs (either .primary or .main, .secondary is fine). The z-indexes for these divs are set in a separate stylesheet, ie.css, in case someone'll be looking for them. If someone could provide some advice, I'd be very grateful.

    Read the article

  • Spatial index for geo coordinates?

    - by Michael Borgwardt
    What kind of data structure could be used for an efficient nearest neighbor search in a large set of geo coordinates? With "regular" spatial index structures like R-Trees that assume planar coordinates, I see two problems (Are there others I have overlooked?): Wraparound at the poles and the International Date Line Distortion of distances near the poles How can these factors be allowed for? I guess the second one could compensated by transforming the coordinates. Can an R-Tree be modified to take wraparound into account? Or are there specialized geo-spatial index structures?

    Read the article

  • Visual Studio Code Metrics and the Maintainability index of switch case

    - by pee2002
    Hi there! As a person who loves to follow the best practices, If i run code metrics (right click on project name in solution explorer and select "Calculate Code Metrics" - Visual Studio 2010) on: public static string GetFormFactor(int number) { string formFactor = string.Empty; switch (number) { case 1: formFactor = "Other"; break; case 2: formFactor = "SIP"; break; case 3: formFactor = "DIP"; break; case 4: formFactor = "ZIP"; break; case 5: formFactor = "SOJ"; break; } return formFactor; } It Gives me a Maintainability index of 61 (of course this is insignificant if you have only this, but if you use an utility like class whos philosophy is doing stuff like that, your utility class will have the maintainability index much worst..) Whats the solution for this?

    Read the article

  • Z-Index and javascript for rollover

    - by Raffaele
    I have a container (div) with a background image. In this div there is a menu - a horizontal list. What I need is to insert an image onMouseOver, positioning it absolutely, and showing it behind the text (of course!) AND on top of the div's background image. I also use jQuery, but I think this doesn't matter. The problem can be viewed online. Go to http://www.w3schools.com/css/tryit.asp?filename=trycss_zindex and paste the following text <html> <head> <style type="text/css"> img { top: 0; left: 0; position:absolute; z-index:-1; } #main { color: red; margin: 30px; padding: 20px; width: 700px; min-height: 400px; z-index: -2; background-image: url("http://www.google.com/logos/mother10-hp.gif"); background-repeat: no-repeat; } </style> </head> <body> <div id="main"> <h1>Z-Index question:</h1> <img src="w3css.gif" width="100" height="140" /> <p>How can we place the green pic between the text and the div#main?</p> <p>I need the green gif to appear</p> <ol> <li>On top of #main's background image</li> <li>Behind the text</li> </ol> </div> </body> </html>

    Read the article

  • asp.net search application index update help

    - by srinivasan
    hi im developing a simple search application( ASP.Net VB.Net) the index table is actually a hash table ll be stored in my file system. the search page ll open this in read mode n copy this to a hash table object n perform search. other update n delete functions will open this in write mode n update it. what should i ve to do to make this app correct that there shud not be any execption when multiple user accessing these things at the same time. wat do i ve to do to make this robust and error free. i want multiple users to access search page without any problem n the index updation also in a parallel manner thanks srinivasan

    Read the article

  • Rails uniqueness constraint and matching db unique index for null column

    - by Dave
    I have the following in my migration file def self.up create_table :payment_agreements do |t| t.boolean :automatic, :default => true, :null => false t.string :payment_trigger_on_order t.references :supplier t.references :seller t.references :product t.timestamps end end I want to ensure that if a product_id is specified it is unique but I also want to allow null so I have the following in my model: validates :product_id, :uniqueness => true, :allow_nil => true Works great but I should then add an index to the migration file add_index :payment_agreements, :product_id, :unique => true Obviously this will throw an exception when two null values are inserted for product_id. I could just simply omit the index in the migration but then there's the chance that I'll get two PaymentAgreements with the same product_id as shown here: Concurrency and integrity My question is what is the best/most common way to deal with this problem

    Read the article

  • PostgreSQL - CREATE INDEX

    - by mocopera
    Hi! I'm working with PostgreSQL to create some data types written in C. For example, I have: typedef struct Point3D { char id[50]; double x; double y; double z; } Point3D; The input and output functions are working properly. But the problem is the following: Every id of Point3D must be unique (and can be NULL), so I have decided to create an unique index on this field id, but is that possible? I'm thinking in something like this: create unique index test_point3d_idx on test_point3d (( getID(columname) )); where getID returns the field ID of columname. But I need to implement getID and I am really blocked. Any advice?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >