Posts

c# - GroupBy in LINQ -

I need a table group by month The query is made in this way: var query = from db.bt to db.facts where a.Count_Key == b.Date_key new {A.Month, b.Fact_key}; From this query I'm trying the month group query = query.GroupBy (x => x.Month); Grid1.DataSource = Query; Grid1.DataBind (); Then I get the following error which says: Can IGrouping int be converted? In IQueryable You can: Var query2 = query.GroupBy (x => x.Month); Grid1.DataSource = query2; Grid1.DataBind (); The problem arises because the var query is inherently assumed by its use. query type IQueryable & lt; SomeAnonymousType & gt; and GroupBy method one IQueryable . These are just two different types.

Deleting from Multiple Isolated Storages - windows phone 7 -

I currently compile an item and a history compilation are both separate .at files. The savings and performance work well for both of these different storage, though the problem occurs when I try to delete something from the item, I also want to delete all the items from history ITEMCollection is out where the item items are indexed in the history item I Update: There may be something like this in the item compilation: History item collection can look like this: a B b So if I remove b (itemIndex 1) then I want to remove both of them in history ItemCollection . I can remove items from items. The compilation is okay, but history throws ITemCollection errors. int i = 0; (I = 0; i & lt; = App.ViewModel.historyItemCollection.Count-1; i ++) {If (App.ViewModel.historyItemCollection [i] .VehicleId == (Current as application.App) .hhicleIndex } {App ViewModel.historyItemCollection [i] .remove (i); }} App.ViewModel.VihilitesExclosure [(Current as applicatio...

dreamweaver - Javascript won't display? -

This is probably a silly question, but for some reason I can not find JavaScript to display on my pages. I'm trying it on both Notepad and Dreamweaver, and testing them using the local host in XAMP, but it can not be displayed to check it. I have tried to do this with just a few very basic code to see if it works, something like this: "document.write (" & lt; b & Gt; UTC Time: & lt; / b & gt; "+ utctime +" & lt; br / & gt; "); hours = now go. Mins = now.getMinutes (); Secs = now. GetSeconds (); document.write ("& lt; h1>"); Document.write (hours + ":" + minute + ":" + sec); document.write ("& lt; / h1> gt; ; "); But nothing is available at this time, only one HTML header which I keep. I was hoping someone had There was a suggestion. now = new data (); is it New date () can be? If so, it will remove a reference and close its code.

Django: How do you force an app to use a non-default database from the settings.py? -

Django can use many database engines at the same time My problem is that the questions always reference the default database . How do I solve it? I think this is powerful enough for your needs, but if you need more flexibility, you can use the "

navigation - Displaying/Nesting MediaWiki pages in Wordpress? -

I googled already and tried myself for the day without results. How is this possible for MediaWiki in WordPress (both latest stable versions)? What I've got (and it's not too much) is for older versions of MW and WP, ​​such a work does not seem to be a plugin or tutorial. The HTML (dotspay, etc.) gets spoiled by simply adding the files to MW. What should be done basically: Use WordPress headers, menus and backgrounds for navigation and design and use MediaWiki to display content. Is there any difficulty to achieve this? You must load the wordpress structure (via wp-load.php) in your MediaWiki templates. Follow the instructions here:

c# - TimeSpan FromMilliseconds strange implementation? -

मैंने हाल ही में एनएटी टाइमप्न कार्यान्वयन में कुछ विचित्र व्यवहार का सामना किया है। टाइमस्पेन परीक्षण = TimeSpan.FromMilliseconds (0.5); डबल एमएस = परीक्षा: कुछ मिलिसेकंड; // रिटर्न 0 FromMilliseconds पैरामीटर के रूप में एक डबल लेता है। हालांकि, ऐसा लगता है कि मान को आंतरिक रूप से गोल किया जाता है। अगर मैं 5000 टिकों (.5 एमएस) के साथ एक नया बार-बार प्रारंभ करता हूं, तो कुल Milliseconds का मान सही है। TimeSpan को देखते हुए परावर्तक में कार्यान्वयन से पता चलता है कि इनपुट वास्तव में लंबे समय तक लगाया जाता है। माइक्रोसॉफ्ट ने क्यों नहीं किया है कि एक लंबे पैरामीटर के बजाय डबल पैरामीटर ले जाने के लिए माइक्रोसॉफ्ट ने क्यों डिजाइन किया है (क्योंकि इस कार्यान्वयन को दोहरे मूल्य बेकार है) ? पहला विचार सोच रहा है कि उसने क्यों दो बार रिटर्न के रूप में चुना है मूल्य। लंबे समय का उपयोग करना एक स्पष्ट विकल्प होता। यद्यपि वहां पहले से ही पूरी तरह से अच्छी संपत्ति है जो लंबे समय तक है, हालांकि 100 नैनोकेकंडों की एक इकाई के साथ टिक्क्स स्पष्ट नहीं है। लेकिन उन्होंने दोहरा लि...

c# - session object is null after update -

I am populating an object model with a linq query. The model looks like this: MyModel {Date time from the appointment {get; Set;} Intel TotalAppoints {get; Set;} obtaining environments {receive; Set;}} The linq-to-sql query looks like this: public stable GetAppointsFromDB (parameter) {var MyQuery = from ... .where ... Select new MyModel {AppointDate = ..., TotalAppoints = ..., AppointDuration = ...}; Return microdel as mycodel;} In the master page, I want to load the result of this question in session: If (session [ "Appointment"] == faucet {session ["appointment"] = GetAppointsFromDB (...);} When I run from code, the session is always nullified. I added this line a second time, just right after that, and the query runs again. When I'm looking to use the session at some other point in the code, then it is also zero there also the query works because when I put a breakpoint on the return statement, the object is filled in properly is. Plea...