Posts

Showing posts from June, 2010

MVC 5.1.2 EditorFor htmlAttributes -

यह काफी आसान दिखता है: @ एचटीएमएल.एडिटटरफॉर (एम = & gt; एम.पश्चरनाम, नया {HTML गुणों = नया {@ वर्ग = "फॉर्म-कंट्रोल"},} हालांकि, उत्सर्जित पृष्ठ पर यह क्लास लागू नहीं है। @ html.EditorFor (मॉडल = & gt; model.FirstName, नया {htmlAttributes = new {@class = "form-control"}}) यह मेरे लिए काम करने लगता है, आपके पास अंत में एक अल्पविराम है और पैरांथासिस को सही ढंग से बंद करने में विफल रहे हैं।

php - web service update error -

I have a web service that shows this error There is an error in your SQL syntax ; To use '0', date_de_naissance = '1988-02-02', check the manual associated with your MySQL server version for the correct syntax, lieu_de_naissance = 'at line 4 {"item": [["succes" ]]} & lt ;? Includes php ('settings.php'); Mysql_connect ($ host, user $, $ password); Mysql_select_db ($ base); Mysql_query ('set character settings utf8'); $ Id_patient = $ _GET ['id_patient']; $ nom = $ _GET ['name']; $ Prenom = $ _GET ['prenom']; $ Gender = $ _GET ['gender']; $ Date_de_naissance = $ _GET ['date_de_naissance']; $ Lieu_de_naissance = $ _GET ['lie__de_naissance']; $ Adresse = $ _GET ['adresse']; $ Latitude = $ _GET ['latitude']; $ Longitude = $ _GET ['longitude']; $ Telephone = $ _GET ['telephone']; $ Email = $ _GET ['email']; $ Situation_familiale = $ _GET...

Entity Framework : update 2 entities with related entity of same key -

"Student" has the navigation property "school" in it. Public class students {public long id; The name of the public string; Public school meschool; } Public class school {public long id; The name of the public string; } To update the database, the client program passes in two student institutions of the same school. Students. Myschool has two students in different subjects school with the same key.Id is . How can I update two students in a transaction ? I thought that two students should be paired with DBKNext and then be changed to modify their state. But the second was unsuccessful with the encryption error: Attaching a unit of type 'school' was unsuccessful because another unit of the same type already had primary key value. MySchoolId add property to student and MySchoolId set the reference to MySchool faucets before adding students to the context of each student's property myschool context, and then reference. Publi...

angularjs - Directive for input element with error assistance span elements -

I am trying to write an instruction to verify the input for the IP address. I'm very much like this boiler plate code on the web: & lt; Label & gt; IP address 1: & lt; / Label & gt; & Lt; Input ng-model = "formData.ip1" Required name = "ip1" type = "text" placeholder = 'xxx.xxx.xxx.xxx' ng-pattern = "/ ^ (\ d {1,3} \.) {3} (\ d {1,3}) $ / "& gt; & Lt; span ng-show = "myForm.ip1. $ Error.required" style = "color: red" & gt; * & Lt; / Span & gt; & Lt; Span ng-show = "myForm.ip1. $ Dirty & amp; myForm.ip1. $ Invalid" style = "color: red" & gt; This is an invalid IP. & Lt; / Span & gt; Since it requires dozens of places, and when verification rules and the way errors are indicated, the possibility will change, I would like to use a command like this: & lt; Label & gt; IP address A: & lt; / Labels & gt; & L...

c++ - Why is my for loop of cilk_spawn doing better than my cilk_for loop? -

मेरे पास cilk_for (int i = 0; i & lt; 100; i ++) एक्स = फाइब (35); उपरोक्त 6.151 सेकंड लगते हैं और के लिए (int i = 0; i & lt; 100; i ++) x = Cilk_spawn फिब (35); लेता है 5.703 सेकंड फाइब (x) भयानक पुनरावर्ती फिबोनाची संख्या फ़ंक्शन है। अगर मैं फाइबर फंक्शन cilk_for को डायल करता हूं तो cilk_spawn से बेहतर होता है, लेकिन मुझे लगता है कि fib (x) cilk_for को cilk_spawn से बेहतर करना चाहिए। मैं क्या समझ नहीं पा रहा हूं? प्रति टिप्पणी के लिए, यह मुद्दा गुम सिल्का_एसआईएनसी था मैं उस पर विस्तार से बताऊंगा कि वास्तव में आश्चर्यजनक सटीकता के साथ समय का अनुपात कैसे अनुमानित किया जा सकता है। / cilk_spawn कोड के लिए पी हार्डवेयर धागे (आमतौर पर 7 पर i7) के साथ सिस्टम पर निष्पादित होगा निम्नानुसार: प्रारंभिक थ्रेड i = 0 के लिए चलना निष्पादित करेगा, और कुछ अन्य थ्रेड द्वारा चोरी होने वाली निरंतरता को छोड़ देगा। प्रत्येक चोर एक चलना चोरी करेगा और अगले चलने के लिए निरंतरता छोड़ दें। जब प्रत्येक चोर एक पुनरावृत्ति को खत्म कर लेता है, तो यह चरण 2 में व...

css - Centralize a div with display-inline and affected by float -

I have this problem, I want to centralize a div inside a header, the problem is that: i Div (second use using a float left and float), see below: & lt; Header & gt; & Lt; Div class = "left" & gt; Hello World app left & lt; / Div & gt; & Lt; div class = "center" & gt; Center & lt; / Div & gt; & Lt; Div class = "right" & gt; Right & lt; / Div & gt; & Lt; / Header & gt; I try to use this CSS: header {width: 100%; Background color: black; Margin top: 50px; Text-align: center; }. Left {float: left; }. Center {display: inline-block; } .right {float: right; } but it did not centralize my center div (almost because it was not influenced by any other 2 div), what is the option here that I centralize this div ? Try to float all divs left and setting width: 33% each .

android - How to tell when image has been displayed in a view -

I have an activity that displays a spinning progress, while retrieving an image from a server in the background Has been there. After retrieving the image, it appears in the image view, which hides the progress. In addition, there are some menu items that perform different actions on the image. I should not show this menu item until the image is loaded in the image view. Is there a type of listener that I can add to the image view to display the image? I tried to add Focus Listener to the Properbarbar, when Progress Barr was not focusing anymore, thinking that the focus is lost when the image is displayed, but it never started. any other suggestions? You will use some library or some idealler class to load the image, then check it all Before setting the bitmap in the image view to set the bitmap file image in the byte download library image bytes, you must change your menu item before performing a callback interface to notify the action to be performed. . Specially please ...

c# - Crystal Report Viewer Not Accepting Login Info -

I am trying to create a simple crystal report viewer application and I can not set the login information to the viewer. Basically I want to open a report when I click on a button. Very simple I thought but apparently not. Here is my code Private Zero Button 1_Click (Object Sender, EventArgs e) {ConnectionInfo connInfo = new ConnectionInfo (); ConnInfo.ServerName = "server name"; ConnInfo.DatabaseName = "Database"; ConnInfo.userID = "USERNAME"; ConnInfo.Password = "password"; CrystalReportViewer1.ReportSource = GetReportSource (connInfo); CrystalReportViewer1.RefreshReport (); } Private Report Dockground GetReportSource (ConneInInfo connInfo) {Report Document Document = New Report Document (); Document.Load ("REPORTPATH"); Document.SetParameterValue (0, "04/02/2014"); Document.SetParameterValue (1, "04/03/2014"); TableLogOnInfos logoninfo = New TableLogOnInfos (); TableLogOnInfo logonInfo = New TableLogOnInfo (...

Update Testset (add test cases to test set) with Rally API 2.0 -

I have been stumped The call trying to add test cases to a testet is successfully completed but only one Adds the test case to the test set. $ url = https://rally1.rallydev.com/slm/webservice/{$apiVersion}/TestSet/{$testSetObjectID}?key={$securityToken} My payload: {"TestSet": {"testcases": {{"{_ref": "/ testcases / 17905298381", "_ref": "/ testcases / 10610152170 "," _ref ":" / tests / 10610171280 "}]}} Here is an example of a browser rest client which adds four test cases to a test set: End point: https://rally1.rallydev.com/slm / Webservice /v2.0/testet/14469862335/testcases/add?key=fbaa0c04-... payload: {"archive size": [{"_ref": "/ testcase / 14469885324"}, {"_ref See also: "/ testcase / 14469885842"}, {"_ref": "/ testcase / 14469886070"}, {"_ref": "/ testcase / 14469887154"}]} .

C++ How to put a line of a data file into an array for encryption? (AES) -

I have completed my AES encryption program at that point where I get the right answer at the command prompt with this code : zero main () {int a; Unsigned four syfaris [16] = {0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4f, 0x3c}; Unsigned four plain text [16] = {0x32, 0x43, 0xF6, 0xA8, 0x88, 0x5A, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xA2, 0xE0, 0x37, 0x07, 0x34}; For (a = 0; a & lt; 16; a ++) {key [a] = cipher [a]; Input [A] = plain text [A]; } KeyExpansion (); Cipher (); Cout & lt; & Lt; Endl; Cout & lt; & Lt; "Encrypted Output Text:" & lt; & Lt; Endl; (A = 0; a & lt; 16; a ++) // Loop is used to print each letter of the output array for the coupon {printf ("% 02x", output [A]); // printf is used to print encrypted text in HexSideCal Print & lt; & Lt; Endl; } However, I need to get data blocks for data from seeper and plain text instead of program. I have my data file Input.dat ...

.net - Passing F# function to IEnumerable.Where vs IEnumerable.All -

Looking at the following: open system.link also N = N% 2 = 0 Let's Ceca = SEC {0..2..10} This is a valid expression: seqA.Where (even ) but it is not: seqA.All (also) why also but not for permission? While there may be a bug, I think that would be a better approach IEnumerable & lt ; T & gt; Seq high command function should be used while working in F # instead of Linq in Even n = n% 2 = 0 let seqA = seq { 0..2..10} CKA & Gt; Seq.philter // Value: seq & lt; Int & gt; = CEC [0; 2; 4; 6; ...] seqA | & Gt; Seq.forall even // val it: bool = true

php - Simple JQuery AJax Example: Variables -

I have code from the W3 schools, jquery is related to ajax and it has modified a bit: & lt ;; DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; script src = "http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ("button"). Click (function () {$ ("# div1"). Load ("test / test.php");});}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; By & lt;? $ One = 5; $ B = 5; $ A + $ b = $ c ;? & Gt; & Lt; div id = "div1" & gt; & Lt; H2 & gt; Let's change the jQuery AJAX text This is a small line on my test.php: When I click on the button, I can not find anything, just "the answer is:" I know this stupid is simple, but I Zacro AJAX and no solution can be found to answer this question. This is a real project based...

backbone.js - How do I get a view to refresh after I delete a model from a collection? -

I have a view that is a list of phones. In the list, you can add or remove the phone. For example, for example, the function is called when the deleted phone form is clicked on. The problem is that after the phone is removed, I want to navigate through the updated list. The way I am using the backbone, it means that the phone will need to refresh the collection of phones, but I think it's okay, as long as the list is updated. With the below function, the list is not refreshing. deletePhone: function (ev) {var that = this; ev.preventDefault (); Var Phone Delete = $ (Ivorator Target). Serialize object (); Var Phone = New P.phone (); Phone.set ({ID: [phone-to-remove ']}); Phone.destroy ({success: function (model, response, option) {Backbone.history.navigate ('phone', {trigger: true})}}, error: function (model, feedback, option) {console.log ( "In error:");}}); }, How do I navigate to the updated list? Once you delete a model within a compilation an...

php - Parametrized query unknown total params -

I am using the safemysql class for parametrized queries Generally, when creating a query, it becomes like this Is: $ entries = $ db-> Match all ("From the table with selection =? I and name =?", $ Age, $ name); Such queries where I know that the total number of parameters parsed in advance is quite straightforward, but it appears that I have been stacked on queries, where I do not Know how many parameters I use - eg One search form: What I would like to do is the firing query parameter: if ($ _ POST ['namesparts']) {$ parts = explode (' ', $ _ POST [' at name '']); '$' In the form of $ ($) as '$' or 'firstname`. $ "$'; } If ($ _ POST ['age']) $ q = "and` age` = '". $ _ POST ['age']. ' '' '; $ Entries = $ dbs-> Match all ("Select from table = 1". $ Q ""); Any suggestions? With user-supplied information with any other SQL query,...

java - this while loop wont give me back the same as the for loop -

Can someone help me why loop does not have the same loop when doing the same? public square hallowld {public static zero main (string [] args) {System.out.println ("Hello World"); Int bits = 0; Int data length = 8; Println (dataLength); For / * (int i = (int) (Math.pow (2, numCheckBits) -1); i & lt; datalength + bits; i ++) {numCheckBits = i; } * / While ((Math.pow (2, bits) - 1) & lt; datalength + bits) ++; Println (bits); }} for (int i = (int) (Math. pow) (2, numCheckBits) -1); I & lt; Data lang + bits; i ++) {numCheckBits = i; When the loop starts, i 2 is set to numCheckBits -1 Then again, every time Through the loop, this has increased by 1. Thus, if the value starts as numCheckBits 0, i , then the value will take to 1, 2, 3. .., data length + bit - 1 . Inside the loop, the numCheckBits resizing is not effect, because expression is calculated only at the beginning of the loop using numCheckBits . while ((Math.pow (2, bits) - ...

python - numpy.random.multinomial bad outputs? -

I have this function: import as np def unhot (vec) Do: "" "takes one warm vector and emphasizes related integer" np.sum "(vec) == 1 # This statement should not be unsuccessful, but it did ... return list (vec) .index (1) that I call the call output: numpy.random.multinomial (1, coe) And I got an error at some point when I ran it. How is this possible? Numpy.random.multinomial's output is not guaranteed to be a hot-vector? Then I deleted the claim error, and now I have: ValueError: 1 is not in the list I'm getting some special print, or is it just broken? OK, this is a problem, and I should have realized, because I have encountered it earlier np.random.multinomial (1, a ([0., 0., np. Nn, 0.]) returns array ([0, 0, - 9223372036854775807,0]) I was using an unstable softmax implementation that was given to Nens. I was trying to make sure that I had a symmetrical & lt; = 1 in the parameters passed on the polynomia...

symfony - Symfony2 - How do you set the upload path outside of the bundle? -

I'm new to the completely new thing, I'm trying to fix my file upload Uploading it, the file within the bundle will have to be uploaded to the public_html folder outside the bundle Why do I need to change my functionality below so that the uploadpath is out of the Symphony Project folder? Server folder setup: / etc / / symfony project folder / public_ftp / / public_html / & lt; --- This is where I want to getUploadDir () to get it public function {return 'images /'; } Public function getUploadRootDir () {return __DIR__ '/../../../../web/' $ this- & gt; getUploadDir (); } Public function getWebPath () {return tap === $ this- & gt; Image? Zero: $ this- & gt; GetUploadDir () '/' $ this- & gt; Image; } Public function getAbsolutePath () {return tap === $ this- & gt; Image? Free: $ this- & gt; GetUploadRootDir () '/' $ this- & gt; Image; } Change your getUploadRootDir to: Public function getUploadR...

android - Graphhopper on emulator - No maps in list -

After setting up graphhops and maps (/ sdcard / graphhopper / maps) in Ambler, the dropdown list is empty. I have followed all the instructions according to the instructions given by github-wiki. Thanks Div class = "post-text" itemprop = "text"> This is the one and only in recent versions - we will update the download link soon. So please try to make master or

sql server - SQL LIMIT 1 DESC order -

I am trying to show only the best selling product at the work center, however, it keeps telling me that LIMIT 1 is incorrect sentence - configuration. I think that has helped find an answer here, so I decided to ask questions. Here working on my query SELECT WorkCenter.WorkCenterCode, Product.Name, SUM (Grahkordrlain. Quantity * CustomerOrderLine.ActualPrice) INNER Join productive as the workstation 'total sales. Workcentercode = product WorkCentcode INNER customers join the orderline but the product. Manufacturer = Customer Order Line Work seater by productive group. Workcontent code, product. No. By 'total sales limit Diissi 1 Your query went a bit clearer: SELECT wc.WorkCenterCode, p.Name, SUM (col.Quantity * col.ActualPrice) "Total Sales" includes wc INNER workstation which wc.WorkCenterCode = productive p.WorkCenterCode INNER customer order line at p. Manufacturer = wc.WorkCenterCode by col.ProductID Group, p. No. "Total Sales" by the OR...

issue instantiating object of Java generic class -

I am trying to understand Java generics. I'm having trouble in urging a generic class object. Am I going to go wrong in any insights? In a document, the general category: public class SearchSortAlgorithms & lt; T & gt; Search Sitadat & lt; T & gt; Applies to {ÃÆ'à ¢ â,¬Å¡Ãƒâ € šÃ, · | Public Zero quickSort (T [] list, full length) {recQuickSort (list, 0, length - 1); } One ?? In another: public class TestQuickSort {public static zero main (string [] args) {// Define an integer 50000 elements Array integer [] array = new integer [5000]; // to load the array with random numbers, // a for loop and Math.random () method - (int) (Math.random (* 50000)) for (int i = 0; i & lt; anArray .length; i ++) {Airere [i] = (int) (Math.Randem) * I); } // Print the first 50 array elemnts with a for loop // for system.out.print (int j = 0; j & lt; = 50; j ++) {System.out.print (anArray [ J] + ""); } System.out.println (); // Define an object of Sear...

activerecord - Creating and enforcing has_one relationship in rails relational database -

Working on a table of profiles I have an issue to install, is this correct? I am confused about has_many and has_one relations because it is a table with one line for each visited relationship, I have decided to go with has_one is it correct? Is this also a way to implement the relationship in the ActiveCard? Model Class ViewProfile & lt; ActiveRecord :: base verifies: seen_profile_id, presence: true is valid: profile_id, presence: true_one: profile_id is_on: seen_profile_id end migration Create Classviews Profiles & lt; ActiveRecord :: Migration Change Diff change_table: seen_profiles do | T | T.integer: profile_id t.integer: viewed_profile_id end end end edit with it also when I go to my console and type the profile I've seen So does nothing come in the form of any idea? = C Schema should usually be shown! First of all, you enter model and attributes (especially foreign key) . In the model, Attributes and Association will be set to M...

OCaml compile error with ocamlfind -

यहाँ कोड है: class parser = let test1 = function | 1 - & gt; प्रिंट_ंट 1 | 2 - & gt; प्रिंट_ंट 2 | _ - & gt; Print_int 3 में test = function | | 1 - & gt; प्रिंट_ंट 1 | 2 - & gt; प्रिंट_ंट 2 | _ - & gt; वाक्यरचना (camlp4o) सही: पैकेज (1) Deriving, deriving.syntax) सच है: धागा, डीबग, एनोट्स सच: bin_annot यहाँ संकलन कमांड है: ocamlbuild-use-ocamlfind test मूल यहाँ संकलन त्रुटि है: चेतावनी: टैग "पैकेज" एक पैरामीटर की अपेक्षा नहीं करता है, लेकिन पैरामीटर "deriving, deriving वाक्यविन्यास "चेतावनी: टैग" वाक्यविन्यास "एक पैरामीटर की अपेक्षा नहीं करता है, लेकिन" camlp4o "+ /usr/local/bin/ocamldep.opt -modules test.ml & gt; पैरामीटर के साथ प्रयोग किया जाता है। test.ml.depends फ़ाइल "test.ml", पंक्ति 8, वर्ण 0-3: त्रुटि: वाक्यरचना त्रुटि कोड से बाहर निकल गया आदेश 2। 00:00:00 में 1 लक्ष्य (0 कैश) बनाने के बाद संकलन असफल। हालांकि, जब मैं इसका उपयोग करता हूं: ocamlbuild test.native तब कोड सफलता...

regex - Trying to use /^\s*$/ match multiple blank lines and replace them failed and get a confusing result -

Pearl version: 5.16.01 I am reading a book about regex which perl 5.8 The book states that s / ^ \ s * $ / blabla / mg can match and replace many blank rows. But when I got acclaimed, I got confusing results. code: $ text = "c \ n \ n \ n \ n \ nb"; $ Text = ~ s / ^ \ s * $ / & lt; P & gt; / mg; Print "$ text"; Here is the result: c: \ user \ administrator \ desktop \ regex> perl t2h.pl c & lt ; P & gt; & Lt; P & gt; B I want to know that I have a single & lt; P & gt; is not found, but what between two between 'c' and 'b' varies after parallel to / $ / 5.8? Here's a lesson, beware of regular expression, which will match zero-width pattern, you can get unexpected results Can get it. We can see here that both of the replacements are showing the premiere, match and post match: Use strict; Use warnings; My $ text = "c \ n \ n \ n \ nb"; $ Text = ~ s {^ \ s * $} {prin...

osx - MongoDB not starting on Mac -

मैंने मोंगो डीबी via होमब्रे स्थापित किया है। मैन्युअल रूप से / data / db निर्देशिका बनाई गई कमांड लाइन से mongod कमांड चलाने की कोशिश की, यहां जो हुआ है: संजीत-सुहाग्स-मैकबुक-प्रो: ~ संजीतासुग्ग $ मोंगोड मोंगोड - सहायता और स्टार्टअप के लिए विकल्प 2014-04-24T09: 18: 12.949 + 0530 [initandlisten] MongoDB शुरू: पीआईडी ​​= 19900 बंदरगाह = 27017 dbpath = / डेटा / db 64-बिट मेजबान = संजीत-Suhags-मैकबुक-Pro.local 2014-04-24T09: 18: 12.949 + 0530 [initandlisten] 2014-04-24 टीटी 9: 18: 12.949 + 0530 [initandlisten] ** चेतावनी: नरम रिक्तियों बहुत कम है फाइलों की संख्या 256 है, कम से कम 1000 होनी चाहिए 2014-04-24 टीटी 9: 18: 12.949 + 0530 [initandlisten] db संस्करण v2.6.0 2014-04-24 टीटी 9: 18: 12.949 + 0530 [initandlisten] git संस्करण: nogitversion 2014- 04-24 टीटी 9: 18: 12.949 + 0530 [initandlisten] बिल्ड जानकारी: डार्विन मिनिमावेरिक्स.लोकल 13.1.0 डार्विन कर्नेल संस्करण 13.1.0: गुरु जनवरी 16 19:40:37 पीएसटी 2014; जड़: XNU-2422.90.20 ~ 2 / RELEASE_X86_64 x86_64 BOOST_LIB_VERSION...

c++ - Understanding names of shared library in linux -

I have read the Linux documentation project and I still do not understand that soname and real name . I have three files: main.cpp , header.h and test.cpp . I wrote the following Makefile: bin: main.o test.so g ++ -o bin main.o -ltest -Wl, -rpath / usr / local / lib main.o: Main CPP G ++ CCD CPP test. Type: test.og ++ -shared -o libtest.so test.o test.o: test.cpp g ++ -fPIC -c test.cpp clear: rm -f * .o * .so * bin I have run this make file, I have copied libtest.so in / usr / local / lib and it Okay. But I do not understand what is sonam and real name in my case? To recreate this makefile: Bin: Main Test.so G ++ -O bin Main.O-El-Altest -Wl, -rpath Main. O: Main CPP G ++ - C Main CPP Test. Association: test.o G ++ -share-WL, Sonam, -Listest SO-1-O LIBSTEST.So.1.0.1 Test. O Test. O: Clear test.cpp g ++ -fPIC -c test.cpp: rm -f * .o * .so * bin but it does not work. The reason for the following error was: / usr / bin / ld: can not be found -ltest collect2:...

ios - Allocate NSInteger* -

I'm sure there is nothing clear to me, but I want to make an example of an NSInteger pointer in Objective-C. - (NSInteger *) getIntegerPointer {NSInteger refValue = 0; NSInteger * theReturn = & amp; RefValue; Return; } When I call this function the return is zero, but is valid with the debugger within the function. Any suggestions? I do not want to convert theReturn to NSInteger. variable refValue is a local variable, which means that it is on the stack While the -getIntegerPointer method is being executed. As the method goes back, the variable will run (the stack will be closed), so this address is no longer worthwhile. If you want to return a valid indicator, you will have to allocate memory to the point being talked about, like this: - (NSITFor *) getIntegerPointer {NSInteger refValue = 0; NSInteger * theReturn = malloc (size (NSInteger)); * TheReturn = refValue; Return; }

maven - I add dependency in pom.xml -

I am adding dependency to pom.xml. But I got an error in my pom.xml file, Miss Artifact. Oracle: ojdbc14: jar: 10.2.0.2.0. Anything in the steps I have made is wrong. Please help me. & gt; Dependency & gt; & Lt; Dependency & gt; & Lt; Group & gt; Com.oracle & lt; / Group & gt; & Lt; ArtifactId & gt; Ojdbc14 & lt; / ArtifactId> & Lt; Version & gt; 10.2.0.2.0 & lt; / Edition & gt; & Lt; / Dependencies & gt; & Lt; Dependency & gt; & Lt; Group & gt; Com.microsoft.sqlserver & lt; / Group & gt; & Lt; ArtifactId & gt; sqljdbc4 & lt; / ArtifactId> & Lt; Version & gt; 4.0 & lt; / Edition & gt; & Lt; Scope & gt; Sequence & lt; / Scope & gt; & Lt; / Dependencies & gt; & Lt; / Dependencies & gt; As far as I know, Oracle ojdbc Not available publicly in the Maven Repositories. You should download it from the Oracle site, add it ...

visual studio - WIN API CreateThread not accessible in MFC Share DLL? -

I use the first MFC apps inside the CreateThread function, but it requires 6 parameters MLC share Paste all code into the DLL application. But error I get DLL compile Error 17 error C2660: 'CWinThread:: CreateThread': function does not have 6 arguments How to make thread function with 6 parameters in mfc share dll app? You must specify the CreateThread function in the global name space: handle thread = :: create formula (...);

html - Required Attribute Not work in Safari Browser -

I tried the following code to create the required field to notify the required field but it does not work in the Safari browser Has been doing. Code: & lt; Form action = "" method = "post" & gt; & Lt; Input required / & gt; Your name: & lt; Br / & gt; & Lt; Input type = "submit" / & gt; & Lt; / Form & gt; Code in Firefox Can you tell me the javascript code or any workspace? New in javascript thanks Safari does not support it Attribute, you have to use javascript. This page contains a hacked solution that should add the desired functionality: & lt; form action = "" method = "post" id = "form id" & gt; Your name: & lt; Input required = "true" /> & Lt; Br / & gt; & Lt; Input type = "submit" / & gt; & Lt; / Form & gt; Javascript: var form = document.getElementById ('formID'); // ID has the for...

c# - Floating-point error when not assigned to a float variable -

I have a static method GetFraction which gives the st in the price below: Public static class PriceUtil {public static intra fracturing (float price) {int price int = (int *) (100 * value); Return value value 100%; }} $ 23.79 for the price, this method gives 78 cents instead of 79. While debugging, I have unknowingly set the bug as follows: Public Fixed Class Price Unit {Public Fixed Ent Fret (Float Price) {Float Price = $ 100 value; Int priceInt = (price); Return value value 100%; }} I do not understand that assigning (100 * value) in the float variable solves the problem. The FAIX, the whole number of casting is done on the same value as int bar float float . Thanks for your reply in advance! As written in the comments, you have a problem of decimal To avoid the float instead of type in the form. Using the value 23.79f does not describe the problem My computer is therefore my guess that the price has been calculated from the last few calculation...

php - Accessing a specific value from an array returned by Ajax in javascript -

अजाक्स भाग $ ("# panchayat")। परिवर्तन (फ़ंक्शन () { Var परम = {'पंचायत_आईडी': $ (यह) .वल ()}; अलर्ट (परम ['पंचायत_आईडी']); $ .एजैक्स ({टाइप: 'पोस्ट', यूआरएल: '& lt;? Php echo base_url () ;; & gt; index.php / parent_taluk ', डेटा प्रकार:' html ', डेटा: परम, सफलता: कार्य (डेटा) {var तालुक_आईडी =' तालुक _ '+ डेटा; सतर्क (तालुक_आईडी); दस्तावेज़.getElementById (तालुक_आईडी)। = सच;}, त्रुटि: कार्य (XMLHttpRequest, textStatus, errorThrown) {चेतावनी (XMLHttpRequest.responseText);}});}); नियंत्रक विधि सार्वजनिक फ़ंक्शन parent_taluk () {$ this- & gt; लोड- & gt; सहायक ('फ़ॉर्म'); $ पंचायत_आईडी = $ यह- & gt; इनपुट- & gt; पोस्ट ('पंचायत_आईडी'); $ इस- & gt; check_isvalidated (); $ इस- & gt; load- & gt; मॉडल ( 'admin_model'); $ डेटा ['तालुक'] = $ इस- & gt; व्यवस्थापक_मॉडेल- & gt; माता-पिता_तालुक_ऑन ($ पंचायत_आईडी); $ Taluk_id = $ डेटा [ 'तालुक'] - ...

c# - How to pass parameter to javascript dynamically -

I have a repeater control on the aspx page and in that page I have kept the checkbox when a user checks this box , Then I want to redirect to a page. To do this, I have also written a java script: JS: function update (eid) {window.location ( "Events.aspx Id =" + Id); } The method has the following code: Secure void rptEventReminder_ItemDataBound (Object Sender, RepeaterItemEventArgs e) {checkbox cbx = checkbox As e ITEM FontControl ("chkComplete"); Label labeled lbl = e.Item.FindControl ("lblEid"); If (CBX! = Null & LBL! = Null) {Int64 eid = Convert. ToInt64 (lbl.Text); Cbx.Attributes.Add ("onclick", "update (eid);"); }} The ID that is passing as a parameter is unique in the database. I get a JavaScript error: JavaScript runtime error: 'EID' is undefined , Which is considered as a JavaScript variable, therefore you get an error JavaScript runtime error: 'EID' is undefined Now, ...

c# - Access Dynamic AX methods using JAVA -

Image
I need to use the Dynamic X to Java . I have gone through many blogs and articles, but I could not move it. see the structure, Dynamic AX Here are the general methods (or the way we are doing) to get and to get it Something else in the C # code. Strong> Dynamic AX Business Connector (DLL file) by loading AxaptaObject (App Connector) and AxaptaContainer (Data Container). The question now is, JNI code> we axapta in Java over the object, can load the dynamic x connector DLL file ? Can we write some dynamic C # code (standalone C # program), such as returns POS objects like function ( accepts Method Name AX , Method parameter ) { // fetch 'AxaptaObject', Process method and Client response (Merciful ) Of the image), } and then create a DLL file for the above function and then JNI . Does Microsoft provide some Java libraries directly to Dynamic AX? Has anyone done such a thing or can help me come from here? This i...

php - How to update runtime values in the sense to voting as a refrence -

Just like that, what kind of reasoning is it to make, I know AJAX It's working, but how? The first user has been voted on the second number and at the same time other users can vote / see it below Good explanation on the following site.

python - Create a multiline graph using vincent from a Pandas DataFrame -

I found a problem similar to the following: but I could not find the solution. I want to display a multipurpose graph with the number of discussions processed by users, on chat equipment, for each hour. I got a dataframe with the format below. The left column represents the hour, and every other column has the number of users discussed for each hour: user1 user2 ... ... ... 0 0 9 1 0 10 0 0 11 0 12 12 11 0 ... ... ... Note: I did not show all the DF but I got the lines from 0 to 23. I tried the following code to create my graph: graph = Vincent Line (df) article. I got the following error: To correct the array size, press the Xis_titles (x = 'hour', y = 'number of discussions') Article Is not broadcastable What I really do is wrong, I tried to do something else I copied my index as a serial in my DF, gave me the following form : user1 user2 hours ... ... ... 8 0 0 8 9 1 0 9 10 0 0 10 11 0 11 11 12 11 0 12 ... .... .. And I tried the fol...

forms - For CSS, if we set display to table, table-row, or table-cell, then why don't we outright use to do it? -

इस सवाल का पहले से ही एक उत्तर है: 4 जवाब यह उत्तरदायी वेब डिज़ाइन के लिए है , और मैं कुछ मौजूदा कोड में देख रहा हूं कि कैसे एक फॉर्म किया जाता है। एक सहकर्मी ने पहले नाम के लेबल के कंटेनर div और & lt; इनपुट & gt; और इनपुट बॉक्स के अंतर्गत एक "त्रुटि संदेश", सीएसएस प्रदर्शन: तालिका और प्रदर्शन: तालिका-सेल का उपयोग कर। उन्होंने उल्लेख किया कि यह क्रोम और फ़ायरफ़ॉक्स पर ठीक काम किया है लेकिन IE 8 पर कुछ अजीब है। कृपया पर सरलीकृत संस्करण देखें तो यह फॉर्म किसी भी डेस्कटॉप ब्राउज़र और मोबाइल डिवाइस पर अच्छी तरह दिखा सकता है केवल 320 पिक्सेल चौड़ा होना चाहिए। सबसे पहले, मुझे आश्चर्य है, क्या यह उत्तरदायी वेब डिज़ाइन करना बेहतर तरीका है? मुझे आश्चर्य है कि क्या हम सीएसएस टेबल और टेबल-सेल का उपयोग करते हैं, तो हम वास्तव में HTML का उपयोग क्यों नहीं करते? & lt; तालिका & gt; , & lt; tr & gt; , और & lt; td & gt; ऐसा करने के लिए? (उदाहरण:) इसे दिखाने के लिए सीएसएस तालिका डिस्प्ले का उपयोग करने के लिए थोड़ा अजीब लग...

javascript - JQuery ajax serialized input text field is empty on server side -

Image
I have some radios field and an input text type field on my form: & Lt; Input name = "cbPerson" type = "radio" value = "1" checked & gt; Person1 & lt; Input name = "cbPerson" type = "radio" value = "2" /> Person2 & lt; Input name = "txtName" type = "text" / & gt; I am serializing my form like this: $ Ajax ({type: 'post', url: 'form-1-proc.php', data: $ ('form'). Serialize (), success: function (data) {warning (data);}, error: Function () {warning ('error';}}); And I'm getting data on the server side ( form-1-proc.php ) : $ person = $ _POST ['cbPerson']; $ name = $ _POST ['txtName']; variable $ person has the expected value, but the variable $ name never brings a value and it is always "0". This page is an al-Jumla operated website on BTW The page has been worked as a page, the page itself is at the...

javascript - jQuery Is not a number -

I have a table that uses yoga values ​​when I write something which is not a number, then I How to keep the result 0? Some code: $ (document) .on ('keyup', 'input', newSum); Function newSum () {var sum = 0; Var thisRow = $ (this) .closest ('tr'); Var Total = 0; $ (ThisRow) .Find ("TD: No (gross) input"). Each (function () {sum + = parseInt (this.value);}); // Entrymos El Color de la Sima de Cad file if ((amount% 2 == 0)) $ $ (thisRow) .find ('total'). Chetan ({backgroundColor: 'green'}, 1000);} and {$ (thisRow) .find ('(' background ':' red '}, 1000);} $ (thisRow). Fed ("total") Html (sum); $ ('total') .Every (function () {total + = parseint ($ (this) .html ());})}} Thanks in advance. Try: sum + = + this .value || 0; + tries to put the value of a number into the box, if that value fails Is 0

Magmi - several configuration files for databases informations -

I am trying to set up several profiles to import products to many websites on several magazines. In Conf / folder I have a sub folder for each website, it works fine for each profile configuration. I would like to know whether it is possible or not to configure global standards for each website separately? I know that they are "global" norms, but I have many databases with different connectivity information, and I would like that every time a profile is selected, database notifications also change. Thanks No permission to configure Magmi from a Magento database Was designed for, not many. The way you want to make it, Magmi will need to customize itself.

Timestamp-based automatic merge in Mercurial -

I want to use Mercurial for email-based sync system (see) I have applied around sending bundles nearby and applying them in the repository to coordinate the advertisement. But I often get merge conflicts, which I have to solve manually. But they can be easily resolved: I just want a new file to replace the old file. Is it possible to set a merge-to tool in Mercurial, which actually does this: When I hg pull a new time stamp in the bundle file Updating with? When you drag or unbundle new changes in the repository, Strong> do not pierce (you will get only new head) - I can not see why you can merge on the bridge (untold local changes? Committed before the bridge!) If you Merge-dispute appears on the merge head (when you can merge the local head in tip after tip) and you disputed files Like the tip version of and abandon local changes which you can use to merge with the - tool = internal: local option if you Dummy-merge likes, i.e. Skip all local changes , ...

html - Is there a way to ONLY allow input using the spinner controls on an input type="number"? -

I want the user to be able to change the contents of the box with only in HTML5 Spinner available with input type = "number" , and not able to type anything in the box Can I do this? (My intent viewers are using Chrome only, so spinners are not visible on IE (9) and Firefox (13)) You can use the javascript onkeydown event ... which will prevent the user from typing anything, and still He will be able to use the arrow controls to increase and decrease the numbers. & lt; Input type = "number" min = "0" value = "0" phase = "5" onkeydown = "return false" /> Note: Just do not depend on Javascript and HTML, it is always to ensure that the server side does not authenticate that the user does. Posted to a malicious input Javascript can be disabled and user can abuse by adding any text in the text box, but there is no other way you can prevent it, so check the server side too. As you commented, you w...

Java Socket Programming Buffer for Large File -

I am trying to transfer a large file to the client from a server. My code still works, but if I set the buffer size in the client code to the exact size of the file, I will not always know what the file size will be. I find examples that claim that someone No matter what the size of file or buffer is because it will continue to read from the input stream ...? However, when I apply the code, which is assumed that it transfers 0 bytes. Customers: Public static zero main (string [] args) IOException throws {int bytesRead; Int current = 0; FileOutputStream fos = Faucet; BufferOperputStream Boss = Faucet; Socket sock = null; Try {sock = new socket (hostname, 20000); Println ("Connect ..."); // Get the file InputStream = sock.getInputStream (); Fos = new FileOutputStream (FILE_TO_RECEIVE); Bose = new BufferedOutputStream (fos); //////////// In this place //////////////////////////// byte [] buffer = new byte [ buffer size]; Bitesrad = is Reed (buffer, 0, buffer lamps); Cur...

java - Can't return a Object[] casted as String[] -

सार्वजनिक स्ट्रिंग [] getAllKeys () {ऑब्जेक्ट [] कुंजियाँ कॉपी = नया ऑब्जेक्ट [keys.size ()]; चाबियाँ कॉपी = कुंजियाँ। ऐरा (); वापसी ((स्ट्रिंग []) कुंजी कॉपी ()); } क्यों यह मुझे Ljava.lang.Object देता है; [Ljava.lang.String ?? के लिए डाली नहीं जा सकती है क्योंकि यह आपके पास ऑब्जेक्ट ऑरेंज और वस्तु [] को स्ट्रिंग [] पर डाली नहीं जा सकती। रिवर्स संभव है इसका कारण ऑब्जेक्ट स्ट्रिंग और स्ट्रिंग ऑब्जेक्ट । यदि आप कुंजी की संग्रह स्ट्रिंग की सामग्री है, तो आप कुंजी का उपयोग कर सकते हैं .toArray (नई स्ट्रिंग [keys.size ()]); सार्वजनिक स्ट्रिंग [] getAllKeys () {रिटर्न कंस। एट्रे (नई स्ट्रिंग [keys.size ()) ); }

javascript - Regex validation doesn't work as expected -

var मान्य करें पासवर्ड = समारोह (पासवर्ड) {var ऊपरी = नया RegExp (/ ^ (? =। * [AZ ])। $ $ /), निचले = नया रेगएक्स (/ ^ (? =। * [एजी])। $ $), प्रतीकों = नया रेगएक्स (/^( ??=.*(_ | [^ \ w] ))। $ $ /), संख्याएं = नया रेगएक्स (/ ^ (? =। * \ d)। + $ /); ((Upper.test (पासवर्ड) & amp अगर; & amp; lower.test (पासवर्ड)) || (upper.test (पासवर्ड) & amp; & amp; numbers.test (पासवर्ड)) || (upper.test (पासवर्ड) & amp ; & Amp; symbols.test (पासवर्ड)) || (लोअर.test (पासवर्ड) & amp; amp; amp; और amp; संख्या। टीएस्ट (पासवर्ड)) || (लोअर। टेस्ट (पासवर्ड) & amp; amp; प्रतीक। टीएस्ट (पासवर्ड) ) {वापस सच; } Else {alert ('अमान्य पासवर्ड')}} मान्य पासवर्ड ('Foo1!'); }); यह केवल वापसी सच किसी भी मूल्य दर्ज किया गया है, तो अगर मैं केवल यह रिटर्न एक दर्ज मुझे सच अपनी टिप्पणी मैं अपने जवाब को नवीनीकृत किया है के आधार पर: पासवर्ड 4 से बाहर कम से कम दो पर से मेल खाना चाहिए true var validatePassword = function (password) {var numero के लिए और 8...

ios - A few questions about NSLocalNotifications -

यह मेरा स्थानीय नोटिफिकेशन कोड है I NSDate * currentDate = [एनएसडीटी तिथि]; NSCalendar * कैलेंडर = [NSCalendar वर्तमान कैलेंडर]; [कैलेंडर सेटटाइमजोन: [एनएसटीमेज़ोन सिस्टमटाइमजोन]]; NSDateComponents * घटक = [कैलेंडर घटक: NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | एनएसएचओआर कैलंडरयूएनआईटी | NSMinuteCalendarUnit तिथि से: currentDate]; [घटक सेट टाइम ज़ोन: [एनएसटीमेज़ोन सिस्टमटाइमजोन]]; [घटकों सेटहोअर: 13]; [घटकों सेटमनिट: 11]; [घटक सेटडय: बेटेडमेन्गुनूनंबर.इंटरवेला -3]; एनएसडीट * परीक्षा = [कैलेंडर तारीखफ़ॉर्मसंगत: घटकों]; // अधिसूचना अनुसूची UILocalNotification * स्थानीयनोटिफिकेशन = [[यूआईएलोकल नोटिफिकेशन एलोक] आईआईटी]; LocalNotification.fireDate = test; LocalNotification.alertBody = [NSString stringWithFormat: @ "% @ 3 दिन शेष।", _ TxtBankaAdi.text]; स्थानीय नोटिफिकेशन.लर्टएक्शन = @ "आइटम दिखाएँ"; स्थानीय नोटिफिकेशन। टाइमज़ोन = [एनएसटीमेज़ोन सिस्टमटाइमजोन]; स्थानीय नोटिफिकेशन.अप्लिकेशन्स IconBadgeNumber = [[UIApplication साझा किया गया अनुप्र...

javascript - Change radio model on button click [angularjs] -

What do I want to achieve, when I click on the button change input, the model of the radio changed "value" goes . Why do I need to double click, so that the model can be updated and the radio is checked? & lt; Div ng-app ng-controller = "Ctrl" & gt; & Lt; Input type = "radio" ng-model = "value" ng-value = "33" & gt; & Lt; Input type = "radio" ng-model = "value" ng-value = "22" & gt; {{Value}} & lt; Button onclick = "changeInput ()" & gt; Input input & lt; / Button & gt; & Lt; / Div & gt; JS function Ctrl ($ scope) {} function changeInput () {$ ('input: eq (0)'). Click () .click (); } The probability is because the value is updated before your onclick function. Why do not you update the value in your onclick function and use only one click?

c# - How to make my custom TaskScheduler the default one -

मेरे पास अपना कार्य शेड्यूलर का कार्यान्वयन है इसके अस्तित्व का मुख्य कारण यह है कि यह मेरे कार्य को चलने वाले धागे के लिए प्रोसेसर कोर आत्मीयता स्थापित करेगा। जब मैं इसे निम्न तरीके से करता हूं: var myTaskSceduler = नया माइ टास्क शेड्यूलर (4); var टास्कफ़ाइनिल = नया टास्कफैक्ट्री (मैटस्कससेल्युलर); taskFactory.StartNew (DoSomething); समानता ठीक काम करती है, कार्य केवल निर्दिष्ट कोर पर ही चल जाएगा। मैं कैसे Task.Factory या कार्य। फ़ैक्टरी। शेड्यूलर इसलिए मेरा शेड्यूलर डिफ़ॉल्ट रूप से एक होगा कार्य। फ़ैक्टर। स्टार्टन्यू () को कॉल किया जा रहा है ? क्यों न सिर्फ अपनी खुद की स्थिर विधि बनायें, MyTask.StartNew () ? क्या आप समानता के रूप में समानता को निर्दिष्ट नहीं करना है? किसी भी स्थिति में, कार्य फंडा को उसी अनुसूचक का उपयोग करना चाहिए जो आप कर रहे हैं जब आप कॉल करें StartNew इसलिए यदि आप उचित शेड्यूलर के कार्य पर ऐसा करते हैं, तो उसे ठीक से काम करना चाहिए। यह वास्तव में आपके प्रसंस्करण शेड्यूलिंग आदि को कैसे संभालता है पर निर्भर करता है, लेकिन मैं मान...

mysql - Enum in a database -

I have a feature in a table that I want to be able to update. What is the best way to implement it? To create a second table with the values ​​and "enum_id" in the second table, and when I want to add or update the en enum value, then just update the specific row Or delete or add? Using MISL If the second choice is better then update your property values ​​when you update / insert new feature, Master T The id of the attribute in Lika remains the same If you go with the first choice and use the ENUM data type, you do You will only need to do INSERT or UPDATE on your attribute table. Alternate Table Every time you need to insert or update your attributes, and you need to enter each ENUM The value must be UPDATE in the main table.

sqldatatypes - PHP - What is the "data type" of $link in this case? $link = mysql_connect() -

Disclaimer I know that mysql_ [command] functions get weaker It is for a school project and before they get disconnected, I did not mark the "up-to-date-ness" of the functions used, only because of the complex-nature of the program I have written so that the PDO or There was no incentive to change Myscle. For example, despite not being defined in the same way as vb.net, I must include a variable-listing of all variables (including data type ...). My big question is! What is the data type of variable $ link in the code listed below? Where a data type is a string, integer, bullion value, etc. For example ... $ link = mysql_connect ('localhost', 'mysql_user', 'mysql_password'); If (! $ Link) {die ('could not connect:' mysql_error ()); } If it connects successfully it will be a resource identifier, otherwise Boolean : FALSE on a MySQL link identifier or failure on success. See:

linux - Copy vim ctags and key mapping to and -

I am browsing the long source code using vim + cscope + ctags. I always use it for & lt; C] and & lt; C-T & gt; To really hold , it looks really cumbersome because the keys are very different I have these key bindings to and lt; C-Q & gt; and & lt; C-A & gt; so that both key bindings work in VIM. should be: nnoremap & lt; C-q & gt; & Lt; C -]> Nnoremap & lt; C-A & gt; & Lt; Ct & gt; Although I discourage these mapping because they create problems. & lt; C-A & gt; In the vim is used under the cursor 1, & lt; C-x & gt; Increasing the number according to , similarly below the cursor is to reduce a number from 1.

javascript - Chaining web services calls with promises does not always work -

I'm having trouble, because this does not happen every time: I have webservices with collierges (Dzego / Tastypie ), The promise is only called with sothat WS2 (web service # 2) when WS1 has been executed successfully, etc. The code looks like this: myfunc = function () {callPromiseWS1 (). Then (function (data) {callPromiseWS2 ()} .then (function) {callPromiseWS3 ()}}}; WS2 is a post request that writes stuff in database. Which uses the content created by WS2. Sometimes (and not always), WS3 fails because the object that was previously WS2 should have been created by itself. It is not in existence. Of course, if I try the WS3 request manually Manually execute. This works. I think that WS2 and WS3 are executed in parallel, I do not expect that. Anyone Thank you. Thank you. You are missing 3 return statements, but the behavior you are experiencing This is because of a particular: myfunc = function () {return callPromiseWS1 (). Then (function (data) {return...

deployment - Copy files recursively with grunt-ssh -

I try to use particle-ssh for deployment but I only get files of copied folder: sftp: {deploy: {files: {". /": "Doc / *"}, Options: {path: '& lt; % = Pkg.server.path%> ', Host:' & lt;% = pkg.server.host% & gt; ', Username:' & lt;% = pkg.server.user% & gt; ', Password:' & lt; *% = Pkg.server.password% & gt; How can I get the entire local folder including my subfolders (recursively) Doctor , show progress: true, srcBasePath: 'doc /'}}} Remote copy is made? Take a quick look at the sources to solve my problem: sftp : {Deploy: {files: {"./": "doc / **"}, Options: {path: '& lt;% = pkg.server Path% & gt; ', Host:' & lt;% = pkg.server.host% & gt; ', Username:' & lt;% = pkg.server.user% & gt; ', Password:' & lt;% = pkg.server .password% & gt; ', Show progress: true, srcBasePath:' doc / ', createDire...

C# program to sort a two dimensional array elements in ascending order?(sort the columns first and then the rows) -

सार्वजनिक अतारांकित आरोही ऑर्डर () {// सहायक क्लास डबल टेम्पप = 0; के लिए (int j = 0; j & lt; numbers.Length; j ++) {for (int i = 0; i & lt; संख्याएं। लैंग - 1; i ++) {if (संख्या [i] & gt; संख्या [i + 1] ) {Temp = संख्याएं [i]; संख्या [i] = संख्या [i + 1]; संख्या [i + 1] = अस्थायी; }}}} मुझे कॉलम पहले सॉर्ट करने के लिए कोड की जरूरत है और फिर पंक्तियों को निम्न उदाहरण की तरह सॉर्ट करें! इनपुट: n = 3 2 2 1 3 53 4 32 5 3 आउटपुट: 1 2 2 3 3 54 4 32 53 कुछ उपयोगी लिंक्स:

c++ - Why does bool and not bool both return true in this case? -

इस सवाल का पहले से ही एक उत्तर है: यह मेरा कोड है: / P> #include & lt; cstring & gt; # शामिल करें & lt; iostream & gt; int main () {bool a; मेम्सेट (& amp; ए, 0x03, आकारओफ़ (बूल)); अगर (ए) {std :: cout & lt; & lt; "एक सच है!" & Lt; & lt; std :: endl; } अगर (! ए) {std :: cout & lt; & lt; "! एक सच है!" & Lt; & lt; std :: endl; }} यह आउटपुट करता है: a सच है! ! एक सच है! ऐसा लगता है कि ! ऑपरेटर पर bool केवल अंतिम बिट को बदलता है, लेकिन हर मान जो बराबर नहीं होता 0 को सच के रूप में माना जाता है। यह दिखाए गए व्यवहार को जाता है, जो तार्किक रूप से गलत है क्या यह क्रियान्वयन में एक गलती है, या क्या विनिर्देश इस अनुमति देता है? नोट करें कि memset को छोड़ा जा सकता है, और व्यवहार शायद हो क्योंकि a में स्मृति कचरा होता है। मैं जीसीसी 4.4.5 पर हूं, अन्य कंपलर इसे अलग तरीके से कर सकते हैं। मानक (3. 9। 1/6 मौलिक प्रकार) का कहना है: टाइप बूल के मान या तो सत्य हैं या गलत हैं। .... ...