Posts

c# - Date Filtered Collections without Functions -

मेरे पास एक जैसी इकाई है: सार्वजनिक वर्ग इकाई {सार्वजनिक सूची & lt; DateItem & gt; पेस्टडेट्स {प्राप्त करें; सेट; } सार्वजनिक सूची & lt; DateItem & gt; फ्यूचरडेट्स {प्राप्त करें; सेट; }} सार्वजनिक वर्ग दिनांकआइटम {सार्वजनिक दिनांक का समय दिनांक {get; सेट; } / * * अन्य प्रॉपर्टी * * /} जहां pastDates और FutureDates दोनों एक ही प्रकार / तालिका में मैप किए जाते हैं मैं Nhibernate द्वारा स्वचालित रूप से मैप किए गए अतीत और भविष्य के गुणों का एक तरीका खोजने का प्रयास कर रहा हूं निकटतम मैं आया था, जहां मैपिंग पर खण्ड निम्नानुसार है HasMany (x = & gt; x.PastDates) .AsBag ()। कैस्केड .AllDeleteOrphan () .KeyColumnNames.Add ("EventId" )। जहां ("दिनांक & lt; currentdate ()")। उलटा (); जहां वर्तमान डेट एक यूडीएफ है मुझे ये डेटाबेस विशिष्ट कार्य नहीं करना है यदि मैं इसे से बच सकता हूँ, ज्यादातर क्योंकि मैं SQLite के साथ अपने डीएएल का परीक्षण नहीं कर सकता क्योंकि यह फ़ंक्शंस या संग्रहित प्रक्रियाओं का समर्थन नहीं करता है। इस समय मैं किस...

How to make Excel VBA Automation Execute for All End Users -

I have written the following code so that when an Excel spreadsheet is closed it will update its name with current date and time : Close the personal sub workbook first (cancel as a boolean) if this workbook. Name = "name_lama has been opened" & amp; Format (date, "MM-DD-YYYY") & amp; _ "_" & Amp; Format (Time, "H.M.M.M.") & amp; ".xls" else otherwise this workbook. SaveAs file name: = "\\ C: \ ... name opened_" & amp; _ Format (Date, "MM-DD-YYYY") & amp; "_" & Amp; Format (Time, "H.M.M.M.") & amp; ".xls" FName = Sheets ("name"). Range ("D1"). Delete the text FName end if the end sub-private sub workbook is open () range ("A1"). Additionally, the code is located within VBAProject (file name), MS Excel Object - under this workbook. This code works perfectly for me or for workstation; However, it does not execute for al...

java - read bits and not int from a socket -

Manufacturers are: public TcpConnection (string address, integer port) {this.adress = adress; This.port = port; Try {socket = new socket (address, port); System.out.println ("Open Connection"); Out = new print-वाइटर (socket.getOutputStream (), true); InputStream r = New DataInputStream (socket.getInputStream ()); In = new BufferedReader (new InputStreamReader (socket.getInputStream ())); } Hold (unknownhostexception e) {// TODO: exception to exception}} (IOException e) {e.printStackTrace (); }} Then I read my socket in a while with in.read () . This allows me to read the socket int int, but I need a finer granularity. (Some information in the answer is encoded in 2 bytes, in some bits, in some 64 bytes ....) then I need to read 2 bytes, then a little bit. So another bit, then 1 byte and every bit of this byte are inspected. Earlier I was thinking: "OK, I want to meet in a string binary presentation", (To via integer) ToBinaryString (w...

php - Why are escape characters being added to the value of the hidden input -

& lt; body & gt; & Lt; div & gt; & Lt;? = $ _POST ['msg']? & Gt; & Lt; / div & gt; & Lt; form id = "frm" method = "post" & gt; & Lt; input type = "hidden" name = 'msg' मान = '{"field0": "इम एक स्ट्रिंग", "फ़ील्ड 1": 84, "फ़ील्ड 3": "तो मैं हूं"}' / & gt; & Lt; इनपुट प्रकार = "सबमिट करें" value = "test" / & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; जब फॉर्म पोस्ट होता है, तो निम्न स्ट्रिंग को डिव टैग के बीच प्रदर्शित किया जाता है। {\ "field0 \": \ " ", \" फ़ील्ड 1 \ ": 84, \" फ़ील्ड 3 \ ": \" तो मैं हूं \ "} बच अक्षर क्यों जोड़ा जा रहा है? क्या उन्हें PHP सर्वर या वेब क्लाइंट द्वारा जोड़ा जा रहा है? क्या मैं इसे रोकने के लिए कुछ भी कर सकता हूँ? किसी ने पहले से ही PHP फ़ंक्शन स्ट्रिप्सस्लाब्स का उल्लेख किया है मैं इसे अभी प्रयो...

c# - Which .Net 2.0 Exception should I throw in this circumstance? -

I am writing another ActiveRecord implementation for a company that is less scared than my code because those designations "Release candidates are there" on the implementation of the Castle Project anyway, I am using attributes on each property in the base class so that they can map to the returned dataset column: [ResultColumnAttribute ("CUST_FIRST_NAME")] Public String First Name {get {r} Eturn _columnName; } Set {_columnName = value; }} So that when I instantiate the class with a dataset, I specify the value of the column in that property value. When a column is mapped to an attribute, do I want an exception, but I do not see it in the dataset? I do not want to go a custom (lazy) and write, and I think that the app The exception is a little bit mandatory. This exception is localized in your domain and as if I think you have your own invalid It would be better to type mapping exceptions . How do I write here: Public invalid mapping exception: excep...

asp.net - Is it possible to remove some post data with an HttpModule? -

I am converting to an old classic ASP website asp.net This app is basically an extension of a set of tools for a given set of users but it is hosted on an external vendor. In order to make this application seamless, it posts some XML data that is closing "potentially dangerous request. Farm value". I know that I can close the valid recognition flag, but I can not do this. I have written an httpmodule that takes this data and uses it to authenticate the user, whether it is possible to use the same module, or a separate module for that matter, " Is "valid" before deleting these "bad" values ​​in the "data"? Otherwise if none of these ideas works, then I am open to other suggestions. Yes the following class implements the IHttpModule interface and registers and events that will fire before the HttpRequestValidationException probe. It checks that the request is a post and "testinput" is not zero and then encodes HTML. ...

python - Remove all files in a directory -

Trying to remove all files in a fixed directory gives me a follwing error: ISError: [Aron 2] is not a file or directory: '/ home / me / test / *' The code I'm running is: import os test = "/ home / me / test / *" os.remove (test) os.remove () does not work on a directory, and os.rmdir () will only work on an empty directory. You can use shutil.rmtree () to do this, though.