Posts

c++ - Templated parameter for a template specialisation? -

Hello, I've got a static member of a templated class that I want to define for a sub group of classes Which are templated: template & lt; Typename T & gt; Class FooT {Private: Stable Int MS_ID; }; Template & lt; Typename T & gt; Square fu {}; The template's & lt; & Gt; Template & lt; Typename T & gt; Int Footy & Lt; Template foo & lt; T & gt; & Gt; :: ms_id = 10; Unfortunately this throws the following error under GCC 4.1.1 D: \ X \ Foo.h (98): Error: Invalid template logic 1. On this line: template & lt; & Gt; Template & lt; Typename T & gt; Int Footy & Lt; Template foo & lt; T & gt; & Gt; :: ms_id = 10; What is wrong with the general concept in the first place? You can get partial expertise of this "initial template": template & lt; Typename T & gt; Class FooT {Private: Stable Int MS_ID; }; Template & lt; Typename T & gt; Square fu {}; Template ...

C# Outlook isn't moving all emails -

I am using Outlook Interop to move from one folder to another (after receiving all the attachments, but It works) but it is not copying all the emails I have tried to wait, but it has no effect. First of all, it will be taken 6, then 3, then 1. Can anyone tell me why is not she running? The relevant code is below: application oOutlook = new application (); Namespace ONS = Outercle.net namespace ("MAPI"); Recipient ORP = ON Create Recipe ("Content Help"); MAPIFolder Inbox = ON GateShare Default Folder (ORP, Olendefault Folders.olfolder Inbox); MAPIFolder nihSub = inbox.folders ["NIH"]; MAPIFolder nihArchive = inbox.folders ["NIHarchive"]; Item nihItems = nihSub.Items; MailItem moveMail = Null; // inboxItems = inboxItems.Restrict ("[unread] = false"); Int engagement = 0; Try {Foreach (object collection in nihItems) {moveMail = MailItem as archive item name; If (moveMail! = Null) {Console.WriteLine ("walk {0}", moveMail....

cocoa - CGBitmapContext get pixel value Leopard vs. SnowLeopard confusion -

I am trying to attract specific color rectangles in a CGBitmapContext and then later I compare the pixel values ​​with color. (A type of hit). This works fine on leopard, but pixel-values ​​on the snowy pillar are different from the color value I get - I think due to the colors illusion and ignorance are on my part Make a bitmap context with a CZG rollerspace generic RGB colorspace Set the collarspace to the corresponding CGGSpace generic RGB color palette Set the fill color of the reference Attract Get the bitmap constantdata, iterative pixel value, and so on. As an example, if I do, then on Leopard: - CGCTXTTRGFillCollar (CNXTX, 1.0, 0.0, 0.0, 1.0); // set pure red fill color CGContextFillRect (cntxt, cntxtBounds); // fill the full reference The value in each pixel is UInt8 red == 255, green == 0, blue == 0, alpha == 255 on snow However, the value in each pixel is UInt8 red == 243, green ==31, blue == 6, alpha == 255 (These values ​​are made - I am not on...

c++ - Using a QListView or similar effectively in Qt4 -

I am slowly using the QT4 GUI framework to use. In a project I am working, I should be able to add / edit / delete the team objects in a list. Coming from C # .NET perspective, I list & lt; Team & gt; Team = new list & lt; Team & gt; (); Teams LISTBox.DataSource teams; TeamsListBox.DisplayMember = "name"; Then use the button on the form to add / delete / edit. But, as I can tell, there is no easy way to do this in Qt. I have seen the documentation for QListView, QListWidget, QStandardItemModel etc. But how can I get the equivalent Qt code for C #? My purpose Team in some sort of list box, then team s on runtime Be able to add / delete / edit How would you do this? You should see a customized team ITEM model class for your teams from QAbstractItemModel Or should make. The customized class will be managed by how items are displayed in a widget like QListView. QString with a simple example for the item: QStringList list; List ...

c# - When does the vaIue of the InvokeRequired property change? -

Image
When I want to use delegate class to call windows to work, I It's okay to always have to use InvokeRequired. But when it is working, then the Enverkerclide property has changed. Please check this image: You are calling Delegate.BeginInvoke In the button1_Click , which means SayListeyeEkle will be called in thread-pool thread - which means that it's true that the InvokeRequired is correct If you call List1Ekle directly in the UI thread, then does not will not be correct.

flashdevelop - Can a Flash Application read the host page's DOM? -

I know that Silverlight has this capability, and I do not have any experience in flash development - I need a flash app Div is hidden on the host's page. Can this be done? At least, you can use it to get stuff by javascript.

c# - Indexing in Linq -

Why do we use the index in "clause"? Does it start with an auto generated number answer zero? Simple examples would really be helpful. var query = ... ou ((p, index) ..) Whenever you need access to the index in your query, use it. var alphabet = "ABCDEFGHKJLMNOPQRSTUVX"; Var also Litter = Alphabet. Where ((p, index) => (index% 2) == 1); Var oddLetters = alphabet.Where ((P, index) => (index% 2) == 0);