Search Results

Search found 17973 results on 719 pages for 'x frame options'.

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

  • 8 Things You Can Do In Android’s Developer Options

    - by Chris Hoffman
    The Developer Options menu in Android is a hidden menu with a variety of advanced options. These options are intended for developers, but many of them will be interesting to geeks. You’ll have to perform a secret handshake to enable the Developer Options menu in the Settings screen, as it’s hidden from Android users by default. Follow the simple steps to quickly enable Developer Options. Enable USB Debugging “USB debugging” sounds like an option only an Android developer would need, but it’s probably the most widely used hidden option in Android. USB debugging allows applications on your computer to interface with your Android phone over the USB connection. This is required for a variety of advanced tricks, including rooting an Android phone, unlocking it, installing a custom ROM, or even using a desktop program that captures screenshots of your Android device’s screen. You can also use ADB commands to push and pull files between your device and your computer or create and restore complete local backups of your Android device without rooting. USB debugging can be a security concern, as it gives computers you plug your device into access to your phone. You could plug your device into a malicious USB charging port, which would try to compromise you. That’s why Android forces you to agree to a prompt every time you plug your device into a new computer with USB debugging enabled. Set a Desktop Backup Password If you use the above ADB trick to create local backups of your Android device over USB, you can protect them with a password with the Set a desktop backup password option here. This password encrypts your backups to secure them, so you won’t be able to access them if you forget the password. Disable or Speed Up Animations When you move between apps and screens in Android, you’re spending some of that time looking at animations and waiting for them to go away. You can disable these animations entirely by changing the Window animation scale, Transition animation scale, and Animator duration scale options here. If you like animations but just wish they were faster, you can speed them up. On a fast phone or tablet, this can make switching between apps nearly instant. If you thought your Android phone was speedy before, just try disabling animations and you’ll be surprised how much faster it can seem. Force-Enable FXAA For OpenGL Games If you have a high-end phone or tablet with great graphics performance and you play 3D games on it, there’s a way to make those games look even better. Just go to the Developer Options screen and enable the Force 4x MSAA option. This will force Android to use 4x multisample anti-aliasing in OpenGL ES 2.0 games and other apps. This requires more graphics power and will probably drain your battery a bit faster, but it will improve image quality in some games. This is a bit like force-enabling antialiasing using the NVIDIA Control Panel on a Windows gaming PC. See How Bad Task Killers Are We’ve written before about how task killers are worse than useless on Android. If you use a task killer, you’re just slowing down your system by throwing out cached data and forcing Android to load apps from system storage whenever you open them again. Don’t believe us? Enable the Don’t keep activities option on the Developer options screen and Android will force-close every app you use as soon as you exit it. Enable this app and use your phone normally for a few minutes — you’ll see just how harmful throwing out all that cached data is and how much it will slow down your phone. Don’t actually use this option unless you want to see how bad it is! It will make your phone perform much more slowly — there’s a reason Google has hidden these options away from average users who might accidentally change them. Fake Your GPS Location The Allow mock locations option allows you to set fake GPS locations, tricking Android into thinking you’re at a location where you actually aren’t. Use this option along with an app like Fake GPS location and you can trick your Android device and the apps running on it into thinking you’re at locations where you actually aren’t. How would this be useful? Well, you could fake a GPS check-in at a location without actually going there or confuse your friends in a location-tracking app by seemingly teleporting around the world. Stay Awake While Charging You can use Android’s Daydream Mode to display certain apps while charging your device. If you want to force Android to display a standard Android app that hasn’t been designed for Daydream Mode, you can enable the Stay awake option here. Android will keep your device’s screen on while charging and won’t turn it off. It’s like Daydream Mode, but can support any app and allows users to interact with them. Show Always-On-Top CPU Usage You can view CPU usage data by toggling the Show CPU usage option to On. This information will appear on top of whatever app you’re using. If you’re a Linux user, the three numbers on top probably look familiar — they represent the system load average. From left to right, the numbers represent your system load over the last one, five, and fifteen minutes. This isn’t the kind of thing you’d want enabled most of the time, but it can save you from having to install third-party floating CPU apps if you want to see CPU usage information for some reason. Most of the other options here will only be useful to developers debugging their Android apps. You shouldn’t start changing options you don’t understand. If you want to undo any of these changes, you can quickly erase all your custom options by sliding the switch at the top of the screen to Off.     

    Read the article

  • How to Force Graphics Options in PC Games with NVIDIA, AMD, or Intel Graphics

    - by Chris Hoffman
    PC games usually have built-in graphics options you can change. But you’re not limited to the options built into games — the graphics control panels bundled with graphics drivers allow you to tweak options from outside PC games. For example, these tools allow you to force-enabling antialiasing to make old games look better, even if they don’t normally support it. You can also reduce graphics quality to get more performance on slow hardware. If You Don’t See These Options If you don’t have the NVIDIA Control Panel, AMD Catalyst Control Center, or Intel Graphics and Media Control Panel installed, you may need to install the appropriate graphics driver package for your hardware from the hardware manufacturer’s website. The drivers provided via Windows Update don’t include additional software like the NVIDIA Control Panel or AMD Catalyst Control Center. Drivers provided via Windows Update are also more out of date. If you’re playing PC games, you’ll want to have the latest graphics drivers installed on your system. NVIDIA Control Panel The NVIDIA Control Panel allows you to change these options if your computer has NVIDIA graphics hardware. To launch it, right-click your desktop background and select NVIDIA Control Panel. You can also find this tool by performing a Start menu (or Start screen) search for NVIDIA Control Panel or by right-clicking the NVIDIA icon in your system tray and selecting Open NVIDIA Control Panel. To quickly set a system-wide preference, you could use the Adjust image settings with preview option. For example, if you have old hardware that struggles to play the games you want to play, you may want to select “Use my preference emphasizing” and move the slider all the way to “Performance.” This trades graphics quality for an increased frame rate. By default, the “Use the advanced 3D image settings” option is selected. You can select Manage 3D settings and change advanced settings for all programs on your computer or just for specific games. NVIDIA keeps a database of the optimal settings for various games, but you’re free to tweak individual settings here. Just mouse-over an option for an explanation of what it does. If you have a laptop with NVIDIA Optimus technology — that is, both NVIDIA and Intel graphics — this is the same place you can choose which applications will use the NVIDIA hardware and which will use the Intel hardware. AMD Catalyst Control Center AMD’s Catalyst Control Center allows you to change these options on AMD graphics hardware. To open it, right-click your desktop background and select Catalyst Control Center. You can also right-click the Catalyst icon in your system tray and select Catalyst Control Center or perform a Start menu (or Start screen) search for Catalyst Control Center. Click the Gaming category at the left side of the Catalyst Control Center window and select 3D Application Settings to access the graphics settings you can change. The System Settings tab allows you to configure these options globally, for all games. Mouse over any option to see an explanation of what it does. You can also set per-application 3D settings and tweak your settings on a per-game basis. Click the Add option and browse to a game’s .exe file to change its options. Intel Graphics and Media Control Panel Intel integrated graphics is nowhere near as powerful as dedicated graphics hardware from NVIDIA and AMD, but it’s improving and comes included with most computers. Intel doesn’t provide anywhere near as many options in its graphics control panel, but you can still tweak some common settings. To open the Intel graphics control panel, locate the Intel graphics icon in your system tray, right-click it, and select Graphics Properties. You can also right-click the desktop and select Graphics Properties. Select either Basic Mode or Advanced Mode. When the Intel Graphics and Media Control Panel appears, select the 3D option. You’ll be able to set your Performance or Quality setting by moving the slider around or click the Custom Settings check box and customize your Anisotropic Filtering and Vertical Sync preference. Different Intel graphics hardware may have different options here. We also wouldn’t be surprised to see more advanced options appear in the future if Intel is serious about competing in the PC graphics market, as they say they are. These options are primarily useful to PC gamers, so don’t worry about them — or bother downloading updated graphics drivers — if you’re not a PC gamer and don’t use any intensive 3D applications on your computer. Image Credit: Dave Dugdale on Flickr     

    Read the article

  • iPhone smooth move and pinch of UIImageView

    - by Jacob
    I have an image view that I'm wanting to be able to move around, and pinch to stretch it. It's all working, but it's kinda jumpy when I start to do any pinch movements. The position will jump back and forth between the two fingers. - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { startLocation = [[touches anyObject] locationInView:mouth_handle]; if([touches count] == 2) { NSArray *twoTouches = [touches allObjects]; UITouch *first = [twoTouches objectAtIndex:0]; UITouch *second = [twoTouches objectAtIndex:1]; initialDistance = distanceBetweenPoints([first locationInView:mouth_handle],[second locationInView:mouth_handle]); } } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { CGPoint pt = [[touches anyObject] locationInView:mouth_handle]; CGRect frame = [mouth_handle frame]; frame.origin.x += pt.x - startLocation.x; frame.origin.y += pt.y - startLocation.y; frame.origin.x = (frame.origin.x < 58) ? 58 : frame.origin.x; frame.origin.x = (frame.origin.x > (260 - mouth_handle.frame.size.width)) ? (260 - mouth_handle.frame.size.width) : frame.origin.x; frame.origin.y = (frame.origin.y < 300) ? 300 : frame.origin.y; frame.origin.y = (frame.origin.y > 377) ? 377 : frame.origin.y; if(frame.origin.x - prevDistanceX > 2 && frame.origin.x - prevDistanceX < -2) frame.origin.x = prevDistanceX; if(frame.origin.y - prevDistanceY > 2 && frame.origin.y - prevDistanceY < -2) frame.origin.y = prevDistanceY; prevDistanceX = frame.origin.x; prevDistanceY = frame.origin.y; CGFloat handleWidth = mouth_handle.frame.size.width; if([touches count] == 2) { NSArray *twoTouches = [touches allObjects]; UITouch *first = [twoTouches objectAtIndex:0]; UITouch *second = [twoTouches objectAtIndex:1]; CGFloat currentDistance = distanceBetweenPoints([first locationInView:mouth_handle],[second locationInView:mouth_handle]); handleWidth = mouth_handle.frame.size.width + (currentDistance - initialDistance); handleWidth = (handleWidth < 60) ? 60 : handleWidth; handleWidth = (handleWidth > 150) ? 150 : handleWidth; if(initialDistance == 0) { initialDistance = currentDistance; } initialDistance = currentDistance; } mouth_handle.frame = CGRectMake(frame.origin.x, frame.origin.y, handleWidth, 15); } Any thoughts on how to make this smoother?

    Read the article

  • frame lock networking

    - by kochol
    I'm developing an RTS game and I want to add multiplayer support to my game. I picked the easiest technique to implement for start frame locking technique. I used server client networking architecture (I think it's my first mistake I think using peer to peer is a better one for this) On game update every clients send their commands and maybe receive some command then render the frame and wait for all clients to send their update complete message then all of them can go for the next frame. I send commands and all logic is calculated on the clients based on commands but the clients can go out of sync easily. Every AI controlled units make different decisions on each clients What I have to do to sync my game? Do you suggest me a better network architecture or technique?

    Read the article

  • Resize content for "frame" on .aspx page which draws product content from suppliers' page

    - by zenbike
    I have a retail store site, no online sales, which displays the webpage of our supplier in a "frame" in order to have the most accurate and up to date information for our customers. (example) My issue is that the size of the page it is pulling in doesn't fit in the frame. It looks pretty poor, and part of the content is obscured. Is there a way to scale the content drawn in to the size of the frame? The same site also has an intermittent issue with the Flash banner loading. When it doesn't load, the layout of the header on the page is awful. Any ideas there will also be appreciated.

    Read the article

  • How to change color of the frame of a maximizing window

    - by SteliosSk
    Though I have read and tried some advises regarding the change of colors in a theme, I found no answer regarding my question, which is: When I drag a window to the left (or right or up) side of the screen an orange frame shows up, indicating the area that the window will occupy. This frame is in orange. Can you please inform me how can I change this color to blueish, to match my theme? At this point, I would like to inform you that Zorin OS has this blueish frame instead of orange, but I do not know where this color comes from.

    Read the article

  • Cross-platform configuration, options, settings, preferences, defaults

    - by hippietrail
    I'm interested in peoples' views on how best to store preferences and default settings in cross-platform applications. I primarily work in Perl on *nix and Windows but I'm also interested in the bigger picture. In the *nix world "dotfiles" (and directories) are very common with system-wide or application default settings generally residing in one path and user-specific settings in the home directory. Such files and dirs begin with a dot "." and are hidden by default from directory listings. Windows has the registry which also has paths for defaults and per-user overrides. Certain cross-platforms do it their own way, Firefox uses JavaScript preference files. Should a cross-platform app use one system across platforms or say dotfiles on *nix and registry on Windows? Does your favourite programming language have a library or module for accessing them in a standard way? Is there an emerging best practice or does everybody roll their own?

    Read the article

  • Handle complex options with Boost's program_options

    - by R S
    I have a program that generates graphs using different multi-level models. Each multi-level model consists of a generation of a smaller seed graph (say, 50 nodes) which can be created from several models (for example - for each possible edge, choose to include it with probability p). After the seed graph generation, the graph is expanded into a larger one (say 1000 nodes), using one of another set of models. In each of the two stages, each model require a different number of parameters. I would like to be have program_options parse the different possible parameters, according to the names of the models. For example, say I have two seed graphs models: SA, which has 1 parameters, and SB, which has two. Also for the expansion part, I have two models: A and B, again with 1 and 2 parameters, respectively. I would like to be able do something like: ./graph_generator --seed=SA 0.1 --expansion=A 0.2 ./graph_generator --seed=SB 0.1 3 --expansion=A 0.2 ./graph_generator --seed=SA 0.1 --expansion=B 10 20 ./graph_generator --seed=SB 0.1 3 --expansion=B 10 20 and have the parameters parsed correctly. Is that even possible?

    Read the article

  • keyDown works but i get beeps

    - by Oscar
    I just got my keydown method to work. But i get system beep everytime i press key. i have no idea whats wrong. Googled for hours and all people say is that if you have your keyDown method you should also implement the acceptsFirstResponder. did that to and it still doesn't work. #import <Cocoa/Cocoa.h> #import "PaddleView.h" #import "BallView.h" @interface GameController : NSView { PaddleView *leftPaddle; PaddleView *rightPaddle; BallView * ball; CGPoint ballVelocity; int gameState; int player1Score; int player2Score; } @property (retain) IBOutlet PaddleView *leftPaddle; @property (retain) IBOutlet PaddleView *rightPaddle; @property (retain) IBOutlet BallView *ball; - (void)reset:(BOOL)newGame; @end #import "GameController.h" #define GameStateRunning 1 #define GameStatePause 2 #define BallSpeedX 0.2 #define BallSpeedY 0.3 #define CompMoveSpeed 15 #define ScoreToWin 5 @implementation GameController @synthesize leftPaddle, rightPaddle, ball; - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if(self) { gameState = GameStatePause; ballVelocity = CGPointMake(BallSpeedX, BallSpeedY); [NSTimer scheduledTimerWithTimeInterval:0.001 target:self selector:@selector(gameLoop) userInfo:nil repeats:YES]; } return self; } - (void)gameLoop { if(gameState == GameStateRunning) { [ball setFrameOrigin:CGPointMake(ball.frame.origin.x + ballVelocity.x, ball.frame.origin.y + ballVelocity.y)]; if(ball.frame.origin.x + 15 > self.frame.size.width || ball.frame.origin.x < 0) { ballVelocity.x =- ballVelocity.x; } if(ball.frame.origin.y + 35 > self.frame.size.height || ball.frame.origin.y < 0) { ballVelocity.y =- ballVelocity.y; } } if(CGRectIntersectsRect(ball.frame, leftPaddle.frame)) { if(ball.frame.origin.x > leftPaddle.frame.origin.x) { ballVelocity.x =- ballVelocity.x; } } if(CGRectIntersectsRect(ball.frame, rightPaddle.frame)) { if(ball.frame.origin.x +15 > rightPaddle.frame.origin.x) { ballVelocity.x =- ballVelocity.x; } } if(ball.frame.origin.x <= self.frame.size.width / 2) { if(ball.frame.origin.y < leftPaddle.frame.origin.y + 75 && leftPaddle.frame.origin.y > 0) { [leftPaddle setFrameOrigin:CGPointMake(leftPaddle.frame.origin.x, leftPaddle.frame.origin.y - CompMoveSpeed)]; } if(ball.frame.origin.y > leftPaddle.frame.origin.y +75 && leftPaddle.frame.origin.y < 700 - leftPaddle.frame.size.height ) { [leftPaddle setFrameOrigin:CGPointMake(leftPaddle.frame.origin.x, leftPaddle.frame.origin.y + CompMoveSpeed)]; } } if(ball.frame.origin.x <= 0) { player2Score++; [self reset:(player2Score >= ScoreToWin)]; } if(ball.frame.origin.x + 15 > self.frame.size.width) { player1Score++; [self reset:(player1Score >= ScoreToWin)]; } } - (void)reset:(BOOL)newGame { gameState = GameStatePause; [ball setFrameOrigin:CGPointMake((self.frame.size.width + 7.5) / 2, (self.frame.size.height + 7.5)/2)]; if(newGame) { if(player1Score > player2Score) { NSLog(@"Player 1 Wins!"); } else { NSLog(@"Player 2 Wins!"); } player1Score = 0; player2Score = 0; } else { NSLog(@"Press key to serve"); } NSLog(@"Player 1: %d",player1Score); NSLog(@"Player 2: %d",player2Score); } - (void)moveRightPaddleUp { if(rightPaddle.frame.origin.y < 700 - rightPaddle.frame.size.height) { [rightPaddle setFrameOrigin:CGPointMake(rightPaddle.frame.origin.x, rightPaddle.frame.origin.y + 20)]; } } - (void)moveRightPaddleDown { if(rightPaddle.frame.origin.y > 0) { [rightPaddle setFrameOrigin:CGPointMake(rightPaddle.frame.origin.x, rightPaddle.frame.origin.y - 20)]; } } - (BOOL)acceptsFirstResponder { return YES; } - (void)keyDown:(NSEvent *)theEvent { if ([theEvent modifierFlags] & NSNumericPadKeyMask) { NSString *theArrow = [theEvent charactersIgnoringModifiers]; unichar keyChar = 0; if ( [theArrow length] == 0 ) { return; // reject dead keys } if ( [theArrow length] == 1 ) { keyChar = [theArrow characterAtIndex:0]; if ( keyChar == NSLeftArrowFunctionKey ) { gameState = GameStateRunning; } if ( keyChar == NSRightArrowFunctionKey ) { } if ( keyChar == NSUpArrowFunctionKey ) { [self moveRightPaddleUp]; } if ( keyChar == NSDownArrowFunctionKey ) { [self moveRightPaddleDown]; } [super keyDown:theEvent]; } } else { [super keyDown:theEvent]; } } - (void)drawRect:(NSRect)dirtyRect { } - (void)dealloc { [ball release]; [rightPaddle release]; [leftPaddle release]; [super dealloc]; } @end

    Read the article

  • App crashes when adding array data to table cells

    - by bassmandan
    I am trying to create a table view that loads a number of tweets into the table (one per cell etc). I am using NSXMLParser to get the information and have got as far as creating an array with the selection of tweets that I want. However, when I try to add them to the table cells, the app crashes on the line: cell.textLabel.text = cellValue; An NSLog before this shows in the console that the app is getting the correct data, so I am a bit stumped as to why this isn't working. This is the block of code that appears to be having the problem: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } // Set up the cell... NSString *cellValue = [statuses objectAtIndex:indexPath.row]; NSLog(@"%@", cellValue); cell.textLabel.text = cellValue; return cell;} If it makes a difference, I am using ARC and the latest version of XCode. I'm still quite new to all this, so if I need to give some extra information, let me know. Thanks in advance. Edit: Backtrace gives the following: * thread #1: tid = 0x2003, 0x918a19c6 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT frame #0: 0x918a19c6 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x9968ff78 libsystem_c.dylib`pthread_kill + 106 frame #2: 0x99680bdd libsystem_c.dylib`abort + 167 frame #3: 0x03c93e78 libc++abi.dylib`_Unwind_DeleteException frame #4: 0x03c9189e libc++abi.dylib`_ZL17default_terminatev + 34 frame #5: 0x0154df4b libobjc.A.dylib`_objc_terminate + 94 frame #6: 0x03c918de libc++abi.dylib`_ZL19safe_handler_callerPFvvE + 13 frame #7: 0x03c91946 libc++abi.dylib`std::terminate() + 23 frame #8: 0x03c92ab2 libc++abi.dylib`__cxa_throw + 110 frame #9: 0x0154de15 libobjc.A.dylib`objc_exception_throw + 311 frame #10: 0x013bdced CoreFoundation`-[NSObject doesNotRecognizeSelector:] + 253 frame #11: 0x01322f00 CoreFoundation`___forwarding___ + 432 frame #12: 0x01322ce2 CoreFoundation`_CF_forwarding_prep_0 + 50 frame #13: 0x0015168f UIKit`-[UILabel setText:] + 56 frame #14: 0x00003088 Twitter`-[TwitterViewController tableView:cellForRowAtIndexPath:] + 376 at TwitterViewController.m:131 frame #15: 0x000ace0f UIKit`-[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 494 frame #16: 0x000ad589 UIKit`-[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 69 frame #17: 0x00098dfd UIKit`-[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1350 frame #18: 0x000a7851 UIKit`-[UITableView layoutSubviews] + 242 frame #19: 0x00052301 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 145 frame #20: 0x013bde72 CoreFoundation`-[NSObject performSelector:withObject:] + 66 frame #21: 0x01d6692d QuartzCore`-[CALayer layoutSublayers] + 266 frame #22: 0x01d70827 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 231 frame #23: 0x01cf6fa7 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 377 frame #24: 0x01cf8ea6 QuartzCore`CA::Transaction::commit() + 374 frame #25: 0x01d8430c QuartzCore`+[CATransaction flush] + 52 frame #26: 0x000124c6 UIKit`-[UIApplication _reportAppLaunchFinished] + 39 frame #27: 0x00012bd6 UIKit`-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 1324 frame #28: 0x00021743 UIKit`-[UIApplication handleEvent:withNewEvent:] + 1027 frame #29: 0x000221f8 UIKit`-[UIApplication sendEvent:] + 68 frame #30: 0x00015aa9 UIKit`_UIApplicationHandleEvent + 8196 frame #31: 0x012a6fa9 GraphicsServices`PurpleEventCallback + 1274 frame #32: 0x013901c5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 frame #33: 0x012f5022 CoreFoundation`__CFRunLoopDoSource1 + 146 frame #34: 0x012f390a CoreFoundation`__CFRunLoopRun + 2218 frame #35: 0x012f2db4 CoreFoundation`CFRunLoopRunSpecific + 212 frame #36: 0x012f2ccb CoreFoundation`CFRunLoopRunInMode + 123 frame #37: 0x000122a7 UIKit`-[UIApplication _run] + 576 frame #38: 0x00013a9b UIKit`UIApplicationMain + 1175 frame #39: 0x0000239d Twitter`main + 141 at main.m:16 frame #40: 0x00002305 Twitter`start + 53 Debugging console shows this: 2012-04-08 10:10:05.084 Twitter[25309:f803] ( { text = "Have you shared the Shakedown yet? http://t.co/WHrIC9w7"; }, { text = "For all you closet rocknrollas pencil in Sat 12th May The Rebirth of Rock n Roll Party. Haywire Saint @ The Good... http://t.co/OXHKlLIV"; }, { text = "4 weeks today: Vocal tracks will be getting recorded at The Premises Studios"; }, { text = "Rehearsal tonight in preparation to some big recording next month!"; }, { text = "haywire saint 'great taste.' Tune. \n\nhttp://t.co/GKmu5Lna http://t.co/0fii55Hw"; }, { text = "Meeting up with an old roadie for The Cure today. oh the stories...... http://t.co/UeUYccme"; }, { text = "Satisfying day of programming today.. Haywire Saint app coming along nicely with the custom music player ready to rock 'n' roll!"; }, { text = "Happy Friday Everyone!"; }, { text = "We had a great time at The Premises Studios yesterday. We'll be back there before long :D x"; }, { text = "I posted a new photo to Facebook http://t.co/73qAnCvk"; } ) 2012-04-08 10:10:05.093 Twitter[25309:f803] { text = "Have you shared the Shakedown yet? http://t.co/WHrIC9w7"; } 2012-04-08 10:10:05.094 Twitter[25309:f803] -[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6877a50 2012-04-08 10:10:05.096 Twitter[25309:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x6877a50' *** First throw call stack: (0x13bc052 0x154dd0a 0x13bdced 0x1322f00 0x1322ce2 0x15168f 0x3088 0xace0f 0xad589 0x98dfd 0xa7851 0x52301 0x13bde72 0x1d6692d 0x1d70827 0x1cf6fa7 0x1cf8ea6 0x1d8430c 0x124c6 0x12bd6 0x21743 0x221f8 0x15aa9 0x12a6fa9 0x13901c5 0x12f5022 0x12f390a 0x12f2db4 0x12f2ccb 0x122a7 0x13a9b 0x239d 0x2305) terminate called throwing an exception2012-04-08 10:10:05.924 Twitter[25309:f803] -[__NSCFConstantString count]: unrecognized selector sent to instance 0x5b30

    Read the article

  • Objective-C I can access self.view but not self.view.frame

    - by user292896
    I can access and show self.view and see the frame in the log but when I try to access self.view.frame I get null. Below is the log output of NSLog(@"Show self.view:%@",self.view); NSLog(@"Show self.view.frame:%@",self.view.frame); - 2010-03-28 11:08:43.373 vivmed_CD_Tab[20356:207] Show self.view:<UITableView: 0x4001600; frame = (0 0; 320 583); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x3b21270>> 2010-03-28 11:08:43.373 vivmed_CD_Tab[20356:207] Show self.view.frame:(null) Can anyone explain why self.view.frame is null but self.view shows a frame? May Goal is to change the frame size. Cheers, Grant

    Read the article

  • problem with select boxes - second options based on first selection

    - by Charles Marsh
    Hello All, I just posted a question about opening in a new window but if I use window.location it doesn't work?? is there a problem with my javascript? <script type="text/javascript"> function setOptions(chosen){ var selbox = document.formName.table; selbox.options.length = 0; if (chosen == " ") { selbox.options[selbox.options.length] = new Option('No diploma selected',' '); } if (chosen == "1") { selbox.options[selbox.options.length] = new Option('first choice - option one','http://www.pitman-training.com'); selbox.options[selbox.options.length] = new Option('first choice - option two','onetwo'); } if (chosen == "2") { selbox.options[selbox.options.length] = new Option('second choice - option one','twoone'); selbox.options[selbox.options.length] = new Option('second choice - option two','twotwo'); selbox.options[selbox.options.length] = new Option('second choice - option three','twothree'); selbox.options[selbox.options.length] = new Option('second choice - option four','twofour'); } if (chosen == "3") { selbox.options[selbox.options.length] = new Option('third choice - option one','threeone'); selbox.options[selbox.options.length] = new Option('third choice - option two','threetwo'); } } </script> Its a little messy I know... <form name="formName" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <select name="optone" size="1" onchange="setOptions(document.formName.optone.options[document.formName.optone.selectedIndex].value);"> <option value=" " selected="selected">Please select a diploma</option> <option value="1">First Choice</option> <option value="2">Second Choice</option> <option value="3">Third Choice</option> </select> <select name="table" size="1" > <option value=" " selected="selected">No diploma selected</option> </select> <input type="submit" onclick="ob=this.form.table;window.location(ob.options[ob.selectedIndex].value)"/> </form> to be honest I'm not happy with this anyway I want a way to hide the Submit button until the second selected box has been selected...but I'm no java expert! Can anyone point me in the right direction?

    Read the article

  • Can't configure frame relay T1 on Cisco 1760

    - by sonar
    For the past few days I've been trying to configure a data T1 via a Frame Relay. Now I've been pretty unsuccessful at it, and it's been a while, since I've done this so please bare with me. The ISP provided me the following information: 1. IP address 2. Gateway address 3. Encapsulation Frame Relay 4. DLCI 100 5. BZ8 ESF (I think the bz8 was supposed to be b8zs) 6. Time Slot (1 al 24). And what I have configured up until now is the following: interface Serial0/0 ip address <ip address> 255.255.255.252 encapsulation frame-relay service-module t1 timeslots 1-24 frame-relay interface-dlci 100 sh service-module s0/0 (outputs): Module type is T1/fractional Hardware revision is 0.128, Software revision is 0.2, Image checksum is 0x73D70058, Protocol revision is 0.1 Receiver has no alarms. Framing is **ESF**, Line Code is **B8ZS**, Current clock source is line, Fraction has **24 timeslots** (64 Kbits/sec each), Net bandwidth is 1536 Kbits/sec. Last module self-test (done at startup): Passed Last clearing of alarm counters 00:17:17 loss of signal : 0, loss of frame : 0, AIS alarm : 0, Remote alarm : 2, last occurred 00:10:10 Module access errors : 0, Total Data (last 1 15 minute intervals): 0 Line Code Violations, 0 Path Code Violations 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs Data in current interval (138 seconds elapsed): 0 Line Code Violations, 0 Path Code Violations 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs sh int: FastEthernet0/0 is up, line protocol is up Hardware is PQUICC_FEC, address is 000d.6516.e5aa (bia 000d.6516.e5aa) Internet address is 10.0.0.1/24 MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Full-duplex, 100Mb/s, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:20:00, output 00:00:00, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: fifo Output queue: 0/40 (size/max) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog 0 input packets with dribble condition detected 191 packets output, 20676 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier 0 output buffer failures, 0 output buffers swapped out Serial0/0 is up, line protocol is down Hardware is PQUICC with Fractional T1 CSU/DSU MTU 1500 bytes, BW 1536 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation FRAME-RELAY, loopback not set Keepalive set (10 sec) LMI enq sent 157, LMI stat recvd 0, LMI upd recvd 0, DTE LMI down LMI enq recvd 23, LMI stat sent 0, LMI upd sent 0 LMI DLCI 1023 LMI type is CISCO frame relay DTE FR SVC disabled, LAPF state down Broadcast queue 0/64, broadcasts sent/dropped 2/0, interface broadcasts 0 Last input 00:24:51, output 00:00:05, output hang never Last clearing of "show interface" counters 00:27:20 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 1152 kilobits/sec 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 23 packets input, 302 bytes, 0 no buffer Received 0 broadcasts, 0 runts, 0 giants, 0 throttles 1725 input errors, 595 CRC, 1099 frame, 0 overrun, 0 ignored, 30 abort 246 packets output, 3974 bytes, 0 underruns 0 output errors, 0 collisions, 48 interface resets 0 output buffer failures, 0 output buffers swapped out 4 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up Serial0/0.1 is down, line protocol is down Hardware is PQUICC with Fractional T1 CSU/DSU MTU 1500 bytes, BW 1536 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation FRAME-RELAY Last clearing of "show interface" counters never Serial0/0.100 is down, line protocol is down Hardware is PQUICC with Fractional T1 CSU/DSU Internet address is <ip address>/30 MTU 1500 bytes, BW 1536 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation FRAME-RELAY Last clearing of "show interface" counters never And everything seems to be accounted for to me, but apparently I'm missing something. My issue is that I'm stuck on interface up, line protocol down, so the T1 doesn't go up. Any ideas? Thank you,

    Read the article

  • Design non-windowed Gtk.Frame in Glade

    - by Ángel Araya
    I'm building a ToDo app for personal porpouses, and I'm using Quickly and Glade for this. I want it to desplay a list of the pending to-do elements. The problem I'm having is that I can't find the way to create a single Frame (not inside another window) with some other widgets inside to dinamically add them to a VBox that I already have created in Glade. Is there a way to do it or do I have to create the Frame in the code?

    Read the article

  • Additional options in MDL

    - by Jane Zhang
        The Metadata Loader(MDL) enables you to populate a new repository as well as transfer, update, or restore a backup of existing repository metadata. It consists of two utilities: metadata export and metadata import. The export utility extracts metadata objects from a repository and writes the information into a file. The import utility reads the metadata information from an exported file and inserts the metadata objects into a repository.      While the Design Client provides an intuitive UI that helps you perform the most commonly used export and import tasks, OMBPlus scripting enables you to specify some additional options, and manage a control file that allows you to perform more specialized export and import tasks. Is it possible to utilize these options in MDL from Design Client? This article will tell you how to achieve it.      A property file named mdl.properties is used to configure the additional options. It stores options in name/value pairs. This file can be created and placed under the directory <owb installation path>/owb/bin/admin/. Below we will introduce the options that can be specified in the mdl.properties file. 1. DEFAULTDIRECTORY     When we open a Metadata Export/Import dialog in Design Client, a default directory is provided for MDL file and log file. For MDL Export, the default directory is <owb installation path>/owb/bin/. As for MDL Import, the default directory is <owb installation path>/owb/mdl/. It may not be the one you would want to use as a default. You can specify the option DEFAULTDIRECTORY in the mdl.properties file to set your own default directory for MDL Export/Import, for example, DEFAULTDIRECOTRY=/tmp/     In this example, the default directory is set to /tmp/. Be sure the value ends with a file separator since it represents a directory. In Windows, the file separator is “\”. In linux, the file separator is “/”. 2. MDLTRACEFILE     Sometimes we would like to trace the whole process of MDL Export/Import, and get detailed information about operations to help developers or supports troubleshooting. To turn on MDL trace, set the option MDLTRACEFILE in the mdl.properties file. MDLTRACEFILE=/tmp/mdl.trc    The right side of the equals sign is to specify the name of the file for MDL trace information to be written. If no path is specified, the file will be placed under directory <owb installation path>/owb/bin/admin/. However, the trace file may be large if the MDL file contains a large number of metadata objects, so please use this option sparingly. 3. CONTROLFILE       We can use a control file to specify how objects are imported or exported. We can set an option called CONTROLFILE in the mdl.properties file, so the control file can also be utilized in Design Client, for example, CONTROLFILE=/tmp/mdl_control_file.ctl     The control file stores options in name/value pairs. When using control file, be sure the file exists, otherwise an exception java.lang.Exception: CNV0002-0031(ERROR): Cannot find specified file will be thrown out during MDL Export/Import.      Next we will introduce some options specified in control file. ZIPFILEFORMAT     By default, MDL exports objects into a zip format file. This zip file has an .mdl extension and contains two files. For example, you export the repository metadata into a file called projects.mdl. When you unzip this MDL file, you obtain two files. The file projects.mdx contains the repository objects. The file mdlcatalog.xml contains internal information about the MDL XML file. Another choice is to combine these two files into one unzip text format file when doing MDL exporting.    In OMBPlus command related to MDL, there is an option called FILE_FORMAT which is used to specify the file format for the exported file. Its acceptable values are ZIP or TEXT. When the value TEXT is selected, the exported file is in text format, for example, OMBEXPORT MDL_FILE '/tmp/options_file_format_test.mdl' FILE_FORMAT TEXT FROM PROJECT 'MY_PROJECT'    How to achieve this via Design Client when doing an MDL exporting? Here we have another option called ZIPFILEFORMAT which has the same function as the FILE_FORMAT. The difference is the acceptable values for ZIPFILEFORMAT are Y or N. When the value is set to N, the exported file is in text format, otherwise it is in zip file format. LOGMESSAGELEVEL     Whenever you export or import repository metadata, MDL writes diagnostic and statistical information to a log file. Their are 3 types of status messages: Informational, Warning and Error. By default, the log file includes all types of message. Sometimes, user may only care about one type of messages, for example, they would like only error messages written to the log file. In order to achieve this, we can set an option called LOGMESSAGELEVEL in control file. The acceptable values for LOGMESSAGELEVEL are ALL, WARNING and ERROR. ALL: If the option LOGMESSAGELEVEL is set to ALL, all types of messages (Informational, Warning and Error) will be written into the log file. WARNING: If the option LOGMESSAGELEVEL is set to WARNING, only warning messages will be written into log file. ERROR: If the option LOGMESSAGELEVEL is set to ERROR, only error messages will be written into log file. UPDATEPROJECTATTRIBUTES, UPDATEMODULEATTRIBUTES      These two options are used to decide whether updating the attributes of projects/modules. The options work when projects/modules being imported already exist in repository and we use update metadata mode or replace metadata mode to do the MDL import. The acceptable values for these two options are Y or N. If the value is set to Y, the attributes of projects/modules will be updated, otherwise not.      Next, let’s give an example to see how these options take effect in MDL. 1. First of all, create the property file mdl.properties under the directory <owb installation path>/owb/bin/admin/. 2. Specify the options in the mdl.properties file, see the following screenshot. 3. Create the control file mdl_control_file.ctl under the directory /tmp/. Set the following options in control file. 4. Log into the OWB Design Client. 5. Create an Oracle module named ORA_MOD_1 under the project MY_PROJECT, then export the project MY_PROJECT into file my_project.mdl. 6. Check the trace file mdl.trc under the directory /tmp/. In this file, we can see very detail information for the above export task. 7. Check the exported MDL file. The file my_project.mdl is in text format. Opening the file, you can see the content of the file directly. It concats the file my_project.mdx and mdlcatalog.xml. 8. Modify the project MY_PROJECT and Oracle module ORA_MOD_1, add descriptions for them separately. Delete the location created in step 5. 9. Import the MDL file my_project.mdl. From the Metadata Import dialog, we can see the default directory for MDL file and log file has been changed to /tmp/. Here we use update metadata mode, match by names to do the importing. 10. After importing, check the description of the project MY_PROJECT, we can see the description is still there. But the description of the Oracle module ORA_MOD_1 has gone. That because we set the option UPDATEPROJECTATTRIBUTES to N, and set the option UPDATEMODULEATTRIBUTES to Y. 11. Check the log file, the log file only contains warning messages and the log message level is set to WARNING.      For more details about the 3 types of status messages, see Oracle® Warehouse Builder Installation and Administration Guide11g Release 2.

    Read the article

  • Constant game speed independent of variable FPS in OpenGL with GLUT?

    - by Nazgulled
    I've been reading Koen Witters detailed article about different game loop solutions but I'm having some problems implementing the last one with GLUT, which is the recommended one. After reading a couple of articles, tutorials and code from other people on how to achieve a constant game speed, I think that what I currently have implemented (I'll post the code below) is what Koen Witters called Game Speed dependent on Variable FPS, the second on his article. First, through my searching experience, there's a couple of people that probably have the knowledge to help out on this but don't know what GLUT is and I'm going to try and explain (feel free to correct me) the relevant functions for my problem of this OpenGL toolkit. Skip this section if you know what GLUT is and how to play with it. GLUT Toolkit: GLUT is an OpenGL toolkit and helps with common tasks in OpenGL. The glutDisplayFunc(renderScene) takes a pointer to a renderScene() function callback, which will be responsible for rendering everything. The renderScene() function will only be called once after the callback registration. The glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0) takes the number of milliseconds to pass before calling the callback processAnimationTimer(). The last argument is just a value to pass to the timer callback. The processAnimationTimer() will not be called each TIMER_MILLISECONDS but just once. The glutPostRedisplay() function requests GLUT to render a new frame so we need call this every time we change something in the scene. The glutIdleFunc(renderScene) could be used to register a callback to renderScene() (this does not make glutDisplayFunc() irrelevant) but this function should be avoided because the idle callback is continuously called when events are not being received, increasing the CPU load. The glutGet(GLUT_ELAPSED_TIME) function returns the number of milliseconds since glutInit was called (or first call to glutGet(GLUT_ELAPSED_TIME)). That's the timer we have with GLUT. I know there are better alternatives for high resolution timers, but let's keep with this one for now. I think this is enough information on how GLUT renders frames so people that didn't know about it could also pitch in this question to try and help if they fell like it. Current Implementation: Now, I'm not sure I have correctly implemented the second solution proposed by Koen, Game Speed dependent on Variable FPS. The relevant code for that goes like this: #define TICKS_PER_SECOND 30 #define MOVEMENT_SPEED 2.0f const int TIMER_MILLISECONDS = 1000 / TICKS_PER_SECOND; int previousTime; int currentTime; int elapsedTime; void renderScene(void) { (...) // Setup the camera position and looking point SceneCamera.LookAt(); // Do all drawing below... (...) } void processAnimationTimer(int value) { // setups the timer to be called again glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0); // Get the time when the previous frame was rendered previousTime = currentTime; // Get the current time (in milliseconds) and calculate the elapsed time currentTime = glutGet(GLUT_ELAPSED_TIME); elapsedTime = currentTime - previousTime; /* Multiply the camera direction vector by constant speed then by the elapsed time (in seconds) and then move the camera */ SceneCamera.Move(cameraDirection * MOVEMENT_SPEED * (elapsedTime / 1000.0f)); // Requests to render a new frame (this will call my renderScene() once) glutPostRedisplay(); } void main(int argc, char **argv) { glutInit(&argc, argv); (...) glutDisplayFunc(renderScene); (...) // Setup the timer to be called one first time glutTimerFunc(TIMER_MILLISECONDS, processAnimationTimer, 0); // Read the current time since glutInit was called currentTime = glutGet(GLUT_ELAPSED_TIME); glutMainLoop(); } This implementation doesn't fell right. It works in the sense that helps the game speed to be constant dependent on the FPS. So that moving from point A to point B takes the same time no matter the high/low framerate. However, I believe I'm limiting the game framerate with this approach. Each frame will only be rendered when the time callback is called, that means the framerate will be roughly around TICKS_PER_SECOND frames per second. This doesn't feel right, you shouldn't limit your powerful hardware, it's wrong. It's my understanding though, that I still need to calculate the elapsedTime. Just because I'm telling GLUT to call the timer callback every TIMER_MILLISECONDS, it doesn't mean it will always do that on time. I'm not sure how can I fix this and to be completely honest, I have no idea what is the game loop in GLUT, you know, the while( game_is_running ) loop in Koen's article. But it's my understanding that GLUT is event-driven and that game loop starts when I call glutMainLoop() (which never returns), yes? I thought I could register an idle callback with glutIdleFunc() and use that as replacement of glutTimerFunc(), only rendering when necessary (instead of all the time as usual) but when I tested this with an empty callback (like void gameLoop() {}) and it was basically doing nothing, only a black screen, the CPU spiked to 25% and remained there until I killed the game and it went back to normal. So I don't think that's the path to follow. Using glutTimerFunc() is definitely not a good approach to perform all movements/animations based on that, as I'm limiting my game to a constant FPS, not cool. Or maybe I'm using it wrong and my implementation is not right? How exactly can I have a constant game speed with variable FPS? More exactly, how do I correctly implement Koen's Constant Game Speed with Maximum FPS solution (the fourth one on his article) with GLUT? Maybe this is not possible at all with GLUT? If not, what are my alternatives? What is the best approach to this problem (constant game speed) with GLUT? I originally posted this question on Stack Overflow before being pointed out about this site. The following is a different approach I tried after creating the question in SO, so I'm posting it here too. Another Approach: I've been experimenting and here's what I was able to achieve now. Instead of calculating the elapsed time on a timed function (which limits my game's framerate) I'm now doing it in renderScene(). Whenever changes to the scene happen I call glutPostRedisplay() (ie: camera moving, some object animation, etc...) which will make a call to renderScene(). I can use the elapsed time in this function to move my camera for instance. My code has now turned into this: int previousTime; int currentTime; int elapsedTime; void renderScene(void) { (...) // Setup the camera position and looking point SceneCamera.LookAt(); // Do all drawing below... (...) } void renderScene(void) { (...) // Get the time when the previous frame was rendered previousTime = currentTime; // Get the current time (in milliseconds) and calculate the elapsed time currentTime = glutGet(GLUT_ELAPSED_TIME); elapsedTime = currentTime - previousTime; /* Multiply the camera direction vector by constant speed then by the elapsed time (in seconds) and then move the camera */ SceneCamera.Move(cameraDirection * MOVEMENT_SPEED * (elapsedTime / 1000.0f)); // Setup the camera position and looking point SceneCamera.LookAt(); // All drawing code goes inside this function drawCompleteScene(); glutSwapBuffers(); /* Redraw the frame ONLY if the user is moving the camera (similar code will be needed to redraw the frame for other events) */ if(!IsTupleEmpty(cameraDirection)) { glutPostRedisplay(); } } void main(int argc, char **argv) { glutInit(&argc, argv); (...) glutDisplayFunc(renderScene); (...) currentTime = glutGet(GLUT_ELAPSED_TIME); glutMainLoop(); } Conclusion, it's working, or so it seems. If I don't move the camera, the CPU usage is low, nothing is being rendered (for testing purposes I only have a grid extending for 4000.0f, while zFar is set to 1000.0f). When I start moving the camera the scene starts redrawing itself. If I keep pressing the move keys, the CPU usage will increase; this is normal behavior. It drops back when I stop moving. Unless I'm missing something, it seems like a good approach for now. I did find this interesting article on iDevGames and this implementation is probably affected by the problem described on that article. What's your thoughts on that? Please note that I'm just doing this for fun, I have no intentions of creating some game to distribute or something like that, not in the near future at least. If I did, I would probably go with something else besides GLUT. But since I'm using GLUT, and other than the problem described on iDevGames, do you think this latest implementation is sufficient for GLUT? The only real issue I can think of right now is that I'll need to keep calling glutPostRedisplay() every time the scene changes something and keep calling it until there's nothing new to redraw. A little complexity added to the code for a better cause, I think. What do you think?

    Read the article

  • How Can I Bypass the X-Frame-Options: SAMEORIGIN HTTP Header?

    - by Daniel Coffman
    I am developing a web page that needs to display, in an iframe, a report served by another company's SharePoint server. They are fine with this. The page we're trying to render in the iframe is giving us X-Frame-Options: SAMEORIGIN which causes the browser (at least IE8) to refuse to render the content in a frame. First, is this something they can control or is it something SharePoint just does by default? If I ask them to turn this off, could they even do it? Second, can I do something to tell the browser to ignore this http header and just render the frame?

    Read the article

  • Can you use data binding with the Content property of a WPF Frame?

    - by dthrasher
    I can use data binding to set the initial Content of a WPF Frame, but subsequent changes to the the bound property (implemented using INotifyPropertyChange) do not seem to change the content. Also, does anyone know if binding directly to the Content property in this way will cause the bound item to appear in the Frame or NavigationWindow's journal? Some context: I realize that I should probably be using the NavigationService to interact with the Frame, but I'm attempting to follow the MVVM pattern. It seems like it would be much simpler to databind to the Content property...

    Read the article

  • R: What are the best functions to deal with concatenating and averaging values in a data.frame?

    - by John
    I have a data.frame from this code: my_df = data.frame("read_time" = c("2010-02-15", "2010-02-15", "2010-02-16", "2010-02-16", "2010-02-16", "2010-02-17"), "OD" = c(0.1, 0.2, 0.1, 0.2, 0.4, 0.5) ) which produces this: > my_df read_time OD 1 2010-02-15 0.1 2 2010-02-15 0.2 3 2010-02-16 0.1 4 2010-02-16 0.2 5 2010-02-16 0.4 6 2010-02-17 0.5 I want to average the OD column over each distinct read_time (notice some are replicated others are not) and I also would like to calculate the standard deviation, producing a table like this: > my_df read_time OD stdev 1 2010-02-15 0.15 0.05 5 2010-02-16 0.3 0.1 6 2010-02-17 0.5 0 Which are the best functions to deal with concatenating such values in a data.frame?

    Read the article

  • Persisting settings without using Options dialog in Visual Studio

    - by Utkarsh Shigihalli
    Originally posted on: http://geekswithblogs.net/onlyutkarsh/archive/2013/11/02/persisting-settings-without-using-options-dialog-in-visual-studio.aspxIn one of my previous blog post we have seen persisting settings using Visual Studio's options dialog. Visual Studio options has many advantages in automatically persisting user options for you. However, during our latest Team Rooms extension development, we decided to provide our users; ability to use our preferences directly from Team Explorer. The main reason was that we had only one simple option for user and we thought it is cumbersome for user to go to Tools –> Options dialog to change this. Another reason was, we wanted to highlight this setting to user as soon as he is using our extension.   So if you are in such a scenario where you do not want to use VS options window, but still would like to persist the settings, this post will guide you through. Visual Studio SDK provides two ways to persist settings in your extensions. One is using DialogPage as shown in my previous post. Another way is to use by implementing IProfileManager interface which I will explain in this post. Please note that the class implementing IProfileManager should be independent class. This is because, VS instantiates this class during Tools –> Import and Export Settings. IProfileManager provides 2 different sets of methods (total 4 methods) to persist the settings. They are LoadSettingsFromXml and SaveSettingsToXml – Implement these methods to persist settings to disk from VS settings storage. The VS will persist your settings along with other options to disk. LoadSettingsFromStorage and SaveSettingsToStorage – Implement these methods to persist settings to local storage, usually it be registry. VS calls LoadSettingsFromStorage method when it is initializing the package too. We are going to use the 2nd set of methods for this example. First, we are creating a separate class file called UserOptions.cs. Please note that, we also need to implement IComponent, which can be done by inheriting Component along with IProfileManager. [ComVisible(true)] [Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")] public class UserOptions : Component, IProfileManager { private const string SUBKEY_NAME = "TForVS2013"; private const string TRAY_NOTIFICATIONS_STRING = "TrayNotifications"; ... } Define the property so that it can be used to set and get from other classes. public bool TrayNotifications { get; set; } Implement the members of IProfileManager. public void LoadSettingsFromStorage() { RegistryKey reg = null; try { using (reg = Package.UserRegistryRoot.OpenSubKey(SUBKEY_NAME)) { if (reg != null) { // Key already exists, so just update this setting. TrayNotifications = Convert.ToBoolean(reg.GetValue(TRAY_NOTIFICATIONS_STRING, true)); } } } catch (TeamRoomException exception) { TrayNotifications = true; ExceptionReporting.Report(exception); } finally { if (reg != null) { reg.Close(); } } } public void LoadSettingsFromXml(IVsSettingsReader reader) { reader.ReadSettingBoolean(TRAY_NOTIFICATIONS_STRING, out _isTrayNotificationsEnabled); TrayNotifications = (_isTrayNotificationsEnabled == 1); } public void ResetSettings() { } public void SaveSettingsToStorage() { RegistryKey reg = null; try { using (reg = Package.UserRegistryRoot.OpenSubKey(SUBKEY_NAME, true)) { if (reg != null) { // Key already exists, so just update this setting. reg.SetValue(TRAY_NOTIFICATIONS_STRING, TrayNotifications); } else { reg = Package.UserRegistryRoot.CreateSubKey(SUBKEY_NAME); reg.SetValue(TRAY_NOTIFICATIONS_STRING, TrayNotifications); } } } catch (TeamRoomException exception) { ExceptionReporting.Report(exception); } finally { if (reg != null) { reg.Close(); } } } public void SaveSettingsToXml(IVsSettingsWriter writer) { writer.WriteSettingBoolean(TRAY_NOTIFICATIONS_STRING, TrayNotifications ? 1 : 0); } Let me elaborate on the method implementation. The Package class provides UserRegistryRoot (which is HKCU\Microsoft\VisualStudio\12.0 for VS2013) property which can be used to create and read the registry keys. So basically, in the methods above, I am checking if the registry key exists already and if not, I simply create it. Also, in case there is an exception I return the default values. If the key already exists, I update the value. Also, note that you need to make sure that you close the key while exiting from the method. Very simple right? Accessing and settings is simple too. We just need to use the exposed property. UserOptions.TrayNotifications = true; UserOptions.SaveSettingsToStorage(); Reading settings is as simple as reading a property. UserOptions.LoadSettingsFromStorage(); var trayNotifications = UserOptions.TrayNotifications; Lastly, the most important step. We need to tell Visual Studio shell that our package exposes options using the UserOptions class. For this we need to decorate our package class with ProvideProfile attribute as below. [ProvideProfile(typeof(UserOptions), "TForVS2013", "TeamRooms", 110, 110, false, DescriptionResourceID = 401)] public sealed class TeamRooms : Microsoft.VisualStudio.Shell.Package { ... } That's it. If everything is alright, once you run the package you will also see your options appearing in "Import Export settings" window, which allows you to export your options.

    Read the article

  • Multiplayer Network Game - Interpolation and Frame Rate

    - by J.C.
    Consider the following scenario: Let's say, for sake of example and simplicity, that you have an authoritative game server that sends state to its clients every 45ms. The clients are interpolating state with an interpolation delay of 100 ms. Finally, the clients are rendering a new frame every 15ms. When state is updated on the client, the client time is set from the incoming state update. Each time a frame renders, we take the render time (client time - interpolation delay) and identify a previous and target state to interpolate from. To calculate the interpolation amount/factor, we take the difference of the render time and previous state time and divide by the difference of the target state and previous state times: var factor = ((renderTime - previousStateTime) / (targetStateTime - previousStateTime)) Problem: In the example above, we are effectively displaying the same interpolated state for 3 frames before we collected the next server update and a new client (render) time is set. The rendering is mostly smooth, but there is a dash of jaggedness to it. Question: Given the example above, I'd like to think that the interpolation amount/factor should increase with each frame render to smooth out the movement. Should this be considered and, if so, what is the best way to achieve this given the information from above?

    Read the article

  • What's the best way to use requestAnimationFrame and fixed frame rates

    - by m90
    I recently got into using the HTML5-requestAnimationFrame-API a lot on animation-heavy websites, especially after seeing the Jank Busters talk. This seems to work pretty well and really improve performance in many cases. Yet one question still persists for me: When wanting to use an animation that is NOT entirely calculated (think spritesheets for example) you will have to aim for a fixed frame rate. Of course one could go back to use setInterval again, but maybe there are other ways to tackle this. The two ways I could think of using requestAnimationFrame with a fixed frame rate are: var fps = 25; //frames per second function animate(){ //actual drawing goes here setTimeout(function(){ requestAnimationFrame(animate); }, 1000 / fps) } animate(); or var fps = 25; //frames per second var lastExecution = new Date().getTime(); function animate(){ var now = new Date().getTime(); if ((now - lastExecution) > (1000 / fps)){ //do actual drawing lastExecution = new Date().getTime(); } requestAnimationFrame(animate); } animate(); Personally, I'd opt for the second option (the first one feels like cheating), yet it seems to be more buggy in certain situations. Is this approach really worth it (especially at low frame rates like 12.5)? Are there things to be improved? Is there another way to tackle this?

    Read the article

  • Access the Options for Your Favorite Extensions Easier in Firefox

    - by Asian Angel
    Would you prefer a much quicker way to access the options for your favorite extensions in Firefox? Now you can skip opening the Add-ons Manager Tab and access them directly by menu using the Extension Options Menu add-on for Firefox. There is a toolbar button available if you prefer an even quicker method for accessing the options for extensions. Left clicking on the toolbar button displays a menu as shown here and right clicking automatically opens the Add-ons Manager Tab. The options are simple to work with…select or deselect display methods to best suit your needs. Note: Works with Firefox 3.7a5pre – 4.0.* Install Extension Options Menu Add-on (Mozilla Add-ons) [via Ghacks] Latest Features How-To Geek ETC Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? How To Make Hundreds of Complex Photo Edits in Seconds With Photoshop Actions How to Enable User-Specific Wireless Networks in Windows 7 Access the Options for Your Favorite Extensions Easier in Firefox Don’t Sleep Keeps Your Windows Machine Awake DropSpace Syncs Android Files to Dropbox Field of Poppies Wallpaper The History Of Operating Systems [Infographic] DriveSafe.ly Reads Your Text Messages Aloud

    Read the article

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