Daily Archives

Articles indexed Tuesday April 20 2010

Page 24/121 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How to find the maximum value for each key in a List of Dictionaries using LINQ?

    - by Argos
    I have a List of Dictionaries that have keys of type string and values that are ints. Many of the dictionaries have the same keys in them but not all of them. So my question is: using LINQ how would I find the maximum value associated with each distinct key across all of the dictionaries? So for example given the following input: var data = new List<Dictionary<string, int>> { new Dictionary<string, int> {{"alpha", 4}, {"gorilla", 2}, {"gamma", 3}}, new Dictionary<string, int> {{"alpha", 1}, {"beta", 3}, {"gamma", 1}}, new Dictionary<string, int> {{"monkey", 2}, {"beta", 2}, {"gamma", 2}}, }; I would like some kind of collection that contains: {"alpha", 4}, {"gorilla", 2}, {"gamma", 3}, {"beta", 3}, {"monkey", 2} (I'm currently looping through the list and keeping track of things myself, really just wondering if there is a nicer LINQ-esque way of doing it) EDIT: I also don't know what the string keys are in advance

    Read the article

  • GAC Assembly Missing in Add Reference dialog

    - by Frederick
    I have an Interop assembly lying in GAC; Windows Explorer clearly shows it listed in the C:\WINDOWS\assembly folder. Yet, when I try to add a reference to it in from Visual Studio, I can't see it anywhere in the Add Reference dialog. If this is happened to you too, what is the reason for this? And how do I fix this? (The assembly is actually located in C:\WINDOWS\assembly\GAC_MSIL folder, if you must know.)

    Read the article

  • How to Implement Web Based Find File Database Via Text Search

    - by neversaint
    I have series of files like this: foo1.txt.gz foo2.txt.gz bar1.txt.gz ..etc.. and a tabular format file that describe those files: foo1 - Explain foo1 foo2 - Explain foo2 bar1 - Explain bar1 ..etc.. What I want to do is to have a website with a simple search bar and allow people to type foo1 or just foo and finally return the gzipped file(s) and the related explanation of the file(s). What's the best way to implement this and what kind of tools should I use. Sorry I am totally new in this area.

    Read the article

  • Multiple shapes on Android

    - by LucaB
    Hi Hi I'm trying to build a layout where some shapes will popup every 2 seconds. If the user will click one of these shapes, they have to disappear. What is the correct way of doing this? I thought about a thread, but i missed out. Here's my code at the moment (is not working): public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); l = new LinearLayout(this); setContentView(l); int counter = 1; View v = new CustomDrawableView(this,20,50); l.addView(v); Thread t = new Thread() { public void run() { while (true) { Log.i("THREAD","INSIDE"); View h = new CustomDrawableView(c, (int)Math.round(Math.random()*100), (int)Math.round(Math.random()*100)); SystemClock.sleep(2000); l.addView(h); } } }; t.start(); }

    Read the article

  • Can Windsor do this?

    - by Marius
    Consider this example: public class Factory { private List<ISubFactory> subFactories; public Factory(List<ISubFactory> subFactories) { this.subFactories = subFactories; } } public interface ISubFactory { } I want Windsor to resolve the Factory class and put all implementers of the ISubFactory interface which are registered in the container (ResolveAll) into the "subFactories" parameter, can Windsor do this?

    Read the article

  • How to setup an IPSec / GRE tunnel on Windows Server 2008

    - by qbeuek
    I have a Windows Server 2008 that has a single network interface configured with a public IP address. My business partner has a private network. From my server, I need to access all the devices on his private network, and those devices must be able to access my server. My business partner has a standard solution for these requirements. They will setup an IPSec + GRE tunnel to my server. They told me, that I will need an additional public IP address for this to work. If it really is necessary, there is no problem, I can get an additional public IP address, although it will be assigned to the same physical network interface. I assume that on my server I will have both public IP addresses and also the private IP address from the tunnel (the same that is visible for the devices inside the private network). What alternatives do I have? Is it possible to configure this tunnel on my Windows Server 2008? Can it be done using only Windows tools, or do I need an additional free / commercial VPN software? If it cannot be done directly on Windows, can I setup an additional virtual machine running Linux, that will handle the IPSec + GRE tasks? How to do it? If it cannot be done on a virtual linux box, will I have to buy and setup a Cisco router to handle the IPSec + GRE tasks? Thanks for your opinions. I'm watching this question to clarify any issues or questions.

    Read the article

  • Core i7 920 vs 870

    - by JL
    I am not sure which is better. Surely with processors you would think the 920 would be a higher version because 920 870. What's bothering me is that the 870 seems to have a higher clock speed, so which one is the better processor?

    Read the article

  • Create Shortened goo.gl URLs in Your Favorite Browser

    - by Asian Angel
    Now that the new goo.gl URL shortening service has been active for a bit you may be wanting to add it to your favorite non Internet Explorer/Firefox browser. See how easy it is to enjoy that goo.gl URL shortening goodness with the “goo.gl with prompt for copying Bookmarklet”. goo.gl with Prompt for Copying Bookmarklet In Action To add the bookmarklet to your browser simply drag it to your “Bookmarks Toolbar” and get ready to start creating those shortened URLs. For our example we chose one of the wonderful malware removal articles here at the site. All that you will need to do is click on the bookmarklet to create your shortened URL. The wonderful thing about this bookmarklet is the small pop-up window that provides an easy way for you to copy the shortened URL. You can see the “Context Menu” for the small window here…definitely nice. Once you have copied your new URL you can close the window by clicking on “OK” or pressing “Enter”. Now you are ready to use your new shortened goo.gl URL wherever you like or need to. Conclusion If you have been wanting to add goo.gl URL shortening power to your favorite browser then this is the perfect bookmarklet to have. Links Add the goo.gl with Prompt for Copying Bookmarklet to Your Favorite Browser Similar Articles Productive Geek Tips See Where Shortened URLs “Link To” in Your Favorite BrowserVerify the Destinations of Shortened URLs the Easy WayA Quick Look at URL Shortening Services & ExtensionsCreate Shortened goo.gl URLs in Google Chrome the Easy WayText-Only URL Quick-Fix for Firefox TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Open Multiple Links At One Go NachoFoto Searches Images in Real-time Office 2010 Product Guides Google Maps Place marks – Pizza, Guns or Strip Clubs Monitor Applications With Kiwi LocPDF is a Visual PDF Search Tool

    Read the article

  • Classic asp problem

    - by user181421
    Hello, I have this problem with my .Asp file. I get an error saying 'GetFrontpageInfo' is undefined. This is the code: http://www.kollelbaaleibatim.com/Content_of_asp_file.txt click "view source" to see the code. TY

    Read the article

  • C stack/scope, variable's lifetime after functions ends

    - by Ranking Stackingblocks
    void someFunc() { int stackInt = 4; someOtherFunc(&stackInt); } Is it the case that stackInt's address space could be reallocated after someFunc ends, making it unsafe to assume that the value passed to someOtherFunc represents the stackInt variable with value 4 that was passed to it? In other words, should I avoid passing stack variables around by address and expecting them to still be alive after the function they were initialised in has ended?

    Read the article

  • Sessions in asp.net

    - by Indranil Mutsuddy
    Hello i have a login page so once the user enters the correct details he enters into the home page. Now i want to implement 3 things once he clicks the button 'log out' he must be redirected to a page saying" logged out successfully " n even if clicks the back button in the browser, he should not be able to access. if the user leaves the homepage idle for a specific amount of time say 10minutes and then he tries to navigate after 10 mins a msg should display saying "Your Session has been expired login again" if given the url of homepage he shouldnt be able to access unless logged in. I am not sure about what exactly i need to do and how to do. Plz Help Regards Indranil Mutsuddy

    Read the article

  • URL Generation Technique with PHP

    - by harigm
    I have a build a web portal based on the Cricket concept, I have build a Custom based CMS where I can upload the News for the site Once I upload the news, the URL Will be like this http://cricandcric.com/news/news.php?id=841&An-emotional-moment:-Dhoni.html But I am trying to have the above Url as follows (some thing like this) http://cricandcric.com/news/An-emotional-moment:-Dhoni.html Or similar to Stackoverflow.com, Can any one please help me how can i build that? Do I need to rewrite the URL ?

    Read the article

  • Sorting Dynamically generated HTML Table

    - by Mahesh Varia
    I am generating a dynamic HTML table string and displaying inside a div. I am assigning ID and runat server in that string. eg. string s="<table id='tblAll' runat='server'></table>". This string is generated on some different page, and its passed as XmlhttpResponseText I want to apply sorting on this table, It would be great if any one can help me out. Thanks

    Read the article

  • jqGrid search/filter data api

    - by McLovin
    I've already read all available documentation and I cannot find a solution. I have a calendar outside of the grid which on click returns a date. All I need to do is filter my jqGrid based on that date. Can someone point me to the correct API method? Thanks!

    Read the article

  • problem in printing fonts

    - by user1400
    hello i have a application on php that i show a report in the table , i want to print this page i can see my page fine in print preview , but when i send thuis page to printer ,the fonts are small and diffrent fonts that i set in css file this is my css file @page { size: A4 landscape; margin-top:2cm; margin-bottom:1cm; margin-left:1cm; margin-right:1cm; } table.print{ text-align:right; border:#999 1px solid; } table.print td.e1{ border-top:#999 1px solid; padding:5px 2px; text-align: right; font-size: 20pt; font-family:"stencil"; } table.print td.e2{ border-top:#999 1px solid; padding:5px 2px; text-align: right; font-size: 120%; font-family:"tahoma"; } thanks

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >