Posts

sql - Does the size of the data stored in the record affect the Clustered index performance? -

i have 3 tables. primary fact table (facttable) a table containing int field + other 'n' varchar(50) fields(table001) a table containing int field + other 'n' varchar(max) fields(table002) records in each table: #5 million rows query: select * facttable f (nolock) inner join table001 t001 (nolock) on f.id = t001.id inner join table002 t002 (nolock) on t002.id = f.id f.datefield = '2014-02-01' all tables have clustered index on field 'id'(which used in joining tables i.e., foreign key) the clustered indices not fragmented(fragmentation percentage < 5%) on tables the case when join 3 tables, seeing in execution plan cost of joining table002 higher table001. there reason behavior? link xml execution plan: https://onedrive.live.com/redir?resid=7e436ae9d73999b0%21120 i couldn't paste xml content because of size restriction. another link : http://www.expinos.in/executionplan.sqlplan the size of columns in row, not in...

c++ - Static inline method no need static member initialization -

there class: k.h class k { static int ii; static void foo(); }; k.cpp #include "k.h" void k::foo() { ii++; } during compile following error message: error lnk2001: unresolved external symbol "private: static int k::ii" (?ii@k@@0ha) it's ok. when add inline keyword method, error disappeared: class k { static int ii; inline static void foo(); }; this not real-world example, don't know happens in code, may explain me? this code: #include <iostream> using namespace std; struct k { static int ii; static void foo(); }; void k::foo() { ii=0; } int main() { // code goes here return 0; } gives linking error, because function k::foo output compiler, , references k::ii. this code: #include <iostream> using namespace std; struct k { static int ii; inline static void foo(); }; inline void k::foo() { ii=0; } int main() { // code goes here return 0; } do...

multithreading - Python threading module error: 'NoneType' object is not callable -

my screen displays <type 'exceptions.typeerror'>: 'nonetype' object not callable when run code below: import threading import urllib2 import queue import time hosts = ["http://baidu.com", "http://yahoo.com"] queue = queue.queue() class threadurl(threading.thread): """ threaded url grab """ def __init__(self, queue): threading.thread.__init__(self) self.queue = queue def run(self): while true: #grabs host queue host = self.queue.get() #grabs urls of hosts , prints first 1024 byte of page url = urllib2.urlopen(host) #signals queue job done self.queue.task_done() start = time.time() def main(): in range(2): t = threadurl(queue) t.setdaemon(true) t.start() host in hosts: queue.put(host) queue.join() main() print "elapsed time: %s" % (t...

swing - Get Pixel Color on screen Java? -

hello trying color of particular pixel on jframe. this code. frame red. the problem having when click frame should return me rgb color red (255,0,0) when click @ different points rgb color white (255,255,255) problem in code guys? public class guitest extends jframe { private static shape ellipse; private static robot rb; public guitest() { super("4-connected approach"); setlayout(new flowlayout()); setdefaultcloseoperation(jframe.exit_on_close); setvisible(true); setsize(800,800); this.getcontentpane().setbackground(color.red); setlocationrelativeto(null); addmouselistener(new mouselistener(){ @override public void mouseclicked(mouseevent e) { system.out.println("pixel:"+e.getx()+","+e.gety()); try { system.out.println(getpixel(e.getx(),e.gety())); } catch (awtexception e1) { // todo auto-generat...

performance - difference between opened files and open files in mysql -

in below status have opened files count '95349'. value increasing rapidly. mysql> show global status 'open_%'; open_files = 721 open_streams = 0 open_table_definitions = 706 open_tables = 741 opened_files = 95349 opened_table_definitions = 701 opened_tables = 2851 also see this. mysql> show variables '%open%'; have_openssl = disabled innodb_open_files = 300 open_files_limit = 8502 table_open_cache = 4096 and max_connection = 300 is there relation open files , opened files. there performance issues because of increasing opened_files value. server of 8 gd ram , 500 gb hardisk processor: intel(r) xeon(r) cpu e3-1220 v2 @ 3.10ghz. dedicated mysql server. here command ulimit -n; 1024 count the server hanging often. using online tools have optimised parameters already. need know else should optimized ? in case opened files count red...

javascript - How to change the displayed text in label (for Internationalization) -

i have html file contains this > <label id="remem" for"remem"><input type"checkbox" > name="remem"/>test</label> now im dealing i18n , working on translating these words. , need translate word test different language. how change label (in example.."test" ) programmatically?? attribute should deal with? thanks! give text inside <span> tag id > <label id="remem" for"remem"><input type"checkbox" > name="remem"/><span id="rememtext">test</span></label> then can use javascript manipulate text. document.getelementbyid("rememtext").innerhtml = "another language";

d3.js - change Axis domain/range doesn't work in nvds -

i'm trying nvd3 example @ http://nvd3.org/livecode/index.html#codemirrornav please click on plot 2 "scatter/bubble chart". original code javascript like: nv.addgraph(function() { var chart = nv.models.scatterchart() .showdistx(true) .showdisty(true) .color(d3.scale.category10().range()); chart.xaxis.tickformat(d3.format('.02f')); chart.yaxis.tickformat(d3.format('.02f')); d3.select('#chart svg') .datum(data(4,40)) .transition().duration(500) .call(chart); nv.utils.windowresize(chart.update); return chart; }); i tried change xaxis range/scale/domain see if has anything. somehow doesn't work. what did add var xscale = d3.scale.linear().domain([0,1]).range([1,4]); chart.xaxis.scale(xscale); chart.xaxis.tickvalues([1,2,3]); below yaxis line in original plot. can see tickvalues work expected. somehow both domain , range doesn't work expected. i see xaxis start differen...