Friday 7 December 2012

Intentionally left blank.The document root element is not supported by the visual designer.


if ur xaml is not blank and has controls
close VS , open VS and build the whole solution.
the error wil vanish :)

"Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))"


That is because the parameters (or parameters names) you set in your code are different from defined parameters in your report

Wednesday 14 November 2012

Unable to find the report in the manifest resources. Please build the project, and try again

This error occurred to us when we were trying to run a crystal report in Silverlight 4.
The report was put in a folder with name 'MTS Reports'.
When the space in the folder name was removed and renamed as 'MTS_Reports' in the .cs file of the added crystal report and after we rebuilt the application, the error was resolved.

Hope This Helps. 

|,|| and &,&& in C#

The && and || operators in C# work very similarly to their And and Or counterparts (& and | in C#).
The difference is that with these operators the second expression is never evaluated
when the first one already determines the outcome of the entire expression
eg: if (userName == “Administrator” && GetNumberOfRecordsFromDatabase() > 0)

Now, GetNumberOfRecordsFromDatabase() will only be executed when the current user is
Administrator. The code will be ignored for all other users, resulting in increased performance for them.

&& in C# is equivalent to AndAlso in C#
|| in C# is equivalent to OrElse in C#

&& and || are not advisable if each and every expression is to be evaluated.

&&' and '||' are what's called "short-circuiting" logical operators.

In the case of &&, if the first operand is false, then it doesn't bother evaluating the second operand, because the whole expression is certain to be false.

In the case of ||, if the first operand is true, then it doesn't bother evaluating the second operand, because the whole expression is certain to be true.

'&' and '|' can also be used as logical operators though it's more common for them to be used as bitwise operators. When they're used as logical operators, both operands are always evaluated.

Wednesday 25 July 2012

Using the InvariantCulture Property

The CultureInfo.InvariantCulture property is neither a neutral nor a specific culture. It is a third type of culture that is culture-insensitive. It is associated with the English language but not with a country or region. You can use InvariantCulture in almost any method in the System.Globalization namespace that requires a culture.

  // Parses the string stored in the file,
         // and stores it in a DateTime.
         DateTime dtout = DateTime.Parse(date, InvC);

         // Creates a CultureInfo set to "fr-FR".
         CultureInfo frc = new CultureInfo("fr-FR");
         // Displays the date formatted for the "fr-FR" culture.
         Console.WriteLine("\nThe date read from the file and formatted 
               for the culture \"fr-FR\" is:\n{0}" , dtout.ToString("d", 
               frc));

         // Creates a CultureInfo set to "ja-JP".
         CultureInfo jpn= new CultureInfo("ja-JP");
         // Displays the date formatted for the "ja-JP" culture.
         Console.WriteLine("\nThe date read from the file and formatted 
               for the culture \"ja-JP\" is:\n{0}" , dtout.ToString("d", 
               jpn));

The date read from the file and formatted for the culture "fr-FR" is:
24/07/2001

The date read from the file and formatted for the culture "ja-JP" is:
2001/07/24

Select all CheckBox in DataGrid and delete rows in Silverlight

RDLC in .NET framework - Date formatting

CDate(Fields!StartDate.Value) may not always work.

Format(Fields!StartDate.Value,"dd-MM-yyyy") - this works.

if StartDate.Value is string then First(Fields!StartDate.Value) works.

HTH,
Anju

Tuesday 24 July 2012

D-8709 UGC NET Computer Science Dec 2009 Paper - II

31.   In an absolute loading scheme which loader function is accomplished by assembler ? (A)   re-allocation     (B)           allocation            (C)      linking             (D)    loading

32.   Which of the following grammar is LR (1) ? (A)  A a A b, A b A b, A a , A b (B)        A a A a, A a A b, A c
(C)      A A + A, A a
(D)     Both (A) and (B)

33.   A shift-reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of the grammar.
S x x W [ print 1] S y [print 2]
W S2 [print 3], what is the translation of x x x x y z z?
(A)     1 1 2 3 1               (B)      1 1 2 3 3          (C)    2 3 1 3 1              (D)     2 3 3 2 1

34.   Contex-free Grammar (CFG) can be recognized by
(A)     Finite state automata
(B)      2-way linear bounded automata
(C)     push down automata
(D)     both (B) and (C)

35.   Synthesized attribute can be easily simulated by a

(A)
LL grammar
(B)     Ambiguous grammar
(C)
LR grammar
(D)    None of the above


36.   In the process management Round-robin method is essentially the pre-emptive version of           
(A)     FILO                                                   (B)    FIFO
(C)      SSF                                                     (D)    Longest time first

37.   A page fault
(A)     is an error specific page.
(B)     is an access to the page not currently in memory.
(C)      occur when a page program occur in a page memory. (D)  page used in the previous page reference.

38.   A  semaphore  count  of  negative  n  means  (s  =    n)  that  the  queue  contains                 
waiting processes.
(A)     n + 1                    (B)     n                     (C)    n 1                   (D)     0

39.   A program is located in the smallest available hole in the memory is             (A)   best fit           (B)           first bit              (C)      worst fit       (D)    buddy

40.   The Unix command used to find out the number of characters in a file is
(A)     nc                        (B)     wc                  (C)    chcnt                   (D)     lc
41.   Software Engineering is a discipline that integrates                    for the development of computer software.
(A)     Process                (B)      Methods          (C)    Tools                   (D)     All

42.   Any  error  whose  cause  cannot  be  identified  anywhere  within  the  software  system  is called  
(A)     Internal error                                    (B)    External error
(C)      Inherent error                                      (D)    Logic error

43.   Recorded software attributes can be used in the following endeavours : (i) Cost and schedule estimates.
(ii)       Software product reliability predictions. (iii)            Managing the development process.
(iv)      No where
Codes :

(A)
(i)
(ii)
(iv)

(B)
(ii)
(iii)
(iv)
(C)
(i)
(ii)
(iii)
(D)
(i)
(ii)
(iii)
(iv)

44.   Black  Box testing is done
(A)        to show that s/w is operational at its interfaces i.e. input and output. (B)  to examine internal details of code.
(C)      at client side. (D)  none of above.

45.   The name of the transaction file shall be provided by the operator and the file that contains the edited transactions ready for execution shall be called
(A)     Batch. Exe                                         (B)    Trans. Exe
(C)      Opt. Exe                                             (D)    Edit.Exe

46.   The single stage network is also called

(A)
one sided network
(B)
two sided network
(C)
recirculating network
(D)
pipeline network

47.   Analysis of large database to retrieve information is called
(A)     OLTP                  (B)     OLAP            (C)    OLDP                 (D)     OLPP

48.   Which technology is sometime referred to as wireless cable ?
(A)     MMDS               (B)      ATM              (C)    LMDS                (D)     CDMA

49.   Another name of IEEE 802.11 a is                       

(A)
Wi-Max
(B)     Fast Ethernet
(C)
Wi-Fi
(D)    802.11 g

50.   The  unlicensed  National  Information  Infrastructure  band  operates  at  the                  
frequency
(A)     2.4 GHz              (B)      5 GHz             (C)    33 MHz              (D)     5 MHz