Search Results

Search found 13 results on 1 pages for 'gam erix'.

Page 1/1 | 1 

  • calculate AUC (GAM) in R [migrated]

    - by ahmad
    I used the following script to calculate AUC in R: library(mgcv) library(ROCR) library(AUC) data1=read.table("d:\\2005.txt", header=T) GAM<-gam(tuna ~ s(chla)+s(sst)+s(ssha),family=binomial, data=data1) gampred<- predict(GAM, type="response") rp <- prediction(gampred, data1$tuna) auc <- performance( rp, "auc")@y.values[[1]] auc roc <- performance( rp, "tpr", "fpr") plot( roc ) But when I was running the script, the result is: **rp <- prediction(gampred, data1$tuna) Error in prediction(gampred, data1$tuna) : Format of predictions is invalid. > > auc <- performance( rp, "auc")@y.values[[1]] Error in performance(rp, "auc") : object 'rp' not found > auc function (x, min = 0, max = 1) { if (any(class(x) == "roc")) { if (min != 0 || max != 1) { x$fpr <- x$fpr[x$cutoffs >= min & x$cutoffs <= max] x$tpr <- x$tpr[x$cutoffs >= min & x$cutoffs <= max] } ans <- 0 for (i in 2:length(x$fpr)) { ans <- ans + 0.5 * abs(x$fpr[i] - x$fpr[i - 1]) * (x$tpr[i] + x$tpr[i - 1]) } } else if (any(class(x) %in% c("accuracy", "sensitivity", "specificity"))) { if (min != 0 || max != 1) { x$cutoffs <- x$cutoffs[x$cutoffs >= min & x$cutoffs <= max] x$measure <- x$measure[x$cutoffs >= min & x$cutoffs <= max] } ans <- 0 for (i in 2:(length(x$cutoffs))) { ans <- ans + 0.5 * abs(x$cutoffs[i - 1] - x$cutoffs[i]) * (x$measure[i] + x$measure[i - 1]) } } return(as.numeric(ans)) } <bytecode: 0x03012f10> <environment: namespace:AUC> > > roc <- performance( rp, "tpr", "fpr") Error in performance(rp, "tpr", "fpr") : object 'rp' not found > plot( roc ) Error in levels(labels) : argument "labels" is missing, with no default** Can anybody help me to solve this problem? Thank you in advance.

    Read the article

  • Disable ability to add startup items in Windows 7?

    - by Gam Erix
    Note: This is not the question "How to disable startup items" because the simple answer is: "Use msconfig". Now as for my question: I recently am very annoyed that some programs add startup items to my PC without my knowledge after installation, I always have 2 programs which startup - Temperature monitor and the Catalyst Control Center Tray. Now, sometimes I install something and it adds startup entries, how can I make sure that no startup entries can be added to windows anymore? So what I would like to do: -Disable adding scheduled tasks (even for administrator accounts, so programs installing from them can't add startup entries too) -Disable adding startup entries to the registry (even for administrators, would changing the permissions in HKLM on the Microsoft\Windows\CurrentVersion\Run to read only be enough?) -Disable all other methods of startup in Windows 7 I don't know -Set default startup of NEW installed services to "Start Manually" instead of/and block "Start Automaticly" and "Start Automaticly (Delayed)" How can I accomplish this? This is also a nice way to prevent most viruses fom running after machine reboot (if this can be accomplished).

    Read the article

  • 1024x768 gone (1024x600 availble) on HDMI, yesterday it worked?

    - by Gam Erix
    When I try to play a game called F-22 Total Air War 2.0 I get an error which says that the resolution 1024.768 is unsupported by the harware.. so I look into my desktop options and it looks like there is an option for 800x600, 1024x600, 1152x648 and higher wide screen resolutions but the 1024x768 is gone? I did play the game yezterday, I disconnected the HDMI, got upstairs, played a few more games, came back downstairs, plugged in the HDMI, launched the game and bam I got the error! I have a ATI Radeon Mobility HD5470 and the newest ATI Catalyst Center downloaded 3 days ago. How can I 'enable' the 1024x768 resolution again? Without it I can't play the game on my Big TV and I will be stuck with my little laptop screen.

    Read the article

  • vector does not erase content correctly (infite amount run of copy asignment operator untill crash [BEX])?

    - by Gam Erix
    Well my problem is that after I want to "unload" loaded DLL's the copy assignmnent operator is called an unlimited amount of times until crash. The code from which I remove the vector data looks like this: void UnloadPlugins() { dbg(("[DBG]UnloadPlugins()")); for(std::vector<DLLInfo>::iterator it = plugins.begin(); it != plugins.end(); ++it) { plugins.erase(it); } dbg(("[DBG]UnloadPlugins()::Done")); } however "[DBG]UnloadPlugins()::Done" gets never printed. this is my copy assignmnent operator: // 2. copy assignment operator DLLInfo& operator=(const DLLInfo& that) { dbg(("[DBG]Start-DLLInfo& operator=(const DLLInfo& that)")); Instance = that.Instance;//hinstance dbg(("[DBG]DLLInfo 1")); //Identifier.assign(that.Identifier);//string dbg(("[DBG]DLLInfo 2")); IsAMX = that.IsAMX;//integer dbg(("[DBG]DLLInfo 3")); dwSupportFlags = that.dwSupportFlags;//integer dbg(("[DBG]DLLInfo 4")); Load = that.Load;//integer dbg(("[DBG]DLLInfo 5")); Unload = that.Unload;//integer dbg(("[DBG]DLLInfo 6")); Supports = that.Supports;//integer dbg(("[DBG]DLLInfo 7")); ProcessTick = that.ProcessTick;//integer dbg(("[DBG]DLLInfo 8")); AmxLoad = that.AmxLoad;//integer dbg(("[DBG]DLLInfo 9")); AmxUnload = that.AmxUnload;//integer dbg(("[DBG]DLLInfo 10")); UseDestructor = that.UseDestructor;//bool dbg(("[DBG]DLLInfo 11")); KeyboardHit = that.KeyboardHit;//integer dbg(("[DBG]End-DLLInfo& operator=(const DLLInfo& that)")); return *this; } So the log looks like: [17:50:50] [DBG]UnloadPlugins() [17:50:50] [DBG]~DLLInfo [17:50:50] [DBG]~DLLInfo::if(this->UseDestructor) passed [17:50:50] [DBG]~DLLInfo::if(this->UseDestructor)::if(this->Unload != NULL && this->IsAMX) passed [17:50:50] [DBG]~DLLInfo::end [17:50:50] [DBG]Start-DLLInfo& operator=(const DLLInfo& that) [17:50:50] [DBG]DLLInfo 1 [17:50:50] [DBG]DLLInfo 2 [17:50:50] [DBG]DLLInfo 3 [17:50:50] [DBG]DLLInfo 4 [17:50:50] [DBG]DLLInfo 5 [17:50:50] [DBG]DLLInfo 6 [17:50:50] [DBG]DLLInfo 7 [17:50:50] [DBG]DLLInfo 8 [17:50:50] [DBG]DLLInfo 9 [17:50:50] [DBG]DLLInfo 10 [17:50:50] [DBG]DLLInfo 11 [17:50:50] [DBG]End-DLLInfo& operator=(const DLLInfo& that) [17:50:50] [DBG]Start-DLLInfo& operator=(const DLLInfo& that) ... [17:50:50] [DBG]End-DLLInfo& operator=(const DLLInfo& that) ...repeat until crash What could the problem be?

    Read the article

  • How to display List<> using ListView?

    - by eriX
    When I use ListView to display a array of my object, I can use the following code: MyObject[] myObject; ... ArrayAdapter<MyObject> itemList = new ArrayAdapter<MyObject>(this, R.layout.list, myObject); setListAdapter(itemList); In case that the input is a list: List<MyObject> myobject; How can I assign it to ListAdapter? Please advise, Thx!

    Read the article

  • R plot- SGAM plot counts vs. time - how do I get dates on the x-axis?

    - by Nate
    I'd like to plot this vs. time, with the actual dates (years actually, 1997,1998...2010). The dates are in a raw format, ala SAS, days since 1960 (hence as.date conversion). If I convert the dates using as.date to variable x, and do the GAM plot, I get an error. It works fine with the raw day numbers. But I want the plot to display the years (data are not equally spaced). structure(list(site = c(928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L, 928L), date = c(13493L, 13534L, 13566L, 13611L, 13723L, 13752L, 13804L, 13837L, 13927L, 14028L, 14082L, 14122L, 14150L, 14182L, 14199L, 16198L, 16279L, 16607L, 16945L, 17545L, 17650L, 17743L, 17868L, 17941L, 18017L, 18092L), y = c(7L, 7L, 17L, 18L, 17L, 17L, 10L, 3L, 17L, 24L, 11L, 5L, 5L, 3L, 5L, 14L, 2L, 9L, 9L, 4L, 7L, 6L, 1L, 0L, 5L, 0L)), .Names = c("site", "date", "y"), class = "data.frame", row.names = c(NA, -26L)) sgam1 <- gam(sites$y ~ s(sites$date)) sgam <- predict(sgam1, se=TRUE) plot(sites$date,sites$y,xaxt="n", xlab='Time', ylab='Counts') x<-as.Date(sites$date, origin="1960-01-01") axis(1, at=1:26,labels=x) lines(sites$date,sgam$fit, lty = 1) lines(sites$date,sgam$fit + 1.96* sgam$se, lty = 2) lines(sites$date,sgam$fit - 1.96* sgam$se, lty = 2) ggplot2 has a solution (it doesn't mind the as.date thing) but it gives me other problems...

    Read the article

  • Replace first Letter in a field Oracle

    - by Stanley
    Hi Guys I have this Table I need to replace the First Letter in ACCT_NAME with the First Name of ACCT_SHORT_NAME. Records like the Higliighted(RAFFMAN) should not be changed. I have tried: select acct_name, ACCT_SHORT_NAME,replace(acct_name, substr(acct_name, 1, 1), ACCT_SHORT_NAME) from tbaadm.gam where schm_type = 'TDA' and rcre_user_id = 'SYSTEM' and substr(acct_name,2,1) = ' ' I am getting: This means that am Picking the whole value in ACCT_SHORT_NAME. WHat is the best way to do what am trying to do?

    Read the article

  • July, the 31 Days of SQL Server DMO’s – Day 29 (sys.dm_os_buffer_descriptors)

    - by Tamarick Hill
    The sys.dm_os_buffer_descriptors Dynamic Management View gives you a look into the data pages that are currently in your SQL Server buffer pool. Just in case you are not familiar with some of the internals to SQL Server and how the engine works, SQL Server only works with objects that are in memory (buffer pool). When an object such as a table needs to be read and it does not exist in the buffer pool, SQL Server will read (copy) the necessary data page(s) from disk into the buffer pool and cache it. Caching takes place so that it can be reused again and prevents the need of expensive physical reads. To better illustrate this DMV, lets query it against our AdventureWorks2012 database and view the result set. SELECT * FROM sys.dm_os_buffer_descriptors WHERE database_id = db_id('AdventureWorks2012') The first column returned from this result set is the database_id column which identifies the specific database for a given row. The file_id column represents the file that a particular buffer descriptor belongs to. The page_id column represents the ID for the data page within the buffer. The page_level column represents the index level of the data page. Next we have the allocation_unit_id column which identifies a unique allocation unit. An allocation unit is basically a set of data pages. The page_type column tells us exactly what type of page is in the buffer pool. From my screen shot above you see I have 3 distinct type of Pages in my buffer pool, Index, Data, and IAM pages. Index pages are pages that are used to build the Root and Intermediate levels of a B-Tree. A Data page would represent the actual leaf pages of a clustered index which contain the actual data for the table. Without getting into too much detail, an IAM page is Index Allocation Map page which track GAM (Global Allocation Map) pages which in turn track extents on your system. The row_count column details how many data rows are present on a given page. The free_space_in_bytes tells you how much of a given data page is still available, remember pages are 8K in size. The is_modified signifies whether or not a page has been changed since it has been read into memory, .ie a dirty page. The numa_node column represents the Nonuniform memory access node for the buffer. Lastly is the read_microsec column which tells you how many microseconds it took for a data page to be read (copied) into the buffer pool. This is a great DMV for use when you are tracking down a memory issue or if you just want to have a look at what type of pages are currently in your buffer pool. For more information about this DMV, please see the below Books Online link: http://msdn.microsoft.com/en-us/library/ms173442.aspx Follow me on Twitter @PrimeTimeDBA

    Read the article

  • Removing HTML entities while preserving line breaks with JSoup

    - by shrodes
    I have been using JSoup to parse lyrics and it has been great until now, but have run into a problem. I can use Node.html() to return the full HTML of the desired node, which retains line breaks as such: Gl&oacute;andi augu, silfurn&aacute;tt <br />Bl&oacute;&eth; alv&ouml;ru, starir &aacute; <br />&Oacute;&eth;ur hundur er &iacute; v&iacute;gam&oacute;&eth;, &iacute; maga... m&eacute;r <br /> <br />Kolni&eth;ur gref, kvik sem dreg h&eacute;r <br />Kolni&eth;ur svart, hvergi bjart n&eacute; But has the unfortunate side-effect, as you can see, of retaining HTML entities and tags. However, if I use Node.text(), I can get a better looking result, free of tags and entities: Glóandi augu, silfurnátt Blóð alvöru, starir á Óður hundur er í vígamóð, í maga... mér Kolniður gref, kvik sem dreg hér Kolniður svart, Which has another unfortunate side-effect of removing the line breaks and compressing into a single line. Simply replacing <br /> from the node before calling Node.text() yields the same result, and it seems that that method is compressing the text onto a single line in the method itself, ignoring newlines. Is it possible to have the best of both worlds, and have tags and entities replaced correctly which preserving the line breaks, or is there another method or way of decoding entities and removing tags without having to replace them manually?

    Read the article

  • Control layout using graphviz twopi

    - by vy32
    I am trying to draw a graph showing search prefixes using twopi. I have a simple input file and am getting this output: (full image) Here is the input file: digraph search { // ordering=out; // color=blue; // rank=same; // overlap=scale; rankdir=LR; root=root; ranksep=1.25; overlap=true; "root"; a [color=none,fontsize=12]; b [color=none,fontsize=12]; c [color=none,fontsize=12]; d [color=none,fontsize=12]; e [color=none,fontsize=12]; f [color=none,fontsize=12]; #g [color=none,fontsize=12]; h [color=none,fontsize=12]; i [color=none,fontsize=12]; j [color=none,fontsize=12]; k [color=none,fontsize=12]; l [color=none,fontsize=12]; m [color=none,fontsize=12]; n [color=none,fontsize=12]; o [color=none,fontsize=12]; p [color=none,fontsize=12]; q [color=none,fontsize=12]; r [color=none,fontsize=12]; s [color=none,fontsize=12]; t [color=none,fontsize=12]; u [color=none,fontsize=12]; v [color=none,fontsize=12]; w [color=none,fontsize=12]; x [color=none,fontsize=12]; y [color=none,fontsize=12]; #ga [color=none,fontsize=12]; gb [color=none,fontsize=12]; gc [color=none,fontsize=12]; gd [color=none,fontsize=12]; ge [color=none,fontsize=12]; gf [color=none,fontsize=12]; gg [color=none,fontsize=12]; gh [color=none,fontsize=12]; gi [color=none,fontsize=12]; gj [color=none,fontsize=12]; gk [color=none,fontsize=12]; gl [color=none,fontsize=12]; gm [color=none,fontsize=12]; gn [color=none,fontsize=12]; go [color=none,fontsize=12]; gp [color=none,fontsize=12]; gq [color=none,fontsize=12]; gr [color=none,fontsize=12]; gs [color=none,fontsize=12]; gt [color=none,fontsize=12]; gu [color=none,fontsize=12]; gv [color=none,fontsize=12]; gw [color=none,fontsize=12]; gx [color=none,fontsize=12]; gy [color=none,fontsize=12]; gaa [color=none,fontsize=12]; gab [color=none,fontsize=12]; gac [color=none,fontsize=12]; gad [color=none,fontsize=12]; gae [color=none,fontsize=12]; gaf [color=none,fontsize=12]; gag [color=none,fontsize=12]; gah [color=none,fontsize=12]; gai [color=none,fontsize=12]; gaj [color=none,fontsize=12]; gak [color=none,fontsize=12]; gal [color=none,fontsize=12]; gam [color=none,fontsize=12]; gan [color=none,fontsize=12]; gao [color=none,fontsize=12]; gap [color=none,fontsize=12]; gaq [color=none,fontsize=12]; #gaz [color=none,fontsize=12]; gas [color=none,fontsize=12]; gat [color=none,fontsize=12]; gau [color=none,fontsize=12]; gav [color=none,fontsize=12]; gaw [color=none,fontsize=12]; gax [color=none,fontsize=12]; gay [color=none,fontsize=12]; gaza [color=none,fontsize=12]; gazb [color=none,fontsize=12]; gazc [color=none,fontsize=12]; gazd [color=none,fontsize=12]; gaze [color=none,fontsize=12]; #gazf [color=none,fontsize=12]; gazg [color=none,fontsize=12]; gazh [color=none,fontsize=12]; gazi [color=none,fontsize=12]; gazj [color=none,fontsize=12]; gazk [color=none,fontsize=12]; gazl [color=none,fontsize=12]; gazm [color=none,fontsize=12]; gazn [color=none,fontsize=12]; gazo [color=none,fontsize=12]; gazp [color=none,fontsize=12]; gazq [color=none,fontsize=12]; gazr [color=none,fontsize=12]; gazs [color=none,fontsize=12]; gazt [color=none,fontsize=12]; gazu [color=none,fontsize=12]; gazv [color=none,fontsize=12]; gazw [color=none,fontsize=12]; gazx [color=none,fontsize=12]; gazy [color=none,fontsize=12]; root -> a [minlen=2]; root -> b [minlen=2]; root -> c [minlen=2]; root -> d [minlen=2]; root -> e [minlen=2]; root -> f [minlen=2]; root -> g [minlen=2]; root -> h [minlen=2]; root -> i [minlen=2]; root -> j [minlen=2]; root -> k [minlen=2]; root -> l [minlen=2]; root -> m [minlen=2]; root -> n [minlen=2]; root -> o [minlen=2]; root -> p [minlen=2]; root -> q [minlen=2]; root -> r [minlen=2]; root -> s [minlen=20]; root -> t [minlen=2]; root -> u [minlen=2]; root -> v [minlen=2]; root -> w [minlen=2]; root -> x [minlen=2]; root -> y [minlen=2]; root -> 0 [minlen=2]; root -> 1 [minlen=2]; root -> 2 [minlen=2]; root -> 3 [minlen=2]; root -> 4 [minlen=2]; root -> 5 [minlen=2]; root -> 6 [minlen=2]; root -> 7 [minlen=2]; root -> 8 [minlen=2]; root -> 9 [minlen=2]; root -> "." [minlen=2]; g -> ga ; g -> gb ; g -> gc ; g -> gd ; g -> ge ; g -> gf ; g -> gg ; g -> gh ; g -> gi ; g -> gj ; g -> gk ; g -> gl ; g -> gm ; g -> gn ; g -> go ; g -> gp ; g -> gq ; g -> gr ; g -> gs ; g -> gt ; g -> gu ; g -> gv ; g -> gw ; g -> gx ; g -> gy ; ga -> gaa ; ga -> gab ; ga -> gac ; ga -> gad ; ga -> gae ; ga -> gaf ; ga -> gag ; ga -> gah ; ga -> gai ; ga -> gaj ; ga -> gak ; ga -> gal ; ga -> gam ; ga -> gan ; ga -> gao ; ga -> gap ; ga -> gaq ; ga -> gaz ; ga -> gas ; ga -> gat ; ga -> gau ; ga -> gav ; ga -> gaw ; ga -> gax ; ga -> gay ; gaz -> gaza ; gaz -> gazb ; gaz -> gazc ; gaz -> gazd ; gaz -> gaze ; gaz -> gazf ; gaz -> gazg ; gaz -> gazh ; gaz -> gazi ; gaz -> gazj ; gaz -> gazk ; gaz -> gazl ; gaz -> gazm ; gaz -> gazn ; gaz -> gazo ; gaz -> gazp ; gaz -> gazq ; gaz -> gazr ; gaz -> gazs ; gaz -> gazt ; gaz -> gazu ; gaz -> gazv ; gaz -> gazw ; gaz -> gazx ; gaz -> gazy ; gazo -> "Blue Tuesday" ; "Blue Tuesday" [ fontsize=10]; // Layout engines: circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi } This output is generated with: twopi -os1.png -Tpng s1.dot I'm posting here because the printout is pretty dreadful. All of the nodes hung of "gaz" are overlapping; I've tried specifying nodesep and it is simply ignored. I would like to see the lines from root to the single letters further apart, but again, I can't control that. This seems to be a bug in twopi. The documentation says it should clearly follow these directives, but it doesn't seem to. My questions: Is there any way to make twopi behave? Failing that, is there a better layout engine to use? Thanks.

    Read the article

  • SQL SERVER – Beginning of SQL Server Architecture – Terminology – Guest Post

    - by pinaldave
    SQL Server Architecture is a very deep subject. Covering it in a single post is an almost impossible task. However, this subject is very popular topic among beginners and advanced users.  I have requested my friend Anil Kumar who is expert in SQL Domain to help me write  a simple post about Beginning SQL Server Architecture. As stated earlier this subject is very deep subject and in this first article series he has covered basic terminologies. In future article he will explore the subject further down. Anil Kumar Yadav is Trainer, SQL Domain, Koenig Solutions. Koenig is a premier IT training firm that provides several IT certifications, such as Oracle 11g, Server+, RHCA, SQL Server Training, Prince2 Foundation etc. In this Article we will discuss about MS SQL Server architecture. The major components of SQL Server are: Relational Engine Storage Engine SQL OS Now we will discuss and understand each one of them. 1) Relational Engine: Also called as the query processor, Relational Engine includes the components of SQL Server that determine what your query exactly needs to do and the best way to do it. It manages the execution of queries as it requests data from the storage engine and processes the results returned. Different Tasks of Relational Engine: Query Processing Memory Management Thread and Task Management Buffer Management Distributed Query Processing 2) Storage Engine: Storage Engine is responsible for storage and retrieval of the data on to the storage system (Disk, SAN etc.). to understand more, let’s focus on the following diagram. When we talk about any database in SQL server, there are 2 types of files that are created at the disk level – Data file and Log file. Data file physically stores the data in data pages. Log files that are also known as write ahead logs, are used for storing transactions performed on the database. Let’s understand data file and log file in more details: Data File: Data File stores data in the form of Data Page (8KB) and these data pages are logically organized in extents. Extents: Extents are logical units in the database. They are a combination of 8 data pages i.e. 64 KB forms an extent. Extents can be of two types, Mixed and Uniform. Mixed extents hold different types of pages like index, System, Object data etc. On the other hand, Uniform extents are dedicated to only one type. Pages: As we should know what type of data pages can be stored in SQL Server, below mentioned are some of them: Data Page: It holds the data entered by the user but not the data which is of type text, ntext, nvarchar(max), varchar(max), varbinary(max), image and xml data. Index: It stores the index entries. Text/Image: It stores LOB ( Large Object data) like text, ntext, varchar(max), nvarchar(max),  varbinary(max), image and xml data. GAM & SGAM (Global Allocation Map & Shared Global Allocation Map): They are used for saving information related to the allocation of extents. PFS (Page Free Space): Information related to page allocation and unused space available on pages. IAM (Index Allocation Map): Information pertaining to extents that are used by a table or index per allocation unit. BCM (Bulk Changed Map): Keeps information about the extents changed in a Bulk Operation. DCM (Differential Change Map): This is the information of extents that have modified since the last BACKUP DATABASE statement as per allocation unit. Log File: It also known as write ahead log. It stores modification to the database (DML and DDL). Sufficient information is logged to be able to: Roll back transactions if requested Recover the database in case of failure Write Ahead Logging is used to create log entries Transaction logs are written in chronological order in a circular way Truncation policy for logs is based on the recovery model SQL OS: This lies between the host machine (Windows OS) and SQL Server. All the activities performed on database engine are taken care of by SQL OS. It is a highly configurable operating system with powerful API (application programming interface), enabling automatic locality and advanced parallelism. SQL OS provides various operating system services, such as memory management deals with buffer pool, log buffer and deadlock detection using the blocking and locking structure. Other services include exception handling, hosting for external components like Common Language Runtime, CLR etc. I guess this brief article gives you an idea about the various terminologies used related to SQL Server Architecture. In future articles we will explore them further. Guest Author  The author of the article is Anil Kumar Yadav is Trainer, SQL Domain, Koenig Solutions. Koenig is a premier IT training firm that provides several IT certifications, such as Oracle 11g, Server+, RHCA, SQL Server Training, Prince2 Foundation etc. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Security, SQL Server, SQL Tips and Tricks, SQL Training, T SQL, Technology

    Read the article

  • SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28

    - by pinaldave
    This is another common wait type. However, I still frequently see people getting confused with PAGEIOLATCH_X and PAGELATCH_X wait types. Actually, there is a big difference between the two. PAGEIOLATCH is related to IO issues, while PAGELATCH is not related to IO issues but is oftentimes linked to a buffer issue. Before we delve deeper in this interesting topic, first let us understand what Latch is. Latches are internal SQL Server locks which can be described as very lightweight and short-term synchronization objects. Latches are not primarily to protect pages being read from disk into memory. It’s a synchronization object for any in-memory access to any portion of a log or data file.[Updated based on comment of Paul Randal] The difference between locks and latches is that locks seal all the involved resources throughout the duration of the transactions (and other processes will have no access to the object), whereas latches locks the resources during the time when the data is changed. This way, a latch is able to maintain the integrity of the data between storage engine and data cache. A latch is a short-living lock that is put on resources on buffer cache and in the physical disk when data is moved in either directions. As soon as the data is moved, the latch is released. Now, let us understand the wait stat type  related to latches. From Book On-Line: PAGELATCH_DT Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Destroy mode. PAGELATCH_EX Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Exclusive mode. PAGELATCH_KP Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Keep mode. PAGELATCH_SH Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Shared mode. PAGELATCH_UP Occurs when a task is waiting on a latch for a buffer that is not in an I/O request. The latch request is in Update mode. PAGELATCH_X Explanation: When there is a contention of access of the in-memory pages, this wait type shows up. It is quite possible that some of the pages in the memory are of very high demand. For the SQL Server to access them and put a latch on the pages, it will have to wait. This wait type is usually created at the same time. Additionally, it is commonly visible when the TempDB has higher contention as well. If there are indexes that are heavily used, contention can be created as well, leading to this wait type. Reducing PAGELATCH_X wait: The following counters are useful to understand the status of the PAGELATCH: Average Latch Wait Time (ms): The wait time for latch requests that have to wait. Latch Waits/sec: This is the number of latch requests that could not be granted immediately. Total Latch Wait Time (ms): This is the total latch wait time for latch requests in the last second. If there is TempDB contention, I suggest that you read the blog post of Robert Davis right away. He has written an excellent blog post regarding how to find out TempDB contention. The same blog post explains the terms in the allocation of GAM, SGAM and PFS. If there was a TempDB contention, Paul Randal explains the optimal settings for the TempDB in his misconceptions series. Trace Flag 1118 can be useful but use it very carefully. I totally understand that this blog post is not as clear as my other blog posts. I suggest if this wait stats is on one of your higher wait type. Do leave a comment or send me an email and I will get back to you with my solution for your situation. May the looking at all other wait stats and types together become effective as this wait type can help suggest proper bottleneck in your system. Read all the post in the Wait Types and Queue series. Note: The information presented here is from my experience and there is no way that I claim it to be accurate. I suggest reading Book OnLine for further clarification. All the discussions of Wait Stats in this blog are generic and vary from system to system. It is recommended that you test this on a development server before implementing it to a production server. Reference: Pinal Dave (http://blog.SQLAuthority.com)   Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Wait Stats, SQL Wait Types, T SQL, Technology

    Read the article

  • XNA Notes 010

    - by George Clingerman
    With GDC 2011 wrapping up there were a LOT of great interviews and posts with and about XNA and XBLIG and some of our more notorious developers. Definitely worth spending many, many hours watching, listening and reading all those. Very inspiring! Also, don’t forget to get signed up for Dream Build Play! And just as an early warning reminder do NOT, I repeat do NOT wait to submit your game the last day. There are major issues submitting the last day every year and you do not want all your hard work to be hanging on whether your entry actually went through in that last day. Plan on submitting a few days if not a week before. I’m serious, you’ll thank yourself later! Now on to what’s happening in the XNA community! Time Critical XNA News: PAX East Meet Up (really wish I was going!) http://forums.create.msdn.com/forums/p/71921/439262.aspx Want to stay panicked about the countdown to Dream Build Play? Mike McLaughlin shares his DBP countdown clock http://twitter.com/#!/mikebmcl/status/44454458960252928 XNA Team: Nick Gravelyn Only needs less than 600 new users in his unique marketing plan for Pixel Man 2 http://nickgravelyn.com/pixelman2/ And hares his ad revenue numbers with his XNA WP7 games http://theoneswiththelight.com/2011/my-results-with-ad-revenue-for-wp7-games/ XNA MVPs: Andy “The ZMan” Dunn posts his 15,000th App Hub forum post and shares a few thoughts on the MVP summit http://forums.create.msdn.com/forums/t/77625.aspx Chris Williams shares his thoughts on the MVP summit http://geekswithblogs.net/cwilliams/archive/2011/03/07/144229.aspx XNA Developers: Nathan Fouts of Mommy’s Best games Wraps up GDC http://mommysbest.blogspot.com/2011/03/gdc-2011-wrapped.html And shares the wonderful screenshots from Serious Sam. (I’m so jealous people at PAX East willl be playing a demo of this game!) http://mommysbest.blogspot.com/2011/03/serious-sam-double-d.html James Silva of Ska Studios announces http://www.ska-studios.com/2011/03/09/vampire-smile-at-hotel-sierra/ http://www.ska-studios.com/2011/03/08/vengeance-begins-april-6th/ http://www.ska-studios.com/2011/03/04/good-morning-gato-52/ Michael McLaughlin writes an extremely useful set of tips for XNA WP7 developers http://geekswithblogs.net/mikebmcl/archive/2011/03/10/tips-for-xna-wp7-developers.aspx Robert Boyd “the one man XBLIG improving machine” posts his 9 tips for marketing an Xbox LIVE Indie Gam http://www.gamasutra.com/blogs/RobertBoyd/20110309/7183/9_Tips_for_XBLIG_Marketing.php http://forums.create.msdn.com/forums/p/77534/470586.aspx#470586 And shares his day by day experience at GDC this year http://www.gamasutra.com/blogs/RobertBoyd/20110301/7118/GDC_Saves_the_World__Impressions_Day_1.php http://www.gamasutra.com/blogs/RobertBoyd/20110301/7123/GDC_Saves_the_World__Impressions_Day_2.php http://www.gamasutra.com/blogs/RobertBoyd/20110303/7129/GDC_Saves_the_World__Impressions_Day_3.php http://www.gamasutra.com/blogs/RobertBoyd/20110307/7133/GDC_Saves_the_World__Impressions_Day_4.php http://www.gamasutra.com/blogs/RobertBoyd/20110307/7160/GDC_Saves_the_World__Impressions_Day_5.php Phillipe Da Silva releases new IGF Pong Sample preview http://www.vimeo.com/20904070 Xbox LIVE Indie Games (XBLIG): Gamergeddon posts XBox Indie Game Roundup for March 6th http://www.gamergeddon.com/2011/03/06/xbox-indie-game-round-up-march-6th/ Dealspwn interviews FortressCraft developer Projector Games http://www.dealspwn.com/fortresscraft-developer-interview-minecraft-clones-venting-haters-part-1/ http://www.dealspwn.com/fortresscraft-developer-interview-part-2-trials-tribulations-indie-development/ Writings of Mass Destruction continues the Xbox LIVE Indie Game a day campaign, here’s his take on FishCraft (be sure to check out his other posts!) http://writingsofmassdeduction.com/2011/03/05/day-116-fishcraft/ Tom Ogburn shares his GDC notes on the XBLIG panel jotted quickly while attending the panel http://twitter.com/#!/TOgburn/status/44454191028125696 http://www.starlitskygames.com/blogs/site_news/archive/2011/03/06/802.aspx Dave Voyles of Armless Octopus has crazy good coverage on XNA and Xbox LIVE Indie Game developers at GDC 2011. Interviews and articles all extremely well done! http://www.armlessoctopus.com/2011/03/06/gdc-2011-successful-indie-developers-share-insight-on-microsofts-self-publishing-service/ There’s honestly so many posts and interviews you should just hit his front page and scroll down through all of the latest ones. http://www.armlessoctopus.com/ GameMarx Episode 12 http://www.gamemarx.com/video/the-show/27/ep-12-march-4-2011.aspx B.U.T.T.O.N now on Steam! http://www.gamesetwatch.com/2011/03/button_party_game_now_on_steam.php German Xbox Dashboard gets review program from GamePro http://www.armlessoctopus.com/2011/03/07/gamepo-indie-review-show-debuts-on-german-xbox-dashboard/ XboxIndies.com (one of the best XNA sites out there at this point!) continues to add review sites to it’s main review feed. (And don’t forget to play with that awesome XBLIG pivot control!) http://xboxindies.com/ Kris Steele of FunInfused Games shares early footage of his game World of Chalk http://twitter.com/#!/kriswd40/status/45007114371989504 Raymond Matthews of Darkstarmatryx reviews FunInfused Games Abduction Action http://www.darkstarmatryx.com/?p=264 TheVideoGamerRob reviews Zombie Football Carnage http://videogamerrob.wordpress.com/2011/03/08/xblig-review-zombie-football-carnage/ XBLIG Square Off Making the Jump to WP7 http://www.wp7connect.com/2011/03/08/xblig-square-off-will-make-the-jump-to-windows-phone/ Mommy’s Best Games making the news round with their Serious Sam announcement http://www.joystiq.com/2011/03/09/serious-sam-gets-serious-indie-cred-with-new-indie-series/ Most quoted and linked XBLIG article of the week with the least amount of actual facts and reporting. Shared only because it makes me sad that this is the best coverage we get. (Hey reporters, there’s LOT and LOTS of XBLIG and XNA experts you can contact if you need to check up on facts or wonder why on questions like, Why can’t XBLIGs have Nazis? There’s actually a real answer for that..) http://www.joystiq.com/2011/03/06/xblig-facts-nazi-killing-a-no-no-revenue-a-yes-yes/ XNA Development: Mort8088 has been in an XNA tutorial writing frenzy releasing 4 XNA 4.0 entry level tutorials this week! http://mort8088.com/2011/03/06/xna-4-0-tutorial-0-intro/ http://mort8088.com/2011/03/06/xna-4-0-tutorial-1-fonts/ http://mort8088.com/2011/03/06/xna-4-0-tutorial-2-sprites/ http://mort8088.com/2011/03/06/xna-4-0-tutorial-3-input-from-keyboard/ Interesting discussion on what it means to be a community (you do have to sign up to be a member of the XNA UK forums to read it...) http://twitter.com/#!/XNAUK/status/44705269254594560 Slyprid continues his incredible pace on Transmute and shares screens of his new Animation Builder http://twitter.com/#!/slyprid/status/45169271847911424 http://forgottenstarstudios.com/blog/ Philippe Da Silva wants to know who is using IGF for their games. If it’s you, drop him a note letting him know! http://twitter.com/#!/philippedasilva/status/44325893719588864 New Sunburn Video Tutorials released http://www.synapsegaming.com/blogs/fivesidedbarrel/archive/2011/03/07/new-documentation-video-tutorials.aspx Loading and rendering animated collada models using XNA 4.0 http://bunkernetz.wordpress.com/2011/03/09/loading-and-rendering-animated-collada-models-using-xna-4-0/ XNA for Silverlight Developers Part 6 Accelerometer Input http://buzzgamesnews.blogspot.com/2011/03/xna-for-silverlight-developers-part-6.html

    Read the article

1