Search Results

Search found 1557 results on 63 pages for 'horizontal'.

Page 12/63 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to change a class's content using jQuery

    - by coffeeaddict
    Here is the div element on my page: How can I change a class's content? So from existing which is: class="jcarousel-next jcarousel-next-horizontal" to class="jcarousel-next jcarousel-next-horizontal jcarousel-next- disabled jcarousel-next-disabled-horizontal" Do I need to completely remove it by using removeClass and then re-add?

    Read the article

  • Display continious dates in Pivot Chart

    - by Douglas
    I have a set of data in a pivot table with date times and events. I've made a pivot chart with this data, and grouped the data by day and year, then display a count of events for each day. So, my horizontal axis goes from 19 March 2007 to 11 May 2010, and my vertical axis is numeric, going from zero to 140. For some days, I have zero events. These days don't seem to be shown on the horizontal axis, so 2008 is narrower than 2009. How do I display a count of zero for days with no events? I'd like my horizontal axis to be continuous, so that it does not miss any days, and every month ends up taking up the same amount of horizontal space. (This question is similar to the unanswered question here, but I'd rather not generate a table of all the days in the last x number of years just to get a smooth plot!)

    Read the article

  • Cage nuts - which way to insert them?

    - by Ingmar Hupp
    Cage nuts can be inserted (in square holes) either with the flaps horizontal or vertical. I've seen and used both methods, but am still not sure which is best. Is there a recommended way of inserting them? If so, why is it the best way? From my own experience, the horizontal way (on the left) seems slightly better for no other reason than making it easier to insert or pry out the cage nut in a full rack (with the units above and below being populated), for example when replacing cage nuts with a snap-in rail. Edit: Major vendors each seem to have their own preference too: Horizontal: IBM, Cisco, APC Vertical: HP (and Compaq), Sun/Oracle, Dell

    Read the article

  • Enabling Compiz Viewport Switcher key bindings

    - by David Moles
    I'm running compiz 0.8.2 with compizconfig on Scientific Linux 6.2 with Gnome 2.28.2. In the compizconfig "General Options" I have "Desktop Size" set as follows: Horizontal Virtual Size: 6 Vertical Virtual Size: 1 Number of Desktops: 1 This gets me the layout I want, i.e. 6 workspaces in a horizontal layout. Ctrl-alt-cursor-keys work fine for switching between them. However, I can't figure out how to get key bindings for specific workspaces. I've tried enabling "Viewport Switcher" in compizconfig, and tried various combinations both in "Number-based viewport switching" and "Go to specific viewport", to no apparent effect. My first thought was that something else was eating the specific key bindings I chose, but I think I've tried every combination of shift, control, alt and super (i.e., the Windows key) by now. I tried setting 6 desktops under "General Options" instead of one desktop with horizontal virtual size 6, but that doesn't seem to make a difference either. What am I missing?

    Read the article

  • Enabling Compiz Viewport Switcher key bindings

    - by David Moles
    I'm running compiz 0.8.2 with compizconfig on Scientific Linux 6.2 with Gnome 2.28.2. In the compizconfig "General Options" I have "Desktop Size" set as follows: Horizontal Virtual Size: 6 Vertical Virtual Size: 1 Number of Desktops: 1 This gets me the layout I want, i.e. 6 workspaces in a horizontal layout. Ctrl-alt-cursor-keys work fine for switching between them. However, I can't figure out how to get key bindings for specific workspaces. I've tried enabling "Viewport Switcher" in compizconfig, and tried various combinations both in "Number-based viewport switching" and "Go to specific viewport", to no apparent effect. My first thought was that something else was eating the specific key bindings I chose, but I think I've tried every combination of shift, control, alt and super (i.e., the Windows key) by now. I tried setting 6 desktops under "General Options" instead of one desktop with horizontal virtual size 6, but that doesn't seem to make a difference either. What am I missing?

    Read the article

  • What is the cause of a vertical white line on an LCD monitor?

    - by Deviruchi D Devourer
    This just happened yesterday when I was browsing the internet. My AOC N941Sw monitor is suddenly showing a thin horizontal white line near the center of the screen. The white line distorts the images. I tried checking the cables for loose connection and dust particles but the white line is still here. There are times the entire image below the horizontal white line flickers and move up and down. When this happens, I just turn off the monitor then the flicker goes away but the white horizontal line is still there. After a few minutes, the same thing happen all over again. Is there a way to fix this?

    Read the article

  • Nothing happen when refreshing the main Frame (JAVA)

    - by Ams
    Hello everyone, I try to show a ( Logged in ) message when a user is succefully connected but nothing happen when a do a repaint(). you can take a look to the code : public class MainFrame extends JFrame implements ActionListener{ private static final long serialVersionUID = 1L; private static final int FRAME_HEIGHT = 400; private static final int FRAME_WIDTH = 250; private static final String TITLE = new String("TweeX"); private static String TWITTERID = new String(); private static String TWITTERPW = new String(); private boolean logged = false; private JTextField loginField = new JTextField(10); private JPasswordField passField = new JPasswordField(10); private JButton login = new JButton("Connect"); private GridBagConstraints c = new GridBagConstraints(); private String UserStatus = new String("Please login..."); /* * Constructor ! */ MainFrame() { setSize(FRAME_WIDTH, FRAME_HEIGHT); setTitle(TITLE); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setResizable(false); loginUser(); } /* * Login Forms */ protected void loginUser(){ this.setLayout(new GridBagLayout()); //add Login Fiels + Label c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.insets = new Insets(5,5,5,20); c.gridy = 0; add(new JLabel("Username:"),c); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 0; add(loginField,c); //add Password Fiels + Label c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 1; add(new JLabel("Password:"),c); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 1; add(passField,c); //add Login button c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 2; add(login,c); //add listener to login button login.addActionListener((ActionListener) this); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 3; add(new JLabel(UserStatus),c); setVisible(true); } @Override public void actionPerformed(ActionEvent e) { TWITTERID = loginField.getText(); TWITTERPW = passField.getText(); Twitter twitter = new TwitterFactory().getInstance(TWITTERID,TWITTERPW); logged = true; try { twitter.verifyCredentials(); } catch (TwitterException e1) { logged = false; } } protected void connect(){ if(logged){ UserStatus = "Loged In :)"; repaint(); } } static public void main(String[] argv) { new MainFrame(); } }

    Read the article

  • Having to check collisions twice per game tic

    - by user22241
    I have vertically moving elevators (3 solid tiles wide) and static solid tiles. Each are separate entities and therefore have their own respective collision routines (to check for, and resolve, collisions with the main character) I check my vertical collisions after characters vertical movements and then horizontal collisions after horizontal movements. The problem is that I want my platform to kill the player if it squashes him from the top, and also if he's on a moving platform (that is moving up) that squashes him into a solid block. Correct behaviour, player on solid blocks being squashed from above by decending elevator Here is what happens. Gravity pushes character into solid block, solid block collision routine corrects characters position and sits him on the solid block which pushes him into the moving elevator, elevator routine then checks for collision and kills player. This assumes I am checking solid blocks first, then elevator collisions. However, if it's the other way around, this happens.... Incorrect behaviour, player on accending elevator gets pushed into solid blocks above Player is on an elevator moving up, gravity pushes him into the elevator, solid block CD routine detects no collision, no action taken. Elevator CD routine detects character has been pushed into elevator by gravity, corrects this by moving character up and sitting him on the elevator and pushes him into the solid blocks above, however the solid block vertical routine has now already run for this tic, so the game continues and the next solid block collision that is encountered is the horizontal routine. This detects a collision and moves the character out of the collision to the left or right of the block which looks odd to say the least (character should get killed here). The only way I've managed to get this working correctly is by running the solid block CD, then the elevator CD, then the solid block CD again straight after. This is clearly wasteful but I can't figure out how else to do this. Any help would be appreciated.

    Read the article

  • Resultant Vector Algorithm for 2D Collisions

    - by John
    I am making a Pong based game where a puck hits a paddle and bounces off. Both the puck and the paddles are Circles. I came up with an algorithm to calculate the resultant vector of the puck once it meets a paddle. The game seems to function correctly but I'm not entirely sure my algorithm is correct. Here are my variables for the algorithm: Given: velocity = the magnitude of the initial velocity of the puck before the collision x = the x coordinate of the puck y = the y coordinate of the puck moveX = the horizontal speed of the puck moveY = the vertical speed of the puck otherX = the x coordinate of the paddle otherY = the y coordinate of the paddle piece.horizontalMomentum = the horizontal speed of the paddle before it hits the puck piece.verticalMomentum = the vertical speed of the paddle before it hits the puck slope = the direction, in radians, of the puck's velocity distX = the horizontal distance between the center of the puck and the center of the paddle distY = the vertical distance between the center of the puck and the center of the paddle Algorithm solves for: impactAngle = the angle, in radians, of the angle of impact. newSpeedX = the speed of the resultant vector in the X direction newSpeedY = the speed of the resultant vector in the Y direction Here is the code for my algorithm: int otherX = piece.x; int otherY = piece.y; double velocity = Math.sqrt((moveX * moveX) + (moveY * moveY)); double slope = Math.atan(moveX / moveY); int distX = x - otherX; int distY = y - otherY; double impactAngle = Math.atan(distX / distY); double newAngle = impactAngle + slope; int newSpeedX = (int)(velocity * Math.sin(newAngle)) + piece.horizontalMomentum; int newSpeedY = (int)(velocity * Math.cos(newAngle)) + piece.verticalMomentum; for those who are not program savvy here is it simplified: velocity = v(moveX² + moveY²) slope = arctan(moveX / moveY) distX = x - otherX distY = y - otherY impactAngle = arctan(distX / distY) newAngle = impactAngle + slope newSpeedX = velocity * sin(newAngle) + piece.horizontalMomentum newSpeedY = velocity * cos(newAngle) + piece.verticalMomentum My Question: Is this algorithm correct? Is there an easier/simpler way to do what I'm trying to do?

    Read the article

  • Platform game collisions with Block

    - by Sri Harsha Chilakapati
    I am trying to create a platform game and doing wrong collision detection with the blocks. Here's my code // Variables GTimer jump = new GTimer(1000); boolean onground = true; // The update method public void update(long elapsedTime){ MapView.follow(this); // Add the gravity if (!onground && !jump.active){ setVelocityY(4); } // Jumping if (isPressed(VK_SPACE) && onground){ jump.start(); setVelocityY(-4); onground = false; } if (jump.action(elapsedTime)){ // jump expired jump.stop(); } // Horizontal movement setVelocityX(0); if (isPressed(VK_LEFT)){ setVelocityX(-4); } if (isPressed(VK_RIGHT)){ setVelocityX(4); } } // The collision method public void collision(GObject other){ if (other instanceof Block){ // Determine the horizontal distance between centers float h_dist = Math.abs((other.getX() + other.getWidth()/2) - (getX() + getWidth()/2)); // Now the vertical distance float v_dist = Math.abs((other.getY() + other.getHeight()/2) - (getY() + getHeight()/2)); // If h_dist > v_dist horizontal collision else vertical collision if (h_dist > v_dist){ // Are we moving right? if (getX()<other.getX()){ setX(other.getX()-getWidth()); } // Are we moving left? else if (getX()>other.getX()){ setX(other.getX()+other.getWidth()); } } else { // Are we moving up? if (jump.active){ jump.stop(); } // We are moving down else { setY(other.getY()-getHeight()); setVelocityY(0); onground = true; } } } } The problem is that the object jumps well but does not fall when moved out of platform. Here's an image describing the problem. I know I'm not checking underneath the object but I don't know how. The map is a list of objects and should I have to iterate over all the objects??? Thanks

    Read the article

  • How to put a background image on GridBagLayout

    - by Loligans
    I am trying to work with layout managers for the first time, and they are just kicking me in the teeth. I am trying to make a background image and then put buttons on top, using GridBagLayout, if there is a a better layoutmanager please do tell. As for trying to learn how to use layout managers, its very difficult and any learning references would also be much appreciated. This is what it looks like currently, I can get the frame to show the full image, but when i use gridlayout manager, it does that public void addComponentsToPane(Container pane){ BackgroundImage image = new BackgroundImage(); JButton button1, button2, button3, button4, button5; pane.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); if(shouldFill){ c.fill = GridBagConstraints.NONE; } button1 = new JButton("Button 1"); if (shouldWeightX) { c.weightx = 0.5; } c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 0; button1.setOpaque(false); pane.add(button1, c); button2 = new JButton("Button 2"); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 0.5; c.gridx = 0; c.gridy = 0; button2.setOpaque(false); pane.add(button2, c); button3 = new JButton("Button 3"); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 0.5; c.gridx = 2; c.gridy = 0; button3.setOpaque(false); pane.add(button3, c); button4 = new JButton("Long-Named Button 4"); c.fill = GridBagConstraints.HORIZONTAL; c.ipady = 40; //make this component tall c.weightx = 0.0; c.gridwidth = 3; c.gridx = 0; c.gridy = 1; pane.add(button4, c); button5 = new JButton("button 1"); c.fill = GridBagConstraints.HORIZONTAL; c.ipady = 0; //reset to default c.weighty = 1.0; //request any extra vertical space c.anchor = GridBagConstraints.PAGE_END; //bottom of space c.insets = new Insets(10,0,0,0); //top padding c.gridx = 1; //aligned with button 2 c.gridwidth = 2; //2 columns wide c.gridy = 2; //third row pane.add(button5, c); c.ipadx = 800; c.ipady = 400; pane.add(image, c); } This is what i'm trying to make it look like

    Read the article

  • Making AI jump on a spot effectively

    - by Pasquale Sada
    How to calculate, in 3D environment, the closest point, from which an AI character can jump onto a platform? Setup I have an initial velocity V(Vx,Vy,VZ) and a spot where the character stands still at S(Sx,Sy,Sz). What I'm trying to achieve is a successful jump on a spot E(Ex,Ey,Ez) where you have clicked on(only lower or higher spot, because I've in place a simple steering behavior for even terrains). There are no obstacles around. I've implemented a formula that can make him jump in a precise way on a spot but you need to declare an angle: the problem arise when the selected spot is straight above your head. It' pretty lame that the char hang there and can reach a thing that is 1cm above is head. I'll share the code I'm using: Vector3 dir = target - transform.position; // get target direction float h = dir.y; // get height difference dir.y = 0; // retain only the horizontal direction float dist = dir.magnitude ; // get horizontal distance float a = angle * Mathf.Deg2Rad; // convert angle to radians dir.y = dist * Mathf.Tan(a); // set dir to the elevation angle dist += h / Mathf.Tan(a); // correct for small height differences // calculate the velocity magnitude float vel = Mathf.Sqrt(dist * Physics.gravity.magnitude / Mathf.Sin(2 *a)); return vel * dir.normalized; Ended up using the lowest angle (20 degree) and checking for collision on the trajectory. If found any increase the angle. Here some code (to improve the code maybe must stop the check at the highest point of the curve): Vector3 BallisticVel(Vector3 target, float angle) { Vector3 dir = target - transform.position; // get target direction float h = dir.y; // get height difference dir.y = 0; // retain only the horizontal direction float dist = dir.magnitude ; // get horizontal distance float a = angle * Mathf.Deg2Rad; // convert angle to radians dir.y = dist * Mathf.Tan(a); // set dir to the elevation angle dist += h / Mathf.Tan(a); // correct for small height differences // calculate the velocity magnitude float vel = Mathf.Sqrt(dist * Physics.gravity.magnitude / Mathf.Sin(2 * a)); return vel * dir.normalized; } Vector3 TrajectoryPoint(Vector3 startingPosition, Vector3 startingVelocity, float n ) { float t = 1/60 ; // seconds per time step Vector3 stepVelocity = t * startingVelocity; // m/s Vector3 stepGravity = t * t * Physics.gravity; // m/s/s return startingPosition + n * stepVelocity + 0.5f * (n*n+n) * stepGravity; } bool CheckTrajectory(Vector3 startingPosition,Vector3 target, float angle_jump) { Debug.Log("checking"); if(angle_jump < 80f) { Debug.Log("if"); Vector3 startingVelocity = BallisticVel(target, angle_jump); for (int i = 0; i < 180; i++) { //Debug.Log(i); Vector3 trajectoryPosition = TrajectoryPoint( startingPosition, startingVelocity, i ); if(Physics.Raycast(trajectoryPosition,Vector3.forward,safeDistance)) { angle_jump += 10; break; // restart loop with the new angle } else continue; } return true; JumpVelocity = BallisticVel(target, angle_jump); } return false; }

    Read the article

  • Layout problem: how to place something on top and bottom?

    - by chow
    I want create a layout, with a horizontal LinearLayout(s) on top and bottom, a ListView fill in middle. How can I define the main.xml. I tried to create a layout with horizontal LinearLayout on top, TextView on bottom, a ListView fill in middle; is ok. But after I modified the bottom TextView to LinearLayout, the bottom LinearLayout disappear. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:textSize="12px" android:text="something here" android:layout_width="50px" android:layout_height="wrap_content" /> <TextView android:textSize="12px" android:text="something here" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="bottom" > <ListView android:id="@+id/listbody" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <LinearLayout android:orientation="horizontal" android:layout_height="wrap_content" android:layout_width="fill_parent" > <TextView android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="1" android:textSize="12px" android:text="50%" /> <TextView android:layout_height="wrap_content" android:layout_width="0dip" android:layout_weight="1" android:textSize="12px" android:text="50%" /> </LinearLayout> </LinearLayout> </LinearLayout> Anybody can tell advise? Please help.

    Read the article

  • HTML notes in freemind

    - by asdf
    Hi, I wonder if the following things can be done with the HTML notes pane of freemind: Is it possible on the layout view to decrease the separation between lines? The panel is horizontal, is it possible to setup a vertical view? (I have a big, horizontal-like monitor) By the way, when I move the mouse pointer over a node, i can see the HTLM note associated with it, but its view (as a yellow square) only lasts for some seconds. Can it be made permament? Thanks a lot

    Read the article

  • HTLM notes in freemind

    - by asdf
    Hi, I wonder if the following things can be done with the HTML notes pane of freemind: 1- is it possible on the layout view to decrease the separation between lines? 2- the panel is horizontal, is it possible to setup a vertical view? (I have a big, horizontal-like monitor) By the way, when I move the mouse pointer over a node, i can see the HTLM note associated with it, but its view (as a yellow square) only lasts for some seconds. Can it be made permament? Thanks a lot

    Read the article

  • Dual Screen screen adjustments for wallpaper

    - by Rogue
    I have a dual screen setup one is horizontal one is vertical problem is that the wallpaper on the vertical one displays as horizontal so i have black space above and below the wallpaper. How can turn the wallpaper around so it displays correctly on the vertical screen.

    Read the article

  • ListView items not clickable with HorizontalScrollView inside

    - by Felix
    I have quite a complicated ListView. Each item looks something like this: > LinearLayout (vertical) > LinearLayout (horizontal) > include (horizontal LinearLayout with two TextViews) > include (ditto) > include (ditto) > TextView > HorizontalScrollView (this guy is my problem) > LinearLayout (horizontal) In my activity, when an item is created (getView() is called) I add dynamic TextViews to the LinearLayout inside the HorizontalScrollView (besides filling the other, simpler stuff out). Amazingly, performance is pretty good. My problem is that when I added the HorizontalScrollView, my list items became unclickable. They don't get the orange background when clicked and they don't fire the OnItemClickedListener I have set up (to do a simple Log.d call). How can I make my list items clickable again?

    Read the article

  • WPF layout with several fixed height parts and certain parts relative to window size

    - by Daniil Harik
    Hello, At moment my main layout consists of vertically oriented stack panel and it looks like this: Root StackPanel StackPanel - fixed Height 150 (horizontal orientation) StackPanel - relative Height must be behalf of free space left on screen (but at least 150 px). Used by Telerik GridView Control, if I don't specify Height or MaxHeight Telerik GridView Height becomes very large and does not fit my window. StackPanel - fixed Height 100 (horizontal orientation) StackPanel - relative Height must be half of free space left on screen (but at least 150 px). Used by Telerik GridView Control, if I don't specify Height or MaxHeight Telerik GridView Height becomes very large and does not fit my window. StackPanel - fixed Height 100 (horizontal orientation) The view must totally fit available screen size. The problem is that I don't understand how to make certain areas of my view resize depending on available screen size. Is there is easy way to solve it, or should I be binding to Window height property and doing math? Thank You very much!

    Read the article

  • iPhone landscape navigation back action shows vertical view transition?

    - by Code Shogun
    I have a regular UINavigationController and I push a series of UIViewController into the stack. The view transition for push controller is horizontal animation transition: [self.navigationController pushViewController:controller animated:YES]; However, when I press the Back button on the navigation bar, the view transition animation is vertical (vertically dropping down the previous controller/view). I don't seem to find any way to make this horizontal. This happens only in Landscape mode. Portrait mode the transition all happens as horizontal flip transition. Can anyone shed any light on this? Thanks

    Read the article

  • Set Caret position with JTextArea in JScrollPane

    - by Albinoswordfish
    Right now I have a JTextArea inside of a JScrollPane. For the current content it has both a vertical and horizontal scroll bar showing up. I'm trying to implement a search functionality where a user can search for a certain string and it will set the caret position to the first occurrence of that string. However it seems that JScrollPane only scrolls vertically when I set my caret position. So matching strings going off the JTextArea horizontally will completely get missed and the horizontal scroll bar won't scroll at all. I'm using the basic function setCaretPosition() for the JTextArea Does anybody have any idea why my JScrollPane isn't moving horizontally using setCaretPosition() Edit: It appears the horizontal scroll bar is scrolling but it moves so little that it's barely noticeable. I can only see the very first pixel of the character. Is there a way to have the scrollbar center (or as much as possible) to the caret position?

    Read the article

  • How to change all selected chars to _ in Vim

    - by Kev
    I try to draw a class diagram using Vim. I fill the editor window with white-spaces. Type :match SpellBad /\s/ to highlight all the white-spaces. Ctrl+Q to select vertical white-spaces. Ctrl+I to insert Bar(|) and then Esc ........................... v+l +... + l to select horizontal white-spaces But I don't know how to change all selected horizontal white-spaces to underscore(_). I have to hit _ serval times. When comes to long horizontal line, it's bad. ___________ ___________ | | | | | BaseClass |/__________| Client | |___________|\ |___________| /_\ | |____________________________________ | | | _____|_____ _____|_____ _____|_____ | | | | | | | SubClass1 | | SubClass2 | | SubClass3 | |___________| |___________| |¦¦¦¦¦¦¦¦¦¦¦| I want a quick method to do this. Select it - Change it - Done! Maybe map F6 to do it. Thanks!

    Read the article

  • Can I add columns in a QListView in Qt ??

    - by Vic.
    Can I add columns in a QListView object?? here's something I found here: model->setHeaderData( 0, Qt::Horizontal, "numéro" ); model->setHeaderData( 1, Qt::Horizontal, "prénom" ); model->setHeaderData( 2, Qt::Horizontal, "nom" ); //... model->setData( model->index( line, 0 ), contact->num(), Qt::DisplayRole ); model->setData( model->index( line, 1 ), contact->prenom(), Qt::DisplayRole ); model->setData( model->index( line, 2 ), contact->nom(), Qt::DisplayRole ); Since I'm using Qt Creator 2.0.1, I figured my model would be: ui->ObjectName->model() The application builds successfully but I get a: "The program has unexpectedly finished." at runtime. Any Ideas ? Thanks.

    Read the article

  • Grandparent – Parent – Child Reports in SQL Developer

    - by thatjeffsmith
    You’ll never see one of these family stickers on my car, but I promise not to judge…much. Parent – Child reports are pretty straightforward in Oracle SQL Developer. You have a ‘parent’ report, and then one or more ‘child’ reports which are based off of a value in a selected row or value from the parent. If you need a quick tutorial to get up to speed on the subject, go ahead and take 5 minutes Shortly before I left for vacation 2 weeks agao, I got an interesting question from one of my Twitter Followers: @thatjeffsmith any luck with the #Oracle awr reports in #SQLDeveloper?This is easy with multi generation parent>child Done in #dbvisualizer — Ronald Rood (@Ik_zelf) August 26, 2012 Now that I’m back from vacation, I can tell Ronald and everyone else that the answer is ‘Yes!’ And here’s how Time to Get Out Your XML Editor Don’t have one? That’s OK, SQL Developer can edit XML files. While the Reporting interface doesn’t surface the ability to create multi-generational reports, the underlying code definitely supports it. We just need to hack away at the XML that powers a report. For this example I’m going to start simple. A query that brings back DEPARTMENTs, then EMPLOYEES, then JOBs. We can build the first two parts of the report using the report editor. A Parent-Child report in Oracle SQL Developer (Departments – Employees) Save the Report to XML Once you’ve generated the XML file, open it with your favorite XML editor. For this example I’ll be using the build-it XML editor in SQL Developer. SQL Developer Reports in their raw XML glory! Right after the PDF element in the XML document, we can start a new ‘child’ report by inserting a DISPLAY element. I just copied and pasted the existing ‘display’ down so I wouldn’t have to worry about screwing anything up. Note I also needed to change the ‘master’ name so it wouldn’t confuse SQL Developer when I try to import/open a report that has the same name. Also I needed to update the binds tags to reflect the names from the child versus the original parent report. This is pretty easy to figure out on your own actually – I mean I’m no real developer and I got it pretty quick. <?xml version="1.0" encoding="UTF-8" ?> <displays> <display id="92857fce-0139-1000-8006-7f0000015340" type="" style="Table" enable="true"> <name><![CDATA[Grandparent]]></name> <description><![CDATA[]]></description> <tooltip><![CDATA[]]></tooltip> <drillclass><![CDATA[null]]></drillclass> <CustomValues> <TYPE>horizontal</TYPE> </CustomValues> <query> <sql><![CDATA[select * from hr.departments]]></sql> </query> <pdf version="VERSION_1_7" compression="CONTENT"> <docproperty title="" author="" subject="" keywords="" /> <cell toppadding="2" bottompadding="2" leftpadding="2" rightpadding="2" horizontalalign="LEFT" verticalalign="TOP" wrap="true" /> <column> <heading font="Courier" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="FIRST_PAGE" /> <footing font="Courier" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="NONE" /> <blob blob="NONE" zip="false" /> </column> <table font="Courier" size="10" style="NORMAL" color="-16777216" userowshading="false" oddrowshading="-1" evenrowshading="-1" showborders="true" spacingbefore="12" spacingafter="12" horizontalalign="LEFT" /> <header enable="false" generatedate="false"> <data> null </data> </header> <footer enable="false" generatedate="false"> <data value="null" /> </footer> <security enable="false" useopenpassword="false" openpassword="" encryption="EXCLUDE_METADATA"> <permission enable="false" permissionpassword="" allowcopying="true" allowprinting="true" allowupdating="false" allowaccessdevices="true" /> </security> <pagesetup papersize="LETTER" orientation="1" measurement="in" margintop="1.0" marginbottom="1.0" marginleft="1.0" marginright="1.0" /> </pdf> <display id="null" type="" style="Table" enable="true"> <name><![CDATA[Parent]]></name> <description><![CDATA[]]></description> <tooltip><![CDATA[]]></tooltip> <drillclass><![CDATA[null]]></drillclass> <CustomValues> <TYPE>horizontal</TYPE> </CustomValues> <query> <sql><![CDATA[select * from hr.employees where department_id = EPARTMENT_ID]]></sql> <binds> <bind id="DEPARTMENT_ID"> <prompt><![CDATA[DEPARTMENT_ID]]></prompt> <tooltip><![CDATA[DEPARTMENT_ID]]></tooltip> <value><![CDATA[NULL_VALUE]]></value> </bind> </binds> </query> <pdf version="VERSION_1_7" compression="CONTENT"> <docproperty title="" author="" subject="" keywords="" /> <cell toppadding="2" bottompadding="2" leftpadding="2" rightpadding="2" horizontalalign="LEFT" verticalalign="TOP" wrap="true" /> <column> <heading font="Courier" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="FIRST_PAGE" /> <footing font="Courier" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="NONE" /> <blob blob="NONE" zip="false" /> </column> <table font="Courier" size="10" style="NORMAL" color="-16777216" userowshading="false" oddrowshading="-1" evenrowshading="-1" showborders="true" spacingbefore="12" spacingafter="12" horizontalalign="LEFT" /> <header enable="false" generatedate="false"> <data> null </data> </header> <footer enable="false" generatedate="false"> <data value="null" /> </footer> <security enable="false" useopenpassword="false" openpassword="" encryption="EXCLUDE_METADATA"> <permission enable="false" permissionpassword="" allowcopying="true" allowprinting="true" allowupdating="false" allowaccessdevices="true" /> </security> <pagesetup papersize="LETTER" orientation="1" measurement="in" margintop="1.0" marginbottom="1.0" marginleft="1.0" marginright="1.0" /> </pdf> <display id="null" type="" style="Table" enable="true"> <name><![CDATA[Child]]></name> <description><![CDATA[]]></description> <tooltip><![CDATA[]]></tooltip> <drillclass><![CDATA[null]]></drillclass> <CustomValues> <TYPE>horizontal</TYPE> </CustomValues> <query> <sql><![CDATA[select * from hr.jobs where job_id = :JOB_ID]]></sql> <binds> <bind id="JOB_ID"> <prompt><![CDATA[JOB_ID]]></prompt> <tooltip><![CDATA[JOB_ID]]></tooltip> <value><![CDATA[NULL_VALUE]]></value> </bind> </binds> </query> <pdf version="VERSION_1_7" compression="CONTENT"> <docproperty title="" author="" subject="" keywords="" /> <cell toppadding="2" bottompadding="2" leftpadding="2" rightpadding="2" horizontalalign="LEFT" verticalalign="TOP" wrap="true" /> <column> <heading font="Courier" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="FIRST_PAGE" /> <footing font="Courier" size="10" style="NORMAL" color="-16777216" rowshading="-1" labeling="NONE" /> <blob blob="NONE" zip="false" /> </column> <table font="Courier" size="10" style="NORMAL" color="-16777216" userowshading="false" oddrowshading="-1" evenrowshading="-1" showborders="true" spacingbefore="12" spacingafter="12" horizontalalign="LEFT" /> <header enable="false" generatedate="false"> <data> null </data> </header> <footer enable="false" generatedate="false"> <data value="null" /> </footer> <security enable="false" useopenpassword="false" openpassword="" encryption="EXCLUDE_METADATA"> <permission enable="false" permissionpassword="" allowcopying="true" allowprinting="true" allowupdating="false" allowaccessdevices="true" /> </security> <pagesetup papersize="LETTER" orientation="1" measurement="in" margintop="1.0" marginbottom="1.0" marginleft="1.0" marginright="1.0" /> </pdf> </display> </display> </display> </displays> Save the file and ‘Open Report…’ You’ll see your new report name in the tree. You just need to double-click it to open it. Here’s what it looks like running A 3 generation family Now Let’s Build an AWR Text Report Ronald wanted to have the ability to query AWR snapshots and generate the AWR reports. That requires a few inputs, including a START and STOP snapshot ID. That basically tells AWR what time period to use for generating the report. And here’s where it gets tricky. We’ll need to use aliases for the SNAP_ID column. Since we’re using the same column name from 2 different queries, we need to use different bind variables. Fortunately for us, SQL Developer’s clever enough to use the column alias as the BIND. Here’s what I mean: Grandparent Query SELECT snap_id start1, begin_interval_time, end_interval_time FROM dba_hist_snapshot ORDER BY 1 asc Parent Query SELECT snap_id stop1, begin_interval_time, end_interval_time, :START1 carry FROM dba_hist_snapshot WHERE snap_id > :START1 ORDER BY 1 asc And here’s where it gets even trickier – you can’t reference a bind from outside the parent query. My grandchild report can’t reference a value from the grandparent report. So I just carry the selected value down to the parent. In my parent query SELECT you see the ‘:START1′ at the end? That’s making that value available to me when I use it in my grandchild query. To complicate things a bit further, I can’t have a column name with a ‘:’ in it, or SQL Developer will get confused when I try to reference the value of the variable with the ‘:’ – and ‘::Name’ doesn’t work. But that’s OK, just alias it. Grandchild Query Select Output From Table(Dbms_Workload_Repository.Awr_Report_Text(1298953802, 1,:CARRY, :STOP1)); Ok, and the last trick – I hard-coded my report to use my database’s DB_ID and INST_ID into the AWR package call. Now a smart person could figure out a way to make that work on any database, but I got lazy and and ran out of time. But this should be far enough for you to take it from here. Here’s what my report looks like now: Caution: don’t run this if you haven’t licensed Enterprise Edition with Diagnostic Pack. The Raw XML for this AWR Report <?xml version="1.0" encoding="UTF-8" ?> <displays> <display id="927ba96c-0139-1000-8001-7f0000015340" type="" style="Table" enable="true"> <name><![CDATA[AWR Start Stop Report Final]]></name> <description><![CDATA[]]></description> <tooltip><![CDATA[]]></tooltip> <drillclass><![CDATA[null]]></drillclass> <CustomValues> <TYPE>horizontal</TYPE> </CustomValues> <query> <sql><![CDATA[SELECT snap_id start1, begin_interval_time, end_interval_time FROM dba_hist_snapshot ORDER BY 1 asc]]></sql> </query> <display id="null" type="" style="Table" enable="true"> <name><![CDATA[Stop SNAP_ID]]></name> <description><![CDATA[]]></description> <tooltip><![CDATA[]]></tooltip> <drillclass><![CDATA[null]]></drillclass> <CustomValues> <TYPE>horizontal</TYPE> </CustomValues> <query> <sql><![CDATA[SELECT snap_id stop1, begin_interval_time, end_interval_time, :START1 carry FROM dba_hist_snapshot WHERE snap_id > :START1 ORDER BY 1 asc]]></sql> </query> <display id="null" type="" style="Table" enable="true"> <name><![CDATA[AWR Report]]></name> <description><![CDATA[]]></description> <tooltip><![CDATA[]]></tooltip> <drillclass><![CDATA[null]]></drillclass> <CustomValues> <TYPE>horizontal</TYPE> </CustomValues> <query> <sql><![CDATA[Select Output From Table(Dbms_Workload_Repository.Awr_Report_Text(1298953802, 1,:CARRY, :STOP1 ))]]></sql> </query> </display> </display> </display> </displays> Should We Build Support for Multiple Levels of Reports into the User Interface? Let us know! A comment here or a suggestion on our SQL Developer Exchange might help your case!

    Read the article

  • How to bind mouse buttons to keys?

    - by Callum Rogers
    I have a Logitech MX400 Laser Mouse which has 5 buttons + 4 for vertical/horizontal scrolling. I would like it set up so instead of horizontal scrolling pressing right on the scrollwheel will send Ctrl+Tab and left will send Ctrl+Shift+Tab, which will allow me to cycle through tabs in browsers. Also, it would be nice if I could remap the middle button to one of the ones on the side as it is really hard to press down. Another bonus would be if I could write a script that allows me to define what buttons do what dependent on which window is currently active. I have tried using xmodmap but I could only see how to rearrange buttons, not have them send key signals. Thanks in advance. Button Map (using xev): Left 1 Middle 2 Right 3 ScrollUp 4 ScrollDown 5 ScrollLeft 6 ScrollRight 7 Backward 8 Forward 9

    Read the article

  • Changing mouse behaviour in EOG

    - by Wauzl
    When I open a photo in eog I can easily zoom with the mouse mouse wheel. This is kind of nice but since I have a touchpad with two-fingered scrolling and horizontal scrolling I'd rather scroll in the image and zoom by using Ctrl+Mouse Wheel? I basically want the same behaviour as in evince: Horizontal Scroll and Normal Scroll navigate within the image and Ctrl + Mouse Wheel zooms in and out. Is this possible somehow? [EDIT] I just figured out that what I want is already implemented: I can pan the image by using Ctrl + Mouse Wheel. This is fine as it is the behaviour I want only with the Ctrl inverted. But I cannot pan to the left. Up, down and right work fine. What's the problem?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >