Posts

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 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 = 1; LEEEEE...

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, "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 bookmark object ...

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...

UITableView in a View controller by a UIViewController and not a UITableView -

I have a button with lots of things, including buttons, a scroll view and a tableview (iPad app) . I am making this view controller with a view controller subclass but I do not know how to manage my table view. I do not know where these are: - (UITableViewCell *) TableView: (UITableView *) Table View CellForAatindapath: (NSIndexPath *) Index pathway I should add them to my view controller or would I like to create a new sub-section of the UITBi ViUI controller (and get them "for free") and setting up datasource and setting up my table representative for that class When should i Create this program? Displaying my data in I am storing that data, I just have to set UIViewController as the representative and data source of my UITableView. Bus. You do not need to create UITableViewController's own sub-class to manage that table view. So you can put all the subviews in the viewcontroller's view.

javascript - Google Chrome is doing things wrong again -

width and height value reporting for images during incorrect images After, or just after, the load time is used in this code example: If you insert a script into the $ (function () {}) function, the result is the same, but if the page runs the code after a few seconds of loading , Returns the correct result. & lt; Script & gt; Function example () {var img = $ ('img # image01'); Img.width () // 145 in both Firefox and Chrome Img.height () // 134 returns in both Firefox and Chrome} Window.setTimeout (e.g., 1000) & lt; / Script & gt; If the value is width and height in tags, then the script will be expected to both work as expected and. & lt; Img id = 'image01' src = '/ images / picture.jpg' width = 145 height = 134 / & gt; But as you can not always control the html input, this is not an ideal solution. Can this problem be compromised with a better solution? Or do I need to specify width and height for each...

Can you reccomend a podcast on OOP & Design? -

Can you recommend a web site that provides me podcasting focused on OOP; Design? This can be more advanced, then you are later but to get started on the right path Are the best. If you do not understand all the things here, do not worry too much. This is Scott Hanselman, who is talking with Uncle Bob, who is describing Solid You can also do this Look at the resources available on the fun

how to add a xml document to another xml document in java -

मेरे पास इस रूट xmldoc = & lt; root & gt; & Lt; param> gt; & lt; / param & gt; & lt; / root & gt; मुझे paramxmlDoc = & lt; पैरामीटर par = '1' & gt; abc & lt; / पैरामीटर & gt; सम्मिलित करने की आवश्यकता है I जावा में rootXMLDoc पर paramxmlDoc कैसे डालें? और मुझे इस की तरह आउटपुट की आवश्यकता है & lt; root & gt; & Lt; पैरामीटर पैरा = '1' & gt; एबीसी & lt; / पैरामीटर & gt; & LT; param & gt; & lt; / param & gt; & Lt; / root & gt; इस तरह: तत्व ई = paramxmlDoc.getRootElement (); paramxmlDoc.setRootElement (शून्य); // दस्तावेज़ और तत्व रूट XMLDoc.getRootElement () के बीच कनेक्शन का ब्रेक। AddChild (e); // अन्य दस्तावेज़ में नोड सम्मिलित करें नोट: यह स्मृति से है, इसलिए वास्तविक विधि कॉल थोड़ी अलग हो सकती है लेकिन आपको यह विचार मिलता है।

dll - Assembly version from command line? -

Is there a Microsoft device to get the assembly version of a DLL file from a command line? (I know that I can code my own device.) This is an area where power shield shines. If you do not have it already, install it, it is preinstalled with Windows 7. Run this command line: [System.Reflection.Assembly] :: LoadFrom ("C: \ full \ path \ to \ YourDllName .dll"). GetName () Version outputs this: Major Short Build modifications ----- ----- - --- ----- --- 3 0 8 0 Note that LoadFrom returns an assembly object, so that you can greatly love it. There is no need to write a program.

visual c++ - Uploading image to flicker in c++ -

I am making an application to upload an image to Flickr using VCO + Win32, Wininet. I am able to get frob, tokens properly but when I try to upload the image, the post size is getting bigger. The headers are created as follows: wstring wstrAddHeaders = L "content-type: multipart / form data; border = abcd \ r \ n"; WstrAddHeaders + = "Host: api.flickr.com \ r \ n"; Wchar_t tempStr [MAX_PATH]; Wsprintf (L "Content-Length:% ld \ r \ n", szTotalSize); WstrAddHeaders + = tmpStr; WstrAddHeaders + = L "\ r \ n"; Hunterter H. Session = Internet Connect (HE Internet, L "www.flickr.com", InterDEDFUBHAL_Http_PORT, Faucet, Faucet, Internal Services HTTP, 0, 0); If (hSession == NULL) {dwErr = GetLastError (); Return; } The content of the post request has been made as follows: wstring wstrboundry = l "- ABCD \ r \ n"; Wstring wstrContent = wstrBoundry; WstrContent + = "content-presentation: form-data; name = \" API...

Arrange files by creation or modification with PHP -

Is it possible to get file names from the date of creation or modification in a folder? Thank you. & lt; Php $ files = array (); $ It = new directorytitle ("."); $ Is- & gt; Rewind (); While ($ it-> Valid ()) {$ files [$ it- & gt; Milf name ()] = $ it- & gt; GetMTime (); $ Is- & gt; Next (); } Esport ($ files); $ Files = array_keys ($ files);

Getting WAP embedded video in android AND iphone? -

A recent customer asked me to "work on smart phones" on my site, which is usually too much There is no issue ... though this is a video site, and I do not know at all that even away from the bat to start, I have to work on Android (probably 2.0+) on the site and anything other than the iPhone I'm not considering allowing permission, maybe Blackberry and Winmo but beyond ... Shall I do? I am using tags, but I am sure what is, if anyone, who uses the phone, is HTML5 even adopted in their browsers? Can anyone tell me in the right direction? Am I going to go about this right, using the tag? Or there are some magical HTML elements both iPhone and Android (and BB and WMO) that allow them to play video in their original video players (like on YouTube).

c# - Add Image to Base64 Encoded ImageStream in Resources (resx) -

I am working on an old project, updating it. There is a toolstrip with a button in some part of the program, with each single image. I've found that the images are stored in a Base64 encoded ImageStream in resx for the form and can be accessed in such a way as: System.ComponentModel.ComponentResourceManager resources = New System. ComponentModel.ComponentResourceManager (typeof (Form1)); ... this.imageList1 = new system.window.form. Image list (this.components); ... this.toolStrip1.ImageList = this.imageList1; ... this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer) (resources.GetObject ("imageList1.ImageStream"))); ... this.toolStripButton1.ImageIndex = 0; // There are 41 images in it, so it can be between 0 and 40 I have to add another button with a new image. How can I add an image to this stream? I can not use the designer, because as soon as I load the form, as soon as the crash (I believe it uses a custom component with the unsafe code...

python - Convert url for crawler -

I'm working on crawler Usually, when I type url1 in my browser, then the browser converted it to url2 Does. How can I do this in Python? url1: www.odevsitesi.com/ara.asp?kelime=doğanın dengesinin bozulması url2: www.odevsitesi.com/ara.asp? Kelime = do% F0an% FDn% 20dengesinin% 20bozulmas% FD You can translate the URL properly (ISO-8859-9 in your case), separate it into parts, enter urllib.Query part and keep it together again. I.e .: & gt; & Gt; & Gt; Import urlparse & gt; & Gt; & Gt; Import urllib & gt; & Gt; & Gt; X = u'http: //www.odevsitesi.com/ara.asp? Kelime = doğanın dengesinin bozulması '& gt; & Gt; & Gt; Y = x.encode ('iso-8859-9') & gt; & Gt; & Gt; # Just to show how the division of y is visible (we can handle it as a tuple): & gt; & Gt; & Gt; Urlparse.urlsplit (y) SplitResult (schema = 'hp', netlok = 'www.odevsitesi.com', path = '/ era.asp', quer...

php - Can Symfony simply reload a page request? -

I have an app that receives requests from another app. It detects a value on the query string, checks the value against the cached value and, if it does not match, then it has to clear its cache and reload the page (install a new cache do). Unfortunately, I can not find any way to tell Symphony about redirecting the current page to the same format (protocol, URI path, query string, etc.). What am I missing? This is happening in a filter at isFirstCall () . Thank you. We did this in a filter. This is a little hack but it is an example of redirecting to a filter ... you have to test the cache itself ... class is invalid caffef filter expands Sffilter {public function executed ($ filterChain) {$ redirect = true; If ($ redirect === true) {$ request = $ this- & gt; GetContext () - & gt; GetRequest (); / ** This is a hack bit I'm pretty sure we can do it in the requested item, but we need to complete it quickly and what it really should be. * / Header ("loca...

wpf - Having trouble entering time values with MaskedTextbox -

I am using masked textbox for WPF Toolkit for .NET 3.5 SP1. I have found a maskedtexbox on a WPF page, it fills the SQL Server database right away, but when I try to edit the value nothing happens. I can choose anything but typing on it or using a deleted key or something that does nothing for the value of it I use it to enter a time value to a user or Allow to edit, such as: 9:30 AM will appear as "09:30 AM". Here is the XML I have specified: & lt; CusControls: maskedtextbox x: name = "MTBtime" mask = "90:00" LL "margin =" 5,0,0, 0 "text =" {binding element = hedetime, path = timepart, converter = {static resource nullible timecounter Converter}} "/> (This is a part of user control, I call it" heditetime ".) What I'm doing wrong and how do I fix it Can I? I do not have the source for the text box I have seen, but I could not find anything similar to myself. This may be a problem in your parti...

Magento Home Page Layout -

My page. Why does not the layout of the xml file homepage change ?? It changes the layout of other pages, but the homepage does not have the homepage, its layout is the XML file ?? Understand this. You have to change the homepage layout to match your layout by going to Admin Panel -> CMS ->. For example: My B / C page was not working .xml was using a single column layout, while the homepage was using two column layouts. - All this left above. Just match the layout