Posts

Showing posts from March, 2010

C# RDP application with STUN -

I have searched all the links in the internet about the NAT running with C # and STUN I have public IP and port That's what the application is using. On most web pages, I have read about STUN, a protocol that should help me connect to other clients behind the NAT-Router or Firewall. Now my question ... If I consider STUN, STUN is only for giving me public IP address and characterization of my NAT. But how can I connect another client with this information? AC # implementation: Example Usage: // Create a new socket for the STUN client. Socket socket = new socket (addressfamily.internetwork, sockettip.degram, protocol type .ups); Socket.bund (new IPPpoint (IP address no, 0)); // query STUN server STUN_R result result = STUN_Client.Query ("stunserver.org", 3478, socket); If (result.NetType! = STUN_NetType.UdpBlocked) {// UDP blocked or !!!! Bad STUN Server} Other {IPEndPoint publicEP = Results Public indent; // your stuff}

arrays - Need help, Excel Formula, Count number of cells in a range that match the content of a different range -

I'm pretty good on Excel but I've got it. I have many entries - $ D7: $ AH7 I want to know how many times these entries show in this category - $ K $ 7: $ V $ 10 I have tried the Cowgraph array, but I think it is trying to match the row with the row instead of every entry in my range against the entire lookup range. I look at the same line Also tried to transition the range, but then I want to It strikes that it tries to match the column with columns in the same fashion. If yoga works then I can not comprehensively compile this document. If you have this suggestion then I'm happy to use VBA solution. Non VBA solution: = SUMPRODUCT (COUNTIF ($ K $ 7: $ V $ 10, $ D7: $ AH7)) VBA solution: How many times the value is shown in rng2 from rng1 : Is it possible to ignore this empty space? Could? Function countEntries (range as rng1, range as rng2), long arr1, arr2, a1, UPD: A2 arr1 = rng1. Value arr2 = rng2.Value for each a1 in the arr1 i...

postgresql - SQL finding part of common and differences under some conditions -

Image
First of all, I will describe the whole idea that I have a system which is about projects There are many topics in each project, every project is modified every month. For example: 2014-01-01 Project '1' was added to 40 topics 2014-01-01 Project '2' in relation to 120 topics added 2014-02 - 01 was added to project '1' in relation to 30 subjects 2014-02-01 Project '2' was added in relation to 100 subjects I have discussed differences between topics I want to count, how many of them are new, how many of them have ended, and how many of them are still going on I Try it as Create a question. Table structure: database = & gt; \ D Project Tabela "public.project" Kolumna | Type | Modifiktree ---------------- + --------- + ---------------------- ----------------------------------- ID | Integer | Nephitius Dominici Agvalewell ('project_ id_seq' :: regclass) skid | Integer | Beginners Date | Database = & gt; \ D topi...

php - no response ajax request -

I am trying to make a simple login with AJAX. My problem is that I have not received any response from my request. When I myurl.com/login.php is_ajax = 1 & amp; I try to use username = test and password = test I get a successful message back. ($ ("$ User name"). (Function () {$ ("# submit") (function () {var form_data = {usernm: $ ("# username"). Val (), passwd: $ ("# Password") Val (), is_ajax: 1}; $ .ajax ({type: "POST", url: "myurl.php", data: form_data, succes: function (feedback) {if (response == 'succes') {window.location = "myurl.html";} and {warnings ("wrong user name password combination")}}}) return false;})}}; my php: $ is_ajax = $ _REQUEST ['is_ajax']; If (isset ($ is_ajax) & $ is_ajax) {$ uName = $ _REQUEST [' Username ']; $ PWord = $ _REQUEST [' password ']; if ($ uName ==' test '& amp; $ pWord ==' Test ') {echo' s...

dynamic - Shortest path algorithm design -

I am currently studying for the final and the following is a problem in the study guide: " Create an O (K (M + N) time using the graphic programming technique using the least path algorithm, define optimal structure (G). The smallest path to the edge of K in a graph. " Being on this is on the study guide, I'm sure it will not be at the last but I I am a little disturbed by the fact that I am not sure how to do this. Is there any existing algorithms with this sequence that I should know? If not, how can I make an optimum solution? Right now I am implementing DjCastro's algorithm in Java, which has helped it to understand something, but I know that it does not meet the requirement of time, so I am thinking that I can adapt it. > The question is basically asking (when K = N-1). You can define DP repetition: Path [K] [V] is the shortest route leading up to the top, with maximum K is the edge. Now the smallest path to the maximum variance on which maximu...

c# - How to append node and attribute to an existing Xml file -

मेरे पास निम्न XML फ़ाइल है मुझे XElement और XAttribute का उपयोग करके एक नोड जोड़ना होगा। ऐसा कैसे करें? & lt;? Xml संस्करण = "1.0" एन्कोडिंग = "UTF-8"? & Gt; & Lt; रिपोर्ट xmlns = "http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns: rd = "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" & gt; & LT; डेटासेट & gt; & Lt; डेटासेट नाम = "डेटा" & gt; & LT; क्वेरी & gt; & LT; DataSourceName & gt; DS1 & lt; / DataSourceName & gt; & Lt; कमांडटाक्स्ट & gt; SELECT प्रथम नाम, अंतिमनाम से व्यक्ति & lt; / CommandText & gt; & Lt; / क्वेरी & gt; & Lt; / डेटासेट & gt; & Lt; डेटासेट नाम = "तालिका 22" & gt; & LT; क्वेरी & gt; & LT; DataSourceName & gt; DS1 & lt; / DataSourceName & gt; & Lt; कमांड टेक्स्ट & gt; नया पाठ 2 & lt; / CommandText & gt; & Lt;...

awk - Picking out elements not in an 1-D array? -

मेरे पास 1-डी सरणी है x1 = [1, 2, 3, ..., 10] जो फ़ाइल x1.dat में एक रिकार्ड (सभी एक पंक्ति पर) के रूप में संग्रहीत है, जो कॉमा से अलग है। x1.dat पढ़ता है 1,2,3,4,5, ..., 10 और वहां हैं दो सरणियों array1 = [1,3] , और array2 = [4,7] (तत्वों में सरणी 1 और array2 सरणी के कुछ तत्व x1 ) हैं। मैं सभी तत्व का चयन करना चाहता हूं जो न तो है सरणी 1 और सरणी 2 में नहीं वांछित आउटपुट पढ़ा जाएगा 2,5,6,8,9,10 मैंने awk के साथ कोशिश की: $ awk 'BEGIN {array1 = (1,3); Array2 = (4,7)} {for (i = 1; i & lt; = nf; i ++) अगर ((($ i में a1)) & amp; amp; amp; & amp; amp; (! ($ I में a2))) {प्रिंट $ I}} 'x1.dat यह काम नहीं करता है क्या आप कृपया मुझे इसे सही करने या इस चयन का बेहतर तरीका देकर सहायता कर सकते हैं? आपने अपनी डेटा फ़ाइल का पाठ स्वरूप नहीं दिया है। मुझे लगता है कि यह प्रति पंक्ति एक तत्व है। आपके कोड में आपके पास कुछ समस्याएं हैं I चर असाइनमेंट, आप उस तरह एक ओक एआरआई नहीं आवंटित कर सकते हैं। में उपयोग सरणी (वास्तव में हैश...

android - Convert PNG image to Base64 -

I am converting the drawable resource PGG image to bitmap and then converting that bitmap to base 64 and making it web Sending to the server by service. / P> The image is stored on the server at some address and I am getting the URL where the image is stored. The problem is that the url I am getting with the URL after sending the image to the server is setting the image in another image view, but the transparent part of the image is blackish, I think That problem is to convert PGG image to base 64, My code: bitmap bitmap = bitmapfender Decode processing (getResources (), R.drawable.ic_launcher); Bitmap = bitmap.scent scaledbitmap (bitmap, 300, 300, incorrect); MImageView.setImageBitmap (bitmap); BytereonOperputTreamBao = new BytereOutStream (); Bitmap.compress (bitmap.compress format.png, 90, bao); Byte [] Ba = Bao To Batteryre (); Base64Image = Base 64. encodeToString (BA, Base64.DEFAULT); Please give me the solution ASAP Whatever you are doing Are right. Depend...

php - Hashtag preg_replace -

I have a web app that is creating and linking to #hashtags and I have noticed that if a person makes #hashtag of # JB22 that the following code breaks. far regex I have a #hashtag $ users = preg_replace ( "~ (& lt; Var data-type = \" user \ "class = \" user highlights \ "id = \" (. *?) \ "& Gt;) (. *?) (& Lt; / var & gt;) ~", "& lt; _link & Gt; $ 2 | $ 3 & lt; / _ link & gt; ", start $); $ Tag = preg_replace ( "~ (& lt; var data-type = \" tags \ "class = \" tagHighlight \ "id = \" (. *?) \ "& Gt;) # (. *?) ( & Lt; / var & gt;); "," & lt; _link> tags: // $ 3 | # $ 3 & lt; / _link & gt; ", $ users); $ Last = preg_replace ("~ (^ | \\ s) # (\\ w * [a-zA-Z _] + \\ w *) ~", "& lt; _link> tag: // $ 2 | $ 2 & lt; / _ Link & gt; ", $ tags); change it to [a-zA-Z _] + with [a-...

android - Operation of Subtraction and write the result in the shared preferences -

I have priority with the value of 20 in string (A), I have to subtract the value of an int (b) 0 From 20, I tried to do this string A = prefs .getString (A, "20"); Int B = intent.getIntExtra (trn + ".INB", 0); TextView TVRest = (TextView) Find ViewById (R.id.txtrest); TvRest.setText (A - (B)); I need to display AB results in TextView txtrest , as I have done. After you get results, instead of the initial value of C, you can write C in the preferences in C. Do something like below, int A = integer Parasont (prefs.getString (A, "20")); Int B = intent.getIntExtra (trn + ".INB", 0); Int C = A-B; TextView TVRest = (TextView) Find ViewById (R.id.txtrest); TvRest.setText (String.valueOf (C));

Facebook API - get whole user feed of a given period of time -

I have to meet a user's entire feed duration (last 24 hours to say). When I call API / M / Feed / I find that I only receive a recent post of a user (this also seems random to me, sometimes group messages, sometimes private messages etc.) . To speak, I need something in the flipboard. How can I do this?

android - Change first row colors of ListView onFetchComplete -

I have a list view that, when loaded from database, onFetchComplete, moves one of the rows to the top of the list . I have worked, but I want to change the background color of the first line and only want to change some text view and background colors of some lines. I'm new to Android, so I'm having trouble finding this problem. Some help would be greatly appreciated Here's where I change a line: @Override FETchComplete (list & lt; application & gt; ) {String myDefault = "3"; // Dismiss the progress dialog if (dialog! = Null) dialog.dismiss (); // Create new adapter ApplicationAdapter adapter = New ApplicationAdapter (this, data); For (int i = 0; i & lt; data.size (); ++ i) {if (data. Get (i) .getAppID (). Equals (myDefault)} {app app = data. Get (i ); Data.remove (i); Data.add (0, app); }} // setListAdapter set the adapter to list the adapter; } The listview is being loaded first, then I have tried to make some changes, but when I do this,...

c# - Device Status in Windows Phone 8.1 -

To find information about current device (OS information, RAM size, power source), are there any classes in the Windows Runtime API? / P> Windows Phone 8 is the equivalent class Microsoft. Phone.Info.DeviceStatus () Any help? According to my knowledge and what I have searched for in the present, there is no way that will tell you As I have also searched for exploration, there is no alternative to the system. Power. You might think, I am also curious how this will be resolved, so the IMO should have such capability that the phone should be developed to check it. Whether it is powered or not. For example, background transporsers are required to supply external power for large files under WP8.0, and I can not check it - maybe it will be resolved in the final release.

python - How to get scalebars continously output inside a while loop tkinter -

I programmed a guinea with a typiler and applied a scalebar to change a variable. I am trying to get the output of this scalebar inside the one-time loop. Press the button position = true Get the bar scalab with reading () method Pass the variable in another function Scalabar -> Check 1. The second button press set position = false -> exit while loop My code stuck and I can not change the scalab when I am inside the loop And I had to be forced to leave my code I hope you have any idea! The code example is below, if you need more or overall source code then let me know best regards, intake death class FunctionClassTest: def __init __ (self): pass def intimeSTOP (self): self.Test = wrong def intime (self): self.test = true while self.test: self.TestTmp = scalebarTime.get () if self.TestTmp & Lt; 0: ... playwriter ... online = function classista () button c = button (window, text = "test on", command = online. Intime) button d = button (window...

javascript - Bootstrap tooltip onblur firing twice -

And I see that the blurred incident is saying twice for many people I'm sincere, I do not understand Why is why Javascript: // call tooltip initTooltip ($ element, {'trigger': 'manual', 'placement': 'down ',' Title ': message [$ element.id +' required ']}); InitTooltip: function ($ element, option) {console.log ('--- initTooltip ---'); // It is executing 1x $ ('#' + $ element.id). Tooltip ({'placement': options.placement, 'title': options.title, 'trigger': options.trigger}). {'Blur': function () {console.log ('ON BLUR EVENT'); // It is executing 2x. $ ('#' + $ Element.id) .tooltip ('show');}}); My paramans are coming correctly, my messages are all right when I log out everything. Just not sure how the stigma is being executed twice to get around the event I have also tried to use the focusout but no luck. Whenever you call your initToolti...

MS Dynamics Webservice -

I am using MS Dynamics CRM4 and requesting contacts in a list using the web service. I'm applying for only one filter, the list is name. The problem is that there are 3000 members in the list of Dynamics but the web service is returning only 2200. Does anyone know why there is any difference? All records are of the same type and I have terminated those people who are not active. Look at it appears that when you see the marketing list in mobility, the contact appears. However, if you open contact records, the marketing list does not appear on the contact record. restrictions are counted on the count of records with a single request and you will be given a single request. There is no need to avoid downloading large amounts. I got a code sample for CRM 2011, you should have something like

TestNg Assert.AssertTrue Always returns False - Selenium Webdriver -

मेरे पास एक उपयोगी कार्य है: सार्वजनिक स्थिर बूलियन है WebElementEnabled (WebElement element) {कोशिश {वापसी element.isEnabled (); } पकड़ (अपवाद exx) {वापसी झूठी; }} सार्वजनिक स्थिर बूलीयन chkForThisElement (WebElement myElement) {प्रयास करें {myElement.isDisplayed (); } पकड़ (अपवाद ई) {// TODO स्वत: उत्पन्न पकड़ ब्लॉक वापसी झूठी; }} मैं इसे इस तरह बेस क्लास में कॉल करता हूं: सार्वजनिक स्थिर बूलीयन isusernameBoxEnabled = isWebElementEnabled (unameBox); सार्वजनिक स्थिर बूलीयन ispWordBoxEnabled = isWebElementEnabled (pwordbox); सार्वजनिक स्थिर बूलीयन issubmitBtnEnabled = isWebElementEnabled (submitBtn); सार्वजनिक स्थिर बूलीयन isctrsDrpdwnEnabled = isWebElementEnabled (multyCts); जब मैं इसे टेस्ट कक्षा में जांचता हूं, तो वह हमेशा झूठा देता है मैंने अस्तित्व के लिए परीक्षण के भिन्न तरीकों की कोशिश की, लेकिन यह केवल झूठे को देता है। @Test (प्राथमिकता = 1) सार्वजनिक शून्य सत्यापित करेंगॉजिन्ग कंसोल () {Assert.assertTrue (isusernameBoxEnabled ); Assert.assertTrue (ispW...

symfony - GuafretteBundle with Aws SDK2 -

I am trying to use goufet with AOS SDK2, and I get the following error on the cache: Clear after config: [ehs / common \ exception \ invalid enterprise exception] The signature value provided is not an example of S3SignatureInter I have setup composer.json "aws / aws-sdk-php": "2.6.*@dev" config. Yml Services: SRCOS_s3 Client: Class: Avs S3 \ S3 Client Factory_ Category: Oh \ S3 \ S3 Client Factory _Meth: 'Factory' Logic Key:%% of Amazon_s_s_s_Keep :% Amazon_avs_sat_sat% of area: US standard ... knp_gaufrette: adapter: media_ adapter: ass_s3: service_id: 'srcos_s3 Clint 'BucketName: my.bucket options: Directory:' Media ' GitHub: The problem was a mistake, the logic of service announcement (which I should have seen) must be a collection like this: config.yml Services: src.aws_s3.client: Category: Aas \ S3 \ S3Client factory_class: Aws \ S3 \ S3Client factory_method: 'factory' logic - key:% amazon_av_sou...

javascript - Jquery DatePicker YearRange based on current month -

"itemprop =" text "> I'm using datepicker for jQuery and I want to know if this yearRange change properties based on current month Is possible for In my case, if the month is different from November or December yearRange its current year otherwise this current year + 1 example is 1 : on average in April .datepicker ({showOn: "buttons", buttonImageOnly: true, changeMonth: true, changeYear: true , YearRange: '-12: +0': Example 2: Current month: November .datepicker ({showOn: "buttons", buttonImage: "../../App_Themes/Samae/images/calendar.png", buttonImageOnly: true, changeMonth: true, changeYear: true, yearRange: '-12: +1' Thanks! jQuery code $ (function () {var d = new date (); var month = d.getMonth (); var category ; If (month == 10 || months == 11) {range = '-12: +1';} and {class = '-12: +0';} $ ('# txtDate'). Datepicker ({ ChangeMonth: true, changeYea...

javascript - Tiny MCE Editor issue on Joomla 1.5 -

Image
I have a Joomla admin panel on Joomla 1.5, and it uses Tinnimese 2.12 problem with editor Chrome works well in Firefox There is a small MCE image on page load here. When I click on HTML, the HTML editor will pop up. Image: As I press update button in popup , Little MEE Edward Grey turns out and does not allow any editing. Image: However the content added in the save and apply popup Has been saved properly Can anyone help me, what's the problem with Timmy MCE, which is not performing well in CHROME? Is there any update of TinMMEE for Joomla 1.5? I tried for Joomla 1.5 with a small MEE 3 but it is not working. Thank you! TinyMCE for the latest version should you update. You can only download the latest version from TinyMCE's official website, and you can remove it in the correct directory under Joomla. Make sure you back up your Joomla website first and make sure you delete the previous TINMEE Core files before uploading new ones.

php - How to remove all whitespaces between tag-pairs inside <ul> element -

मेरे पास वर्तमान में निम्नलिखित सामग्री है: & lt; अनुभाग & gt; & LT; hgroup & gt; & Lt; h1 शैली = "टेक्स्ट-संरेखित करें: केंद्र;" & gt; कोपेटिटल 1 & lt; / h1 & gt; & Lt; h2 शैली = "टेक्स्ट-संरेखित करें: केंद्र;" & gt; उपशीर्षक & lt; / h2 & gt; & Lt; / hgroup & gt; & Lt; ul class = "sample1" & gt; & Lt; li वर्ग = "नमूना 2" & gt; उत्तरदायी विज्ञापन लैंडिंग प्लसटेट्स, एक्सट्स ओटिसिज एक्सपेरिज्स, लेक्टीस मील एंड्रॉइड एंड कंट्रीजिंग सर्विसेज एंड लेफ्टिबैक / ली & gt; & Lt; li वर्ग = "नमूना 2" & gt; उत्तरदायी विज्ञापन सैंडबॉक्स यूआरएल: मेरे पास PHP में निम्न कोड है: $ new_content = preg_replace ('/ (? & Lt; = & lt; ul class = "sample1" & gt; | & lt; \ / Li & gt;) \ s *? (? = & Lt; \ / ul & gt; | & lt; li। *? & Gt;) / है ',' ', $ सामग्री); यह काम करता है, उल और ली के बीच और ल...

javascript - angularjs injector with location service -

I have some angular with Jasmine To do this, I need an angular injector: var Injector = angular index (['ng', 'ngrut', 'main module']); This works fine, but when I test a controller that uses $ space, I have to add that injector: var Injector = angular indicator (['ng', 'ngrut', 'position', 'main module']); Now it throws an error: Error: Error: Failed to instantiate module space due to [$ Injector: Modular]: Error: [$ Injector: Named] module 'Location' is not available! You either misspelled the name of the module or forgot to load it. If a module is registering, make sure you specify the dependency in the form of the second argument. How can I include the $ location service there? Thank you. -------------- Edit ----------------- Many people No Answer I thought I would add some details. Here's the controller I'm trying to test (or its definition, I will not paste all the code): var ap...

java - Fractal noise terrain generating strange artefact lines -

I have a perline fractal noise pattern that generates a remarkable area. The problem I am facing is some strange lines going in both the X and Z directions, I am thinking that this would have to do with the fractal generation, but as I made it 2D pictures, I do not have any artifacts Sees Partition is divided into parts of the region, which alternately divides into tiles, which is a shape based on resolution. Size + (posx * (map size), z * tileSize + (posZ * (mapSize), 25000,0.5,16); Fractal function: Flat fractal (int x, int y, float grid subs, float gain, int octaves) {float total = 0; Float Freak = 1.0 / GridSubes; Float amp = gain; For (int f = 0; f & lt; octaves; f ++) {total + = noise (x * freq, y * freq) * amp; Freq * = 2.0; Amp * = Benefits; } Total Return; } Edit: I have not really given a good answer why this is happening but one possibility is that I have something for the upper position There are strange values ​​(though I should not be). I am ...

angularjs - ngInject and closure compiler -

I try to compile the following code in the advanced mode incorrectly: / ** * @Description App Configuration * @Veram {! Kajal. $ Route provider} $ route provider * @constructor * @ngInject * / function Config ($ routeProvider) {$ routeProvider. When ('/', {templateUrl: 'mainpage / mainpage.html', administrator: 'MainpageCtrl'}). When ('/ viewer', {templateUrl: 'viewer / viewer,', controller: 'viewerkeletal'}). Otherwise ({redirectTo: '/'}); } Is there any special flag on? If I add the following line then it works, but I want to take advantage of ngInet. config ['$ inject'] = ['$ routeProvider']; thanks Closing compiler with the "--angular_pass" flag .

ios - Arc shape not rendered smoothly -

Image
I made an arc at a casapeller 12 o'clock position and added it as a Sublayer on a UIView. The arc is rough or rough. I tried to join the antialiasing, the radius of the corner, line and tried to rasterize at one point but there was no luck. Why no idea why it is not smooth and what to do to make it smooth? If 9 or 3 make the same arc, they are smooth, but not 12 or 6 o'clock. Appreciate any help Here is the code: CGMutablePathRef path = CGPathCreateMutable (); CGPathAddArc (path, zero, 38.25, 38.25, 25, degree toradiadia (304), degree oradian (236), yes); Caspelier * Size Layer = [Caspare Layer]; [Size Layer Set Alveoli Antialiasing: Yes]; [Size Layer SetAdateAlizing Mask: KCLAER LtAdge | KCLArrayAdge | KCL AirebottomAdge | KCALayerTopEdge]; [Size Layer Set Corner Radius: 2.0]; [Size Layer Settlement Zone: KCellineJoinRound]; [Size Layer SetfillRoller: [[UICLER clear collar] CGColor]]; [Size Layer Setstructloror: [Color Cigilillor]]; [Size Layer Set Lyneppap: KCLinAphe...

serialization - Protect the Serializeable File from Copying (Java Program) -

I have a Java program that has expired and can be used only X times the serializable file The date ended with the X and X are read. I have encrypted the file with DES. The problem is how to protect that file by copying that file? Example problem: For the first time, my program with Datasair (A) in User A, which includes the price, how many times it can open its program (50 times). Then he can save that Data.ser (B) to copy Data.ser (A) to another folder. After using my program 49 times, he copies Data.ser (B) to replace Data.ser (A)), then he can open his program again 50 times. How to stop it? Now I can only hide the file in a separate folder (like C: \ Windows \ rds) but if the user finds that file, the user can copy that file. Is there a way to ensure that the serial accessable file? Or is there a better way to save on the expiry date of that time and how many times can be opened for that program? Thanks ...

ruby on rails - error with shoes no superclass method -

I am developing an interface with ads for green_shoes (GUI). To connect my script to the LDAP server and check the presence of the user, I can enter the login and password. When I click on the "login" button with or without logging in, I get an error. Error: can not work as expected / Yes / Zirius /. RVM / Games / Ruby-1.9.3-P484 / Games / Green_Shares -1.1.374 / Leib / Shoes / Ruby RB: 14: In 'Exit Operation': Super: No Super Class Method for GLIB 'Exit App Application': /home/zyriuse/.rvm/gems/ruby-1.9 Modules (Nomhaetire error). 3-P 484 / gemstone / green_short-1.1.374 / Leib / shoes / main RB: 123: In 'main', script 'green_shores' requires 'Net / LDAP' shoes.app (title = & Gt; "Authentication" ,: width => 300,: height = & gt; 300) Class ConnectLdap @myApp def initialize (Myapp, connect = Zero) @connect = connect @myApp = myapp end def connect (Login, pwd) @ myApp.app ldap = net :: LDAP.new ldap.ho...

php - Wordpress echoing a certain custom field -

I am trying to resize a specific custom field called 'price'. I have tried & lt ;? Php echo get_post_meta ($ post-> ID, 'value', true); ? & Gt; How can I resonate the value area? You must first get information about Wordpress's current term in a variable, for its use Can: global $ post; This variable will receive all the post information in $ post . With this you can call your function and it should work: echo get_post_meta ($ post-> ID, 'value', true) ; but value should have a meta property for that post.

spring - REST in workflow applications - where to keep the state? -

I tried to take a more detailed look on the rest - I love the spring too much, and I'm confused. The rest of the "resources" is fine for the original CRUD functions, but it seems weird for those applications which require the state to maintain, such as the workflow application I have read in one of the answers, it can not be found now , The state should be placed on the client. It seems strange: then does the customer stop cooking a request, and claims that he is in a state in which he is not? A way around it can be that the server sends the customer to sign his next state, and the customer then uses this signed status on his next request on the server. If someone has seen the "strong workflow app", then how is it actually done? REST = delegate state transfer customer and server exchange of a resource status - Provide It is basically placed on the server and updated by the client (/ created / deleted). The REST workflow is not odd for the app at all...

lua - HowTo create a fuel bar -

I would like to create a fuel bar (empty with full tank). When the user touches the screen, the fuel once Dairejh these is my code: lifeBar = display.newImage ( "fuel_bar1.png") lifeBar.anchorX = 0 lifeboats. ======================== Lifetime Y = 37 screens Group: The Insert function (called Laifbar) However, I fuel Kansmoshn (equivalent to "pressed" variable to reduce the fuel tank "true") Have used. When pressed == is true, it means that the user is touching the screen: processed (fuel) processed () if life & gt; 0 and pressed == true remains = life - life 1 Life = life =. Wide-1 remains Value.text = string.format ("% d", life) End of this This function is active as the entrance event: runtime: addEventListener ( "Antrfrem" fuel Snsadna) it is very well, but my question is: pressed variable each time 5 seconds (once = = True) How is it possible to reduce the vitality width? I tried to add it to my touch even...

How to open a url and then check if it is still opened or not in ruby? -

I have seen many ways to open URLs in the browser in Ruby, but there is no way to check that it Still open or not? I found something here - but then it looks like this ruby ​​version & gt; = 1.9.2 works with and I have ruby ​​1.8.7 (2011-06-30 patchlay 352) [i686 -linux] so I do not want to change this installation. So is there any way by which I can open a URL and then check that this example of tab or browser is closed or is still open or not ??? So, what I originally wanted to do was URL in a browser so that the server could redirect my script to that URL. The script that writes the file provided by the server to a file and my Ruby app has to read the contents of the file. So if I know that the URL is off it means that my Ruby app can now get the code from the file. You can get the process ID, then you can wait for that process to exit, or So in your main thread or in another thread. You can do this process by using the stdlib integration: View

coldfusion - Same application name on multiple IIS sites -

In the context of both aesthetics and architecture, our website is prominently redesigning. To avoid locking applications against updates during this redesign, we want to redesign one module at a time and pass users just between old and new sites as needed. However, we have several session notifications including our logs, which require us to be protected in this shuttle. If we set up two separate Webstrot folders with ColdFusion files (one for the old one) for each own IIS site, but to use the same application name Setting up application.cfc files in both, sessions and application scopes will be preserved as users move forward between two sites? Will this cause any unexpected problem? We are using ColdFusion 9. While this will work, as Dan suggested, this is not a great idea. For one thing you will not have any qualifications to change anything in the site app without affecting Site A. Without affecting this B It can present head-scratching worms. Consider the DSN names w...

database - How to find the longest running queries in sybase ASE 15? -

How to find the longest running queries in the Sibez ASE 15? Do we need to use MDA tables or is there another way? Without using the MDA tables, you can first see the system table master. Sisogsold . Otherwise, you can use the MDA tables master..monProcessStatement and master..monProcessSQLText . You can also look at sp_monitor 'statement' .

How to run specific tests using SBT Jenkins Plugin for ScalaTest test -

Currently we are using Intel, Scala, SBT so that our tests can kick in our local environment. With the SBT command line, we can specify specific tests, suites, wildcards according to the instructions specified here: Such only "test-only * redeem" While specifying this, along with SBT plugging, on our CI Jenkins server, it returns an error. In the Action field, the following values ​​were used: Action: test-only test.package.name All tests using the following tests Works for: Action: compile test [Success] Total Time: 240 Expected 'ID: [Error] Expected ID Characters [Error] Valid Order No: Organization (Equal: Export) [Error] Expected Project ID [Error] Expected Configuration [Error] Expected ': (If Choosing a configuration) [Error] Expected Key [Error] Not a valid key: Organization (Equal: Fork, Run, Doctor) [Error] org.company.scalatest.abc.regressionsuite [Error] ^ Build Build 'Build Sbt 'Build Build Changes to Failure' Use Build Usi...

impresspages - How to have 2+ AdminControllers for 1 Plugin -

मेरे पास 2 व्यवस्थापक contollers है। पोस्टकंटोलर श्रेणियाँ नियंत्रक मैं ब्लॉग प्लगइन के अंदर उन्हें कैसे बना सकता हूं, अगर मैं चाहता हूं एक प्लगइन में एक से अधिक नियंत्रक, एडमिन या सार्वजनिक हो सकते हैं। मैंने पोस्टएडमिन कंटोलर बनाने और व्यवस्थापक कंट्रोलर का विस्तार करने की कोशिश की, लेकिन इसे कैसे कॉल करना है ? Aa = Post.index डिफ़ॉल्ट रूप से उपलब्ध तीन नियंत्रक हैं: व्यवस्थापक नियंत्रक SiteController PublicController यदि आप अधिक नियंत्रक चाहते हैं, तो मार्गों का उपयोग करें () परन्तु फिर आपको स्वयं की सुरक्षा जांच करनी है: \ ip \ internal \ Admin \ backend :: userId () // जांचें कि क्या व्यवस्थापक लॉग इन है ipAdminPermission ($ plugin) // जांचें कि मौजूदा व्यवस्थापक को प्लग इन एक्सेस करने का अधिकार है या नहीं।

saml 2.0 - Unable to lookup idp connection metadata for entityid='http://sp.example.com/sp' -

मेरे पास सेवा प्रदाता आवेदन http://sp.example.com/sp है और जब उपयोगकर्ता एक ब्राउज़र के माध्यम से इसे एक्सेस करता है, उपयोगकर्ता को मेरे एसपी अनुप्रयोग से आईडीपी सर्वर पर रीडायरेक्ट किया जाता है जो पिंगफ्रेडेटेड सर्वर पर एसपी कनेक्शन () के साथ इकाई आईडी के रूप में कॉन्फ़िगर किया जाता है उपयोगकर्ता को SAML प्रोटोकॉल के माध्यम से SAML AuthnRequest आईडीपी पर पुनर्निर्देशित किया जाता है लेकिन पिंग सर्वर पर मुझे यह त्रुटि मिलती रहती है जो कहते हैं आईडीपी कनेक्शन मेटाडेटा को एंटिनेट = 'http: //sp.example.com/sp' क्या किसी के पास पिंग के साथ पहले ऐसी कोई त्रुटि है? यह एसपी-शुरू की एसएसओ है अनुरोध मैं PingFederate को भेज रहा हूँ & lt; एक्सएमएल संस्करण = "1.0" एन्कोडिंग = "UTF-8" & gt; & lt; samlp? AuthnRequest xmlns: samlp = "कलश: ओएसिस: नाम: टीसी: एसएएमएल: 2.0: प्रोटोकॉल" असेंशन कंस्यूमर सेवा सेवा = "https://sp.example.com/sp" गंतव्य = "https://idp.com/sp/ACS.saml2" फोर्सऑथन = "false" id = ...

Can the return type inside templates in C++ be controlled? -

मेरे पास एक templated फ़ंक्शन है: टेम्पलेट & lt; class T & gt; टी फू (स्ट्रिंग sReturnType) {// छद्म कोड यदि (sReturnType = "string") {स्ट्रिंग तालिका में लुकअप डेटा स्ट्रिंग लौटाता है} और {नंबर तालिका वापसी संख्या का उत्तर देखें}} उपयोग कुछ ऐसा होगा: फ़्यू ("स्ट्रिंग") फ़ंक्शन के अंदर, तर्क होना चाहिए कि या तो स्ट्रिंग तालिका से खींचती है या एक संख्या तालिका और वह मान देता है। मैं इस के आसपास खेला और काम करने में सक्षम नहीं था जैसा कि मैंने उम्मीद की थी ऐसा लगता है कि यह बहुत सीधे आगे और आसान करना चाहिए। क्या यह एक वैध दृष्टिकोण और टेम्पलेट्स का उपयोग है? मैंने टेम्प्लेट स्पेशलाइजेशन पर देखा, लेकिन फिर आप दो अलग-अलग कोड ठिकानों को वैसे भी लिखते ही हैं, क्यों एक अतिभारित फ़ंक्शन का उपयोग नहीं करें? क्या कोई बेहतर तरीका है? नहीं - भिन्न रिटर्न प्रकार वाले फ़ंक्शन को घोषित करने का कोई तरीका नहीं है ( एक टेम्पलेट फ़ंक्शन में भिन्न रिटर्न प्रकार हो सकते हैं, लेकिन ये एक टेम्प्लेट पैरामीटर पर निर्भर करते हैं)। आप इसके बजाय सभी संभावित रिटर्न प्...

javascript - How to get json data in my case? -

I'm trying to use httml to get JSMS I have something like that .controller ('testcontroller', function ($ scope, $ state, $ http) {$ http ({url: "/json/test.json", Method: "GET" ,}). Success (data) {$ scope.testData = data; console.log (data)}; // $ outside the scope of http, but under the same controller, I have // ​​shows it undefined Console.log ($ scope .testData)}) I know that we have to keep our login code so that I can get data inside $ http Do not want to modify it. Is there any way to accomplish it? Thank you! First of all, Do not put a vote in the controller to take it into a service. This is the service that is designed for. Second, the $ http service is asynchronous. Your result is only available in success callback, and by the completion of the http request Your console.log will first be called. You can use it to use outside of the callback. Scope is required to assign the variables, and the call is expected to clear until...

Can SVN be integrated with authorization service -

I want to configure SVN such that it talks to an external service for authorization access to a user's way To determine the type of external service, there will be logic. When a user reaches the SVN, then it must be certified and then contact the authorization service for admission details - reading / writing / deletion etc. Is it possible and how to configure SVN to implement it Assuming that the Authority service is already available. What type of authority service are you the subject I'm talking about. Subversion Authority does not, instead, it passes authorization for another service You can use any service that is working with Apache httpd (like LDAP and Active Directory). You can use svnserve on SASL to connect to other services (like LDAP and Active Directory). You do not have access to or more of these authorization services. It is in your Subvision repository that after the user is certified, that user has to read / write (i.e. read, And can check files ...

r - Clustering dots in a scatterplot -

मान लें कि मेरे पास यह data.frame है: और मुझे प्लॉट करना है df $ y बनाम df $ x । चूंकि एक्स मान निरंतर हैं, एक समान स्कैटरप्लोट में एक दूसरे के ऊपर समान या करीबी y मान वाले प्लॉट्स को प्लॉट किया जाएगा, इस तरह के वाई-वैल्यू पर अंक की घनत्व किस प्रकार छुपाता है। उस स्थिति के लिए एक समाधान एक वायलिन साजिश का उपयोग करने के लिए निश्चित है। मैं एक और समाधान की तलाश कर रहा हूं - अलग-अलग बिंदुओं के बजाय अंकों की साजिश रचने के लिए, जो कि एक बबल प्लॉट के समान दिखाई देगी। हालांकि बुलबुले की साजिश में, बुलबुले को सार्थक बनाने के लिए एक तीसरा आयाम आवश्यक है, जो मेरे डेटा में मेरे पास नहीं है। क्या कोई आर फ़ंक्शन / पैकेज जानता है जो इनपुट अंक (और शायद एक निर्धारित त्रिज्या) के रूप में लेता है और उन्हें क्लस्टर करेगा और उन्हें साजिश करेगा? सूर्यप्रवाह प्लॉट फ़ंक्शन (और xyTable फ़ंक्शन जो ओवरलैपिंग पॉइंट्स को गिनने के लिए उपयोग करता है) को देखें। आप कर सकते हैं अन्य आकृतियों (बहुभुज या उदाहरण) का उपयोग करने के लिए xyTable के परिणामों के साथ TeachingDemos पैकेज से my.sy...

c++ - Write the definition of the function print to output the values of the -

Note: I ask my teacher for help, but it is only active on Thursday ~ Sunday, so it's a long Wait. In the class we are currently using: C ++ programming: Program design with data design Everything was fine until up to Chapter 10, reaching classes, After reading chapter 2 again, I suspect that I will be able to understand myself, in the part of our homework, it asks that we: print the definition of the function, for example Print to output values ​​of variable T. to: class employee // line1 {// line2 public: // line3 employee (); // line 4 employee (string, int, double); // line5 employee (int, double); // line 6 staff (string); // line 7 zero set data (string, int, double); // Line 8 Zero print () CONST; // line 9 zero update pay (double x); // line 10 intem namsoffservice () cons; // line 11 double getPay () const; // line 12 private: // line 13 string name; // Line 14 NANFSS virus; // line 15 double pay; // line16}; Will such a thing appear? Zero Employee :: P...

Polish characters are not stored in drop down list from oracle database in asp.net application published on server -

I have a problem with my ASP.NET application. I have some drop down lists that are using the sqldatasource oracle Database is surrounded. I use wet DB to connect to Oracle when I run my project on my local machine, then it is okay, but when I publish my application on the server, for example "N" And the letter "Paul" in "L" in "L" is an abstract Changed to the biological equivalent form What can be the problem? Is it about a version of Oracle on the server? PS I tried to do it in web.config: & lt; Globalization uiCulture = "pl-PL" culture = "pl-PL" file encoding = "UTF-8" request encoding = "UTF-8" response encoding = "utf-8" /> But this did not help, however the currencies have been converted from $ to Polish currency. I hope someone can help me, thanks in advance.

matlab - How to get the same motion in forward dynamics solution in Simulink? -

I'm new to SIMILIC and I'm having problems with creating and running multobody models. For a little while, here is my problem. I have designed 2 joint, 2 body systems. I work together in combination with position, speed and acceleration data (array format) and the system works perfectly. I was connected to the joint sensor in each joint, saved in joints by the torque workspace. I have the same model but it analyzes the system further in mobility. Therefore, the joints of this model are implemented by the torques obtained from the inverse mobility model. But the speed goes beyond the mobility model which does not happen with the inverse mobility model, even if it is not identical, it is completely absurd. I think I have checked everything but not sure "everything" can anyone help me in this ?!

php - Quoted string with quotes excaped by another quote (two double quotes) -

Then regex has been solved for a quoted string. Here's a good answer: $ re_dq = '/ "[^" \\\\ !!!! ?? \\\\\. [^ "\\\\\" \\\\\\\ "/ s'; PHP is considered a standard solution. My Points is that my quote has escaped from another quote. Example: = "123 4556 789" "Product B v .24 "" "=" 00 00FF "" License Key for Blah Blah "" HFD.33 "=" " The previous string should match the following, respectively: string '123 4556 789 "" product b v.24 "" (length = 31) string' 00 00ff '' license key for blah blah '' HFD.33 '(Length = 48) string' '(length = 0) The given example is only image String is what looks and not the actual string that I could be in the thousands that will match that. I need a Reggae pattern which will match a double quoted string which is not a sequence of two double quotes. Update 5/5/14: ...

javascript - AngularJS - orderBy distance function -

I'm very innovative for AngularJS, so be easy on me ... :-) In the process of building a building New PhoneGap App with Ionic Framework and AngularJS I have a list of those places which have an output and a function in the list view that will look at the user's location and will get the distance between their current location and the location in the list . These are currently both works properly and I can see my list, sorted by normal areas (name, etc.). What I would like to do is a preference screen where the user has already set up my preferred Sorting Options I have already set up my basic priority controller, which is currently only storing priority for sorting by 'name' But I want to sort it down by the distance, which is done by the below-seen function. But since the distance function is seen in this controller, I do not know how to make it? Again, I'm new so any help would be greatly appreciated! Here's my controller: .controller ('Locati...

java - Why arent my Student strings printing out? -

I have three small java classes, and I'm trying to read some data from a file and print it . These are my codes, and they are very few. Students.Java Package students; Import java.text *; Public class student {name of private string; Personal gaps ages; Private Double GPA; Public student (string name, int era, double GPA) {this.name = name; This.age = age; This.gpa = GPA; } Public string toString () {string gpa_string = new decimalFormat ("####). Format (GPA); Name of return + "+ + + integer .strosting (age) +" + + gpa_string + "\ n"; }} student.java package students; Import java.util. *; Import java.io * *; Public class students {public fixed final int MAX = 100; Private student student []; Private count; Public Zero Read File (string path) throws IOException {students = new student [Max]; Scanner X = new scanner (new file (path)); Calculation = 0; While (x.hasNextLine () & amp; amp;; & lt; MAX) {string name = x.nextLine (); If (...

mysql - Visual Basic - DLLs Throw NullRefrenceExceptions -

I sometimes do DLL and then try to import them, it works, but when I code I run directly from DLL, no matter what it is that throws an NullRefrenceException. Here is an example of a code that throws an NullReferenceException. New Streamer (client gatestream) Writer.Write ("& lt; />" client = new TcpClient ("127.0.0.1", 8000) & Amp; "hello_world" & "& lt; \ & gt;" author. Flush () Where "Hello_World" is a string. It does not work with MySQL Connector Net Along with, either I think My version of MySQL Connector Net is 6.1.2, I can not try and use the catch because it can not use the variable outside of the statement. Maybe the statement to use it? In, I'm not sure if you should try an effort inside the catch statement. I think it can put something else ... But the annoying part is that it is with someone else. Does not occur.

c# - DateTime shows random date after being bound to DataGrid -

मेरे पास ObservableCollection & lt; object & gt; है कि मैं DataGrid कोड के पीछे और मैं कॉलम जोड़ता हूं और उन कॉलम के लिए बाइंडिंग को पीछे के कोड में भी उत्पन्न करता हूं निजी शून्य RgvReportDisplay_Loaded (ऑब्जेक्ट प्रेषक, RoutedEventArgs ई) {यदि (RgvReportDisplay.Column.Count.Count == 0) {foreach (var आइटम ((ReportsQueryHolder) DataContext)। संकलन [0] GetType ()। GetProperties ()) {बाध्यकारी बी = नल; यदि (item.Name.ToLower ()। इसमें शामिल है ("तारीख")। Item.Name.ToLower ()। इसमें शामिल है ("अनुसूचित")) {बी = नया बाध्यकारी (item.Name + "Date"); //B.Converter = नया दिनांकन कनवर्टर (); B.Mode = बाध्यकारीमोड.ऑनवे; } और {बी = नया बाध्यकारी (item.Name); B.Mode = बाध्यकारीमोड.ऑनवे; } RgvReportDisplay.Column.Add (नया Microsoft.Windows.Controls.DataGridTextColumn () {हेडर = आइटम। नाम, बाइंडिंग = बी}); }}} जब मैं बाध्य होने से पहले एक संग्रह सूची को देखता हूँ तो सही दिखता है यहाँ मेरी तत्काल विंडो से कुछ है: ((रिपोर्टोंवालाहोल्डर) डेटाकॉन्टे...

windows - Communicate with Firewire ports in python -

I am in an unfortunate situation where I have been given a legacy system with an old Windows XP Firewire camera. Actually I am trying to get it all in OpenCV so that I can make at least one good interface in this old machine. The problem is, how can I connect to a document? What is the extension of firewire port to Python? Is there some extension for pyserial which can allow me to join this ancient machine? Sorry I can not be more clear, but I have not really got much of this. If by any means I can be more useful, just tell me and I will provide immediate information for the best information in my abilities. I think that's what you want.

php - CSRF token is invalid after download symfony -

When I install the symphony for a new project, I found this error on the installation page (when you used your database Configure): - (I can not get enough reputation due to cant) I just downloaded the repo from my machine, configured the vhost , Apache has restarted and found it. I got nothing. I know about disabling CSRF protection on config.yml structure: csrf_protection: ~ but I It does not want to do this with all my new project, when I download from Symphony GIT repo. I also tried to change the permission from Dear, but notices! Thank you!

video - Piping stdout to gstreamer -

गुड डे, मैं इनपुट से प्राप्त करने के लिए gst-launch (gstreamer) प्राप्त करने का प्रयास कर रहा हूं stdout। नेट पर ज्यादातर उदाहरण या तो फाइल से पढ़ने या डिवाइस से पढ़ने के बारे में हैं। क्या किसी को एक उदाहरण पाइपलाइन पता है? filesrc location = "lowframe.h264" या device = / dev / video0 क्या कोई ऐसा है जो stdout से पढ़ा जाता है fdsrc नामक एक जीस्ट्रीमर तत्व है इससे आपको (पहले से ही खुले) फ़ाइल डिस्क्रिप्टर से पढ़ने की अनुमति मिलती है। stdin मूलतः fd 0 (Linux / Mac जैसे POSIX सिस्टम पर) देखें, ताकि आप बस निम्न लॉन्च लाइन की तरह कुछ का उपयोग करें: curl http://example.com:8000/stream1.ogg! जीएसटी-लॉन्च एफडीआरसी एफडी = 0! डिकोडिबिन! filesrc का उपयोग करने के लिए और / dev / stdin से सिस्टम को इसका समर्थन करने वाला एक अन्य तरीका होगा, उदा: जीएसटी लॉन्च filesrc location = / dev / stdin! डिकोडिबिन! ऑटोओडियंसिक & lt; fdsrc विधि के बारे में पता चला / संपादित करें (जो कि प्रतीत होता है इस समस्या का बेहतर समाधान)

authentication - Access Control, Entitlements in Scala, Play Framework -

The building entitlements, access control module for an existing project where ACL wide level goes eg. role 1 can see page 1 and add all fields on page 1 can view role1 page 1 and can only view 4 fields on page 1 can not see role3 page 1 Signup / authentication requirements for the same authorization are also there will be a few fields in custom registration that will fill a new user and if it was already a registered user then the user login page Will use. Saito's Sikyorsomic for safety focus, but it is not flexible (at least custom registration forms) The use of past cross log Iks (while working on Java projects) (I That the Oracle entitlement server is predecessor), there are detailed entitlement layouts per role, per resource, etc. Are there any OAS replacements or what are the other Libs / Frameworks suggested in the Scala, Play Framework Land? There is an option to provide a custom registration page in SecureSocial: and deadbolt 2 handles piece of its auth...

java - Passing a parameter of an object contained in an arraylist to a method -

The title may be a little confusing or misleading, but I'm trying to compare a string: string mestring = "ABC"; and then try to compare it with every single string contained in the array list ArrayList & lt; String & gt; Array = new arreelist & lt; String & gt; (); Array.add ("The first letters of the alphabet are ABC"); Array.add ("abc"); Array.add ("alphabet"); Array.add ("nothing"); I have got a class which is the only thing which is important "searching" method. Public Zero Search (ArrayList> Object> Objects) If you have noticed, then this method is an array of object parameters As receives. The problem now is that ArrayList & lt; String & gt; The array which I have mentioned above is the property of each item, so I can not read it directly through the array list (I can do but I do not know how). Is there a way that the attributes of an object should be obtained in the...

Appropriate http responses on exception in REST API -

In my module, I would like to be able to throw exceptions when I have "bad things" and this setting is automatically used with appropriate exceptions (Including the status codes and payloads, if applicable) change those exceptions. I know that I can do this from my BootStrapper on the pipeline at the Honor ceremony. But is there a better or more established way of doing this? What I have now here: pipelines.OnError + = (ctx, err) = & gt; Handle exception (mistake, CTX); More method: Fixed response handles exception (exception error, Nancy Cotex CTX) {If (not fault is availableHandler exception) {Return ctx.Response. WStringContents ("No handler exists for given command"). With StatusCode (HttpStatusCode.NotImplemented); } If (incorrect UserAlreadyExistsException) {return ctx.Response .WithStringContents (err.Message) .WithStatusCode (HttpStatusCode.BadRequest); } If there is no mistake (unimplemented exception) {return ctx.Response .WithStringCont...

jquery - Stacks with Javascript -

I am working with a stack on the infamous 'braces' problem and I got a stop. It should be an easy decision, but my eyes do not help at this time. The first call to the function is working like a charm, but the second is going to an extra time and I ' the first call return 01110 which is correct but the second return is 011110 Which is not ... If you can not read the code here, then // Constructor function for our stack class function stack () {this.dataStore = []; This.top = 0; This.push = Push; This.pop = pop; This.peek = peeping; This.length = length; This.clear = clear; } Function Push (element) {this.dataStore [this.top ++] = element; } Function (pop) (return.dataStore [- this.top]; } Peak Peak () {this.dataStore return [this.top - 1]; } Length of function () {return.top; } Function clear () {this.top = 0; } Function braces {var i = 0; i & lt; expression; height} i ++) {// If the number of elements in the expression is weird, then it is a guarantee that...

ios - Process unicode string in C and Objective C -

I type the C function to read the characters in the user-input string. Since this string is user-input, so it can contain any unicode characters. There is an Objective C method that receives the user input NSString, then convert this string to NSData and pass this data to the C function for processing. The C function searches for these symbols: *, [,], _, does not care about any other characters, every time it gets a symbol, it processes and then calls an objective method, the symbol Passes the place. C code: typedef zero (* callback) (zero * reference, size_t location); Zero process (const uint8_t * data, size_ty length, callback CB, zero * reference) {size_t i = 0; While (i & lt; length) {if (data [i] == '*' || data [i] == '['] data [i] == ']' || data [i] == ' _ ') {Int Valid = 0; // Do something, set valid = 1 if (valid) CB (references, i); } I ++; }} Objective C code: // declared a C function. M file void mycallback (zero * referen...