Posts

c++ - Can I use port 80 in my VCL client-server app's -

Usually I use some random ports for my client-server applications in Delphi / C + + Builder. But, since I work in a building with a strong firewall policies, I would like to use Port 80 (TCP and / or UDP). My question is, do I have any problems with my client-server communication if there are other applications using the same port? I think my server will also take that communication? I would like to avoid any potential confrontation with other apps. Yes, you have problems, if an application that listen , You can not use that port. Notice, browsers use port 80 as target ports, they do not talk about 80. Therefore, when you want to use that port, do not count them.

c# - Calculating Center Of many blobs with aforge and manualy -

I am trying to get the center of all the detected blops in an image, so I changed it to two different Tried in ways, and I got two different results! has been followed as the first one: BlankConverterBlobCounter = NewBlackConverter (); BlobCounter.ObjectsOrder = ObjectsOrder.Area; BlobCounter.ProcessImage (image); Blob [] blobs = blobCounter.GetObjectsInformation (); AForge.Point Center = New AForge.Point (); If (blobs.Length> gt; {center.x = blobs.Average (c => c.CenterOfGravity.X); center. Y = Blobs Avg (C => c.CenterOfGravity.Y); } and followed in another way: System.Drawing.Point Center = new System.Drawing.Point (); Int count = 0; Int sum x = 0; Int'l = 0; For (int i = 0; i & lt; image.Width; i ++) for (int j = 0; j & lt; image.Height; j ++) {var p = image.GetPixel (i, J); If (! P.Name.ToLower (.) Equals ("ff000000") {sumX + = i; Sumy + = j; Count ++; }} If (calculation> 0) {center.x = sumX / count; center. Y = sumy / count; } Return...

Writing class that is subclass of Vector, java -

Just hope I can find someone to tell me whether I'm doing this right or not, just like I Never written before. So I want to write a class by the name of the process class which is a subclass of the vector, as well as a constructor which defines the blank queue. Apart from this, objects of vector type will be "objects". So here it is ... process value of the public class & lt; Vector & gt; {ProcessQueue () {}} vector anywhere Change your code to: public class process question & lt; T & gt; Vector extension & lt; T & gt; {} Anyway, I do not recommend you by using vector . check . If you have to do this then IMO ArrayList will be better. public class process question & lt; T & gt; ArrayList extension & lt; T & gt; {} and use list in your code: list & lt; SomeClass & gt; LstQueue = new process value & lt; SomeClass & gt; (); People fighting for the people of Orissa ¶ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ...

java - Best way to identify which button was pressed for method logic -

I have a method that is used for two different tasks, actions are identified, which button Suppresses I am using a boolean to identify button press. PDFButton.addSelectionListener (new selectionEditor () {Public Zero widget selected (SelectionEvent e) {buildArray (true);}}); Plot button Ad selector (new selectionEditor) (Public Zero widget selected (selection event e) {build array (wrong);}}); Public Zero Builder (Boolean Button ID) {Get Index etc ... if (true) {PDF.getInstance.buildArray (index); } Else {Plot.getInstance.buildArray (index); }} Is this the best way to do this? Edit tip button snippet pasted, there are no 2 buttons in it. I'm trying to do IF logic has a condition set, so I know what button The buildArray method was pushed to activate. Public Zero Builder () {Get Index, Mode Code. .... if ** (button press is equal to pdf button) ** {PDF.getInstance.buildArray (index); } Else {Plot.getInstance.buildArray (index); }} I know that in a way similar t...

html - Is there a way to specify the width of an embedded gist? -

I am trying to embed an abstract in a webpage. Take an example as an example: & lt; Script src = "https://gist.github.com/Astr0surf3r/5208714.js" & gt; & Lt; / Script & gt; I wonder if there is a way to determine the width of the essence. For example, I want to compile briefly compared to the default width I You use this summary Modifying the CSS class can control the width. .gist {width: 250px; } Example:

xcode - new tabs for different files -

I need to use Xcode as a general purpose editor. For example, I need to open the file .txt, .project, etc. If I open a file on time then it gets all right, but I have to put new files in a new tab. I tried cmd + t But the new tab is a text similar to the first tab ?? | And if I open a second file with double click, it opens a new window and does not have a new tab ?? | Is there a solution? Thanks a lot! Command + T will open a new tab with the same file, then you navigate to a new file And can open one in one tab. XCode does not want to assume that the file you want to open in a new tab and it does not want to open an empty tab, so it opens the existing tab in a new tab.

php - Variables not being sent to server when using POST -

उपयोगकर्ता अपने कंप्यूटर पर एक पृष्ठ निम्न JavaScript / अजाक्स : xmlhttp.open ("POST", "ProcessRequest.php", सत्य); Xmlhttp.setRequestHeader ("सामग्री-प्रकार", "एप्लिकेशन / एक्स-www-फ़ॉर्म-यूआरएलएक्सोडेड"); xmlhttp.send (encodeURIComponent ( "fname = श्री & amp; lname = परीक्षक")); सर्वर साइड स्क्रिप्ट ProcessRequest.php चर को एक्सेस नहीं कर पा रहा है। उदाहरण के लिए $ _ POST ['fname'] निम्न त्रुटि देता है : सूचना: अपरिभाषित सूचकांक: fname मैं क्या कर रहा हूँ गलत? मैं इसे WAMP का उपयोग कर चला रहा हूं। आप बहुत अधिक एन्कोडिंग कर रहे हैं। आपको क्या चाहिए: xmlhttp.send ("fname =" + encodeurIC घटक ("श्री") + "& lname =" + encodeurIComponent ("परीक्षक")); बेशक, आप इसे अधिक शुष्क बनाने के लिए एक फ़ंक्शन का उपयोग कर सकते हैं।