Search Results

Search found 197 results on 8 pages for 'lars bx'.

Page 4/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Log onto a domain elsewhere

    - by Lars
    I am wondering if an user can log onto my domain outside the office, or are you only able to do this locally? (in the office) Can you be outside the town or even country login onto a company's domain? (windows server 2008)

    Read the article

  • Credentials for Member server

    - by Lars
    So i am working on my member server right now and everytime I am adding accounts in security tab of a folder, I am asked for login name and password from the Domain Controller. How do select so I dont need to do this everytime? I am watching this video guide and the man there never need to fill in credentials on his member server.

    Read the article

  • Dependency diagramming / mapping tool [closed]

    - by Lars
    I am looking for a tool that allows me to easily create and maintain dependency maps of our mission critical servers, apps, processes, etc. It needs to be intuitive and easy to work with and be able to generate diagrams that clearly show the dependencies graphically. What would be some good tools for this? I have looked at videos for AssetGen Sysmap and BluePrint from Pathwaysystems.com, and they both seem to fit my needs, but there has got to be more good systems like them that I can look at. I want to make sure I pick the best system for our needs (and limited budget).

    Read the article

  • Tool to allow Kerberos Authenticated users to modify Firewall settings

    - by Lars Hanke
    I run a firewall on a central router. Recently, several users want to use Skype. Since firewalling Skype virtually means to switch the firewall off, I consider to allow users to temporarily punch holes for their system. Since the users have no accounts on the router, I consider using Kerberos for authentication and authorization. The router is a Debian Squeeze box, with minimal configuration, i.e. no web-server, database or similar gimmicks. Does anyone know an existing solution, which could be used for that purpose? Or does anybody know easy to use and well documented frameworks in say Perl, Python, C, C++, ... making the set-up of a Kerberos authenticated Client and Server application really simple?

    Read the article

  • How can I move a polygon edge 1 unit away from the center?

    - by Stephen
    Let's say I have a polygon class that is represented by a list of vector classes as vertices, like so: var Vector = function(x, y) { this.x = x; this.y = y; }, Polygon = function(vectors) { this.vertices = vectors; }; Now I make a polygon (in this case, a square) like so: var poly = new Polygon([ new Vector(2, 2), new Vector(5, 2), new Vector(5, 5), new Vector(2, 5) ]); So, the top edge would be [poly.vertices[0], poly.vertices[1]]. I need to stretch this polygon by moving each edge away from the center of the polygon by one unit, along that edge's normal. The following example shows the first edge, the top, moved one unit up: The final polygon should look like this new one: var finalPoly = new Polygon([ new Vector(1, 1), new Vector(6, 1), new Vector(6, 6), new Vector(1, 6) ]); It is important that I iterate, moving one edge at a time, because I will be doing some collision tests after moving each edge. Here is what I tried so far (simplified for clarity), which fails triumphantly: for(var i = 0; i < vertices.length; i++) { var a = vertices[i], b = vertices[i + 1] || vertices[0]; // in case of final vertex var ax = a.x, ay = a.y, bx = b.x, by = b.y; // get some new perpendicular vectors var a2 = new Vector(-ay, ax), b2 = new Vector(-by, bx); // make into unit vectors a2.convertToUnitVector(); b2.convertToUnitVector(); // add the new vectors to the original ones a.add(a2); b.add(b2); // the rest of the code, collision tests, etc. } This makes my polygon start slowly rotating and sliding to the left, instead of what I need. Finally, the example shows a square, but the polygons in question could be anything. They will always be convex, and always with vertices in clockwise order.

    Read the article

  • Understanding dot notation

    - by Starkers
    Here's my interpretation of dot notation: a = [2,6] b = [1,4] c = [0,8] a . b . c = (2*6)+(1*4)+(0*8) = 12 + 4 + 0 = 16 What is the significance of 16? Apparently it's a scalar. Am I right in thinking that a scalar is the number we times a unit vector by to get a vector that has a scaled up magnitude but the same direction as the unit vector? So again, what is the relevance of 16? When is it used? It's not the magnitude of all the vectors added up. The magnitude of all of them is calculated as follows: sqrt( ax * ax + ay * ay ) + sqrt( bx * bx + by * by ) + sqrt( cx * cx + cy * cy) sqrt( 2 * 2 + 6 * 6 ) + sqrt( 1 * 1 + 4 * 4 ) + sqrt( 0 * 0 + 8 * 8) sqrt( 4 + 36 ) + sqrt( 1 + 16 ) + sqrt( 0 + 64) sqrt( 40 ) + sqrt( 17 ) + sqrt( 64) 6.3 + 4.1 + 8 10.4 + 8 18.4 So I don't really get this diagram: Attempting with sensible numbers: a = [1,0] b = [4,3] a . b = (1*0) + (4*3) = 0 + 12 = 12 So what exactly is a . b describing here? The magnitude of that vector? Because that isn't right: the 'a.b' vector = [4,0] sqrt( x*x + y*y ) sqrt( 4*4 + 0*0 ) sqrt( 16 + 0 ) 4 So what is 12 describing?

    Read the article

  • How to get Rid of this strange Border on JButton in Windows System look and Feel?

    - by Timo J.
    I have a small Problem with the Layout of my Frame. As You could see in a picture (if i would have my 10 rep ;) ) there is a small Border around my JButtons. I'm already searching long time on this topic and i finally decided to ask for help, i'm just out of ideas. Is this Part of the Windows Theme which shouldn't be changed? It just doesnt fit into my current Layout, as I'm Listing TextBoxes and Comboboxes on Page Axis without any Border. I would be very happy if there is solution for this issue. Thanks in advance! EDIT 1: I do not mean the Focus Border. I like the Highlighting of a focussed Element. What i mean is the Border in the Background Color which causes a small distance of background-colored space beetween a JButton and another Element. (Picture on Personnal Webspace: http://tijamocobs.no-ip.biz/border_jbutton.png) EDIT 2: I'm using the Windows 8 Look and Feel but saw this Problem on Windows 7 Look and Feel, too. short Example import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class TestFrame extends JFrame { public TestFrame(){ setLayout(new BoxLayout(getContentPane(), BoxLayout.PAGE_AXIS)); for (int i = 0; i < 3; i++) { JButton btn = new JButton("."); // not working: // btn.setBorder(null); // btn.setBorder(BorderFactory.createEmptyBorder()); add(btn); } pack(); } public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); TestFrame tiss = new TestFrame(); tiss.setVisible(true); } } Example Code (long version): import java.awt.BorderLayout; import java.awt.Container; import java.awt.Dimension; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class TestFrame extends JFrame { public TestFrame(){ JPanel muh = new JPanel(); muh.setLayout(new BoxLayout(muh, BoxLayout.PAGE_AXIS)); for (int i = 0; i < 3; i++) { Container c = new JPanel(); c.setLayout(new BoxLayout(c, BoxLayout.LINE_AXIS)); Box bx = Box.createHorizontalBox(); final String[] tmp = {"anything1","anything2"}; JComboBox<String> cmbbx = new JComboBox<String>(tmp); cmbbx.setMinimumSize(new Dimension(80,20)); bx.add(cmbbx); JButton btn = new JButton("."); btn.setMinimumSize(new Dimension(cmbbx.getMinimumSize().height,cmbbx.getMinimumSize().height)); btn.setPreferredSize(new Dimension(30,30)); btn.setMaximumSize(new Dimension(30,30)); bx.add(btn); c.setMaximumSize(new Dimension(Integer.MAX_VALUE,30)); c.add(new JLabel("Just anything")); c.add(bx); muh.add(c); } add(muh,BorderLayout.CENTER); pack(); } public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); TestFrame tiss = new TestFrame(); tiss.setVisible(true); } }

    Read the article

  • Dartisans Ep. 6 - Meet the community - Dart hangout

    Dartisans Ep. 6 - Meet the community - Dart hangout In this episode of Dartisans, we are joined by special guests from the Dart community. John Evans, Adam Smith, Chris Buckett, John McCutchan, and Lars Tackmann talk about their Dart libraries, what they like about Dart, and what they want to see in the future. Get started with Dart at www.dartlang.org From: GoogleDevelopers Views: 4 0 ratings Time: 48:11 More in Science & Technology

    Read the article

  • Google I/O 2012 - Dart - A Modern Web Language

    Google I/O 2012 - Dart - A Modern Web Language Lars Bak, Kasper Lund The two creators of Dart will discuss the rationale behind Dart's design and its impact on web scalability and performance. They'll also present how Dart helps developers innovate by increasing their productivity without breaking backwards compatibility. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 2066 36 ratings Time: 01:03:40 More in Science & Technology

    Read the article

  • Silverlight DataGrid: Hiding columns using VisualStateManager

    - by Lars Udengaard
    Is it possible to hide a column of a datagrid, without using codebehind? E.g. by using the VisualStateManager? <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="Buttons.MainPage" Width="640" Height="480"> <StackPanel x:Name="LayoutRoot" Width="624" HorizontalAlignment="Right" Margin="0,0,8,0" > <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="EditStates"> <VisualState x:Name="ReadOnly" /> <VisualState x:Name="Edit"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ShownInEditMode" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000"> <DiscreteObjectKeyFrame KeyTime="00:00:00"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <data:DataGrid AutoGenerateColumns="False" ItemsSource="{Binding BBRNumbers}"> <data:DataGrid.Columns> <data:DataGridTextColumn Header="AlwaysShown" Width="80" Binding="{Binding Municipality}" /> <data:DataGridTextColumn Header="ShownInEditMode" Width="73" Binding="{Binding Estate}" Visibility="Collapsed" /> </data:DataGrid.Columns> </data:DataGrid> </StackPanel> Calling the following should then hide the column, but this doesnt work. VisualStateManager.GoToState(this, "Edit", false); Any ideas?

    Read the article

  • WPF FlowDocument: force calculation of height etc. "off screen"

    - by Lars
    My target: a DocumentPaginator which takes a FlowDocument with a table, which splits the table to fit the pagesize and repeat the header/footer (special tagged TableRowGroups) on every page. For splitting the table I have to know the heights of its rows. While building the FlowDocument-table by code, the height/width of the TableRows are 0 (of course). If I assign this document to a FlowDocumentScrollViewer (PageSize is set), the heights etc. are calculated. Is this possible without using an UI-bound object? Instantiating a FlowDocumentScrollViewer which is not bound to a window doesn't force the pagination/calculation of the heights. This is how I determine the height of a TableRow (which works perfectly for documents shown by a FlowDocumentScrollViewer): FlowDocument doc = BuildNewDocument(); // what is the scrollviewer doing with the FlowDocument? FlowDocumentScrollViewer dv = new FlowDocumentScrollViewer(); dv.Document = doc; dv.Arrange(new Rect(0, 0, 0, 0)); TableRowGroup dataRows = null; foreach (Block b in doc.Blocks) { if (b is Table) { Table t = b as Table; foreach (TableRowGroup g in t.RowGroups) { if ((g.Tag is String) && ((String)g.Tag == "dataRows")) { dataRows = g; break; } } } if (dataRows != null) break; } if (dataRows != null) { foreach (TableRow r in dataRows.Rows) { double maxCellHeight = 0.0; foreach (TableCell c in r.Cells) { Rect start = c.ElementStart.GetCharacterRect(LogicalDirection.Forward); Rect end = c.ElementEnd.GetNextInsertionPosition(LogicalDirection.Backward).GetCharacterRect(LogicalDirection.Forward); double cellHeight = end.Bottom - start.Top; if (cellHeight > maxCellHeight) maxCellHeight = cellHeight; } System.Diagnostics.Trace.WriteLine("row " + dataRows.Rows.IndexOf(r) + " = " + maxCellHeight); } } Edit: I added the FlowDocumentScrollViewer to my example. The call of "Arrange" forces the FlowDocument to calculate its heights etc. I would like to know, what the FlowDocumentScrollViewer is doing with the FlowDocument, so I can do it without the UIElement. Is it possible?

    Read the article

  • Problem in linking an nasm code

    - by Stefano
    I'm using a computer with an Intel Core 2 CPU and 2GB of RAM. The SO is Ubuntu 9.04. When I try to compile this code: ;programma per la simulazione di un terminale su PC, ottenuto utilizzando l'8250 ;in condizione di loopback , cioè Tx=Rx section .code64 section .data TXDATA EQU 03F8H ;TRASMETTITORE RXDATA EQU 03F8H ;RICEVITORE BAUDLSB EQU 03F8H ;DIVISORE DI BAUD RATE IN LSB BAUDMSB EQU 03F9H ;DIVISORE DI BAUD RATE IN MSB INTENABLE EQU 03F9H ;REGISTRO DI ABILITAZIONE DELL'INTERRUZIONE INTIDENTIF EQU 03FAH ;REGISTRO DI IDENTIFICAZIONE DELL'INTERRUZIONE LINECTRL EQU 03FBH ;REGISTRO DI CONTROLLO DELLA LINEA MODEMCTRL EQU 03FCH ;REGISTRO DI CONTROLLO DEL MODEM LINESTATUS EQU 03FDH ;REGISTRO DI STATO DELLA LINEA MODEMSTATUS EQU 03FEH ;REGISTRO DI STATO DEL MODEM BAUDRATEDIV DW 0060H ;DIVISOR: LOW=60, HIGH=00 -BAUD =9600 COUNTERCHAR DB 0 ;CHARACTER COUNTER ;DW 256 DUP (?) section .text global _start _start: ;PROGRAMMAZIONE 8250 MOV DX,LINECTRL MOV AL,80H ;BIT 7=1 PER INDIRIZZARE IL BAUD RATE OUT DX,AL MOV DX,BAUDLSB MOV AX,BAUDRATEDIV ;DEFINISCO FATTORE DI DIVISIONE OUT DX,AL MOV DX,BAUDMSB MOV AL,AH OUT DX,AL ;MSB MOV DX,LINECTRL MOV AL,00000011B ;8 BIT DATO, 1 STOP, PARITA' NO OUT DX,AL MOV DX,MODEMCTRL MOV AL,00010011B ;BIT 4=0 PER NO LOOPBACK OUT DX,AL MOV DX,INTENABLE XOR AL,AL ;DISABILITO TUTTI GLI INTERRUPTS OUT DX,AL CICLO: MOV DX,LINESTATUS IN AL,DX ;LEGGO IL REGISTRO DI STATO DELLA LINEA TEST AL,00011110B ;VERIFICO GLI ERRORI (4 TIPI) JNE ERRORI TEST AL,01H ;VERIFICO Rx PRONTO JNE LEGGOCHAR TEST AL,20H ;VERIFICO Tx VUOTO JE CICLO ;SE SI ARRIVA A QUESTO PUNTO ALLORA L'8250 è PRONTO PER TRASMETTERE UN NUOVO CARATTERE MOV AH,1 INT 80H JE CICLO ;SE SI ARRIVA A QUESTO PUNTO SIGNIFICA CHE ESISTE UN CARATTERE DA TASTIERA MOV AH,0 INT 80H ;Al CONTIENE IL CARATTERE DELLA TASTIERA MOV DX,3F8H OUT DX,AL JMP CICLO LEGGOCHAR: MOV AL,[COUNTERCHAR] INC AL CMP AL,15 JE FINE MOV [COUNTERCHAR],AL MOV DX,TXDATA IN AL,DX ;AL CONTIENE IL CARATTERE RICEVUTO AND AL,7FH ;POICHè VI SONO 7 BIT DI DATO ;VISUALIZZAZIONE DEL CARATTERE MOV BX,0 MOV AH,14 INT 80H POP AX CMP AL,0DH ;CONTROLLO SE RETURN JNE CICLO ;CAMBIO RIGA DI VISUALIZZAZIONE MOV AL,0AH MOV BX,0 MOV AH,14 ;INT 10H INT 80H JMP CICLO ;GESTIONE ERRORI ERRORI: MOV DX,3F8H IN AL,DX MOV AL,'?' MOV BX,0 MOV AH,14 INT 80H JMP CICLO FINE: XOR AH,AH MOV AL,03 INT 80H When I compile this code "NASM -f bin UARTLOOP.asm", the compiler can create the UARTLOOP.o file without any error. When I try to link the .o file with "ld UARTLOOP.o" it tells: UARTLOOP.o: In function `_start': UARTLOOP.asm:(.text+0xd): relocation truncated to fit: R_X86_64_16 against `.data' Have u got some ideas to solve this problem? Thx =)

    Read the article

  • Enable 2-way databinding on nested listview

    - by Lars Pedersen
    I have a ASP.NET FormView, that - via an ObjectDataSource - is bound to my EventOrder-object: [Serializable] public class EventOrder { [Serializable] public class OrderTicket { public int Qty { get; set; } public int Id { get { return this.Ticket.Id; } } public Ticket Ticket { get; set; } public double TicketPrice { get; set; } } [Serializable] public class OrderExtra { public int Qty { get; set; } public int Id { get { return this.Extra.Id; } } public Extra Extra { get; set; } } public Event Event { get; set; } public List<OrderTicket> OrderTickets { get; set; } public List<OrderExtra> OrderExtras { get; set; } public UserProfile UserProfile { get; set; } public List<Fee> Fees { get; set; } public List<Discount> Discounts { get; set; } public EventOrder() { this.OrderExtras = new List<OrderExtra>(); this.OrderTickets = new List<OrderTicket>(); this.Fees = new List<Fee>(); this.Discounts = new List<Discount>(); } } In my FormView, I have a bindingexpression on an inner listview for my collection of OrderTickets: <asp:ListView Visible="false" runat="server" DataKeyNames="Id" ID="lvTickets" DataSource='<%# Bind("OrderTickets") %>'> <ItemTemplate> <asp:TextBox ID="TextBox5" Text='<%# Bind("Qty") %>' runat="server"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text='<%# Eval("Ticket.Title") %>'></asp:Label> <asp:Label ID="Label2" runat="server" Text='<%# Eval("TicketPrice") %>'></asp:Label><br /> </ItemTemplate> My problem is that the Qty-property isn't databound to the object when the parent container is updated. Is it possible to have this kind of parent-child relation with 2-way databinding? Can I force the child listview to update it's bound dataobject when I submit the form?

    Read the article

  • How do I implement a remove by index method for a singly linked list in Java?

    - by Lars Flyger
    Hi, I'm a student in a programming class, and I need some help with this code I've written. So far I've written an entire linked list class (seen below), yet for some reason the "removeByIndex" method won't work. I can't seem to figure out why, the logic seems sound to me. Is there some problem I don't know about? public class List<T> { //private sub-class Link private class Link { private T value; private Link next; //constructors of Link: public Link (T val) { this.value = val; this.next = null; } public Link (T val, Link next) { this.value = val; this.next = next; } @SuppressWarnings("unused") public T getValue() { return value; } } private static final Exception NoSuchElementException = null; private static final Exception IndexOutOfBoundsException = null; private Link chain = null; //constructors of List: public List() { this.chain = null; } //methods of List: /** * Preconditions: none * Postconditions: returns true if list is empty */ public boolean isEmpty() { return this.chain == null; } /** * Preconditions: none * Postconditions: A new Link is added via add-aux * @param element */ public void add(T element) { this.add_aux(element, this.chain); } /** * Preconditions: none * Postconditions: A new Link is added to the current chain * @param element * @param chain */ private void add_aux(T element, Link chain) { if (chain == null) { //if chain is null set chain to a new Link with a value of //element this.chain = new Link(element); } else if (chain.next != null) { //if chain.next is not null, go to next item in chain and //try //to add element add_aux(element, chain.next); } else { //if chain.next is null, set chain.next equal to a new Link //with value of element. chain.next = new Link(element); } } /** * Preconditions: none * Postconditions: returns the link at the defined index via nthlink_aux * @param index * @return */ private Link nthLink (int index) { return nthLink_aux(index, this.chain); } /** * Preconditions: none * Postconditions: returns the link at the defined index in the specified *chain * @param i * @param c * @return */ private Link nthLink_aux (int i, Link c) { if (i == 0) { return c; } else return nthLink_aux(i-1, c.next); } /** * Preconditions: the specified element is present in the list * Postconditions: the specified element is removed from the list * @param element * @throws Exception */ public void removeElement(T element) throws Exception { if (chain == null) { throw NoSuchElementException; } //while chain's next is not null and the value of chain.next is not //equal to element, //set chain equal to chain.next //use this iteration to go through the linked list. else while ((chain.next != null) && !(chain.next.value.equals(element))){ Link testlink = chain.next; if (testlink.next.value.equals(element)) { //if chain.next is equal to element, bypass the //element. chain.next.next = chain.next.next.next; } else if (testlink.next == null) { throw NoSuchElementException; } } } /** * Preconditions: none * Postsconditions: the Link at the specified index is removed * @param index * @throws Exception */ public void removeByIndex(int index) throws Exception { if (index == 0) { //if index is 0, set chain equal to chain.next chain = chain.next; } else if (index > 0) { Link target = nthLink(index); while (target != null) { if (target.next != null) { target = target.next; } //if target.next is null, set target to null else { target = null; } } return; } else throw IndexOutOfBoundsException; } /** * Preconditions: none * Postconditions: the specified link's value is printed * @param link */ public void printLink (Link link) { if(link != null) { System.out.println(link.value.toString()); } } /** * Preconditions: none * Postconditions: all of the links' values in the list are printed. */ public void print() { //copy chain to a new variable Link head = this.chain; //while head is not null while (!(head == null)) { //print the current link this.printLink(head); //set head equal to the next link head = head.next; } } /** * Preconditions: none * Postconditions: The chain is set to null */ public void clear() { this.chain = null; } /** * Preconditions: none * Postconditions: Places the defined link at the defined index of the list * @param index * @param val */ public void splice(int index, T val) { //create a new link with value equal to val Link spliced = new Link(val); if (index <= 0) { //copy chain Link copy = chain; //set chain equal to spliced chain = spliced; //set chain.next equal to copy chain.next = copy; } else if (index > 0) { //create a target link equal to the link before the index Link target = nthLink(index - 1); //set the target's next equal to a new link with a next //equal to the target's old next target.next = new Link(val, target.next); } } /** * Preconditions: none * Postconditions: Check to see if element is in the list, returns true * if it is and false if it isn't * @param element * @return */ public boolean Search(T element) { if (chain == null) { //return false if chain is null return false; } //while chain's next is not null and the value of chain.next is not //equal to element, //set chain equal to chain.next //use this iteration to go through the linked list. else while ((chain.next != null) && !(chain.next.value.equals(element))) { Link testlink = chain.next; if (testlink.next.value.equals(element)) { //if chain.next is equal to element, return true return true; } else if (testlink.next == null) { return false; } } return false; } /** * Preconditions: none * Postconditions: order of the links in the list is reversed. */ public void reverse() { //copy chain Link current = chain; //set chain equal to null chain = null; while (current != null) { Link save = current; current = current.next; save.next = chain; chain = save; } } }'

    Read the article

  • How to access "overridden" inner class in Scala?

    - by doom2.wad
    I have two traits, one extending the other, each with an inner class, one extending the other, with the same names: trait A { class X { def x() = doSomething() } } trait B extends A { class X extends super.X { override def x() = doSomethingElse() } } class C extends B { val x = new X() // here B.X is instantiated val y = new A.X() // does not compile val z = new A.this.X() // does not compile } How do I access A.X class in the C class's body? Renaming B.X not to hide A.X is not a preferred way. To make things a bit complicated, in the situation I have encountered this problem the traits have type parameters (not shown in this example).

    Read the article

  • comparing two angles

    - by Elazar Leibovich
    Given four points in the plane, A,B,X,Y, I wish to determine which of the following two angles is smaller ?ABX or ?ABY. I'd rather not use cos or sqrt, in order to preserve accuracy. In the case where A=(-1,0),B=(0,0), I can compare the two angles ?ABX and ?ABY, by calculating the dot product of the vectors X,Y, and watch it's sign. What I can do in this case is: Determine whether or not ABX turns right or left If ABX turns left check whether or not Y and A are on the same side of the line on segment BX. If they are - ?ABX is a smaller than ABY. If ABX turns right, then Y and A on the same side of BX means that ?ABX is larger than ?ABY. But this seems too complicated to me. Any simpler approach?

    Read the article

  • Bash: Correct way to Iterate over Map

    - by Lars Tackmann
    In Bash I can create a map (hashtable) with this common construction hput() { eval "$1""$2"='$3' } hget() { eval echo '${'"$1$2"'#hash}' } and then use it like this: hput capitols France Paris hput capitols Spain Madrid echo "$(hget capitols France)" But how do I best iterate over the entries in the map ?. For instance, in Java I would do: for (Map.Entry<String, String> entry : capitols.entrySet()) { System.out.println("Country " + entry.getKey() + " capital " + entry.getValue()); } is there a common way of accomplishing something similar in Bash ?.

    Read the article

  • Why use I-prefix for interfaces in Java?

    - by Lars Andren
    Is there some reason why people use I-prefix for interfaces in Java? It seems to be a C#-convention spilling over. For C# it makes sense, as the answers to this question explains. However, for Java a class declaration clearly states which class that is extended and which interfaces that are implemented: public class Crow extends Animal implements Bird I think Joshua Bloch didn't suggest this in Effective Java, and I think he usually makes a lot of sense. I get the I-verbing as presented in an answer to the question above, but is there some other use with this convention for Java?

    Read the article

  • PL/SQL pre-compile and Code Quality checks in an automatted build environment?

    - by Lars Corneliussen
    We build software using Hudson and Maven. We have C#, java and last, but not least PL/SQL sources (sprocs, packages, DDL, crud) For C# and Java we do unit tests and code analysis, but we don't really know the health of our PL/SQL sources before we actually publish them to the target database. Requirements There are a couple of things we wan't to test in the following priority: Are the sources valid, hence "compilable"? For packages, with respect to a certain database, would they compile? Code Quality: Do we have code flaws like duplicates, too complex methods or other violations to a defined set of rules? Also, the tool must run head-less (commandline, ant, ...) we wan't to do analysis on a partial code base (changed sources only) Tools We did a little research and found the following tools that could potencially help: Cast Application Intelligence Platform (AIP): Seems to be a server that grasps information about "anything". Couldn't find a console version that would export in readable format. Toad for Oracle: The Professional version is said to include something called Xpert validates a set of rules against a code base. Sonar + PL/SQL-Plugin: Uses Toad for Oracle to display code-health the sonar-way. This is for browsing the current state of the code base. Semantic Designs DMSToolkit: Quite general analysis of source code base. Commandline available? Semantic Designs Clones Detector: Detects clones. But also via command line? Fortify Source Code Analyzer: Seems to be focussed on security issues. But maybe it is extensible? more... So far, Toad for Oracle together with Sonar seems to be an elegant solution. But may be we are missing something here? Any ideas? Other products? Experiences? Related Questions on SO: http://stackoverflow.com/questions/531430/any-static-code-analysis-tools-for-stored-procedures http://stackoverflow.com/questions/839707/any-code-quality-tool-for-pl-sql http://stackoverflow.com/questions/956104/is-there-a-static-analysis-tool-for-python-ruby-sql-cobol-perl-and-pl-sql

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >