Search Results

Search found 3172 results on 127 pages for 'middle earth'.

Page 7/127 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Position a UIView at the middle of a UITableView with CGRectZero frame

    - by Thomas Joulin
    Hi, I have a UITableViewController view a UITableView that I alloc/init with a frame of CGRectZero : self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; I want to add a view at the middle of the tableView (a loading view with a UIActivityIndicatorView and a UILabel), but I don't know how to position it, since I don't know the tableView frame. x = (self.tableview.frame.size.width - loadingView.frame.size.width) / 2.0; y = (self.tableview.frame.size.height - loadingView.frame.size.height) / 2.0; [loadingView setCenter:CGPointMake(x, y)]; I did init my tableView with CGRectZero frame so it can take the whole place available on screen (which it did), but I thought its frame would update or something. Any ideas ? Thanks !

    Read the article

  • Change page layout in the middle of a LaTeX document

    - by David
    I'm looking for a way to change some page layout dimensions in the middle of a LaTeX document. The reason is, I'd like to have smaller margins and longer lines in the "References" section of my report document (basically because short lines aren't so important there and I can save space). In my preamble I have (works fine): \setlength\textwidth{130mm} \setlength\oddsidemargin{14.6mm} In the document I simply try to re-set them at the right point but they're ignored. ... last paragraph ends here. \newpage \setlength\textwidth{150mm} % +20mm text width \setlength\oddsidemargin{13.6mm} % -10mm left margin (so it stays centered) References ... The geometry package is useful but only for global adjustments in the preamble, so I can't use it here. Is it not possible to change the page layout at some point in the document?

    Read the article

  • overflow-x AND Middle Mouse Button Moving

    - by Rad The Mad
    My Page is 980px in Width, but I have a few design elements (which belong with the background). I positioned them with position: absolute;. This creates a horizontal scrollbar for those who have a =< 1024 resolution. I disabled that scrollbar with overflow-x:hidden on (and for IE7 and etc). However, when I hold my middle mouse button,(i think this applies to laptop touchpads as well) it let's me move around to the right, is it possible to fix this with anything? (javascript, css)? Tested this issues in Chrome, IE, Firefox.

    Read the article

  • Quick-sort doesn't work with middle pivot element

    - by Bobby
    I am trying to sort an array of elements using quick-sort algorithm.But I am not sure where am I going wrong.I choose the middle element as pivot every time and then I am checking the conditions.Here is my code below. void quicksort(int *temp,int p,int r) { if(r>p+1) { int mid=(p+r)/2; int piv=temp[mid]; int left=p+1; int right=r; while(left < right) { if(temp[left]<=piv) left++; else swap(&temp[left],&temp[--right]); } swap(&temp[--left],&temp[p]); quicksort(temp,p,left); quicksort(temp,right,r); } }

    Read the article

  • create an hotspot and set an image without background (like earth icon) to my panel

    - by sirvan
    Hi I try to create an hotspot by Extends of canvas and I try to add it on a panel witch painted by images , so I must to draw an icon (image) instead of clear rectangle of the screen, to do that I override the paint method to draw the icon I want to use, so far there is no problem, the hotspot work true and the icon painted in true size I want(32,24 pixel) I try to add this hotspot after painting image on the my panel in mypanel.paint(g) that override too. The problem , I use an car icon that have no background !!(I hope you can understand me) just car icon must be show on the panel that painted with my images; But an unwanted rectangle created around the icon and made bad view, How I can paint may icon on panel without that background? Please help me.

    Read the article

  • Switching back into the middle of a function in Actionscript

    - by J.Ded.
    I need to return to my original function after capturing an event (downloading something) with another function. The original function needs to return a value, which depends on the downloaded data. So, I'd like to pause original function for the time needed for the download and the eventhandler function to complete it's work, and resume it afterwards. The obvious way is to set a flag value (both the original function and the eventhandler are within the same class) and make the original function check it until the eventhandler function changes the flag. But that would be wasteful, and my AS is slow enough already:) [other parts of the application utilise some heavy graphics]. Is there another way? Like an event that gets captured "in the middle" of the function? Or some other form of flow control?

    Read the article

  • Remoting server forcibly closing client connections in the middle of remote calls

    - by Carsten Hess
    Hello everyone. I have a system consisting of a server accepting remoting calls from clients with TCP as the underlying transportlayer. It normally works like a charm, but if I increase the no. of clients, the server starts at random to close the TCP connections in the middle of the calls. Not all calls are interrupted this way. That is really unexpected behaviour... I get no exceptions on the server side, just the client side exception: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host Server stack trace: ved System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) ved System.Runtime.Remoting.Channels.SocketStream.Read(Byte[] buffer, Int32 offset, Int32 size) ved System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] buffer, Int32 offset, Int32 count) ved System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer, Int32 offset, Int32 count) ved System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[] buffer) ved System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadAndMatchPreamble() ved System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16& operation) ved System.Runtime.Remoting.Channels.Tcp.TcpClientSocketHandler.ReadHeaders() ved System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream) ved System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: ved System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) ved System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) ved EBH.GuG.AgentKit.Transports.RemotingAgentHostEndPoint.SyncInvoke(Agent a, Int32 port)

    Read the article

  • Position an icon on the right in the middle of a list item

    - by Andy
    I have the following code which prints an img if the current page is selected. The issue i have is if the list item is a varied height i cant position it in the middle of the list item on the far right... <li><?php echo $child->link($child->title); ?><?php echo (url_start_with($child->url) ? '<img src="images/ico-arrow.png" class="pointer">': null); ?></li> how can i ammend the "TOP" so that it will position itself vertically no matter what the height using css #bf-fest-list li { margin:0; padding:5px 25px; position:relative; } #bf-fest-list li a:hover { color:#ec1c23; text-decoration:none; } #bf-fest-list li.current { background:#a0a1a4; padding:10px 25px; } #bf-fest-list li.current a { color:#FFF; } #bf-fest-list li .pointer { position:absolute; top:10px; left:233px; }

    Read the article

  • Add centered text to the middle of a <hr/>-like line

    - by Brian M. Hunt
    I'm wondering what options one has in xhtml 1.0 strict to create a line on both sides of text like-so: Section one ----------------------- Next section ----------------------- Section two I've thought of doing some fancy things like this: <div style="float:left; width: 44%;"><hr/></div> <div style="float:right; width: 44%;"><hr/></div> Next section Or alternatively, because the above has problems with alignment (both vertical and horizontal): <table><tr> <td style="width:47%"><hr/></td> <td style="vertical-align:middle; text-align: center">Next section</td> <td style="width:47%"><hr/></td> </tr></table> However both options feel 'fudgy', and I'd be much obliged if you happened to have seen this before and know of an elegant solution. Thank you for reading. Brian

    Read the article

  • Exiting from the Middle of an Expression Without Using Exceptions

    - by Jon Purdy
    Is there a way to emulate the use of flow-control constructs in the middle of an expression? Is it possible, in a comma-delimited expression x, y, for y to cause a return? Edit: I'm working on a compiler for something rather similar to a functional language, and the target language is C++. Everything is an expression in the source language, and the sanest, simplest translation to the destination language leaves as many things expressions as possible. Basically, semicolons in the target language become C++ commas. In-language flow-control constructs have presented no problems thus far; it's only return. I just need a way to prematurely exit a comma-delimited expression, and I'd prefer not to use exceptions unless someone can show me that they don't have excessive overhead in this situation. The problem of course is that most flow-control constructs are not legal expressions in C++. The only solution I've found so far is something like this: try { return x(), // x(); (1 ? throw Return(0) : 0); // return 0; } catch (Return& ret) { return ref.value; } The return statement is always there (in the event that a Return construct is not reached), and as such the throw has to be wrapped in ?: to get the compiler to shut up about its void result being used in an expression. I would really like to avoid using exceptions for flow control, unless in this case it can be shown that no particular overhead is incurred; does throwing an exception cause unwinding or anything here? This code needs to run with reasonable efficiency. I just need a function-level equivalent of exit().

    Read the article

  • Simple C++ code (what's wrong here?)

    - by JW
    Noob to C++. I'm trying to get user input (Last Name, First Name Middle Name), change part of it (Middle Name to Middle Initial) and then rearrange it (First Middle Initial Last). Where am I messing up in my code? --Thanks for ANY help you can offer! ... #include <iostream> using std::cout; using std::cin; #include <string> using std::string; int main() { string myString, last, first, middle; cout << "Enter your name: Last, First Middle"; cin >> last >> first >> middle; char comma, space1, space2; comma = myString.find_first_of(','); space1 = myString.find_first_of(' '); space2 = myString.find_last_of(' '); last = myString.substr (0, comma); // user input last name first = myString.substr (space1+1, -1); // user input first name middle = myString.substr (space2+1, -1); // user input middle name middle.insert (0, space2+1); // inserts middle initial in front of middle name middle.erase (1, -1); // deletes full middle name, leaving only middle initial myString = first + ' ' + middle + ' ' + last; // return 0; }

    Read the article

  • ajax panel update during the middle of a function C# ASP.net site

    - by user2615302
    ajax panel update during the middle of a function C# ASP.net site This is the button click. I would like to update LbError.Text to "" before the rest of the function continues. This is my current code. protected void BUpload_Click(object sender, EventArgs e) { LbError.Text = ""; UpdatePanel1.Update(); //// need it to update here before it moves on but it waits till the end to update the lablel Exicute functions..... ....... ....... } <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <contenttemplate> <asp:Label ID="LbError" runat="server" CssClass="failureNotification" Text=""></asp:Label> <br /><br /> <br /><br /> <asp:TextBox ID="NewData" runat="server"></asp:TextBox><br /> then click <asp:Button ID="BUpload" runat="server" Text="Upload New Data" onclick="BUpload_Click"/><br /> Things i have tried include have another UpdatePanel just and same results. any help would be greatly appreciated.

    Read the article

  • Remove key from known_hosts

    - by Adam Matan
    Hi, I have built several virtual machines during the last few weeks. The problem is, the .ssh/known_hosts gives me the Man in the middle warning. This happens because another fingerprint is associated with the virtual machine IP. In the .ssh/known_hosts file, however, I don't seem to find the record related to the IP, only two bizarre, key-like strings and "ssh-rsa". Any ideas how to remove the old key from known_hosts? Thanks, Udi

    Read the article

  • Centering Div in the middle of the page

    - by shinjuo
    What is the best way to center the entire page in the middle of the web browser? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>test.html</title> <style type="text/css"> .testimonials_png { position: absolute; left:20px; top:397px; width:220px; height:395px; background: url("test_files/testimonials.png") no-repeat; } .homeLink_png { position: absolute; left:-1px; top:243px; width:203px; height:75px; background: url("test_files/homeLink.png") no-repeat; } .sidingLink_png { position: absolute; left:202px; top:243px; width:180px; height:75px; background: url("test_files/sidingLink.png") no-repeat; } .windowsLink_png { position: absolute; left:382px; top:243px; width:181px; height:75px; background: url("test_files/windowsLink.png") no-repeat; } .roofingLink_png { position: absolute; left:563px; top:243px; width:183px; height:75px; background: url("test_files/roofingLink.png") no-repeat; } .aboutLink_png { position: absolute; left:746px; top:243px; width:205px; height:75px; background: url("test_files/aboutLink.png") no-repeat; } .banner_png { position: absolute; left:0px; top:0px; width:950px; height:243px; background: url("test_files/banner.png") no-repeat; } </style> </head> <body> <div class="testimonials_png"> </div> <div class="homeLink_png"> </div> <div class="sidingLink_png"> </div> <div class="windowsLink_png"> </div> <div class="roofingLink_png"> </div> <div class="aboutLink_png"> </div> <div class="banner_png"> </div> </body> </html>

    Read the article

  • How can I learn a multitouch screen's communication protocol and write a C# application for it?

    - by puri
    I have got a monitor with multitouch overlay on top of it. It works fine with Windows 7 but I want to write a multitouch application in C# for Windows XP which doesn't support touch feature out of the box. There is no documentation whatsoever and I emailed the manufacturer but never got a reply. However the device works with Google Earth, which doesn't natively support multitouch, on Windows XP. So I think it generates many types of messages together i.e. WM_TOUCH for Windows 7, one for Google Earth COM API, and probably its own messages either in UDP or Windows message form. How can I trap all communications and learn the protocol?

    Read the article

  • Why does GetClusterShape return null when the cluster specification was retrieved through the GetClu

    - by Markus Olsson
    Suppose I have a virtual earth shape layer called shapeLayer1 (my creative energy is apparently at an alltime low). When i call the GetClusteredShapes method I get an array of VEClusterSpecification objects that represent each and every one of my currently visible clusters; no problem there. But when I call the GetClusterShape() method it returns null... null! Why on earth would it do that? I used firebug to confirm that the private variable of the VEClusterSpecification that's supposed to hold a reference to the shape is indeed null so it's not the method that's causing the problem. Some have suggested that this is actually documented behavior Returns null if a VEClusterSpecification object was returned from the VEShapeLayer.GetClusteredShapes Method But looking at the current MSDN documentation for the VEShape class it says: Returns if a VEClusterSpecification object was returned from the VEShapeLayer.GetClusteredShapes Method Is this a bug or a feature? Is there any known workarounds or (if it is a bug) some plan on when they are going to fix it?

    Read the article

  • Place text based divs in relative locations within a circle

    - by NickG
    Direct question - How would I place certain objects or small text within a certain area. For example, how would I replace the following image with html/javascript. --- I don't have enough reps to post an image :/ but try this URL - http://i.imgur.com/a3eWL.jpg Big picture - I am trying to create a kml file for Google Earth that when the point is clicked, the balloon description window pops up and I can display my html formatted diagram showing where the satellites are at that instant. Google Earth and KML docs allow for pretty much any html formatting within it, so currently looking for a good way to do this. Disclaimer: It has been a few years since i have done any html or javascript editing, so general examples and insight is greatful. Thanks

    Read the article

  • How to remove strict RSA key checking in SSH and what's the problem here?

    - by setatakahashi
    I have a Linux server that whenever I connect it shows me the message that changed the SSH host key: $ ssh root@host1 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. The fingerprint for the RSA key sent by the remote host is 93:a2:1b:1c:5f:3e:68:47:bf:79:56:52:f0:ec:03:6b. Please contact your system administrator. Add correct host key in /home/emerson/.ssh/known_hosts to get rid of this message. Offending key in /home/emerson/.ssh/known_hosts:377 RSA host key for host1 has changed and you have requested strict checking. Host key verification failed. It keeps me for a very few seconds logged in and then it closes the connection. host1:~/.ssh # Read from remote host host1: Connection reset by peer Connection to host1 closed. Does anyone know what's happening and what I could do to solve this problem?

    Read the article

  • .htaccess rewrite rule to add a string in the middle of the URL

    - by Mike Crittenden
    Using a .htaccess rewrite rule, I need to add "?q=" before the path on any URL's containing the word "imagecache" Therefore, if the URL is: http://mysite.com/sites/default/files/imagecache/myimage.jpg ...then it will really try: http://mysite.com/?q=sites/default/files/imagecache/myimage.jpg But that will ONLY happen if the URL contains "imagecache." Otherwise, it does no rewriting. Also, this will only happen if /sites/default/files/imagecache/myimage.jpg isn't already an existing image file. I believe I can do that using: RewriteCond %{REQUEST_FILENAME} !-f ...right? It's just the first part that I can't figure out.

    Read the article

  • Implementing touch-based rotation in cocoa touch

    - by ewoo
    I am wondering what is the best way to implement rotation-based dragging movements in my iPhone application. I have a UIView that I wish to rotate around its centre, when the users finger is touch the view and they move it. Think of it like a dial that needs to be adjusted with the finger. The basic question comes down to: 1) Should I remember the initial angle and transform when touchesBegan is called, and then every time touchesMoved is called apply a new transform to the view based on the current position of the finger, e.g., something like: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self]; //current position of touch if (([touch view] == self) && [Utility getDistance:currentPoint toPoint:self.middle] <= ROTATE_RADIUS //middle is centre of view && [Utility getDistance:currentPoint toPoint:self.middle] >= MOVE_RADIUS) { //will be rotation gesture //remember state of view at beginning of touch CGPoint top = CGPointMake(self.middle.x, 0); self.initialTouch = currentPoint; self.initialAngle = angleBetweenLines(self.middle, top, self.middle, currentPoint); self.initialTransform = self.transform; } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self]; //current position of touch if (([touch view] == self) && [Utility getDistance:currentPoint toPoint:self.middle] <= ROTATE_RADIUS && [Utility getDistance:currentPoint toPoint:self.middle] >= MOVE_RADIUS) { //a rotation gesture //rotate tile float newAngle = angleBetweenLines(self.middle, CGPointMake(self.middle.x, 0), self.middle, currentPoint); //touch angle float angleDif = newAngle - self.initialAngle; //work out dif between angle at beginning of touch and now. CGAffineTransform newTransform = CGAffineTransformRotate(self.initialTransform, angleDif); //create new transform self.transform = newTransform; //apply transform. } OR 2) Should I simply remember the last known position/angle, and rotate the view based on the difference in angle between that and now, e.g.,: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self]; //current position of touch if (([touch view] == self) && [Utility getDistance:currentPoint toPoint:self.middle] <= ROTATE_RADIUS && [Utility getDistance:currentPoint toPoint:self.middle] >= MOVE_RADIUS) { //will be rotation gesture //remember state of view at beginning of touch CGPoint top = CGPointMake(self.middle.x, 0); self.lastTouch = currentPoint; self.lastAngle = angleBetweenLines(self.middle, top, self.middle, currentPoint); } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint currentPoint = [touch locationInView:self]; //current position of touch if (([touch view] == self) && [Utility getDistance:currentPoint toPoint:middle] <= ROTATE_RADIUS && [Utility getDistance:currentPoint toPoint:middle] >= MOVE_RADIUS) { //a rotation gesture //rotate tile float newAngle = angleBetweenLines(self.middle, CGPointMake(self.middle.x, 0), self.middle, currentPoint); //touch angle float angleDif = newAngle - self.lastAngle; //work out dif between angle at beginning of touch and now. CGAffineTransform newTransform = CGAffineTransformRotate(self.transform, angleDif); //create new transform self.transform = newTransform; //apply transform. self.lastTouch = currentPoint; self.lastAngle = newAngle; } The second option makes more sense to me, but it is not giving very pleasing results (jaggy updates and non-smooth rotations). Which way is best (if any), in terms of performance? Cheers!

    Read the article

  • Recommend .NET data access layer/middle tier

    - by Simon G
    Hi, I'm currently creating an MVC application that will likely to expand to include a silverlight, wpf and possible windows phone all using the same data. So I've created a class library to keep all my objects in and I've created the MVC app. My question is what would be the best way to access the data? Taking into account possible expansion in the future. Should I use web services/WCF? RIA Services? Remoting? Or something else. What have people used in the past and what do you recommend? Thanks

    Read the article

  • JQuery treeview - add node(s) in middle of tree

    - by Chris
    Hi all, I'm just getting started with JQuery and the treeview plugin so this should be a relatively easy question: The example code for adding branches to the tree: var newnodes = $("<li><span class='folder'>New Sublist</span><ul>" + "<li><span class='file'>Item1</span></li>" + "<li><span class='file'>Item2</span></li></ul></li>").appendTo("#browser"); $("#browser").treeview({ add: branches }); Works fine for me, but adds the new branch at the end of the tree - instead what I want is to be able to select a specific node and add to that branch. I've managed to get the node being added by using the id of the particular node instead of the whole treeview in - appendTo("nodeID") However I can't get the tree to render correctly, either with: $("nodeID").treeview({ add: branches }); or $("browser").treeview({ add: branches }); or calling it on both without arguments. Cheers in advance

    Read the article

  • 3 columns layout, want middle column to stretch wider when column 1 and 3 are empty

    - by Blankman
    I have a 3 column layout using table-less design. <div id="main"> <div id="left"></div> <div id="content"></div> <div id="right"></div> </div> The CSS: #left {width: 200px;float:left;display:inline;} #content {width: 600px;float:left;display:inline;padding: 0 10px;} #right {width: 160px;float:left;display:inline;} I am using a web application, and I can't change the layout. By can't change, I mean the div's with left/content/right cannot be removed. On some pages, both the left and right columns are completely empty. And I want the #content div to expand more than the 600px. is this possible, without altering the HTML? What are my options? Thanks allot!

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >