Search Results

Search found 46790 results on 1872 pages for 'type systems'.

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

  • Converting raw data type to enumerated type

    - by Jim Lahman
    There are times when an enumerated type is preferred over using the raw data type.  An example of using a scheme is when we need to check the health of x-ray gauges in use on a production line.  Rather than using a scheme like 0, 1 and 2, we can use an enumerated type: 1: /// <summary> 2: /// POR Healthy status indicator 3: /// </summary> 4: /// <remarks>The healthy status is for each POR x-ray gauge; each has its own status.</remarks> 5: [Flags] 6: public enum POR_HEALTH : short 7: { 8: /// <summary> 9: /// POR1 healthy status indicator 10: /// </summary> 11: POR1 = 0, 12: /// <summary> 13: /// POR2 healthy status indicator 14: /// </summary> 15: POR2 = 1, 16: /// <summary> 17: /// Both POR1 and POR2 healthy status indicator 18: /// </summary> 19: BOTH = 2 20: } By using the [Flags] attribute, we are treating the enumerated type as a bit mask.  We can then use bitwise operations such as AND, OR, NOT etc. . Now, when we want to check the health of a specific gauge, we would rather use the name of the gauge than the numeric identity; it makes for better reading and programming practice. To translate the numeric identity to the enumerated value, we use the Parse method of Enum class: POR_HEALTH GaugeHealth = (POR_HEALTH) Enum.Parse(typeof(POR_HEALTH), XrayMsg.Gauge_ID.ToString()); The Parse method creates an instance of the enumerated type.  Now, we can use the name of the gauge rather than the numeric identity: 1: if (GaugeHealth == POR_HEALTH.POR1 || GaugeHealth == POR_HEALTH.BOTH) 2: { 3: XrayHealthyTag.Name = Properties.Settings.Default.POR1XRayHealthyTag; 4: } 5: else if (GaugeHealth == POR_HEALTH.POR2) 6: { 7: XrayHealthyTag.Name = Properties.Settings.Default.POR2XRayHealthyTag; 8: }

    Read the article

  • Why to say, my function is of IFly type rather than saying it's Airplane type

    - by Vishwas Gagrani
    Say, I have two classes: Airplane and Bird, both of them fly. Both implement the interface IFly. IFly declares a function StartFlying(). Thus both Airplane and Bird have to define the function, and use it as per their requirement. Now when I make a manual for class reference, what should I write for the function StartFlying? 1) StartFlying is a function of type IFly . 2) StartFlying is a function of type Airplane 3) StartFlying is a function of type Bird. My opinion is 2 and 3 are more informative. But what i see is that class references use the 1st one. They say what interface the function is declared in. Problem is, I really don't get any usable information from knowing StartFlying is IFly type. However, knowing that StartFlying is a function inside Airplane and Bird, is more informative, as I can decide which instance (Airplane or Bird ) to use. Any lights on this: how saying StartFlying is a function of type IFly, can help a programmer understanding how to use the function?

    Read the article

  • determine complex type from a primitive type using reflection

    - by Nilotpal Das
    I am writing a tool where I need to reflect upon methods and if the parameters of the methods are complex type, then I need to certain type of actions such as instantiating them etc. Now I saw the IsPrimitive property in the Type variable. However, it shows string and decimal as complex types, which technically isn't incorrect. However what I really want is to be able to distinguish developer created class types from system defined data types. Is there any way that I can do this?

    Read the article

  • Hot to get generic type from object type

    - by Murat
    My Classes are; class BaseClass { } class DerivedClass1 : BaseClass { } class GenericClass<T> { } class DerivedClass2 : BaseClass { GenericClass<DerivedClass1> subItem; } I want to access all fields of DerivedClass2 class. I use System.Reflection and FieldInfo.GetValue() method; Bu I cant get subItem field. FieldInfo.GetValue() method return type is "object". And I cant cast to GenericClass<DerivedClass1> or I cant get DerivedClass1 type. I try this with BaseClass BaseClass instance = FieldInfo.Getvalue(this) as GenericClass<BaseClass>; but instance is null. How to get instance with type or how to get only type?

    Read the article

  • Why doesn't Haskell have type-level lambda abstractions?

    - by Petr Pudlák
    Are there some theoretical reasons for that (like that the type checking or type inference would become undecidable), or practical reasons (too difficult to implement properly)? Currently, we can wrap things into newtype like newtype Pair a = Pair (a, a) and then have Pair :: * -> * but we cannot do something like ?(a:*). (a,a). (There are some languages that have them, for example, Scala does.)

    Read the article

  • Scala type system : basic type mismatch

    - by SiM
    I have a basic type system type mismatch problem: I have a class with a method def Create(nodeItem : NodeItem) = {p_nodeStart.addEndNode(nodeItem)} where p_nodeStart is NodeCache class NodeCache[END_T<:BaseNode] private(node: Node) extends BaseNode { def addEndNode(endNode : END_T) = {this.CACHE_HAS_ENDNODES.Create(endNode)} and the error its giving me is: error: type mismatch; found : nodes.NodeItem required: Nothing def Create(nodeItem : NodeItem) = {p_nodeStart.addEndNode(nodeItem)} while the NodeCache is defined as object NodeTrigger { def Create() { val nodeTimeCache = NodeCache.Create[NodeItem](node) and in object NodeCache object NodeCache { def Create[END_T<:BaseNode]() { val nodeCache = new NodeCache[END_T](node); Any ideas, how to fix the error?

    Read the article

  • A follow up on type coercion in C++, as it may be construed by type conversion

    - by David
    This is a follow up to my previous question. Consider that I write a function with the following prototype: int a_function(Foo val); Where foo is believed to be a type defined unsigned int. This is unfortunately not verifiable for lack of documentation. So, someone comes along and uses a_function, but calls it with an unsigned int as an argument. Here the story takes a turn. Foo turns out to actually be a class, which can take an unsigned int as a single argument of unsigned int in an explicit constructor. Is it a standard and reliable behavior for the compiler to render the function call by doing a type conversion on the argument. I.e. is the compiler supposed to recognize the mismatch and insert the constructor? Or should I get a compile time error reporting the type mismatch.

    Read the article

  • kernel module compiling error

    - by wati
    sh@ubuntu:/home/ccpp/helloworld$ make gcc-4.6 -O2 -DMODULE -D_KERNEL_ -W -Wall -Wstrict-prototypes -Wmissing-prototypes -isystem /lib/modules/`uname -r`/build/include -c -o hello-1.o hello-1.c hello-1.c:4:0: warning: "MODULE" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition hello-1.c:6:0: warning: "_KERNEL_" redefined [enabled by default] <command-line>:0:0: note: this is the location of the previous definition In file included from /lib/modules/3.2.0-25-generic/build/include/linux/list.h:4:0, from /lib/modules/3.2.0-25-generic/build/include/linux/module.h:9, from hello-1.c:7: /lib/modules/3.2.0-25-generic/build/include/linux/types.h:13:2: warning: #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" [-Wcpp] In file included from /lib/modules/3.2.0-25-generic/build/include/linux/module.h:9:0, from hello-1.c:7: /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘INIT_LIST_HEAD’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:26:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:27:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘__list_add’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:41:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:42:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:43:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:44:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_add’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:62:28: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_add_tail’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:76:22: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘__list_del’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:88:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:89:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘__list_del_entry’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:101:18: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:101:31: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_del’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:106:18: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:106:31: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:107:7: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:108:7: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_replace’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:125:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:125:17: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:126:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:127:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:127:17: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:128:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_is_last’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:179:13: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_empty’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:188:13: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_empty_careful’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:206:31: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:207:40: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_rotate_left’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:219:15: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_is_singular’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:230:35: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:230:49: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘__list_cut_position’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:236:37: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:237:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:237:19: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:238:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:239:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:240:7: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:241:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:242:11: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_cut_position’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:265:8: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘__list_splice’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:277:32: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:278:31: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:280:7: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:281:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:283:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:284:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_splice’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:296:33: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_splice_tail’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:308:27: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_splice_init’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:322:33: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘list_splice_tail_init’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:339:27: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘INIT_HLIST_NODE’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:572:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:573:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_unhashed’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:578:11: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_empty’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:583:11: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘__hlist_del’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:588:29: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:589:31: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:592:7: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_del’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:598:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:599:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_add_head’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:612:30: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:613:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:615:8: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:615:20: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:616:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:617:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:617:15: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_add_before’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:624:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:624:17: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:625:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:626:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:626:18: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:627:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_add_after’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:633:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:633:16: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:634:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:635:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:635:18: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:637:9: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:638:7: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:638:29: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_add_fake’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:644:3: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:644:15: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h: In function ‘hlist_move_list’: /lib/modules/3.2.0-25-generic/build/include/linux/list.h:654:5: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:654:18: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:655:9: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:656:6: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:656:27: error: dereferencing pointer to incomplete type /lib/modules/3.2.0-25-generic/build/include/linux/list.h:657:5: error: dereferencing pointer to incomplete type In file included from /lib/modules/3.2.0-25-generic/build/include/linux/module.h:12:0, from hello-1.c:7: /lib/modules/3.2.0-25-generic/build/include/linux/cache.h: At top level: /lib/modules/3.2.0-25-generic/build/include/linux/cache.h:5:23: fatal error: asm/cache.h: No such file or directory compilation terminated. make: *** [hello-1.o] Error 1 i got this error after compiling an helloworld program my program is #define MODULE #define LINUX #define _KERNEL_ #include <linux/module.h> #include <linux/kernel.h> int init_module(void) { printk("<1>hello World 1.\n"); return 0; } void cleanup_module(void) { printk(KERN_ALERT "goodbye world 1.\n"); } MODULE_LICENSE("GPL"); my make file is: TARGET := hello-1 WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes INCLUDE := -isystem /lib/modules/`uname -r`/build/include CFLAGS := -O2 -DMODULE -D_KERNEL_ ${WARN} ${INCLUDE} CC := gcc-4.6 ${TARGET}.o: ${TARGET}.c .PHONY: clean clean: rm -rf ${TARGET}.o iam usin kernel 3.2.0.25 as novice i can't able to figure out where the problem is I SEARCHED EVERY THING I CAN TO KNOW ABOUT THIS ERROR BUT I CANT UNDERSTAND &I GET IRRELEVANT DOCS anybody help me please

    Read the article

  • How Can I Check an Object to See its Type and Return A Casted Object

    - by Russ Bradberry
    I have method to which I pass an object. In this method I check it's type and depending on the type I do something with it and return a Long. I have tried every which way I can think of to do this and I always get several compiler errors telling me it expects a certain object but gets another. Can someone please explain to me what I am doing wrong and guide me in the right direction? What I have tried thus far is below: override def getInteger(obj:Object) = { if (obj.isInstanceOf[Object]) null else if (obj.isInstanceOf[Number]) (obj:Number).longValue() else if (obj.isInstanceOf[Boolean]) if (obj:Boolean) 1 else 0 else if (obj.isInstanceOf[String]) if ((obj:String).length == 0 | (obj:String) == "null") null else try { Long.parse(obj:String) } catch { case e: Exception => throw new ValueConverterException("value \"" + obj.toString() + "\" of type " + obj.getClass().getName() + " is not convertible to Long") } }

    Read the article

  • SQL SERVER – Summary of Month – Wait Type – Day 28 of 28

    - by pinaldave
    I am glad to announce that the month of Wait Types and Queues very successful. I am glad that it was very well received and there was great amount of participation from community. I am fortunate to have some of the excellent comments throughout the series. I want to dedicate this series to all the guest blogger – Jonathan, Jacob, Glenn, and Feodor for their kindness to take a participation in this series. Here is the complete list of the blog posts in this series. I enjoyed writing the series and I plan to continue writing similar series. Please offer your opinion. SQL SERVER – Introduction to Wait Stats and Wait Types – Wait Type – Day 1 of 28 SQL SERVER – Signal Wait Time Introduction with Simple Example – Wait Type – Day 2 of 28 SQL SERVER – DMV – sys.dm_os_wait_stats Explanation – Wait Type – Day 3 of 28 SQL SERVER – DMV – sys.dm_os_waiting_tasks and sys.dm_exec_requests – Wait Type – Day 4 of 28 SQL SERVER – Capturing Wait Types and Wait Stats Information at Interval – Wait Type – Day 5 of 28 SQL SERVER – CXPACKET – Parallelism – Usual Solution – Wait Type – Day 6 of 28 SQL SERVER – CXPACKET – Parallelism – Advanced Solution – Wait Type – Day 7 of 28 SQL SERVER – SOS_SCHEDULER_YIELD – Wait Type – Day 8 of 28 SQL SERVER – PAGEIOLATCH_DT, PAGEIOLATCH_EX, PAGEIOLATCH_KP, PAGEIOLATCH_SH, PAGEIOLATCH_UP – Wait Type – Day 9 of 28 SQL SERVER – IO_COMPLETION – Wait Type – Day 10 of 28 SQL SERVER – ASYNC_IO_COMPLETION – Wait Type – Day 11 of 28 SQL SERVER – PAGELATCH_DT, PAGELATCH_EX, PAGELATCH_KP, PAGELATCH_SH, PAGELATCH_UP – Wait Type – Day 12 of 28 SQL SERVER – FT_IFTS_SCHEDULER_IDLE_WAIT – Full Text – Wait Type – Day 13 of 28 SQL SERVER – BACKUPIO, BACKUPBUFFER – Wait Type – Day 14 of 28 SQL SERVER – LCK_M_XXX – Wait Type – Day 15 of 28 SQL SERVER – Guest Post – Jonathan Kehayias – Wait Type – Day 16 of 28 SQL SERVER – WRITELOG – Wait Type – Day 17 of 28 SQL SERVER – LOGBUFFER – Wait Type – Day 18 of 28 SQL SERVER – PREEMPTIVE and Non-PREEMPTIVE – Wait Type – Day 19 of 28 SQL SERVER – MSQL_XP – Wait Type – Day 20 of 28 SQL SERVER – Guest Posts – Feodor Georgiev – The Context of Our Database Environment – Going Beyond the Internal SQL Server Waits – Wait Type – Day 21 of 28 SQL SERVER – Guest Post – Jacob Sebastian – Filestream – Wait Types – Wait Queues – Day 22 of 28 SQL SERVER – OLEDB – Link Server – Wait Type – Day 23 of 28 SQL SERVER – 2000 – DBCC SQLPERF(waitstats) – Wait Type – Day 24 of 28 SQL SERVER – 2011 – Wait Type – Day 25 of 28 SQL SERVER – Guest Post – Glenn Berry – Wait Type – Day 26 of 28 SQL SERVER – Best Reference – Wait Type – Day 27 of 28 SQL SERVER – Summary of Month – Wait Type – Day 28 of 28 Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, PostADay, SQL, SQL Authority, SQL Optimization, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQL Wait Stats, SQL Wait Types, SQLServer, T SQL, Technology

    Read the article

  • Obscure Operating Systems

    - by DLH
    Do you ever get the urge to try random obscure operating systems? I think it's sometimes just fun to use systems that are not widely used. What obscure operating systems have you tried (or have thought about trying)? I've been looking into Haiku lately.

    Read the article

  • Is type safety worth the trade-offs?

    - by Prof Plum
    I began coding in in Python primarily where there is no type safety, then moved to C# and Java where there is. I found that I could work a bit more quickly and with less headaches in Python, but then again, my C# and Java apps are at much higher level of complexity so I have never given Python a true stress test I suppose. The Java and C# camps make it sound like without the type safety in place, most people would be running into all sorts of horrible bugs left an right and it would be more trouble than its worth. This is not a language comparison, so please do not address issues like compiled vs interpreted. Is type safety worth the hit to speed of development and flexibilty? WHY? to the people who wanted an example of the opinion that dynamic typing is faster: "Use a dynamically typed language during development. It gives you faster feedback, turn-around time, and development speed." - http://blog.jayway.com/2010/04/14/static-typing-is-the-root-of-all-evil/

    Read the article

  • Comparison between a value with static type Array and a possibly unrelated type Class

    - by Kaoru
    I got this error: Comparison between a value with static type Array and a possibly unrelated type Class. After i modify the class to many classes (before that, everything is on 1 class (all of the functions)), but after i move everything to many classes (all the functions is not on 1 class), that error appear. How to solve this? I am using AS3 and as3isolib Library. Here is the code after i modify the function: if (Constant.dude.y < Constant._numY) { if (Constant.dude.sprites != marioBackClass) { Constant.dude.sprites = [marioBackClass]; Constant.dudeDir = "Up"; } } Here is the code before i change the function to many classes: if (dude.y < ._numY) { if (dude.sprites.toString() != marioBackClass.toString()) { dude.sprites = [marioBackClass]; dudeDir = "Up"; } }

    Read the article

  • Haskell type signature with multiple type somethings (predicates?, for example Eq a =>)

    - by Andrew
    I'm not sure if type predicates is the right term, in fact I've never learned the word for this, so an edit to correct would be helpful - I'm referring to when you give the tipe of function f :: a -> b and you want to say a is a Eq and you say f :: Eq a => a -> b, the name for Eq a => - this is the thing i called a type predicate. My question, though, is how to have multiple of these, so if A is an Eq and B is a Num, I could say either f :: Eq a => a -> b or f :: Num b => a -> b. So, how can I have Eq a => and Num b => at the same time? f :: Eq a => Num b => a -> b, f :: Eq a -> Num b => a -> b, and f :: Eq a, Num b => a -> b all didn't do what I wanted.

    Read the article

  • Help with possible Haskell type inference quiz questions

    - by Linda Cohen
    foldr:: (a -> b -> b) -> b -> [a] -> b map :: (a -> b) -> [a] -> [b] mys :: a -> a (.) :: (a -> b) -> (c -> a) -> c -> b what is inferred type of: a.map mys :: b.mys map :: c.foldr map :: d.foldr map.mys :: I've tried to create mys myself using mys n = n + 2 but the type of that is mys :: Num a => a -> a What's the difference between Num a = a - a and just a - a? Or what does 'Num a =' mean? Is it that mys would only take Num type? So anyways, a) I got [a] - [a] I think because it would just take a list and return it +2'd according to my definition of mys b) (a - b) - [a] - [b] I think because map still needs take both arguments like (*3) and a list then returns [a] which goes to mys and returns [b] c) I'm not sure how to do this 1. d) I'm not sure how to do this 1 either but map.mys means do mys first then map right? Are my answers and thoughts correct? If not, why not? THANKS!

    Read the article

  • Convert List of one type to Array of another type using Dozer

    - by aheu
    I'm wondering how to convert a List of one type to an array of another type in Java using Dozer. The two types have all the same property names/types. For example, consider these two classes. public class A{ private String test = null; public String getTest(){ return this.test } public void setTest(String test){ this.test = test; } } public class B{ private String test = null; public String getTest(){ return this.test } public void setTest(String test){ this.test = test; } } I've tried this with no luck. List<A> listOfA = getListofAObjects(); Mapper mapper = DozerBeanMapperSingletonWrapper.getInstance(); B[] bs = mapper.map(listOfA, B[].class); I've also tried using the CollectionUtils class. CollectionUtils.convertListToArray(listOfA, B.class) Neither are working for me, can anyone tell me what I am doing wrong? The mapper.map function works fine if I create two wrapper classes, one containing a List and the other a b[]. See below: public class C{ private List<A> items = null; public List<A> getItems(){ return this.items; } public void setItems(List<A> items){ this.items = items; } } public class D{ private B[] items = null; public B[] getItems(){ return this.items; } public void setItems(B[] items){ this.items = items; } } This works oddly enough... List<A> listOfA = getListofAObjects(); C c = new C(); c.setItems(listOfA); Mapper mapper = DozerBeanMapperSingletonWrapper.getInstance(); D d = mapper.map(listOfA, D.class); B[] bs = d.getItems(); How do I do what I want to do without using the wrapper classes (C & D)? There has got to be an easier way... Thanks!

    Read the article

  • Do any languages other than haskell/agda have a hindley-milner type system and type classes?

    - by Jimmy Hoffa
    In pondering what gives Haskell such a layer of mental pain in becoming proficient the main thing I can think of are the Monads, Applicatives, Functors, and gaining an intuition to know how a list or maybe will behave in regards to sequence or alternate or bind etc. But why haven't other languages presented these same concepts given the usefulness of monads/applicatives/etc? It occurs to me, type classes are the key, so the question is: Have any languages other than Haskell/Agda actually implemented type classes in the same or similar way?

    Read the article

  • Webpage loading with wrong content-type after setting up CloudFlare

    - by Daniel Little
    I recently migrated my blog to the Ghost service, I've also setup an alias DNS record with CloudFlare. While showing the blog to a colleague I discovered one of the posts wasn't loading properly and would instead prompt to be downloaded with an application/octet-stream content-type. I can view all the pages without any issues and I believe we're both on the same network as well. Has anyone received a wrong content type like application/octet-stream using CloudFlare, or know what I can do to correct this?

    Read the article

  • Webservice Return Generic Result Type or Purposed Result Type

    - by hanzolo
    I'm building a webservice which returns JSON / XML / SOAP at the moment.. and I'm not entirely sure which approach for returning results is best. Which would be a better return value? A generic "transfer" type structure, which carries Generic properties or a purposed type with distinct properties: class GenericTransferObject{ public string returnVal; public string returnType; } VS class PurposedTransferObject_1{ public string Property1; } //and then building additional "types" for additional values class PurposedTransferObject_2 { public string PropertyA; public string PropertyB; } Now, this would be the serialized and returned from a web service call via some client technology, JQuery in this example. SO if I called: /GetDaysInWeek/ I would either get back: {"returnType": "DaysInWeek", "returnVal": "365" } OR {"DaysInWeek": "365"} And then it would go from there. On the one hand there's flexibilty with the 1st example. I can add "returnTypes" without needing to adjust the client other than referencing an additional "index".. but if I had to add a property, now i'm changing a structure definition.. Is there an obvious choice in this situation?

    Read the article

  • two operating systems sharing their file systems with eachother (Windows and Linux)

    - by John Kube
    I have two operating systems installed on my notebook computer, Windows Vista and Ubuntu Linux. When I boot up, I'm presented with a bootloader which allows me to choose which one I want to load. I'm interested in sharing each operating system's file system with the other, such that I could access my Windows files from Linux and vice-versa. Is this possible, and if so how would one go about setting it up? Feel free to just post a link to an existing solution if there is one. I would Google for this myself, but I don't even know what to search for, as I don't know what this is called.

    Read the article

  • Apache serving wrong Content-Type for Rails files

    - by NudeCanalTroll
    Apache keeps serving up my Rails files with a Content-Type of 'text/plain' in the header. I have mod_mime installed, a mime.types files with all the correct MIME assignments, and the following code in my configuration. Any thoughts? DefaultType text/plain <IfModule mime_module> TypesConfig /etc/apache2/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </IfModule>

    Read the article

  • What is the evidence that an API has exceeded its orthogonality in the context of types?

    - by hawkeye
    Wikipedia defines software orthogonality as: orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language. The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set. Jason Coffin has defined software orthogonality as Highly cohesive components that are loosely coupled to each other produce an orthogonal system. C.Ross has defined software orthogonality as: the property that means "Changing A does not change B". An example of an orthogonal system would be a radio, where changing the station does not change the volume and vice-versa. Now there is a hypothesis published in the the ACM Queue by Tim Bray - that some have called the Bánffy Bray Type System Criteria - which he summarises as: Static typings attractiveness is a direct function (and dynamic typings an inverse function) of API surface size. Dynamic typings attractiveness is a direct function (and static typings an inverse function) of unit testing workability. Now Stuart Halloway has reformulated Banfy Bray as: the more your APIs exceed orthogonality, the better you will like static typing My question is: What is the evidence that an API has exceeded its orthogonality in the context of types? Clarification Tim Bray introduces the idea of orthogonality and APIs. Where you have one API and it is mainly dealing with Strings (ie a web server serving requests and responses), then a uni-typed language (python, ruby) is 'aligned' to that API - because the the type system of these languages isn't sophisticated, but it doesn't matter since you're dealing with Strings anyway. He then moves on to Android programming, which has a whole bunch of sensor APIs, which are all 'different' to the web server API that he was working on previously. Because you're not just dealing with Strings, but with different types, the API is non-orthogonal. Tim's point is that there is a empirical relationship between your 'liking' of types and the API you're programming against. (ie a subjective point is actually objective depending on your context).

    Read the article

  • How do I implement the bg, &, and fg commands functionaliity in my custom unix shell program written in C

    - by user1631009
    I am extending the functionality of a custom unix shell which I wrote as part of my lab assignment. It currently supports all commands through execvp calls, in-built commands like pwd, cd, history, echo and export, and also redirection and pipes. Now I wanted to add support for running a command in background e.g. $ls -la& I also want to implement bg and fg job control commands. I know this can be achieved if I execute the command by forking a new child process and not waiting for it in the parent process. But how do I again bring this command to foreground using fg? I have the idea of entering each background command in a list assigning each of them a serial number. But I don't know how do I make the processes execute in the background, then bring them back to foreground. I guess wait() and waitpid() system calls would come handy but I am not that comfortable with them. I tried reading the man pages but still am in the dark. Can someone please explain in a layman's language how to achieve this in UNIX system programming? And does it have something to do with SIGCONT and SIGSTP signals?

    Read the article

  • How do I implement the bg, &, and bg commands functionaliity in my custom unix shell program written in C

    - by user1631009
    I am trying to extend the functionality of my custom unix shell which I earlier wrote as part of my lab assignment. It currently supports all commands through execvp calls, in-built commands like pwd, cd, history, echo and export, and also redirection and pipes. Now I wanted to add the support for running a command in background e.g. $ls -la& Now I also want to implement bg and fg job control commands. I know this can be achieved if I execute the command by forking a new child process and not waiting for it in the parent process. But how do I again bring this command to foreground using fg? I have the idea of entering each background command in a list assigning each of them a serial number. But I don't know how do I make the processes execute in the background, then bring them back to foreground. I guess wait() and waitpid() system calls would come handy but I am not that comfortable with them. I tried reading the man pages but still am in the dark. Can someone please explain in a layman's language how to achieve this in UNIX system programming? And does it have something to do with SIGCONT and SIGSTP signals?

    Read the article

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