Search Results

Search found 7086 results on 284 pages for 'explain'.

Page 176/284 | < Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >

  • Where Should Using Statements Be Located [closed]

    - by Bobby Ortiz - DotNetBob
    Possible Duplicate: What is the difference between these two declarations? I recently started working on a project with using statement located inside the NameSpace block. namespace MyApp.Web { using System; using System.Web.Security; using System.Web; public class MyClass { I usually put my using statements above the namespace block. using System; using System.Web.Security; using System.Web; namespace MyApp.Web { public class MyClass { I don't think it matters, but I am currious if someone else had a recommendation and could they explain why one way is better than another. Note: I always have one class per file.

    Read the article

  • How to SUM columns on multiple conditions in a GROUP BY

    - by David Liddle
    I am trying to return a list of Accounts with their Balances, Outcome and Income Account Transaction ------- ----------- AccountID TransactionID BankName AccountID Locale Amount Status Here is what I currently have. Could someone explain where I am going wrong? select a.ACCOUNT_ID, a.BANK_NAME, a.LOCALE, a.STATUS, sum(t1.AMOUNT) as BALANCE, sum(t2.AMOUNT) as OUTCOME, sum(t3.AMOUNT) as INCOME from ACCOUNT a left join TRANSACTION t1 on t1.ACCOUNT_ID = a.ACCOUNT_ID left join TRANSACTION t2 on t1.ACCOUNT_ID = a.ACCOUNT_ID and t2.AMOUNT < 0 left join TRANSACTION t3 on t3.ACCOUNT_ID = a.ACCOUNT_ID and t3.AMOUNT > 0 group by a.ACCOUNT_ID, a.BANK_NAME, a.LOCALE, a.[STATUS]

    Read the article

  • How messages flows between computers connected with Internet or LAN ?

    - by Praveen
    Hi All, I have been doing Windows programming in .Net since last two years. Now I am shifting to web programming so I just stuck in understanding the fundamentals of web programming, after googling I came to StackOverflow to learn from all of you great guys. My confusion is about how messages flow between systems in distributed enviornment ? I mean suppose I want to send a message "Hello" to a system connected to LAN or Internet, then what will be the steps taken to send the message. Second thing is suppose my system is "A" and I wana send message to system "B" which is connected via a wire, so how the message flows on wire and how system "B" reads it from the wire ? Please someone explain me in a layman terms. Thank you all in advance.

    Read the article

  • Float32 to Float16

    - by Goz
    Can someone explain to me how I convert a 32-bit floating point value to a 16-bit floating point value? (s = sign e = exponent and m = mantissa) If 32-bit float is 1s7e24m And 16-bit float is 1s5e10m Then is it as simple as doing? int fltInt32; short fltInt16; memcpy( &fltInt32, &flt, sizeof( float ) ); fltInt16 = (fltInt32 & 0x00FFFFFF) >> 14; fltInt16 |= ((fltInt32 & 0x7f000000) >> 26) << 10; fltInt16 |= ((fltInt32 & 0x80000000) >> 16); I'm assuming it ISN'T that simple ... so can anyone tell me what you DO need to do?

    Read the article

  • Tag <code>: how to "correct" publish it ?

    - by stighy
    Hi, i'm not sure to explain what i'm looking for. What's the name of the "source code parser" for publish code, in HTML ? For example, when i write some source code here in stack overflow, system auto-detect the sintax and write "correct" source code in html. I've noticed that exists the HTML <"code" tag, but it simply write source code in "courier" font. So i'm asking you if exists some "external" component that, given a text, parse it out correctly in a HTML page. Thank you!

    Read the article

  • Why can I derived from a templated/generic class based on that type in C# / C++

    - by stusmith
    Title probably doesn't make a lot of sense, so I'll start with some code: class Foo : public std::vector<Foo> { }; ... Foo f; f.push_back( Foo() ); Why is this allowed by the compiler? My brain is melting at this stage, so can anyone explain whether there are any reasons you would want to do this? Unfortunately I've just seen a similar pattern in some production C# code and wondered why anyone would use this pattern.

    Read the article

  • How to interpret situations where Math.Acos() reports invalid input?

    - by Sean Ochoa
    Hey all. I'm computing the angle between two vectors, and sometimes Math.Acos() returns NaN when it's input is out of bounds (-1 input && input 1) for a cosine. What does that mean, exactly? Would someone be able to explain what's happening? Any help is appreciated! Here's me method: public double AngleBetween(vector b) { var dotProd = this.Dot(b); var lenProd = this.Len*b.Len; var divOperation = dotProd/lenProd; // http://msdn.microsoft.com/en-us/library/system.math.acos.aspx return Math.Acos(divOperation) * (180.0 / Math.PI); }

    Read the article

  • svn revert or merge 80 revisions

    - by sharp
    Hi All, Let me explain my scenarios I have branch called ca-dev and its pretty stable,now I have to revert about 100 revisions (ca-dev has about 400 revisions checked in total after it branched out )from different users which were checked in over 4 months before I am branching new branch called agile-dev.Can any body help me best way to do... I tried using tortise svn some got reverted some I got conflicts and I resolved my self blindly so build is breaking. (ofcourse I made a agile-dev-temp) .. any tool better than tortisesvn easily I can view myself and clearly explains. Or who should do it Individual developer? Thanks

    Read the article

  • Understanding "this" keyword

    - by Raffaele
    In this commit there is a change I cannot explain deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); becomes deferred.done( arguments ).fail( arguments ); AFAIK, when you invoke a function as a member of some object like obj.func(), inside the function this is bound to obj, so there would be no use invoking a function through apply() just to bound this to obj. Instead, according to the comments, this was required because of some preceding $.Callbacks.add implementation. My doubt is not about jQuery, but about the Javascript language itself: when you invoke a function like obj.func(), how can it be that inside func() the this keyword is not bound to obj?

    Read the article

  • Constant Assigment Bug in Ruby?

    - by aronchick
    We caught some code in Ruby that seems odd, and I was wondering if someone could explain it: $ irb irb(main):001:0> APPLE = 'aaa' => "aaa" irb(main):002:0> banana = APPLE => "aaa" irb(main):003:0> banana << 'bbb' => "aaabbb" irb(main):004:0> banana => "aaabbb" irb(main):005:0> APPLE => "aaabbb" Catch that? The constant was appended to at the same time the local variable was. Known behavior? Expected?

    Read the article

  • Why does Perl allow mutual "use" relationships between modules?

    - by Haiyuan Zhang
    Let's say there are two modules that mutually use each other: package a; use b; sub p {} 1; package b; use a; 1; I think that it is systematically wrong to write code like the above, because the two modules will endlessly copy each other's code to themselves, but I can successfully run the following code, which makes me very surprised. Could any of you explain all of this to me? #! /usr/bin/perl use a; a->p();

    Read the article

  • Trouble using xib files in libraries

    - by flohei
    Hi there, I'm having some trouble working with libraries and included xib files. Let me explain my situation first. I've got a project that's running pretty good. Now I need a part of my project as a library for another customer who want's to use some of the functionality in his app. I've created a library with help of that highly recommended article. My customer should be able to initialize a main view controller like this: LibraryMainViewController *lmvc = [[LibraryMainViewController alloc] initWithNibName:@"LibraryMainViewController.xib" bundle:foo]; That for sure leads to an error when I try to present that view controller modally. I'm not sure what bundle I have to use here. I tried something like [NSBundle bundleForClass:[SomeClassInTheLibrary class]]; but that didn't solve the problem. I would be glad if someone could tell me how to actually use a xib file in that kind of situation. Thanks –f

    Read the article

  • addslashes and addcslahes

    - by theband
    I was seeing today the addslashes and addcslashes in php.net, but did not get the point on what is the difference between them and what are the characters escaped in these two. <?php $originaltext = 'This text does NOT contain \\n a new-line!'; $encoded = addcslashes($originaltext, '\\'); $decoded = stripcslashes($encoded); //$decoded now contains a copy of $originaltext with perfect integrity echo $decoded; //Display the sentence with it's literal \n intact ?> If i comment the $decoded variable and echo $encoded, i get the same value which is in the original string. Can anyone clearly explain me the difference and use of these two.

    Read the article

  • Why isn't the eigenclass equivalent to self.class, when it looks so similar?

    - by The Wicked Flea
    I've missed the memo somewhere, and I hope you'll explain this to me. Why is the eigenclass of an object different from self.class? class Foo def initialize(symbol) eigenclass = class << self self end eigenclass.class_eval do attr_accessor symbol end end end My train of logic that equates the eigenclass with class.self is rather simple: class << self is a way of declaring class methods, rather than instance methods. It's a shortcut to def Foo.bar. So within the reference to the class object, returning self should be identical to self.class. This is because class << self would set self to Foo.class for definition of class methods/attributes. Am I just confused? Or, is this a sneaky trick of Ruby meta-programming?

    Read the article

  • Force reload/refresh when pressing the back button

    - by FlyingCat
    I will try my best to explain this. I have an application that show the 50+ projects in my view page. The user can click the individual project and go to the update page to update the project information. Everything works fine except that after user finish updating the individual project information and hit 'back' button on the browser to the previous view page. The old project information (before update) is still there. The user has to hit refresh to see the updated information. It not that bad, but I wish to provide better user experience. Any idea to fix this? Thanks a lot.

    Read the article

  • Intellij UML diagram does not show one to many relationships

    - by Calm Storm
    I am trying to follow http://www.jetbrains.com/idea/features/uml_class_diagram.html I have a few classes so when I do Ctrl + Alt + U I only see all classes and just Extends relationships. Please note that I have set the "Diagrams" options in my settings to show one to many etc. I do not see One to One, One to Many relationships at all ? I have used JPA OneToOne Annotations and they dont turn up at all? Pressing Ctrl Shift F12 does not do anything? Can someone please explain?

    Read the article

  • pointers in C with a #define

    - by milan
    The function: #define ASSOC(port) (*(volatile bit_field *) (&port)) The function call: #define SCLK ASSOC(PORTC).bit0 bit_field defined as a struct like this: typedef struct { unsigned char bit0 :1, bit1 :1, bit2 :1, bit3 :1, bit4 :1, bit5 :1, bit6 :1, bit7 :1; } bit_field; I don't know where &port is defined. Can someone please explain how the function is read and how it works please? I am not very good with pointers and this example in particular is very confusing with "*" in the front and at the end and the "&" with the port. Thank you

    Read the article

  • Citrix application automation using QTP

    - by user1065345
    I need some clarifications regarding Citrix application automation using QTP. In my project I am having QTP 9.2 and citrix 3.5 version. I would like to know the technical reason behind “why Citrix cannot be automated using QTP?”. Also I got information like applications in citrix 5 version can be automated using QTP. Please let me know how effective the automation can be done with Citrix 5 version. Can anyone explain it in details. Appreciate your help Thanks!!

    Read the article

  • I can't Distinct, Sum, or Count from 3 tables with group clauses

    - by Rio Inggit Dharmawangsa
    I'm still learning linq, now i'm getting confused. I need data for report from 3 tables, I get the result, but it's duplicate. I have used distinct but it's not working, n I need data to be sum still not working. Here is my query, can somebody explain what's wrong? var report= (from u in myDb.TBL_TRANSAKSI_MKN_MNMs.AsEnumerable() where u.TGL_TRANSAKSI.Value.Date.Equals(dateTimePicker1.Value.Date) join l in myDb.TBL_DETAIL_TRANSAKSIs.AsEnumerable() on u.ID_NOTA equals l.ID_NOTA join m in myDb.TBL_MKN_MNMs.AsEnumerable() on l.ID_MKN_MNM equals m.ID_MKN_MNM group new { u, l, m } by new { m.NAMA_MKN_MNM, m.HARGA_JUAL, u.TGL_TRANSAKSI, l.ID_MKN_MNM, u.USERNAME, l.Jumlah } into grp select new { MakanMinum = grp.Key.NAMA_MKN_MNM, HargaJual = grp.Key.HARGA_JUAL, Stok = grp.Sum(groupedthing => groupedthing.l.Jumlah), Tanggal = grp.Key.TGL_TRANSAKSI, Jumlah =(grp.Key.HARGA_JUAL * grp.Sum(groupedthing => groupedthing.l.Jumlah)), Total = grp.Sum(grouptotal => grp.Key.HARGA_JUAL * grp.Sum(groupedthing => groupedthing.l.Jumlah)), Username = grp.Key.USERNAME }).Distinct();

    Read the article

  • Htaccess/robots.txt to allow search bots to explore main domain but not directory on other domain

    - by gX
    Ok, I understand the Title didn't make any sense so here I've tried to explain it in detail. I'm using a hosting that gives me space for my domain and lets me "add on" other domains on it. So lets say I have a domain A, and I add on a domain B. Basically my hosting gives me a public_html where I can put stuff that shows when someone visits website A. But, when I add the domain B, it lets me put the content of B, INSIDE of that public_html so that website B.com can also be visited by going to A.com/siteB... Thats all good, except that Google has started indexing B.com as well as A.com/siteB, I'm ok with it indexing B.com, but I somehow want to prevent it from indexing A.com/siteB so that when people search for B, it doesn't end up showing A.com/siteB. Any ideas? Let me know if the question is still unclear.

    Read the article

  • strenge exception phenomenon in win7

    - by Level 2
    Hello all, I spot some interesting artcles about exception handle in codeproject http://www.codeproject.com/KB/cpp/seexception.aspx after reading, I decided to do some experiment. The first time I try to excute the following code char *p; p[0] = 0; The program died without question. But After serveral time I execute the same problem binary code. It magically did fine. even the following code is doing well. any clue or explain? char *p p[1000] = 'd'; cout<<p[1000]<<endl; my os is windows 7 64bit and compiler is vs2008 rc1.

    Read the article

  • Unreachable, existing variable

    - by Oden
    I'm new at as3, maybe thats the reason why i don't understand, why the setInterval causes an error. <mx:Script> <![CDATA[ import flash.utils.setInterval; import mx.controls.Alert; [Bindable] public var MyInt:int = 500; setInterval(function():void{ ++MyInt; },1000); ]]> </mx:Script> I have a label where the value of MyInt gets visible, the bind works perfect, i've tested it several ways, and i i create a button it grows the number, but if i use the setInterval function i get an error: Access of undefined property myInt. Why? What does cause this? Please explain it, so I can avoid errors like this. Thanks

    Read the article

  • JSON Syntax, what is this?

    - by danp
    I understand concepts of JSON ok, but after starting to use ebay's api, I came across a notation which I've not seen before, and was wondering if anyone could explain what's going on with it? { "findItemsByKeywordsResponse": [ { "ack": [ "Success" ], "version": [ "1.5.0" ], "timestamp": [ "2010-06-16T08:42:21.468Z" ], "searchResult": [ { "@count": "0" } ], "paginationOutput": [ { "pageNumber": [ "0" ], "entriesPerPage": [ "10" ], "totalPages": [ "0" ], "totalEntries": [ "0" ] } ] } ] } What's the "@count" thing? I noticed when I reference it in chrome, it throws an error: But in Firefox not. JSON Lint reports it's valid, as I'd expect... ;)

    Read the article

  • page_load another handler?

    - by joe doe
    can someone please explain why this code is not working as expected: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class temp : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Response.Write("foo<br>"); this.Load += new EventHandler(temp_Load); } void temp_Load(object sender, EventArgs e) { Response.Write("bar<br>"); Response.End(); } } trying to add another handler for page Load event so that output would be: foo<br> bar<br>

    Read the article

  • Could someone tell me if my C++ indent style is named? (example given)

    - by Maulrus
    I'm learning C++. For me, my programming style is just what looks the best; it doesn't seem to follow the rules of any one particular style. Here's an example void f(int x){ //no space between close-paren and bracket if (!x){ cout << "x is non-zero\n"; } //closing bracket indented to the same level as the original statement } It's only slightly different for something like a class or a namespace: class myClass {}; //space between class name and bracket, otherwise the same as functions K&R style does uses that kind of bracketing for statements, but my style uses it for everything. I'd like to know if there's a name for it so I can say simply what my indent style is without having to explain using examples like these.

    Read the article

< Previous Page | 172 173 174 175 176 177 178 179 180 181 182 183  | Next Page >