Search Results

Search found 17 results on 1 pages for 'gili'.

Page 1/1 | 1 

  • ListBoxItem height not getting updated

    - by Gili
    Hi, I have a listbox inside another list box, in inner list box listboxitems height may grow or shrink. My problem is that when the inner items shrink the outer list box doesn't re-render its height. Thus - stays with the previous height before the inner list shrinked. I have tried so many things here, among Invalidate of all types, selection and de-selection of the list box item that should be updated and more - nothing helps.... Can anyone pls help me with this? Thanx, Gili

    Read the article

  • A bug in grpah while using google visualization API on IE

    - by gili
    Hi, i'm using google visulization API to build a line chart grapgh. it works fine on FF and Chrome but i'm having problems on IE7: the problem is that the scailing of the x-axis (string) and y-axis (integer) is all wrong. both axis have the same values for some reason, but naturally those valuse are wrong. my code is the following one: var data = new google.visualization.DataTable(); data.addColumn('string', 'Date'); data.addColumn('number', '??????? ???? ??????'); data.addColumn('number', '??????? ??????'); data.addColumn('number', '??????'); data.addColumn('number', '???????'); data.addColumn('number', '???????'); var n = userRightGuessArray.length; data.addRows(userRightGuessArray.length); data.setCell(0, 0, '?? ?????? ??'); data.setCell(0, 1, 0); data.setCell(0, 2, 0); data.setCell(0, 3, 0); data.setCell(0, 4, 0); data.setCell(0, 5, 0); for(var t = 1 ; t // Create and draw the visualization. var chart = new google.visualization.ImageLineChart(document.getElementById('line_div')); chart.draw(data, {width: 400,legend: 'top'/showValueLabels:false/}); thank you for your help, Gili

    Read the article

  • Installing packages into local directory?

    - by Gili
    I'd like to install software packages, similar to apt-get install <foo> but: Without sudo, and Into a local directory The purpose of this exercise is to isolate independent builds in my continuous integration server. I don't mind compiling from source, if that's what it takes, but obviously I'd prefer the simplest approach possible. I tried apt-get source --compile <foo> as mentioned here but I can't get it working for packages like autoconf. I get the following error: dpkg-checkbuilddeps: Unmet build dependencies: help2man I've got help2man compiled in a local directory, but I don't know how to inform apt-get of that. Any ideas? UPDATE: I found an answer that almost works at http://askubuntu.com/a/350/23678. The problem with chroot is that it requires sudo. The problem with apt-get source is that I don't know how to resolve dependencies. I must say, chroot looks very appealing. Is there an equivalent command that doesn't require sudo?

    Read the article

  • When should I use SATA 6gb/s?

    - by Gili
    I purchased a Baraccuda hard-drive (model ST3000DM001) that supports a maximum read transfer rate of 210 MB/s and SATA 1.5/3/6 Gb/s. My motherboard has a limited number of 6 Gb/s ports so I'd like to reserve them for when it's really necessary. When does a hard-drive benefit from a SATA 6 Gb/s port? Doesn't it require a transfer speed of at least 375 MB/s to surpass the limit of SATA 3 Gb/s? Are there any other benefits of SATA 6 Gb/s vs 3 Gb/s ports?

    Read the article

  • Why use Monte-Carlo method?

    - by Gili
    When should the Monte-Carlo method be used? For example, why did Joel decide to use the Monte-Carlo method for Evidence Based Scheduling instead of methodically processing all user data for the past year?

    Read the article

  • How to "pathconvert" under Maven?

    - by Gili
    I am having a similar problem as http://stackoverflow.com/questions/1799684/ant-basedir-slashes-escape-problem except that I'm running under Maven. I'd like to generate cross-platform paths relative to Maven's built-in property ${basedir}. The problem is that under Windows, ${basedir} resolves to a path containing Windows-style slashes. Is there an easy way for me to get ${basedir} into a form that always uses Unix-style slashes even under Windows?

    Read the article

  • Jackson + Builder Pattern?

    - by Gili
    I'd like Jackson to deserialize a class with the following constructor: public Clinic(String name, Address address) Deserializing the first argument is easy. The problem is that Address is defined as: public class Address { private Address(Map<LocationType, String> components) ... public static Builder { public Builder setCity(String value); public Builder setCountry(String value); public Address create(); } } and is constructed like this: new Address.Builder().setCity("foo").setCountry("bar").create(); Is there a way to get key-value pairs from Jackson in order to construct the Address myself? Alternatively, is there a way to get Jackson to use the Builder class itself?

    Read the article

  • JLayeredPane versus Container layering

    - by Gili
    JLayeredPane allows one to stack multiple Components on top of one another using JLayeredPane.add(Component, Integer). Components in higher "layers" display on top of Components in lower "layers". Container.add(Component, int) provides a similar mechanism whereby Components with lower indexes display on top of Components with higher indexes. Please note that the first mechanism uses Integer and the second mechanism uses int. Also, one renders high values on top of low ones, and the other does the opposite. Do not mix the two :) My question is: what's the point of using JLayeredPane when Container already provides the same mechanism? Does one layer components better than the another? UPDATE: There is also Container.setComponentZOrder(Component, int) to consider.

    Read the article

  • Exporting Maven properties from Ant code

    - by Gili
    I've embedded the following code within my POM: <plugin name="test"> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>validate</phase> <configuration> <tasks> <pathconvert targetos="unix" property="project.build.directory.portable"> <path location="${project.build.directory}"/> </pathconvert> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> I then reference ${project.build.directory.portable} from the run project action but it comes back as null. Executing <echo> within the Ant block shows the correct value. What am I doing wrong?

    Read the article

  • Java Swing or Java Qt?

    - by Gili
    Can someone with extensive experience with both Qt and Java Swing please discuss whether you would use Swing or Qt under Java, and why? Secondly, what is the business impact of using Qt? Is it reasonably popular or will I have a hard time finding experienced Qt developers? Are there any other business impacts I should be aware of? UPDATE: I am more interested in the technical and business impacts of Swing vs Qt than the license type/fee since in my case the cost is not a concern.

    Read the article

  • How to use JarOutputStream to create a JAR file?

    - by Gili
    How does one create a JAR file programmatically using java.util.jar.JarOutputStream? The JAR file produced by my program looks correct (it extracts fine) but when I try loading a library from it Java complains that it cannot find files which are clearly stored inside it. If I extract the JAR file and use Sun's jar command-line tool to re-compress it the resulting library works fine. In short, something is wrong with my JAR file. Please explain how to create a JAR file programmatically, complete with a manifest file.

    Read the article

  • How to communicate with a USB device under Windows and Java?

    - by Gili
    I'd like to communicate with a USB device under Windows and Java but I can't find a good library to do so. I don't want the user to have to install any extra hardware or device drivers to make this work. That is, I want to be able to interact with USB just like other Windows applications do. I am familiar with jUSB and JSR 80 but both seem to be dead projects (at least for Windows).

    Read the article

  • Using Joda DateTime as a Jersey parameter?

    - by HolySamosa
    I'd like to use Joda's DateTime for query parameters in Jersey, but this isn't supported by Jersey out-of-the-box. I'm assuming that implementing an InjectableProvider is the proper way to add DateTime support. Can someone point me to a good implementation of an InjectableProvider for DateTime? Or is there an alternative approach worth recommending? (I'm aware I can convert from Date or String in my code, but this seems like a lesser solution). Thanks. Solution: I modified Gili's answer below to use the @Context injection mechanism in JAX-RS rather than Guice. import com.sun.jersey.core.spi.component.ComponentContext; import com.sun.jersey.spi.inject.Injectable; import com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider; import java.util.List; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriInfo; import javax.ws.rs.ext.Provider; import org.joda.time.DateTime; /** * Enables DateTime to be used as a QueryParam. * <p/> * @author Gili Tzabari */ @Provider public class DateTimeInjector extends PerRequestTypeInjectableProvider<QueryParam, DateTime> { private final UriInfo uriInfo; /** * Creates a new DateTimeInjector. * <p/> * @param uriInfo an instance of {@link UriInfo} */ public DateTimeInjector( @Context UriInfo uriInfo) { super(DateTime.class); this.uriInfo = uriInfo; } @Override public Injectable<DateTime> getInjectable(final ComponentContext cc, final QueryParam a) { return new Injectable<DateTime>() { @Override public DateTime getValue() { final List<String> values = uriInfo.getQueryParameters().get(a.value()); if( values == null || values.isEmpty()) return null; if (values.size() > 1) { throw new WebApplicationException(Response.status(Status.BAD_REQUEST). entity(a.value() + " may only contain a single value").build()); } return new DateTime(values.get(0)); } }; } }

    Read the article

  • Button.MouseDown

    - by Gilad
    Hi Guys, I'm relatively new with WPF. I'm trying to understand the difference between MouseDownEvent and PreviewMouseDownEvent. I understand the WPF event strategies and i understand that the MouseDown event is a bubbling event and the PreviewMouseDown is a tunneling event. I also understand the order of which these events are being fired - according to this MSDN overview http://msdn.microsoft.com/en-us/library/ms742806.aspx#routing (there is a diagram with example there). So i tried to code some my self, check this for example: <Grid x:Name="grid" Width="250"> <StackPanel Mouse.MouseDown="StackPanel_MouseDown" PreviewMouseDown="StackPanel_PreviewMouseDown"> <WPFVisualizerExample:MyButton x:Name="B1" PreviewMouseDown="B1_PreviewMouseDown" MouseDown="B1_MouseDown" Margin="5,5,5,5"> <WPFVisualizerExample:MyButton x:Name="B2" PreviewMouseDown="B2_PreviewMouseDown" MouseDown="B2_MouseDown" Margin="5,5,5,5"> <WPFVisualizerExample:MyButton x:Name="B3" PreviewMouseDown="B3_PreviewMouseDown" MouseDown="B3_MouseDown" Margin="5,5,5,5">Click Me</WPFVisualizerExample:MyButton> </WPFVisualizerExample:MyButton> </WPFVisualizerExample:MyButton> </StackPanel> </Grid> I have an event handler for each of the events (the preview and non-preview) and i wanted to see what is happening, which of the event is being thrown (i have a message box shown for each event). The 'MyButton' user control simply extends the base Button and override the OnMouseDown and OnPreviewMouseDown to set the e.Handled false: protected override void OnMouseDown(System.Windows.Input.MouseButtonEventArgs e) { base.OnMouseDown(e); e.Handled = false; } protected override void OnPreviewMouseDown(System.Windows.Input.MouseButtonEventArgs e) { base.OnPreviewMouseDown(e); e.Handled = false; } (tried with this and without this). According to the MSDN overview (in the link above), if i have 3 elements then the events route should be as follows: PreviewMouseDown (tunnel) on root element. PreviewMouseDown (tunnel) on intermediate element #1. PreviewMouseDown (tunnel) on source element #2. MouseDown (bubble) on source element #2. MouseDown (bubble) on intermediate element #1. MouseDown (bubble) on root element. So I expected the the message boxes to be shown according to the above. From some reason - which I don't understand only the preview events are being thrown (according to what the MSDN says Preview_B1=Preview_B2=Preview_B3). My expectations were: Preview_B1=Preview_B2=Preview_B3=NonPreview_B3=NonPreview_B2=NonPreview_B1. But the non-preview events are not being thrown at all. So basically I don't understand the route of the events, from MSDN overview I understood that the route starts from the root element, goes down (tunnel) to the source element and then back up (bubble) to the root element, but this is not what happening in practice. It is really important for me to understand how this events are working, i probably miss-understand something basic here, your help will be appreciated. THANX!! -Gili

    Read the article

1