Search Results

Search found 847 results on 34 pages for 'simon'.

Page 15/34 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • [WPF] Custom TabItem in TabControl

    - by Simon
    I've created CustomTabItem which inherits from TabItem and i'd like to use it while binding ObservableCollection in TabControl <TabControl ItemsSource="{Binding MyObservableCollection}"/> It should like this in XAML, but i do not know how change default type of the output item created by TabControl while binding. I've tried to create converter, but it has to do something like this inside convertin method: List<CustomTabItem> resultList = new List<CustomTabItem>(); And iterate through my input ObservableCollection, create my CustomTab based on item from collection and add it to resultList... I'd like to avoid it, bacause while creating CustomTabItem i'm creating complex View and it takes a while, so i don't want to create it always when something change in binded collection. My class extends typical TabItem and i'd like to use this class in TabControl instead of TabItem. <TabControl.ItemContainerStyle> <Style TargetType="{x:Type local:CustomTabItem}"> <Setter Property="MyProperty" Value="{Binding xxx}"/> </Style> </TabControl.ItemContainerStyle> Code above generates error that Style cannot be applied to TabItem. My main purpose is to use in XAML my own CustomTabItem and bind properties... Just like above... I've also tried to use <TabControl.ItemTemplate/> <TabControl.ContentTemaplte/> But they are just styles for TabItem, so i'll still be missing my properties wchich i added in my custom class.

    Read the article

  • Performance of Silverlight Datagrid in Silverlight 3 vs Silverlight 4 on a mac

    - by Simon
    I'm using Silverlight Beta 4 for a LOB application. After finding out today that I'll have to wait perhaps 4 months to be able to develop with SL4 on Visual Studio 2010 I'm thinking I need to downgrade my application to SL3 but thats another question. The problem is I'm noticing absolutely abismal performance for simple datagrids that work just fine on a PC when I'm running on a Mac. These grids contain only 5-10 columns and maybe 50 rows. Paging up and down takes about 1-2 seconds sometimes. I would appreciate anybody's experience in which of the following is the best solution: reverting to Silverlight 3 and hoping DataGrid is faster switching to 3rd party datagrid such as Telerik forgetting silverlight altogether I was hoping that possibly SL4 runtime might be updated but that won't happen probably for 3-4 months. Just a reminder - this is specifically a mac issue. Performance on my PC while slightly slow to populate the grid initially is fine.

    Read the article

  • The request was aborted: Could not create SSL/TLS secure channel.

    - by Simon
    We are enabled to connect to an https server using WebRequest because of this error message : The request was aborted: Could not create SSL/TLS secure channel. We know that the server aint got a valid https certificate with the path used (and we're not even sure if its fully release yet... ) but to bypass this issue, we use the following code that we've taken somewhere here in another post. [...] { ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(AllwaysGoodCertificate); } private static bool AllwaysGoodCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors policyErrors) { return true; } There problem is that server just never valide the certificate and fail we the error ... Anyone have any idea of what should I do? Thank and sorry for my english ... I'm from Quebec and usualy talk french!

    Read the article

  • CSS Dropdown Menu issues

    - by Simon Hume
    Can anyone help with a small problem. I've got a nice simple CSS dropdown menu http://www.cinderellahair.co.uk/new/CSSDropdown.html The problem I have is when you rollover a menu item that has children which are wider than the content, it pushes the whole menu right. Aside of shortening the child menu links down, is there any tweak I can make to my CSS to stop this happening? CSS Code: /* General */ #cssdropdown, #cssdropdown ul { list-style: none; } #cssdropdown, #cssdropdown * { padding: 0; margin: 0; } #cssdropdown {padding:43px 0px 0px 0px;} /* Head links */ #cssdropdown li.headlink { margin:0px 40px 0px -1px; float: left; background-color: #e9e9e9;} #cssdropdown li.headlink a { display: block; padding: 0px 0px 0px 5px; text-decoration:none; } #cssdropdown li.headlink a:hover { text-decoration:underline; } /* Child lists and links */ #cssdropdown li.headlink ul { display: none; text-align: left; padding:10px 0px 0px 0px; font-size:12px; float:left;} #cssdropdown li.headlink:hover ul { display: block; } #cssdropdown li.headlink ul li a { padding: 5px; height: 17px; } #cssdropdown li.headlink ul li a:hover { background-color: #333; } /* Pretty styling */ body { font-family:Georgia, "Times New Roman", Times, serif; font-size: 16px; } #cssdropdown a { color: grey; } #cssdropdown ul li a:hover { text-decoration: none; } #cssdropdown li.headlink { background-color: white; } #cssdropdown li.headlink ul { padding-bottom: 10px;} HTML: <ul id="cssdropdown"> <li class="headlink"><a href="http://www.cinderellahair.co.uk/new/index.php">HOME</a></li> <li class="headlink"><a href="http://www.cinderellahair.co.uk/new/gallery/gallery.php">GALLERY</a> <ul> <li><a href="http://amazon.com/">CELEBRITY</a></li> <li><a href="http://ebay.com/">BEFORE &amp; AFTER</a></li> <li><a href="http://craigslist.com/">HAIR TYPES</a></li> </ul> </li> <li class="headlink"><a href="http://www.cinderellahair.co.uk/new/about-cinderella-hair-extensions/about-us.php">ABOUT US</a> <ul> <li><a href="http://amazon.com/">WHY CHOOSE CINDERELLA</a></li> <li><a href="http://ebay.com/">TESTIMONIALS</a></li> <li><a href="http://craigslist.com/">MINI VIDEO CLIPS</a></li> <li><a href="http://craigslist.com/">OUR HAIR PRODUCTS</a></li> </ul> </li> <li class="headlink"><a href="http://www.cinderellahair.co.uk/new/news-and-offers/news.php">NEWS &amp; OFFERS</a> <ul> <li><a href="http://amazon.com/">VERA WANG FREE GIVEAWAY</a></li> <li><a href="http://ebay.com/">CINDERELLA ON TV</a></li> <li><a href="http://craigslist.com/">CINDERELLA IN THE PRESS</a></li> <li><a href="http://craigslist.com/">CINDRELLA NEWSLETTERS</a></li> </ul> </li> <li class="headlink"><a href="http://www.cinderellahair.co.uk/new/cinderella-salon/salon-finder.php">SALON FINDER</a></li> </ul> JS Code: $(document).ready(function(){ $('#cssdropdown li.headlink').hover( function() { $('ul', this).css('display', 'block'); }, function() { $('ul', this).css('display', 'none'); }); }); Full code is on the link above, just view source.

    Read the article

  • Can a Highcharts range selector use non-date linear ranges?

    - by Simon
    I am using the HighStock JS lib to produce a chart that uses a linear series (not a time-series) for the xAxis. I'd still like to use the range-selector in order to zoom to pre-determined ranges within my linear series. Is this possible? For example; say my xAxis has a series: [[121,616],[122,600],[123,605],[124,585.5],[125,575.5],[126,580.5],[127,582],[128,582],[129,584],[130,583]] I'd like to use the range selector to zoom to the last n in the series.

    Read the article

  • Hopcroft–Karp algorithm in Python

    - by Simon
    I am trying to implement the Hopcroft Karp algorithm in Python using networkx as graph representation. Currently I am as far as this: #Algorithms for bipartite graphs import networkx as nx import collections class HopcroftKarp(object): INFINITY = -1 def __init__(self, G): self.G = G def match(self): self.N1, self.N2 = self.partition() self.pair = {} self.dist = {} self.q = collections.deque() #init for v in self.G: self.pair[v] = None self.dist[v] = HopcroftKarp.INFINITY matching = 0 while self.bfs(): for v in self.N1: if self.pair[v] and self.dfs(v): matching = matching + 1 return matching def dfs(self, v): if v != None: for u in self.G.neighbors_iter(v): if self.dist[ self.pair[u] ] == self.dist[v] + 1 and self.dfs(self.pair[u]): self.pair[u] = v self.pair[v] = u return True self.dist[v] = HopcroftKarp.INFINITY return False return True def bfs(self): for v in self.N1: if self.pair[v] == None: self.dist[v] = 0 self.q.append(v) else: self.dist[v] = HopcroftKarp.INFINITY self.dist[None] = HopcroftKarp.INFINITY while len(self.q) > 0: v = self.q.pop() if v != None: for u in self.G.neighbors_iter(v): if self.dist[ self.pair[u] ] == HopcroftKarp.INFINITY: self.dist[ self.pair[u] ] = self.dist[v] + 1 self.q.append(self.pair[u]) return self.dist[None] != HopcroftKarp.INFINITY def partition(self): return nx.bipartite_sets(self.G) The algorithm is taken from http://en.wikipedia.org/wiki/Hopcroft%E2%80%93Karp_algorithm However it does not work. I use the following test code G = nx.Graph([ (1,"a"), (1,"c"), (2,"a"), (2,"b"), (3,"a"), (3,"c"), (4,"d"), (4,"e"),(4,"f"),(4,"g"), (5,"b"), (5,"c"), (6,"c"), (6,"d") ]) matching = HopcroftKarp(G).match() print matching Unfortunately this does not work, I end up in an endless loop :(. Can someone spot the error, I am out of ideas and I must admit that I have not yet fully understand the algorithm, so it is mostly an implementation of the pseudo code on wikipedia

    Read the article

  • How create a Firefox-like search textbox in WPF?

    - by Simon
    Hey there. I'm writing an application in WPF using the MVVM-pattern and will really often use TextBoxes. I don't want to use labels for the user to know user what the text box is for, i.e. I don't want something like this: <TextBlock> Name: </TextBlock> <TextBox /> Instead, I would like the TextBox to contain its own label. Statically, you would express it like this: <TextBox>Name</TextBox> If the cursor is displayed in the textbox, i.e. the TextBox gains focus, I want the description text to disappear. If the TextBox is left empty and it loses the focus, the description text should be shown again. It's similar to the search textbox of StackOverflow or the one of Firefox. (please tell me if your not sure what I mean). One TextBox's label may change at runtime, dependending on e.g. a ComboBox's selected element or a value in my ViewModel. (It's like in Firefox's search TextBox, if you select google from the search engins' menu, the TextBox's label changes to "Google", if you select "Yahoo" its set to "Yahoo"). Thus I want to be able to bind the label's content. Consider that I may already have a Binding on the Text-Property of the TextBox. How can implement such a behaviour and make it reusable for any of my TextBox's? Code is welcome but not needed; a description of what to do is enough. Thank you in advance.

    Read the article

  • Can you use ScrollIntoView() with a PagedCollectionView in a Silverlight DataGrid?

    - by Simon
    Is it possible to scroll to a particular row (by object identity) in a Silverlight DataGrid that has an ItemsSource which is a PagedCollectionView. I am loading a list of orders that are grouped by day/status etc. I need to be able to scroll to a particular order. var pcv = new PagedCollectionView(e.Result.Orders); gridOrders.ItemsSource = pcv; Unfortunately ScrollIntoView(order) doesn't work because of the PagedCollectionView. An article on DataGrid from MSDN shows that it is possible to scroll to a group in a PagedCollectionView, but that's not really much use. foreach (CollectionViewGroup group in pcv.Groups) { dataGrid1.ScrollIntoView(group, null); dataGrid1.CollapseRowGroup(group, true); } Is there a way to do this ?

    Read the article

  • Is there a WinForm control inspector application?

    - by Simon Gillbee
    I'm looking for something that provides interactive meta-data about a running .NET WinForms application. Basically, I'd like to be able to hover over a running WinForms application and have the inspector highlight the various controls and let me inspect properties such as size, position, parent, etc. I could have sworn I've seen this somewhere, but all my searching is turning up nada.

    Read the article

  • asp.net MVC DisplayTemplates and EditorTemplate naming convention

    - by Simon G
    Hi, I've got a couple of questions about the naming convention for the DisplayTemplates and EditorTemplates in MVC 2. If for example I have a customer object with a child list of account how do I: Create a display template for the list of accounts, what is the file called? When I'm doing a foreach( var c in Model.Accounts ) how do I call a display temple while in the foreach loop? When I do Html.DisplayFor( x => x ) inside the foreach x is the model and not in this case c. Thanks in advance.

    Read the article

  • How do I install an ASP.Net MVC application on IIS 7 using Wix?

    - by Simon Steele
    For IIS6 I can use the IIS helpers in Wix to install a web application like this: <iis:WebAppPool Id="AP_MyApp" Name="My Application Pool" Identity="networkService" /> <iis:WebApplication Id="WA_MyApp" Name="MyApp" WebAppPool="AP_MyApp"> <iis:WebApplicationExtension CheckPath="no" Executable="[NETFRAMEWORK20INSTALLROOTDIR]aspnet_isapi.dll" Verbs="GET,HEAD,POST"/> </iis:WebApplication> Unfortunately, this doesn't work for IIS7. We don't want to use the aspnet_isapi.dll mechanism, and instead want the integrated pipeline to handle the request routing. The app pool created by this script is in Classic mode not Integrated mode so none of the handlers get run correctly. How can I correctly install an MVC app on IIS 7?

    Read the article

  • How can I change the UI language of QT Creator 1.3.1?

    - by simon
    I just downloaded and installed QT Creator 1.3.1 on my english Windows 7 system from the english download site at http://qt.nokia.com/downloads Apparently, however, the UI of QT Creator is in German language, although the help files are in English. From the FAQ at http://www.qt.gitorious.org/qt-creator/pages/FrequentlyAskedQuestions I found the answer Qt Creator uses the language setting of the system it runs on. On Linux systems you can also override that language by setting the LANG environment variable prior to starting Qt Creator, e.g. on the command line LANG=de ./qtcreator will run Qt Creator with german interface. This, however, is apparently not correct, as I have an English Windows, and as system locale I have "English (United Kingdom)" set. Possibly QT Creator interprets mistakenly the Windows settings for "current location", which I have set to "Germany" to mean that German would also be my language. However, changing that value had apparently no effect (maybe it should have been done before installing QT Creator). Is there any way to change the UI language of QT creator to english after installing it, preferrably without adjusting global system settings?

    Read the article

  • ASP.NET MVC 2: Updating a Linq-To-Sql Entity with an EntitySet

    - by Simon
    I have a Linq to Sql Entity which has an EntitySet. In my View I display the Entity with it's properties plus an editable list for the child entites. The user can dynamically add and delete those child entities. The DefaultModelBinder works fine so far, it correctly binds the child entites. Now my problem is that I just can't get Linq To Sql to delete the deleted child entities, it will happily add new ones but not delete the deleted ones. I have enabled cascade deleting in the foreign key relationship, and the Linq To Sql designer added the "DeleteOnNull=true" attribute to the foreign key relationships. If I manually delete a child entity like this: myObject.Childs.Remove(child); context.SubmitChanges(); This will delete the child record from the DB. But I can't get it to work for a model binded object. I tried the following: // this does nothing public ActionResult Update(int id, MyObject obj) // obj now has 4 child entities { var obj2 = _repository.GetObj(id); // obj2 has 6 child entities if(TryUpdateModel(obj2)) //it sucessfully updates obj2 and its childs { _repository.SubmitChanges(); // nothing happens, records stay in DB } else ..... return RedirectToAction("List"); } and this throws an InvalidOperationException, I have a german OS so I'm not exactly sure what the error message is in english, but it says something along the lines of that the entity needs a Version (Timestamp row?) or no update check policies. I have set UpdateCheck="Never" to every column except the primary key column. public ActionResult Update(MyObject obj) { _repository.MyObjectTable.Attach(obj, true); _repository.SubmitChanges(); // never gets here, exception at attach } I've read alot about similar "problems" with Linq To Sql, but it seems most of those "problems" are actually by design. So am I right in my assumption that this doesn't work like I expect it to work? Do I really have to manually iterate through the child entities and delete, update and insert them manually? For such a simple object this may work, but I plan to create more complex objects with nested EntitySets and so on. This is just a test to see what works and what not. So far I'm disappointed with Linq To Sql (maybe I just don't get it). Would be the Entity Framework or NHibernate a better choice for this scenario? Or would I run into the same problem?

    Read the article

  • C# and XSLT (using document() function in XSLT generates error)

    - by Simon
    I'd like to use embedded resources in my XSLT file, but while invoking 'document(...)' C# complains that "Error during loading document ..." I'd like to use defined resources in XSLT file and get them by this: "document('')//my:resources/"... How can i do that?? ex xsl: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my="xslt-gruper-v1.2.xsl" exclude-result-prefixes="my"> tryb <xsl:variable name="res" select="document('')/*/my:resources/("/> How can i get access to such structure without exceptions in C#? I'll add that during static transform via ex. Opera everything works fine.

    Read the article

  • AVR sbi command - Error: number must be positive and less than 32

    - by Simon
    I've spent a good while getting my AVR development system set up with the full GCC tool chain (everything is the most recent current stable version) and I have solved most issues with it but one. This following code gives me an error which I just don't get. The AVR assembly manual states that the sbi instruction can accept 0-7 as a constant expression but it still errors out on me. Can anyone shed some light onto why it does this please? #ifndef __AVR_ATmega168__ #define __AVR_ATmega168__ #endif #include <avr/io.h> rjmp Init Init: ser r16 out DDRB, r16 out DDRD, r16 clr r16 out PORTB, r16 out PORTD, r16 Start: sbi PORTB, 0 rjmp Start The line in question is sbi PORTB, 0. Compiled / assembled with: avr-gcc ledon.S -mmcu=atmega168

    Read the article

  • How do HttpOnly cookies work with AJAX requests?

    - by Shawn Simon
    JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site? Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option? Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly? Edit 3: Here is a quote from Wikipedia: When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33]. I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only? In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object. <script type="text/javascript"> var req = null; try { req = new XMLHttpRequest(); } catch(e) {} if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {} if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {} req.open('GET', 'http://beta.stackoverflow.com/', false); req.send(null); alert(req.getAllResponseHeaders()); </script> Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated... Final Edit: Ahh, apparently both sites are wrong, this is actually a bug in FireFox. IE6 & 7 are actually the only browsers that currently fully support HttpOnly. To reiterate everything I've learned: HttpOnly restricts all access to document.cookie in IE7 & and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies. edit: This information is likely no longer up to date.

    Read the article

  • Facebook graph API - OAuth Token

    - by Simon R
    I'm trying to retrieve data using the new graph API, however the token I'm retriving from OAuth doesn't appear to be working. The call I'm making is as follows; $token = file_get_contents('https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=<app_id>&client_secret=<app secret>'); This returns a token with a string length of 41. To give you an example of what is returned I have provided below a sample (converted all numbers to 0, all capital letters to 'A' and small case letters to 'a' access_token=000000000000|AaaAaaAaaAAaAaaaaAaaAa0aaAA. I take this access token and attach it to the call request for data, it doesn't appear to be the correct token as it returns nothing. I make the data call as follows; file_get_contents('https://graph.facebook.com/<my_page's_id>/statuses?access_token=000000000000|AaaAaaAaaAAaAaaaaAaaAa0aaAA.') When I manually retrieve this page directly through the browser I get an 500/Internal Server Error Message. Any assistance would be grately appreciated.

    Read the article

  • How to change the datasource on a YUI datagrid after creation

    - by Simon
    I am using the Yahoo DataTable for which the API is here. I am having difficulty changing the data once I have rendered the grid once. I am using jQuery to get data via AJAX, or from a client side data island and need to put this back into the grid. There is no setDataSource method in the DataTable API, and changing 'dataSource.liveData' does not update the grid. // does not work dataTable.dataSource.liveData = [ {name:"cat"}, {name:"dog"}, {name:"mouse"}; The example I am basing my code on is the basic LocalDataSource example. How can I update the data source without having to completely recreate the table. I do NOT want to use the YUI datasources that make Async calls. I need to know how I can do this 'manually'.

    Read the article

  • Jar not found when executing class

    - by Simon
    Hi there, I'm working through the ANTLR book and there are many examples that should be easy to compile using the command line. Some information to get te problem: antlr-3.2.jar contains the ANTLR classes. I added the antlr-3.2.jar to the CLASSPATH environment variable (Windows 7) and when compiling the classes with javac everything works fine. This is what i execute to compile my program: javac Test.java ExprLexer.java ExprParser.java Test.java contains my main()-method whereas ExprLexer and ExprParser are generated by ANTLR. All three classes use classes contained in the antlr-3.2.jar. But so far so good. As I just said, compiling works fine. It's when I try to execute the Test.class that I get trouble. This is what I type: java -cp ./ Test When executing this, the interpreter tells me that he can't find the ANTLR-classes contained in the antlr-3.2.jar, altough I added an entry in the CLASSPATH variable. E:\simone\Programmierung\Language Processing Tools\ANTLR\Book Samples and Exercises\Exercise\1\output\Test.java Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/Cha rStream Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.CharStream at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: Test. Program will exit. I'm using Windows 7 and Java 1.6_20. Can someone tell what is going on? Why will the interpreter not look in the jar-Archive I specified in the CLASSPATH? I found some kind of workaroud. I copied the antlr-3.2.jar into the directory where the Test.class is located and then executed: java -cp ./;antlr-3.2.jar Test This worked out. But I don't want to type the jar-Archive everytime I execute my test programs. Is there a possibility to tell the interpreter that he should automatically look into the archive?

    Read the article

  • Fastest way to access VB6 String in C#

    - by Simon Woods
    Hi I am using COMInterop. I have a call in VB6 which returns a string of roughly 13000 chars. If I execute the call in pure VB6 it takes about 800ms to execute. If I execute it via c# and COMInterop it takes about 8 seconds. I'm assuming the delay is caused by marshalling. If I am correct about marshalling, I'd be grateful if someone could suggest the fastest way I can get this into C#. e.g. Would it be better to a) expose it as a byte array b) provide a byref string param into the VB6 layer I would appreciate some sample code as well. I tried the Marshal.PtrToStringAuto(Marshal.ReadIntPtr(myCOMObject.GetString, 0) to no avail Many thx S

    Read the article

  • How to run batched WCF service calls in Silverlight BackgroundWorker

    - by Simon
    Is there any existing plumbing to run WCF calls in batches in a BackgroundWorker? Obviously since all Silverlight WCF calls are async - if I run them all in a backgroundworker they will all return instantly. I just don't want to implement a nasty hack if theres a nice way to run service calls and collect the results. Doesnt matter what order they are done in All operations are independent I'd like to have no more than 5 items running at once Edit: i've also noticed (when using Fiddler) that no more than about 7 calls are able to be sent at any one time. Even when running out-of-browser this limit applies. Is this due to my default browser settings - or configurable also. obviously its a poor man's solution (and not suitable for what i want) but something I'll probably need to take account of to make sure the rest of my app remains responsive if i'm running this as a background task and don't want it using up all my connections.

    Read the article

  • How can I implement an abstract singleton class in Java?

    - by Simon
    Here is my sample abstract singleton class: public abstract class A { protected static A instance; public static A getInstance() { return instance; } //...rest of my abstract methods... } And here is the concrete implementation: public class B extends A { private B() { } static { instance = new B(); } //...implementations of my abstract methods... } Unfortunately I can't get the static code in class B to execute, so the instance variable never gets set. I have tried this: Class c = B.class; A.getInstance() - returns null; and this ClassLoader.getSystemClassLoader().loadClass("B"); A.getInstance() - return null; Running both these in the eclipse debugger the static code never gets executed. The only way I could find to get the static code executed is to change the accessibility on B's constructor to public, and to call it. I'm using sun-java6-jre on Ubuntu 32bit to run these tests.

    Read the article

  • Repository pattern with lazying loading using POCO

    - by Simon G
    Hi, I'm in the process of starting a new project and creating the business objects and data access etc. I'm just using plain old clr objects rather than any orms. I've created two class libraries: 1) Business Objects - holds all my business objects, all this objects are light weight with only properties and business rules. 2) Repository - this is for all my data access. The majority of my objects will have child list in and my question is what is the best way to lazy load these values as I don't want to bring back unnecessary information if I dont need to. I've thought about when using the "get" on the child property to check if its "null" and if it is call my repository to get the child information. This has two problems from what I can see: 1) The object "knows" how to get itself I would rather no data access logic be held in the object. 2) This required both classes to reference each other which in visual studio throws a circular dependency error. Does anyone have any suggestions on how to overcome this issue or any recommendations on my projects layout and where it can be improved? Thanks

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >