Thursday, 15 August 2013

SQL server 2008: How to get the start date and end date of my data? -


As a newb, I already know that I will be birited to ask this question, but I The answer can not be found here and the site can help with some help ...

I have a table that lists the data on a day-by-day basis, and for example by type

  transaction. Date | Type ------------------------- Update | 11/7/2008 | Cash-out updates. 11/10/2008 | Written check deposit. 11/11/2009 | Cassand check update | 11/18/2008 | Submit Check Deposit 11/19/2009 | CASAD CHECK  

What I am trying to do is the first occurrence of each transaction type, and the last event of each transaction type is. Therefore, I am trying to find out a SQL statement which I can write which will return something like this:

  Transaction | First date End date ---------------------------------------------- Update | 11/7/2008 | 11/18/2008 | Deposit | 11/11/2009 | 1/19/2009 |  

Any ideas? Select transaction, MIN [[date]] as [first date], max

  ([Date]) From the My_Table group for transaction from AS [last date]  

How to sniff the number of records in a binary file before reading into an array in the C programming language? -


How do I tell in a better way how many records I see in the binary file before opening a file, for example an array Records in?

  MyFile = Fopen ("DATA.dat", "rb"); I = 0; While (Fifi (MyFile) == 0) {FREED (& amp; Temple readings record, size (tempReadingRecord), 1, file); If (ff (mimefile) == 0 {i ++;}} fclose (MyFile);} printf ("% d", i); / * how many records works to find but optimal? * /   

has an arbitrary number of NULS attached at its end) but you will not run into problems on the most common systems (APAI, which was mainly on CP / M, Since the block was not stored, only several blocks, so the end of the file was always padded to fill the last block).

BTW, your loop is a problem to read the record - in fact, sort Almost any loop while ((Fif (file)) , or nothing is guaranteed to work with similar incorrectly (usually it will "last record Twi read" CE).


c# - How does one implement UI independent applications? -


What are the basic techniques for making the majority of my C # source code UI independent?

For example, I would like to write my source code for the Winforms desktop application, which I can plug in in a WPF application with the ASP.NET web application or very small changes. To wit. I would be able to use the same source code in spite of UI technology to make this future proof.

I know that can do this.

But if I do not use CSLA (it takes some time to learn a new framework and currently I do not have much time to spend on it), what should be kept in mind Getting this type of capability in my C # code?

Can you give me an example? I am already using commercial object and layering technology in my applications. But still I have noticed that many coding needs to be plugged into my UI for new UI technologies.

Please do not provide me with any superficial reply.

The best way to do independent coding for UI is to separate the argument from the presentation. Take a look at this

It is more than a discipline issue with its design instead of a framework issue. A framework can not force you to design properly. If you design the app properly, it can make things easier for you, although there are always ways around implementing it.


c++ - How can I share HWND between 32 and 64 bit applications in Win x64? -


MSDN tells me that handles Windows (HWND) (can be shared between 32-and 64-bit applications, (MSDN). However, Win32 has a HWND 32 bit, 64 in 64-bit window How can the handle be shared?

I think the same question applies to handles for named objects such as mutes, semaphores, and file handles.

"Post-Text "Itemprop =" t "Can not be shared that only 32 bits are used in the Win64 process? Windows handles, at least as far as I can tell, are not indexed indicator, so long as MS 2 ^ 32 did not want to give more than window / file / mute x / handle. There is no reason to use 32 x 32 bits of zero * on Win64.


Sample domains for testing DNS lookups -


Is there a well-known address that resolved well-known IP address for both IPv4 and IPv6 can go?

I'm playing with Berkeley Sockets and wrote a class to finish sockaddr_in stuff, and want to test the unit, but I do not know about any address that I tested I can put in the form of data that is guaranteed to be solved for a specific IP address.

I mentioned www.example.com and ipv6.example.com in the Guide of Beige, but ipv6.example.com no longer exists ... I have found the best c. Iana-servers.net which has both an IPv4 and IPv6 addresses that solve it, but I do not know how it is stable ...

This is a good question, I can not give you a single domain that you can rely on, yet there are some other issues about which you Content Distribution Networks want to be aware that by transferring the traffic to the server via diesel lookup on geography. If you are looking to make this project compatible with other locations, then search for a server that is not under a CDN or caching server.

I suggest creating your own server, in this way you can control all the variables.


Boolean Implication -


I need some help with this boolean imp.

Can someone explain how it works in simple words:

A means B = B + A '(if A to B). In addition, A> = b

Boolean means A means B Just means "if one is true, then b should be correct". It means (pun intended) that if A is not true, then B can be anything. Thus:

  false false false meaning -> The true lie means the truth - & gt; True tru means wrong - & gt; False truth means truth - & gt; True  

It can be read as " (not a) or b - i.e." either a liar, or b must be true ".


Quickest way to convert XML to JSON in Java -


What are some good tools to convert JSOM quickly and easily to Java? There are some great resources in

Maven Dependence:

  & lt; Dependency & gt; & Lt; Group & gt; Org.json & lt; / Group & gt; & Lt; ArtifactId & gt; Json & lt; / ArtifactId> & Lt; Version & gt; 20160807 & lt; / Edition & gt; & Lt; / Dependencies & gt;  

XML.java is the class you are looking for:

  import org.json.JSONObject; Import org.json.xml; Public Sector Main {Public Fixed In PRETTY_PRINT_INDENT_FACTOR = 4; Public Stabilized String TEST_XML_STRING = "& lt ;? Xml Version = \" 1.0 \ "? & Gt; Exam attrib = \" Maximize \ "& gt; Turn it on JSON & lt; / test & gt; ; Public static zero major (string [] args) {try {JSONObject xmlJSONObj = XML.toJSONObject (TEST_XML_STRING); String jsonPrettyPrintString = xmlJSONObj.toString (PRETTY_PRINT_INDENT_FACTOR); Println (jsonPrettyPrintString); } Hold (Jason Exception JE) {System.out.println (je.toString ()); }}}  

Output is:

  {"test": {"attrib": "moretest", "content": "it turned on JSON Do "}}