Posts

Cocoa - calling method with multiple arguments -

I'm beginning to Coco and I have questions about the method call with multiple arguments. I'm writing some data in bluetooth (in the sync method) and wait for the answer On another method, I am trying to check that new data was received in buffer but I do not know how I can call this method. I tried many different ways and I could not: - (minus) odczyt: ( Try to call me that this method (IOBluetoothRFCOMMChannel *) rfcommChannel data: (void *) dataPointer length: (size_t) dataLength {unsigned char * dataAsBytes = (unsigned char *) dataPointer, while (dataLength--) {[self addThisByteToTheLogs: * dataAsBytes]; dataAsBytes ++;}} How can I? This method is responsible for reading the string sent and writing it again to label it. This method is pressed when the button is pressed. (And referred to BT request for data) I'm not without calling able to read the data coming this method should call - labeled empty and buttons work after advancing (when Method And the main t...

Convert double to String in Java -

इस सवाल का पहले से ही एक उत्तर है: 11 उत्तर मैं एक डबल कन्वर्ट करने के लिए हूँ स्ट्रिंग के लिए मान। डबल डी = 12345678.999; स्ट्रिंग str = String.valueOf (d); या, बस सादे स्ट्रिंग str = "" + d; क्या यह, एक्सपोनेंट फॉर्म में - स्ट्रिंग मान लौट रहा है: 1.2345678999E7 I स्ट्रिंग में जैसा मान की आवश्यकता है: 12345678.999 क्या ऐसा करने का कोई तरीका है? मैं एक्सपोनेंट के मूल्य के लिए स्ट्रिंग को पार्स कर सकता हूँ- भाग 'ई' के बाद और वहां से चले, लेकिन ऐसा करने का एक आसान तरीका होना चाहिए। // ======= ============================ संपादित करें: इनपुट में दशमलव भाग की लंबाई ज्ञात नहीं है, यह किसी भी संख्या में हो सकता है: 12345678.999 या 12345678.9999999 दशमलव भाग के लिए एक प्रारूप को इंप्रेशन करना दशमलव अंकों की संख्या को ठीक कर देगा (?) आप स्ट्रिंग्स को प्रारूप करने के लिए NumberFormat का उपयोग करना चाहिए ताकि वे वैज्ञानिक संकेतन में दिखाई न दें। स्ट्रिंग str = NumberFormat.getInstance ()। प्रारूप (डी);

jquery - How to combine image map area class with alt attribute to make new class -

I have a picture map with each of 21 states in the US as a separate area. Example: & lt; Area class = "area" size = "poly" courses = "66,8,138,27,126,80,103,73" alt = "wa" & gt; & Lt; Area = square = "area 2" size = "poly" cords = "60,15,108,87,26,120,100,53" alt = "ca"> gt; Now I have set it up so that each state area has its own square and when clicked, opens a div (class or .ca) instance with information for that is. state. $ ('.zone'). Click (function () {$ ('. Wa'). Show ("scale", 350);}); $ ('Area2'). Click (function () {$ ('.ca'). Show ("scale", 350);}); But there are several codes needed to be repeated. What would I do to combine alt attribute of the image map area in the classroom ("bind"?) So that I do not have to repeat jQuery code for each state area on the image map. Pseudocode: When clicked, area s...

ios - Shrink boundaries on UITableView cell label -

I am populating a UITableView with data from an array, however, while displaying some parts of the data, Many rooms are available with the text, or very similar text to fix it, although I will move the cell to the right of the title, and fill the parent title with the title on the left side of the cell. There is not enough room in the cell for both titles, so I wanted to wrap text for both text labels and expansion text labels, hoping that each label would occupy half of the cell. So I did this: cell.textLabel.text = parentItem.title; [Cell.textLabel setLineBreakMode: NSLineBreakByWordWrapping]; Cell.textLabel.numberOfLines = 2; Cell.detailTextLabel.text = item.title; [Cell.detailTextLabel setLineBreakMode: NSLineBreakByWordWrapping]; Cell.detailTextLabel.numberOfLines = 2; However, instead of sharing the space in the label, the text label (one on the left) is spread all over the place, the only way is to replace the detail text label If the text label breaks before a big wor...

python - External matplotlib viewer -

Whenever I try to display a plot by using ipython notebook with matplotlib module, no plot is shown Goes (I'm an external viewer), instead I use the magic command % matplotlib inline , but I do not want to see the note in the notebook in an external viewer. The same happens with others Any ideas or suggestions? The original piece of code: import plus x = np.linspace (0, 5, 100) y = x ** 2 plt.plot (x, y, 'R') plt.xlabel ('x') Plt.ylabel ('y') plt.title ('title') plt.show ()

java - If statement containing char not executing -

I am trying to create a program that checks the "right" answer in every ten places in an array. I think if the condition is not executed even if the condition of the loop is satisfied with the textarray [i * 10 + k] == latter [k] (I have verified it) . And if the statement textarray [i * 10 + k] == '' is working, then I do not know why the former does not. Any help will be very much appreciated! char [] textarray = new char [textfile.length ()]; For (Int i = 0; I & lt; textfile.length (); i + +) {Texturer [i] = TextFile.chirt (i); } Double [] each question = new double [10]; Double [] Each question = new double [10]; Double [] each question = new double [10]; Double [] each question = new double [10]; Double [] each launch = new double [10]; // store how many questions each student correct, wrong or left empty int [] studentcorrect = new int [textfile.length () / 10]; Int [] StudentDiscount = New Ent [textfile.length () / 10]; Int [] studentblank = ne...

rtp - PJSIP not running in Windows Phone 8 background process -

I have studied the Windows ChatterBox sample app for Windows Phone 8 and I write a small app to try PJSIP Was able to. However, I have participated in a problem with CallInProgressAgent. After making an outgoing call, I make a VoipPhoneCall object by calling RequestOutgoingCall method on the VoipCallCoordinator class, after that I create a pjsip call using pjsua api. It seems that as soon as I call RequestOutgoingCall method, pjsip loses all RTP connectivity. My guess is that pjsip is unable to run in the background process initiated by calling RequestOutgoingCall method. Is highlighted? I found it on the PSSIP website: Windows Phone 8 (WP8) support is being added and is still under development on projects / Winfron branch. Specific ideas for this forum are as follows: WP8 WP8 governs specific interaction with GUI and framework, on device VoIP calls need to be applied to make the work continuous. Some light process for background call work will be made by WP8 framework and...