Search Results

Search found 1098 results on 44 pages for 'nigel v thomas'.

Page 28/44 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • View bound to paged collection view not updating all of the time.

    - by Thomas
    I new to silverlight and trying to make a business application using the mvvm pattern and ria services. I have a view model class that contains a PagedCollectoinView and it is set to the item source of a datagrid. When I update the PagedCollectionView the datagrid is only updated the first time then after that subsequent changes to the data to not reflect in the view until after another edit. Things seem to be delayed one edit. Below is a summarized example of my xaml and code behind. This is the code for my view model public class CustomerContactLinks : INotifyPropertyChanged { private ObservableCollection<CustomerContactLink> _CustomerContact; public ObservableCollection<CustomerContactLink> CustomerContact { get { if (_CustomerContact == null) _CustomerContact = new ObservableCollection<CustomerContactLink>(); return _CustomerContact; } set { _CustomerContact = value; } } private PagedCollectionView _CustomerContactPaged; public PagedCollectionView CustomerContactPaged { get { if (_CustomerContactPaged == null) _CustomerContactPaged = new PagedCollectionView(CustomerContact); return _CustomerContactPaged; } } private TicketSystemDataContext _ctx; public TicketSystemDataContext ctx { get { if (_ctx == null) _ctx = new TicketSystemDataContext(); return _ctx; } } public void GetAll() { ctx.Load(ctx.GetCustomerContactInfoQuery(), LoadCustomerContactsComplete, null); } private void LoadCustomerContactsComplete(LoadOperation<CustomerContactLink> lo) { foreach (var entity in lo.Entities) { CustomerContact.Add(entity as CustomerContactLink); } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(string propertyName) { if (PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } Here is the basics of my XAML <Data:DataGrid x:Name="GridCustomers" MinHeight="100" MaxWidth="1000" IsReadOnly="True" AutoGenerateColumns="False"> <Data:DataGrid.Columns> <Data:DataGridTextColumn Header="First Name" Binding="{Binding Customer.FirstName}" Width="105" /> <Data:DataGridTextColumn Header="MI" Binding="{Binding Customer.MiddleName}" Width="35" /> <Data:DataGridTextColumn Header="Last Name" Binding="{Binding Customer.LastName}" Width="105"/> <Data:DataGridTextColumn Header="Address1" Binding="{Binding Contact.Address1}" Width="130"/> <Data:DataGridTextColumn Header="Address2" Binding="{Binding Contact.Address2}" Width="130"/> <Data:DataGridTextColumn Header="City" Binding="{Binding Contact.City}" Width="110"/> <Data:DataGridTextColumn Header="State" Binding="{Binding Contact.State}" Width="50"/> <Data:DataGridTextColumn Header="Zip" Binding="{Binding Contact.Zip}" Width="45"/> <Data:DataGridTextColumn Header="Home" Binding="{Binding Contact.PhoneHome}" Width="85"/> <Data:DataGridTextColumn Header="Cell" Binding="{Binding Contact.PhoneCell}" Width="85"/> <Data:DataGridTextColumn Header="Email" Binding="{Binding Contact.Email}" Width="118"/> </Data:DataGrid.Columns> </Data:DataGrid> <DataForm:DataForm x:Name="CustomerDetails" Header="Customer Details" AutoGenerateFields="False" AutoEdit="False" AutoCommit="False" CommandButtonsVisibility="Edit" Width="1000" Margin="0,5,0,0"> <DataForm:DataForm.EditTemplate> </DataForm:DataForm.EditTemplate> </DataForm:DataForm> And here is my code behind public Customers() { InitializeComponent(); BusyDialogIndicator.IsBusy = true; Loaded += new RoutedEventHandler(Customers_Loaded); CustomerDetails.BeginningEdit += new EventHandler(CustomerDetails_BeginningEdit); } void CustomerDetails_BeginningEdit(object sender, System.ComponentModel.CancelEventArgs e) { CustomerContacts.CustomerContactPaged.EditItem(CustomerDetails.CurrentItem); } private void Customers_Loaded(object sender, RoutedEventArgs e) { CustomerContacts = new CustomerContactLinks(); CustomerContacts.GetAll(); GridCustomers.ItemsSource = CustomerContacts.CustomerContactPaged; GridCustomerPager.Source = CustomerContacts.CustomerContactPaged; GridCustomers.SelectionChanged += new SelectionChangedEventHandler(GridCustomers_SelectionChanged); BusyDialogIndicator.IsBusy = false; } void GridCustomers_SelectionChanged(object sender, SelectionChangedEventArgs e) { CustomerDetails.CurrentItem = GridCustomers.SelectedItem as CustomerContactLink; } private void SaveChanges_Click(object sender, RoutedEventArgs e) { if (WebContext.Current.User.IsAuthenticated) { bool commited = CustomerDetails.CommitEdit(); if (commited && (!CustomerDetails.IsItemChanged && CustomerDetails.IsItemValid)) { CustomerContacts.Update(CustomerDetails.CurrentItem as CustomerContactLink); CustomerContacts.ctx.SubmitChanges(); CustomerContacts.CustomerContactPaged.CommitEdit(); CustomerContacts.CustomerContactPaged.Refresh(); (GridCustomers.ItemsSource as PagedCollectionView).Refresh(); } } }

    Read the article

  • Bash: Check if file was modified since used in script

    - by Thomas Münz
    I need to check in a script if a file was modified since I read it (another application can modify it in between). According to bash manual there is a "-N" test which should report if a file was modified since last read. I tried it in a small script but it seems like it doesn't work. #!/bin/bash file="test.txt" echo "test" > $file cat $file; if [ -N $file ]; then echo "modified since read"; else echo "not modified since read"; fi I also tried an alternative way by touching another file and using if [ "file1" -nt "file2 ]; but this works only on a seconds accuracy which may under rare conditions not be sufficient. Is there any other bash-inbuilt solution for this problem or I do really need to use diff or md5sum?

    Read the article

  • Where to start on creating finger swipe navigation trough a list.

    - by Thomas Stock
    Lets say I want to make a control to select any integer number by dragging on a "bar" with numbers: (156 is selected) Mousedown on "159" and dragging towards the left and then doing mouseup changes the control to this: (160 is selected) I've been experimenting for the past 3 hours but I'm inexperienced in Silverlight so I'm having problems getting started. My current guess is I should seperate this into 2 steps: Step 1: Build this control without swiping behavior. Just 2 buttons to go up a number or go down a number Step 2: Replace the buttons by handling mouse events. With my limited knowledge I think I would manage building a crappy control that does this, with very messy xaml and c# and lots of headaches when trying to apply styling and fancy state transitions, but I was hoping some xaml wizards could get me started with the basic approach? Edit: This is an implementation of what I'm trying to achieve in Silverlight: Iphone's datepicker:

    Read the article

  • Is it possible to exclude some files from checkin (TFS) ?

    - by Thomas Wanner
    We use configuration files within various projects under source control (TFS), where each developer has to make some adjustments in his local copy to configure his environment. The build process takes care about replacing the config files with the server configuration as a part of the deployment, so it doesn't actually matter what is in the repository. However, we would anyway like to keep some kind of a default non-breaking version of config files in the repository, so that e.g. people not involved in the particular project won't run into troubles because of local misconfiguration. We tried to resolve this by introducing the check-in policy that simply forbids to check-in the config files. This works fine, but just because we're lazy to always uncheck those checkboxes in the pending changes window, the question comes : is it possible to transparently disable the check-in of particular files without keeping them out of source control (e.g. locking their current version) ?

    Read the article

  • Adding a imageview to child elements in a expandable list query

    - by Thomas Millin
    I am looking to find out how to assign an image to a imageview in each child of an expandable list. If anyone has any information or links to find out how to do this I would be most appreciative. expListAdapter = new SimpleExpandableListAdapter( main.this, createGroupList(), R.layout.parentnode, new String[] { "day", "number" }, new int[] { R.id.TextView01, R.id.TextView02 }, createChildList(), R.layout.child_row, new String[] { "image", "childName", "date"}, new int[] { R.id.ImageView01, R.id.childname, R.id.date } ); setListAdapter( expListAdapter ); is what my adapter looks like at the moment, I have very little experience in customising adapters so I do not know where to start. Any help would be great :D

    Read the article

  • Java: Stopping a thread that has run for too long?

    - by Thomas King
    Say I've got something like this public void run(){ Thread behaviourThread = new Thread(abstractBehaviours[i]); behaviourThread.start(); } And I want to wait until abstractBehaviours[i] run method has either finished or run for 5000 milliseconds. How do I do that? behaviourThread.join(5000) doesn't seem to do that afaik (something is wrong with my code and I've put it down to that). All the abstract abstractBehaviour class is of course Runnable. I don't want to implement it inside each run method as that seems ugly and there are many different behaviours, I'd much rather have it in the calling/executing thread and do it just once. Solutions? First time doing something as threaded as this. Thanks!

    Read the article

  • Class template specializations with shared functionality

    - by Thomas
    I'm writing a simple maths library with a template vector type: template<typename T, size_t N> class Vector { public: Vector<T, N> &operator+=(Vector<T, N> const &other); // ... more operators, functions ... }; Now I want some additional functionality specifically for some of these. Let's say I want functions x() and y() on Vector<T, 2> to access particular coordinates. I could create a partial specialization for this: template<typename T> class Vector<T, 3> { public: Vector<T, 3> &operator+=(Vector<T, 3> const &other); // ... and again all the operators and functions ... T x() const; T y() const; }; But now I'm repeating everything that already existed in the generic template. I could also use inheritance. Renaming the generic template to VectorBase, I could do this: template<typename T, size_t N> class Vector : public VectorBase<T, N> { }; template<typename T> class Vector<T, 3> : public VectorBase<T, 3> { public: T x() const; T y() const; }; However, now the problem is that all operators are defined on VectorBase, so they return VectorBase instances. These cannot be assigned to Vector variables: Vector<float, 3> v; Vector<float, 3> w; w = 5 * v; // error: no conversion from VectorBase<float, 3> to Vector<float, 3> I could give Vector an implicit conversion constructor to make this possible: template<typename T, size_t N> class Vector : public VectorBase<T, N> { public: Vector(VectorBase<T, N> const &other); }; However, now I'm converting from Vector to VectorBase and back again. Even though the types are the same in memory, and the compiler might optimize all this away, it feels clunky and I don't really like to have potential run-time overhead for what is essentially a compile-time problem. Is there any other way to solve this?

    Read the article

  • Implicit parameter in Scalaz

    - by Thomas Jung
    I try to find out why the call Ø in scalaz.ListW.<^> works def <^>[B: Zero](f: NonEmptyList[A] => B): B = value match { case Nil => Ø case h :: t => f(Scalaz.nel(h, t)) } My minimal theory is: trait X[T]{ def y : T } object X{ implicit object IntX extends X[Int]{ def y = 42 } implicit object StringX extends X[String]{ def y = "y" } } trait Xs{ def ys[T](implicit x : X[T]) = x.y } class A extends Xs{ def z[B](implicit x : X[B]) : B = ys //the call Ø } Which produces: import X._ scala> new A().z[Int] res0: Int = 42 scala> new A().z[String] res1: String = y Is this valid? Can I achieve the same result with fewer steps?

    Read the article

  • How to display configurable product in each color in product listing?

    - by Thomas
    I have a configurable product which is available in many different colors and sizes. I want the configurable product to appear once for every color. My idea is to assign one simple product of the configurable product in every color to the category of the configurable product. Then I want to change the listing, so that the (colored) simple product links to it's master product (the configurable one). The other way would be, to just assign the configurable product to a category and then list it multiple times with different colors. But I think this would be to complicated.

    Read the article

  • Designing small comparable objects

    - by Thomas Ahle
    Intro Consider you have a list of key/value pairs: (0,a) (1,b) (2,c) You have a function, that inserts a new value between two current pairs, and you need to give it a key that keeps the order: (0,a) (0.5,z) (1,b) (2,c) Here the new key was chosen as the average between the average of keys of the bounding pairs. The problem is, that you list may have milions of inserts. If these inserts are all put close to each other, you may end up with keys such to 2^(-1000000), which are not easily storagable in any standard nor special number class. The problem How can you design a system for generating keys that: Gives the correct result (larger/smaller than) when compared to all the rest of the keys. Takes up only O(logn) memory (where n is the number of items in the list). My tries First I tried different number classes. Like fractions and even polynomium, but I could always find examples where the key size would grow linear with the number of inserts. Then I thought about saving pointers to a number of other keys, and saving the lower/greater than relationship, but that would always require at least O(sqrt) memory and time for comparison. Extra info: Ideally the algorithm shouldn't break when pairs are deleted from the list.

    Read the article

  • Using Maven for project distribution

    - by Thomas
    I have an Project that I distribute by sending out large packages. I'd like to know if there is a user friendly way of using Maven to distribute updates of the project? I'd need something like what is done for updating softwares like Firefox or Acrobat Reader. Check a respository, warn user of an update, download and reconfigure. All within a simple and friendly interface. Alternative open source java projects are welcome.

    Read the article

  • How to write in an file in MSIL code

    - by Thomas
    Hi all, I have a aspx webpage which uses an assembly mine (which mades a custom authentification). I would like to modify MSIL code (so just with ILDASM/ILASM tools) of my assembly in order to log something in a file. I have tried to add this at the end of the authentification method of my assembly : IL_0034: ldstr "C:\\path_to_my_website\\log.txt" IL_0039: newobj instance void [mscorlib]System.IO.StreamWriter::.ctor(string) IL_003e: stloc.1 IL_003f: ldloc.1 IL_0040: ldstr "test" IL_0045: callvirt instance void [mscorlib]System.IO.TextWriter::Write(string) IL_004a: nop IL_004b: ldloc.1 IL_004c: callvirt instance void [mscorlib]System.IO.TextWriter::Close() IL_0051: nop ILASM does not find any error, and the CLR does not throw any exception at runtime, but the file is not created or modified ! :( Any idea ?

    Read the article

  • Multi-Select Dropdown with size of 1

    - by Thomas
    Is there any way of creating a combo box (<select>) with a size of 1? All the examples I can find allow for multiple selects but with a number of options visible at any one time. If this cannot be accomplished with bog standard HTML is it possible in a JS library such as JQuery?

    Read the article

  • firefox extension help

    - by Thomas
    Hi all, I am developing a firefox extension which needs to add some html on the page it runs. This element I will be writing needs to be decorated with css and also load some images. I have both the css file and the images in the plugin, but I do not know how to reference them. Do I need to insert the css file to the page I want to modify? In the css file how can I reference the images that are in the extensions? Thanks

    Read the article

  • JavaScript tags, performance and W3C

    - by Thomas
    Today I was looking for website optimization content and I found an article talking about move JavaScript scripts to the bottom of the HTML page. Is this valid with W3C's recommendations? I learned that all JavaScript must be inside of head tag... Thank you.

    Read the article

  • Typed DefaultListModel to avoid casting

    - by Thomas R.
    Is there a way in java to have a ListModel that only accepts a certain type? What I'm looking for is something like DefaultListModel<String> oder TypedListModel<String>, because the DefaultListModel only implements addElement(Object obj) and get(int index) which returns Object of course. That way I always have to cast from Object to e.g. String and there is no guarantee that there are only strings in my model, even though I'd like to enforce that. Is this a flaw or am I using list models the wrong way?

    Read the article

  • Setting jvmargs in log4j.properties file

    - by Thomas
    Hey This is a bit of a weird request but I am trying to set some jvmargs in the log4j.properties file. At present I use ant to for example set some args.... jvmarg value="-Dmail.smtp.socketFactory.port=465" ... but it would be great to group a few of these logging relevant arguments into the .properties file. Does anyone know how to do this? Thanks in advance!

    Read the article

  • Arrays & Pointers

    - by Thomas
    Hi, Looking for some help with arrays and pointers and explanation of what I am trying to do. I want to create a new array on the heap of type Foo* so that I may later assign objects that have been created else where to this array. I am having troubles understanding what I am creating exactly when I do something like the following. Foo *(*f) = new Foo*[10]; Also once I have created my array how do I access each element for example. (f + 9)->fooMember(); ?????? Thanks in advance.

    Read the article

  • Automate download of BusinessObjecs Web Intelligence reports

    - by Daren Thomas
    I'm tasked with automating the retrieval of a couple of BusinessObjects Web Intelligence reports and further processing thereof. I have no other means of access to this data (this was the first avenue I followed), so I will have to do some screen scraping. Alas, the interface seems user-only. Grr! Has anyone done this before? Like to share? Also, does anyone know of a good library for automating the web browser? I know there is a python thingy out there that can be used for testing web applications - I need something in .NET though... What is your favorite? PS: I have also checked this thread (automate getting report from webpage), but am hoping for a Web Intelligence specific sollution.

    Read the article

  • Symfony and uploadify

    - by Thomas
    Hi! I want to use uploadify with Symfony 1.4, but so far I couldn't. Uploadify loads correctly, I choose my files, it says that the files were successfully uploaded, but the are nowhere. (I'm doing this on localhost) Is there anybody who met this problem before? Thanks, Tom $file = $request->getParameter('file'); $filename = sha1($file->getOriginalName()).$file->getExtension($file->getOriginalExtension()); $file->save(sfConfig::get('sf_upload_dir').'/'.$filename);

    Read the article

  • Recommended way to perform Lucene search without limit

    - by Thomas
    The Lucene documents tell me that "Hits" will be removed from the API in Lucene 3.0. Deprecated. Hits will be removed in Lucene 3.0. Use search(Query, Filter, int) instead. The proposed overload limits the number of documents returned to the value of the int. So my question is: what is the recommended way to perform a search in Lucene with no limit on the number of documents to be returned?

    Read the article

  • How do I rewrite a for loop with a shared dependency using actors

    - by Thomas Rynne
    We have some code which needs to run faster. Its already profiled so we would like to make use of multiple threads. Usually I would setup an in memory queue, and have a number of threads taking jobs of the queue and calculating the results. For the shared data I would use a ConcurrentHashMap or similar. I don't really want to go down that route again. From what I have read using actors will result in cleaner code and if I use akka migrating to more than 1 jvm should be easier. Is that true? However, I don't know how to think in actors so I am not sure where to start. To give a better idea of the problem here is some sample code: case class Trade(price:Double, volume:Int, stock:String) { def value(priceCalculator:PriceCalculator) = (priceCalculator.priceFor(stock)-> price)*volume } class PriceCalculator { def priceFor(stock:String) = { Thread.sleep(20)//a slow operation which can be cached 50.0 } } object ValueTrades { def valueAll(trades:List[Trade], priceCalculator:PriceCalculator):List[(Trade,Double)] = { trades.map { trade => (trade,trade.value(priceCalculator)) } } def main(args:Array[String]) { val trades = List( Trade(30.5, 10, "Foo"), Trade(30.5, 20, "Foo") //usually much longer ) val priceCalculator = new PriceCalculator val values = valueAll(trades, priceCalculator) } } I'd appreciate it if someone with experience using actors could suggest how this would map on to actors.

    Read the article

  • How can I preview the contents of books sold on Amazon in Internet Explorer 10?

    - by Aceman
    I run 64-bit Windows 7 and have both Internet Explorer 10 and a newly-downloaded copy of Google Chrome. I downloaded the latter when I found that I could not look (preview) the contents of books sold on Amazon (using it "Look Inside" feature) and wanted to try to get a handle on how extensive the problem was (i.e., whether it occurred on other browsers, too). It turns out that this isn't a problem with Chrome. However, I have grown accustomed over the years to IE and would prefer to resolve this problem instead. Here's an example of my attempt to 'Search Inside' a book on sale at Amazon: http://www.amazon.com/Intellectuals-Race-Thomas-Sowell/dp/0465058728/ref=sr_1_1?s=books&ie=UTF8&qid=1382301764&sr=1-1&keywords=thomas+sowell#reader_0465058728 I understand that I can't (as is the case in some technical support websites) add a screen shot (ie. JPG to this), but if I were to describe what this looks like in IE, the area where the text would appear appears as a blank white page with horizontal lines where the text would ordinarily be. I have just examined this posting of mine via Chrome and the contents of the selected page are clearly visible.

    Read the article

  • DDD and Entity Base, Model using multiple identity types

    - by Thomas
    I have a model that looks like this: public interface IEntity { int Id { get; set; } } Then the idea is to have my entities inherit from this interface: public class User : IEntity { public int Id { get; set; } } However, one of my entities actually has a Guid as an identifier. public class UserSession { public Guid Id { get; set; } } I really would like all my entities inheriting from the same interface but that would force me to add an integer based identity column to the UserSession which is unnecessary since Guid is the identity, but it would keep the domain model nice since all entities would inherit from the same base. What options do I have in this scenario? Can I have two base interfaces, one for int and one for Guid? Should I add an identity column into the UserSession entity although it is unnecessary? I need the Guid so I can't just get rid of it and replace it with and integer. Any thoughts on best practices?

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >