Posts

string - Printing floating point number in python -

How can I print the lines of the following code, but I can get a floating point number instead of a rounded int ? Print "Math Question:", 100 - 25 * 3% 4 Print 3 + 2 + 1 - 5 + 4% 2 - 1/4 + 6 with the division in / 2.x results in an integer if both operencies are integers or Then first put an orange in a float in a float, or __future__ from the import division .

c# - Serializing on Desktop, Deserializing in Silverlight -

I'm trying to create content through a small desktop app, and it should appear inside a silverlight application I am here. (I'm making a simple, simple C # object, and trying to keep it going smoothly.) Reference is a game of some kind, where I have a desktop tool that allows me to create and edit the content I want , And then Silverlight Bayreyers consume it. How can I serial some (desktop) in C # and can it be serialized in serial lights? There is a small library created for my sermonization; It uses Silverlight, and a simple BinaryFormatter for each desktop, it's OK; But across the platform, these two are clearly inconsistent. Is it possible to do this? I do not like to return the data to save the data manually as text and then parse it, and if possible I do not like to use an embedded database. I can have lists of lists and other complex data, and manually parsing it is very painful. If this is not possible, then what options do I have? Edit: Proto...

sql - Check if value in column for all rows is exactly value -

For example, I want to follow number 2 as the target This is a positive sign > ID Status 123 1 432 3 531 2 123 2 This negative signal should return: ID status 123 1 432 1 531 1 123 1 Code> thanks EXISTS in priority COUNT then this first Non-mailing lines can return as soon as possible. Select when not existing (choose from your _table status & lt; & gt; 2) Then your message as 'Y' ELSE 'N' END You do not know the status of RDBMS You may have to add DUAL to at the end of the dependency on the taste.

c# - WPF correct way to set a bool while a key is pressed -

I need to set WPF a boolean variable (and some other actions besides this), while a key is pressed To wit. Pressed to set on key, and the key is released to reset. Something that I can do only by event handlers: this.KeyDown + = New KeyEventHandler (MyModuleView_KeyDown); This.KeyUp + = New KeyEventHandler (MyModuleView_KeyUp); Bull MyFlag = Incorrect; Zero MyModuleView_KeyUp (Object Sender, KeyEventArgs E) {if (e.Key == System.Windows.Input.Key.Space) {MyFlag = false; ...}} Zero MyModuleView_KeyDown (Object Sender, KeyEventArgs e) {if (e.Key == System.Windows.Input.Key.Space) {MyFlag = true; ...}} But I suspect the WPF can be done more accurately. I am trying to use a command approach, but the way I do it can set a variable on on fact when pressing only one key, but While the key is not pressed. Private Static RoutineIiCom mymode; Input gesture clip input = new input stewardess (); Inputs.Add (new keyGesture (key Space, "Space")); MyMode = New Routad UICOM ...

database - ADO.Net EF, Class Inheritance LINQ-SQL Query Syntax? -

Image
मेरे पास निम्न ADO.Net इकाइयां हैं: मैं क्या करने में सक्षम होना चाहता हूं, लोनएंडो आईडी के आधार पर गेम का समूह चुनें I.E सभी खेलों में जहां ऋण लिया गया हो == 1। मैं समझ नहीं पा रहा हूं कि मैं यह कैसे करूँगा? यहाँ मैं कैसे कोशिश की एक उदाहरण है, लेकिन मैं LibraryItems के लिए एक सूची और कोई विकल्प नहीं मिलता है। LanedTo (मुझे आशा है कि यह समझ में आता है) यहाँ एक उदाहरण है: मैं इसे कैसे प्राप्त करूं? क्या SQL सिंटैक्स? धन्यवाद! :) आप इस तथ्य से अपने खेल की सूची को फ़िल्टर करना चाहेंगे कि लाइब्रेरी इटैम का संग्रह ऑब्जेक्ट में कम से कम एक ऑब्जेक्ट को ऋण के साथ हो सकता है = 1। सही? अपने प्रश्न को सटीक रूप से वाक्यांश की कोशिश करें, क्योंकि आमतौर पर आप जिस कारण से फंस रहे हैं वह यह है कि आप सवाल को स्पष्ट रूप से पहले परिभाषित नहीं कर सकते जगह। एलोस, अगली बार, अपने कोड में टाइप करें। सिर्फ एक तस्वीर पोस्ट न करें यह उन लोगों को बनाता है जो आपको सब कुछ पुनः टाइप करने में मदद करने की कोशिश करते हैं - और यह कुछ लोगों को बंद कर सकता है। var games = डेटामोडेल में जी। मीडियाइ...

programming languages - MIPS - Create binary word of an order -

मेरे पास MIPS भाषा में निम्नलिखित कोड है: lw $ s5, -20 ( $ S6) उप $ t1, $ s5, $ t2 addi $ t1, $ t2, 50 मुझे प्रत्येक आदेश को इसके कोड में बदलने की आवश्यकता है: a। दशमलव बी में हेक्स सी में पहले ऑर्डर (lw $ s5, -20 ($ s6) के लिए बाइनरी 32 बिट्स में मैंने किया: a 35 | 22 | 21 | -20 बी। 23 | 16 | 15 | सी 3 प्रश्न: 1) क्या मैं सही हूं? 2) 32 बिट्स द्विआधारी के लिए कोड क्या होगा? 3) अन्य 2 अन्य आदेशों के अन्य कोड क्या हैं? धन्यवाद! ऑपरेंडों और निर्देश के प्रकार के अनुसार, कई एन्कोडिंग योजनाएं हैं, लेकिन ये सभी 32 बिट्स द्वारा रचित हैं और पहले छह निर्देश opcode (जोड़ें, एलडब्ल्यू आदि) निर्दिष्ट करें। रजिस्टर एन्कोडिंग : ये निर्देश केवल रजिस्टरों पर कार्य करते हैं। पहले छः बिट्स 0 हैं, अगले तीन पाँच बिट्स हैं जो क्रमशः पहले और दूसरे स्रोत रजिस्टर और गंतव्य रजिस्टर को निर्दिष्ट करते हैं। अंत में अन्य छः बिट्स हैं जो फंक्शन (एडी, सब इत्यादि) निर्दिष्ट करते हैं तत्काल एन्कोडिंग : ये निर्देश एक ऑपरेंड हैं जो कि स्मृति स्थान है । ओपोड के छः बिट्स के बाद पहली ...

c# - How to get the count from IQueryable -

By the article I'm applying paging in my GridView, I need two methods: Public IQueryable BindEmployees (integer startRowIndex, integer maximumRows) {EmployeeInfoDataContext dbEmp = new EmployeeInfoDataContext (); In the query query = dbEmp.Employees emp.DeptID on dbEmp.Departments join the department in dept.DeptID new selection equal {EmpID = emp.EmpID, EmpName = emp.EmpName, age = emp.ge, address = emp. Address, DeptName = dept.DepartmentName}; Return query. Skip (startRowIndex). (Maximum raus); } and public integer GetEmployeeCount () {// How can I not repeat the above logic to get the numbers? } How can I get the value of the second method GetEmployeeCount from the first method BindEmployees ? I mean without repeating logic (query) will be an option: Public IQueryable BindEmployees (integer startRowIndex, integer maximumRows, count out integer) {EmployeeInfoDataContext dbEmp = new EmployeeInfoDataContext (); In the query query = dbEmp.Employees emp.De...