Posts

Featured post

Re-ordering C++ template functions -

I have a fixed template function in C ++, which, on a given condition, a template function in another class Makes a call. The problem is that to apply the second class, the full definition of first class is required because it creates a second class and stores it and manages it in the same fashion. The problem is that naturally, they fall as a class, and thus there is some tight interop, except that I want two classes for threading reasons. One kind, master for all threads, one child per thread, system. Any advice on how this can be implemented? Comment @ Comment: I have a problem which is slightly like this: class master {public: hair * createChild () {new child return); } Template & lt; Typename T & gt; T * Receive support (return); }}; Class child {Master * Master; Template & lt; Typename T & gt; T * GetSomething (int arg) {if (Rg) returns master-> GetSomething & lt; T & gt; (Arg); And return of return; }}; This is not a clear real implemen

php - Radio button how to? -

What I want to do is that when you vote Y or N (two different radio buttons) and then " Vote "column (in database) = Y or N (which you have picked), if nothing else the error resonates. I know how to do this half way, I have never worked with the radio boots before, so I need you Yes: ; Input type = "radio" value = "y" id = "vote" name = "vote" & gt; & Lt; / Input & gt; & Lt; Br> No: & lt; Input type = "radio" value = "n" id = "vote n" name = "vote" & gt; & Lt; / Input & gt; I gave value N and Y, not identical ID, but same name I think it has the right, but what should I do with the PHP part of what I want to do? I mean I'll call for "vote"? ($ _GET ["vote"]) I do not think so. Here's where IM stuck Based on whether or not you use the GET or Post method almost again, you have to change the variable name properly.

php - Turn all titles in wordpress powered site into "Capitalized" case -

So I have a question or some tip on how to convert all the titles into the Capital Case on the WordPress-powered website. / P> I have something like this now: AAAAA BBBBB CCCCC I want it to be like this: Aaaaa BBbbb Ccccc < / P> I tried googling and searching here, but those tasks are unsuccessful so that any help is greatly appreciated! Update: I need to update the header inside the database. just to be clear. :) There is no function in MySQL for this, but you can create one like this: drop function, if appropriate; Set global log_bin_trust_function_creators = TRUE; DELIMITER | Make the function proper (SR VARCHAR (128)) Return VARCHAR (128) Deparral CRR (1); DECLARE's VARCHAR (128); DECLARE I INT DEFAULT 1; DECLARE BOOL INT DEFAULT 1; DECLARE punct CHAR (17) DEFAULT '() [] {},.-_! @ :: / '; SET s = LCASE (str); When I & lt; LENGTH (ARR) start from the beginning = substring (S, I, 1); If substitution (c, wing) & gt; 0 then set boole

How to give alternating table rows different background colors using PHP -

I have a table of data that is dynamically generated on the content stored in a mysql database. How does this look like my code: & lt; Table range = "1" & gt; & Lt; TR & gt; & Lt; Th & gt; Name & lt; / Th & gt; & Lt; Th & gt; Details & lt; / Th & gt; & Lt; Th & gt; Url & lt; / Th & gt; & Lt; / TR & gt; & Lt ;? Php $ query = mysql_query ("Select * categories"); While ($ line = mysql_fetch_assoc ($ query)) {$ catName = $ line ['name']; $ CatDes = $ line ['description']; $ CatUrl = $ line ['url']; Echo "& lt; tr class = '' & gt;"; Echo "& lt; td> $ catName ;"; Echo "& lt; td> $ catDes & lt; / td & gt;"; Echo "& lt; td> $ catUrl & lt; / td & gt;"; Echo "& lt; / tr & gt;"; }? & Gt; & Lt; / Table & gt; If the table was stationary, now I will gi

serial port does not exist in current context: c# -

यहां कोड है: सिस्टम का उपयोग कर; System.Collections.Generic का उपयोग कर; System.ComponentModel का उपयोग कर; System.Data का उपयोग कर; System.Drawing का उपयोग कर; System.Linq का उपयोग कर; System.Text का उपयोग कर; System.Windows.Forms का उपयोग कर; System.Threading का उपयोग कर; नामस्थान WindowsFormsApplication1 {सार्वजनिक आंशिक श्रेणी के फॉर्म 1: फ़ॉर्म {सार्वजनिक फॉर्म 1 () {InitializeComponent (); } सार्वजनिक वर्ग थ्रेडवर्क {निजी स्थिर Serialport serialPort1; सार्वजनिक स्थिर शून्य DoWork () {serialPort1.Open (); serialPort1.Write ( "एटी + CMGF = 1 \ r \ n"); //Thread.Sleep(500); serialPort1.Write ( "एटी + CNMI = 2,2 \ r \ n"); //Thread.Sleep(500); serialPort1.Write ( "एटी + CSCA = \" + +४७९०००२१०० \ "\ r \ n"); //Thread.Sleep(500); SerialPort1.डेटा पुनर्प्राप्त + = सीरियल पोर्ट 1_DataReceived_1; }} निजी शून्य फॉर्म 1_लोड (ऑब्जेक्ट प्रेषक, इवेंटएरग्स ई) {थ्रेडस्टार्ट मायट्रेड डिलीगेट = नया थ्रेडस्टार्ट (थ्रेडवर्क। डूवर्क); धागा myThread = नया

iphone - NSNotification center may not respond to -object? -

I am trying to make an easy use of the NS Annotation Center within my iPhone application, but I think there is something in it This case is wrong. I was under the impression that it is possible to retrieve an object with a special message, or at least one reference to the object, but I get a warning using the following example code, < P> "NSNotification center-object can not be answered" - (zero) addNewBookmark: (NSNotificationCenter *) Notification {Bookmark * newBookMark = (Bookmark *) [Notification Object]; // Some items with the bookmark object} In fact, when I compile and run the code, basically nothing that I try to do with the contents of the object is actually - (IBAction) save: sending message with sender {// related object [[NSNetification Centers Defender Center] PostNotificationName: @ "addNewBookmark" object: bookmark]; } And the bookmark object is a dictionary, I tried to use the "user input" logic and passed the bookma

c# - Right click to select a row in a Datagridview and show a menu to delete it -

I have some columns in the DataGridView, and there are data in my rows. I see some solutions here, but I do not combine them can! One way to right-click on one line, it will select the entire row and show a menu with the option to delete the row when this option will be deleted. I made some efforts, but no one is working and it looks dirty. What should I do? I finally solved it: P> Using the code given below helped me to do this work. this.MyDataGridView.MouseDown + = New System.Windows.Forms.MouseEventHandler (This. MyDataGridView_MouseDown); This.DeleteRow.Click + = New System.EventHandler (this.DeleteRow_Click); Here's a cool part Private Zero MyDataGridView_MouseDown (Object Sender, MouseEventArgs e) {if (e.button == MouseButtons.Right) {var Hti = MyDataGridViewTest (eX, eY); MyDataGridView.ClearSelection (); MyDataGridView.Rows [hti.RowIndex]. Selected = true; }} Private Zero DeleteRow_Click (Object Sender, EventArgs e) {Int32 rowTo