Search Results

Search found 6661 results on 267 pages for 'francesco de vittori'.

Page 170/267 | < Previous Page | 166 167 168 169 170 171 172 173 174 175 176 177  | Next Page >

  • How do I change text color on the selected row inside a ListView/GridView? (using Expression Dark th

    - by Thiado de Arruda
    I'm using theExpression Dark WPF Theme(http://wpfthemes.codeplex.com/) with a ListView(view property set to a GridView) to display some user data like the following : <ListView Grid.Row="1" ItemsSource="{Binding RegisteredUsers}" SelectedItem="{Binding SelectedUser}" > <ListView.View> <GridView> <GridViewColumn Header="Login" DisplayMemberBinding="{Binding Login}" Width="60"/> <GridViewColumn Header="Full Name" DisplayMemberBinding="{Binding FullName}" Width="180"/> <GridViewColumn Header="Last logon" DisplayMemberBinding="{Binding LastLogon}" Width="120"/> <GridViewColumn Header="Photo" Width="50"> <GridViewColumn.CellTemplate> <DataTemplate> <Image Source="{Binding Photo}" Width="30" Height="35"/> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> The rows have white text with a dark background and white background when selected, however the text color doesnt change when selected and it makes very difficult to read, I would like the text to have a dark color when the row is selected. I have searched for a way to style the text color but with no success, here is the control template for the ListViewItem : <Border SnapsToDevicePixels="true" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" x:Name="border"> <Grid Margin="2,0,2,0"> <Rectangle x:Name="Background" IsHitTestVisible="False" Opacity="0.25" Fill="{StaticResource NormalBrush}" RadiusX="1" RadiusY="1"/> <Rectangle x:Name="HoverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource NormalBrush}" RadiusX="1" RadiusY="1"/> <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="1" RadiusY="1"/> <GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,2,0,2" VerticalAlignment="Stretch" /> </Grid> </Border> The trigger that changes the background color simply applies an animation to change the 'SelectedRectangle' opacity, but I cant change the text color on the same trigger(I tried using a setter for the foreground color on the ListViewItem, but with no success). Does someone have a clue on that?

    Read the article

  • p:commandButton update doesn't work in ui:include

    - by Roberto de Santis
    Hi guys. I want to update a part of a page by PPR. This is the part of page that i want to update: <h:panelGroup id="aggiungiAuto" rendered="#{!autoBean.operazioneOk}"> <ui:include src="../component/aggiungi_auto.xhtml"/> </h:panelGroup> While this is the commandButton present in aggiungi_auto.xhtml <p:commandButton value="Submit" update="growl aggiungiAuto aggiungiFoto" actionListener="#{autoBean.insert}"/> Any Idea?

    Read the article

  • Compiling error with API 10

    - by Suhel De Corser
    I was following the basic tutorials on developers.android.com and came by creating the activity named DisplayMessageActivity. It is a blank activity with all the specifications given as shown in the tutorial. FYI, I am using Min SDK = API 8, Target SDK = API 16, Compile with = API 10 The next thing is that there are two errors: "The method getActionBar() is undefined for the type DisplayMessageActivity "home cannot be resolved or is not a field" I tried changing the API to 14 which called for another problem, it wants the minimum API to be 11. That solves these problems, but the main problem is so many devices still use Gingerbread or maybe FroYo. Can't I write for them? Do I have to go higher? How to write for them?

    Read the article

  • Hidden input text submit with jquery

    - by Lucas Silva de Freitas
    I have a javascript var that returns the value of a input text named "pro_barras", with the value of "pro_barras" I need to make a search in my database without submiting the page. I can't use a javascript var in the java code, so i've setted the value in a hidden input text named "hidden_barra", but I need to submit it to get the value with the java code and make the search...How do I do it ? <input type="text" id="pro_barras"> <input type="hidden" id="hidden_barra"> <script> var barra = document.getElementById('pro_barras').value; document.getElementById('hidden_barra').value = barra; var ref = <%=pd.getProdutosBarra(">VAR 'barra' HERE or request.getParameter("hidden_barra")<").getPro_referencia()%>; </script>

    Read the article

  • Remove duplicates in a String [] list f#

    - by Jose Maria de la Torre
    I need some noob help... I have a String[] list (a list that each element is a Array of strings) I wish to remove all duplicates in the list. But to see if they are duplicates I need to see the fist element in the array. what I have tried is let NotDuplicated = Duplicated.[0] |> Seq.distinct let NotDuplicated = Duplicated |> Seq.distinctBy id but nothing is working... can you guys please help me.. thanks!!

    Read the article

  • In Castle Windsor, can I register a Interface component and get a proxy of the implementation?

    - by Thiado de Arruda
    Lets consider some cases: _windsor.Register(Component.For<IProductServices>().ImplementedBy<ProductServices>().Interceptors(typeof(SomeInterceptorType)); In this case, when I ask for a IProductServices windsor will proxy the interface to intercept the interface method calls. If instead I do this : _windsor.Register(Component.For<ProductServices>().Interceptors(typeof(SomeInterceptorType)); then I cant ask for windsor to resolve IProductServices, instead I ask for ProductServices and it will return a dynamic subclass that will intercept virtual method calls. Of course the dynamic subclass still implements 'IProductServices' My question is : Can I register the Interface component like the first case, and get the subclass proxy like in the second case?. There are two reasons for me wanting this: 1 - Because the code that is going to resolve cannot know about the ProductServices class, only about the IProductServices interface. 2 - Because some event invocations that pass the sender as a parameter, will pass the ProductServices object, and in the first case this object is a field on the dynamic proxy, not the real object returned by windsor. Let me give an example of how this can complicate things : Lets say I have a custom collection that does something when their items notify a property change: private void ItemChanged(object sender, PropertyChangedEventArgs e) { int senderIndex = IndexOf(sender); SomeActionOnItemIndex(senderIndex); } This code will fail if I added an interface proxy, because the sender will be the field in the interface proxy and the IndexOf(sender) will return -1.

    Read the article

  • Webdevelopment with Jetty & Maven

    - by Phuong Nguyen de ManCity fan
    I find it very frustrating doing web development with Maven & Jetty using Eclipse, compare with what I did using Visual Studio. Everytime I make a change, even a minor change in my view file, (*.jsp, for example), then I have to re-package the whole web - waiting for jetty to reload everything before I can see the change. Is there any better way to do that, some thing like an automatically plugin that will picked that changed files and deploy the changed files to web server?

    Read the article

  • Silverlight Windows Phone 7: Load Images From URL

    - by Lennie De Villiers
    Hi, I got the code below that is trying to load an image from the web into an Image control, when I run it I get an error on the given line that no network access is allowed: private void button1_Click(object sender, RoutedEventArgs e) { WebClient webClientImgDownloader = new WebClient(); webClientImgDownloader.OpenReadCompleted += new OpenReadCompletedEventHandler(webClientImgDownloader_OpenReadCompleted); webClientImgDownloader.OpenReadAsync(new Uri("http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/80000/5000/100/85108/85108.strip.print.gif", UriKind.Absolute)); } void webClientImgDownloader_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { BitmapImage bitmap = new BitmapImage(); bitmap.SetSource(e.Result); // ERROR HERE! image1.Source = bitmap; } Silverlight for Windows Phone 7

    Read the article

  • How do I pass references as method parameters across AppDomains?

    - by Thiado de Arruda
    I have been trying to get the following code to work(everything is defined in the same assembly) : namespace SomeApp{ public class A : MarshalByRefObject { public byte[] GetSomeData() { // } } public class B : MarshalByRefObject { private A remoteObj; public void SetA(A remoteObj) { this.remoteObj = remoteObj; } } public class C { A someA = new A(); public void Init() { AppDomain domain = AppDomain.CreateDomain("ChildDomain"); string currentAssemblyPath = Assembly.GetExecutingAssembly().Location; B remoteB = domain.domain.CreateInstanceFromAndUnwrap(currentAssemblyPath,"SomeApp.B") as B; remoteB.SetA(someA); // this throws an ArgumentException "Object type cannot be converted to target type." } } } What I'm trying to do is pass a reference of an 'A' instance created in the first AppDomain to the child domain and have the child domain execute a method on the first domain. In some point on 'B' code I'm going to call 'remoteObj.GetSomeData()'. This has to be done because the 'byte[]' from 'GetSomeData' method must be 'calculated' on the first appdomain. What should I do to avoid the exception, or what can I do to achieve the same result?

    Read the article

  • Sources from referenced projects are not deployed to Tomcat in Eclipse

    - by Steven De Groote
    Hi, I have setup a dynamic web project in eclipse with JSF in which I trust on code from another project (framework). Therefore, I added the framework project to the build path of the website project. So far so good, Eclipse recognises every class and the project builds without errors. Problem is though that when I do "run on server" to test it on tomcat 6.0.24, the application fails. I get ClassNotFoundException on every class from the framework project. Is this a bug or is some specific configuration necessary for this?

    Read the article

  • Opening a file with a variable as name & checking for undefined values

    - by Harm De Weirdt
    Hello everyone. I'm having some problems writing data into a file using perl. sub startNewOrder{ my $name = makeUniqueFileName(); open (ORDER, ">$name.txt") or die "can't open file: $!\n"; format ORDER_TOP = PRODUCT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CODE<<<<<<<<AANTAL<<<<EENHEIDSPRIJS<<<<<<TOTAAL<<<<<<< . format ORDER = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<< @<<<< @<<<<<< @<<<<< $title, $code, $amount, $price, $total . close (ORDER); } This is the sub I use to make the file. (I translated most of it) The makeUniqueFileName method makes a fileName based upon current time("minuteshoursdayOrder"). The problem now is that I have to write in this file in another sub. sub addToOrder{ print "give productcode:"; $code = <STDIN>; chop $code; print "Give amount:"; $amount = <STDIN>; chop $amount; if($inventory{$code} eq undef){ #Does the product exist? print "This product does not exist"; }elsif($inventory{$code}[2] < $amount && !defined($inventaris{$code}[2]) ){ #Is there enough in the inventory? print "There is not enough in stock" }else{ $inventory{$code}[2] -= $amount; #write in order file open (ORDER ">>$naam.txt") or die "can't open file: $!\n"; $title = $inventory{$code}[0]; $code = $code; $amount = $inventory{$code}[2]; $price = $inventory{$code}[1]; $total = $inventory{$code}[1]; write; close(ORDER); } %inventory is a hashtable that has the productcode as key and an array with the title, price and amount as value. There are two problems here: when I enter an invalid product number, I still have to enter an amount even while my code says it should print the error directly after checking if there is a product with the given code. The second problem is that the writing doesn't seem to work. It always give's a "No such file or directory" error. Is there a way to open the ORDER file i made in the first sub without having to make $name not local? Or just a way to write in this file? I really don't know how to start here. I can't really find much info on writing a file that has been closed before, and in a different sub.. Any help is appreciated, Harm

    Read the article

  • Java test framework for Selenium RC

    - by sebstein.hpfsc.de
    I'm going to use Selenium RC to replay some tests for a website. I want to kickoff those tests from a Java test framework so that I get nice reports how many tests failed, etc. Which java test framework should I use? Is JUnit the preferred framework for this purpose?

    Read the article

  • Opening a file with a variable as name and checking for undefined values

    - by Harm De Weirdt
    I'm having some problems writing data into a file using Perl. sub startNewOrder{ my $name = makeUniqueFileName(); open (ORDER, ">$name.txt") or die "can't open file: $!\n"; format ORDER_TOP = PRODUCT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CODE<<<<<<<<AANTAL<<<<EENHEIDSPRIJS<<<<<<TOTAAL<<<<<<< . format ORDER = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<< @<<<< @<<<<<< @<<<<< $title, $code, $amount, $price, $total . close (ORDER); } This is the sub I use to make the file. (I translated most of it.) The makeUniqueFileName method makes a fileName based upon current time("minuteshoursdayOrder"). The problem now is that I have to write to this file in another sub. sub addToOrder{ print "give productcode:"; $code = <STDIN>; chop $code; print "Give amount:"; $amount = <STDIN>; chop $amount; if($inventory{$code} eq undef){ #Does the product exist? print "This product does not exist"; }elsif($inventory{$code}[2] < $amount && !defined($inventaris{$code}[2]) ){ #Is there enough in the inventory? print "There is not enough in stock" }else{ $inventory{$code}[2] -= $amount; #write in order file open (ORDER ">>$naam.txt") or die "can't open file: $!\n"; $title = $inventory{$code}[0]; $code = $code; $amount = $inventory{$code}[2]; $price = $inventory{$code}[1]; $total = $inventory{$code}[1]; write; close(ORDER); } %inventory is a hashtable that has the productcode as key and an array with the title, price and amount as value. There are two problems here: when I enter an invalid product number, I still have to enter an amount even while my code says it should print the error directly after checking if there is a product with the given code. The second problem is that the writing doesn't seem to work. It always give's a "No such file or directory" error. Is there a way to open the ORDER file I made in the first sub without having to make $name not local? Or just a way to write in this file? I really don't know how to start here. I can't really find much info on writing a file that has been closed before, and in a different sub. Any help is appreciated, Harm

    Read the article

  • Variable Scoping in a method and its persistence in C++

    - by de costo
    Consider the following public method that adds an integer variable to a vector of ints(private member) in a class in C++. KoolMethod() { int x; x = 10; KoolList.Add(x); } Vector<int>KoolList; But is this a valid addition to a vector ??? Upon calling the method, it creates a local variable. The scope of this local variable ends the moment the execution control leaves the method. And since this local variable is allocated on a stack(on the method call), any member of KoolList points to an invalid memory location in deallocated stack which may or may not contain the expected value of x. Is this an accurate description of above mechanism ?? Is there a need for creating an int in heap storage using "new" operator everytime a value needs to be added to the vector like described below ????: KoolMethod() { int *x = new int(); *x = 10; KoolList.Add(x); } Vector<int*>KoolList;

    Read the article

  • How to simplyfy getting the patch for one changeset in git?

    - by childno.de
    git revision syntax is really powerful, but I can't find how to simplify things like: git diff 1a2e^..1a2e without writing tree'sh1 twice? Is there now "NEXT" syntax, something like: git diff 1a2e^..NEXT OR git changeset 1a2e ?? Another "next" syntax which might be useful if 1a2e is a known revision: git cherry-pick 1a2e+NEXT..origin/featureBranch ^^ "cherry pick anything from 1a2e to master EXCEPT 1a2e itself"

    Read the article

  • Rails active record association problem

    - by Harm de Wit
    Hello, I'm new at active record association in rails so i don't know how to solve the following problem: I have a tables called 'meetings' and 'users'. I have correctly associated these two together by making a table 'participants' and set the following association statements: class Meeting < ActiveRecord::Base has_many :participants, :dependent => :destroy has_many :users, :through => :participants and class Participant < ActiveRecord::Base belongs_to :meeting belongs_to :user and the last model class User < ActiveRecord::Base has_many :participants, :dependent => :destroy At this point all is going well and i can access the user values of attending participants of a specific meeting by calling @meeting.users in the normal meetingshow.html.erb view. Now i want to make connections between these participants. Therefore i made a model called 'connections' and created the columns of 'meeting_id', 'user_id' and 'connected_user_id'. So these connections are kinda like friendships within a certain meeting. My question is: How can i set the model associations so i can easily control these connections? I would like to see a solution where i could use @meeting.users.each do |user| user.connections.each do |c| <do something> end end I tried this by changing the model of meetings to this: class Meeting < ActiveRecord::Base has_many :participants, :dependent => :destroy has_many :users, :through => :participants has_many :connections, :dependent => :destroy has_many :participating_user_connections, :through => :connections, :source => :user Please, does anyone have a solution/tip how to solve this the rails way?

    Read the article

  • Setting end-of-line character for puts

    - by Dom De Felice
    I have an array of entries I would like to print. Being arr the array, I used just to write: puts arr Then I needed to use the DOS format end-of-line: \r\n, so I wrote: arr.each { |e| print "#{e}\r\n" } This works correctly, but I would like to know if there is a way to specify what end-of-line format to use so that I could write something like: $eol = "\r\n" puts arr UPDATE I know that puts will use the correct line-endings depending on the platform it is run on, but I need this because I will write the output to a file.

    Read the article

  • CSS: "AND" and + operator?

    - by de.vina
    I want to put a space after all the headers using CSS. Like this: if h1 = add a space after else if h1 + h2 = add a space after also but no space in between This is my HTML code <article> <h1>Title 1</h1> ... </article> <article> <h1>Title 1</h1> <h2>Title 2</h2> ... </article> For the CSS h1, h2 { padding-bottom: 20px; } The problem is, there is a space also between h1 and h2. I tried this code below but only those articles with h1 and h2 have a space after. h1 + h2 { padding-bottom: 20px;} Is there a way to do this? Or I should just use the h1 + h2 in CSS and add < br for h1 only?

    Read the article

< Previous Page | 166 167 168 169 170 171 172 173 174 175 176 177  | Next Page >