Daily Archives

Articles indexed Monday June 4 2012

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

  • Any danger in using the Wine workaround in 12.04?

    - by TrailRider
    To run certain Windows programs in WINE you need to this workaround: echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope According to the support websites, this is due to a bug in the Ubuntu kernel that prevents ptrace and WINE playing well together. Using the above command you set the ptrace to 0 which according the research I've done(don't ask me which websites, I have seem a lot of them), ptrace has to do with the interactions between programs. The 0 setting is more permissive than the 1. I have to assume that there was a good reason Ubuntu wanted the ptrace=1 so this leads me back to the short form of the question. Are there any risks involved in setting ptrace=0. Lower security? problems debugging? any others that I haven't thought of??? P.S. for anybody reading this that wonders what the bug causes, the Windows programs will fail to open at all, in the System Monitor you will see many instances of the program trying to open and then they will eventually all quit and if you run the progam for the terminal you will get an error that tells you that the maximum number of program instances has been reached.

    Read the article

  • On-the-fly file search in gnome 3?

    - by jan groth
    I recently switched to Gnome 3 (on Onereic 11.10). I was a big fan of gnome-do (on Gnome 2), where I heavily used the "files and folders"-plugin. This allows to configure a list of files and folder to be searched on-the-fly while typing. E.g. starting to type "timesheet" opens "timesheet_2011.ods" from my dropbox account... I can't find anything like this in Gnome 3. I know that there is a list of "recent items", and also the name of bookmarked folders in nautilus is searched, but that's not (exactly) what I'm looking for... So, what I want is this: tell Gnome 3 where my files are (certainly not only in my home folder) have them searched on the fly while I'm typing I think Unity offers something like this - but hey, I'm using Gnome 3 ;-) Anything I missed?

    Read the article

  • Screen is very dim on an Acer Aspire 6920Z

    - by Justin
    I've been trying to figure this out for a week now, my laptops screen is on and working but you cannot see whats on the screen without shining a flashlight at it. I'm using a spare monitor by the VGA port right now to be able to use this laptop, which is kinda a pain. Been reading around a bit about this problem and it seems to be a common-ish problem it seems. I've tried to change the brightness which doesn't help whats so ever. It just happen one day after I turned off the laptop for the night. The screen flashes on for a bit at start up, then goes completely dim. Anyone with this problem and find a fix? You can search up this computers spec by the name/model in the title if you need hardware info. I never had this problem with the old Ubuntu 10.04.

    Read the article

  • Why do I get Unity instead of Classic when using NX?

    - by Mathew
    Recently I installed FreeNX on my PC and when I login with my 'dev' account I get the Unity interface rather than Classic Gnome. This is odd as my last login before FreeNX was with the Classic interface. I would like to have Classic over FreeNX by default. I do login with a 'watch iplayer' account where the Unity interface works a treat. For this reason I would prefer not to uninstall Unity. Any ideas?

    Read the article

  • Why is Rhythmbox becoming the default (again)?

    - by Christoph
    So, it seems with 12.04, they're switching back to Rhythmbox, after switching from Rhythmbox a year ago. I don't get why. They say that it's because of a blocking bug in GTK3# (if I understand that correctly), but that's just one bug, and in the same breath they say RB is not well maintained. It seems Ubuntu guys were dissatisfied with Banshee in some way, but apparently the Banshee guys were never notified of any problems. Also, it can't be to save disc space by dropping mono, because at the same day it was announced that the install disc will be enlarged by 50MB. Also, isn't it a bit shortsighted to push Banshee for default inclusion, and then drop it again a year later? How is that a sustainable use of dev resources, or consistent? Apparently there was quite some heavy effort by banshee devs - David Nielsen used the term "bending over backwards for Ubuntu" iirc. In summary: Can anyone shed more light on this? Related question: Why is Banshee becoming the default? Sources: http://www.omgubuntu.co.uk/2011/11/banshee-tomboy-and-mono-dropped-from-ubuntu-12-04-cd/ http://www.omgubuntu.co.uk/2011/11/rhythmbox-to-return-as-ubuntu-12-04-default-music-app/ http://www.omgubuntu.co.uk/2011/11/ubuntu-12-04-disc-size-to-be-750mb/ http://summit.ubuntu.com/uds-p/meeting/19442/desktop-p-default-apps/ http://banshee-media-player.2283330.n4.nabble.com/banshee-being-dropped-from-ubuntu-because-of-GTK3-support-td3985298.html

    Read the article

  • Goal completions 10x higher in dashboard

    - by cjk
    I have the following table in my Dashboard: Page path level 1 Visits Goal Completions ----------------- ------ ---------------- /sub1/ 994 1,295 / 102 3 /sub2/ 10 1 I know my conversion rate is 10-20%, and that actually in this period I only had 183 goal completions under /sub1/. My goal is set as a regular expression for a particular page (/success?.*), and I have a funnel set up which tracks the page before the goal (/action). The actual urls hit would be /sub1/action then /sub1/success?1234 and /sub2/action then /sub2/success?1234. Why is my table in my dashboard giving me wildly wrong numbers? Have I done something wrong?

    Read the article

  • Prevent virtual host on same server interact on apache

    - by soosooo
    good day i Have a vps apache 2.0 webserver, with multiple domains and multiple ips set. In document root :/var/www/html/ -- i have http:// serverA.com and i create virtual host on folder :/var/www/html/serverB --- http:// serverB.com They work great for both. but the problem is, i can access serverB files with url http: // serverA.com/ serverB / (which i dont want that happen) how to prevent that ? thx in advance

    Read the article

  • Huge google impression drop after cleaning html

    - by olgatorresfoundation
    Good morning, I am the webmaster of a non-profit organization that donates grants to colorectal cancer research projects and funds various colorectal cancer information campaigns. We have three domains: www.fundacioolgatorres dot org (Catalan) www.fundacionolgatorres dot org (Spanish) www.olgatorresfoundation dot org (English) So what happened? I redesigned olgatorresfoundation on the 20th and the fundacionolgatorres on the 30th of May. In both cases, exactly two days later, the number of impressions on both dropped to a halt. Granted, we did not have the traffic of Microsoft, but a 90% decrease a disaster of incredible proportions for us. My only real changes were cleaning up the old ineffective HTML to a cleaner form (mostly moving away from redundant table construction to a table-less view). Here is a before and after snapshot of what the change looks like: Before: http://www.fundacioolgatorres.org/aparell_digestiu/introduccio/ (unchanged page in Catalan) After: http://www.olgatorresfoundation.org/digestive_system/introduction/ (changed page in English) Anybody has a clue to what just happened? Why should a normal, sane html improvement be punished and so dramatically? No URLs have been changed, neither have page names or descriptions. Possible secondary question: If it is so that Google sees it as a major overhaul and decides to drop the pagerank sharply, does it come back to pre-change levels if the content "checks out" or will the page start over from scratch earning those pagerank points (which would mean that we would have to wait 6 months for the pages to recover to the level they had two weeks ago)? (duplicated from productforums.google dot com/forum/#!category-topic/webmasters/crawling-indexing--ranking/YsnyX0JzOpY, hoping to reach a wider audience)

    Read the article

  • Hijax == sneaky Javascript redirects? Will I get banned from Google?

    - by Chris Jacob
    Question Will I get penalised as "sneaky Javascript redirects" by Google if I have the following Hijax setup (which requires a JavaScript redirect on the page indexed by google). Goal I want to implement Hijax to enable AJAX content to be accessibile to non-JavaScript users and search engine crawlers. Background I'm working on a static file server (GitHub Pages). No server side tricks allowed (so Google's #! "hash bang" solution is not an option). I'm trying to keep my files DRY. I don't want to repeat the common OUTER template in all my files i.e. header, navigation menu, footer, etc They will live in the main index.html Setup the Hijax index.html page contains all OUTER html/css/js... the site's template. index.html has a <div id="content"> which defaults to containing the "homepage" html. index.html has a navigation menu, with a Hijax link to an "about" page. With JavaScript disabled (e.g. crawler) it follows link to /about.html. With JavaScript enabled (e.g. most people) the link updates the url hash fragment to /#about and jQuery replaces the <div id="content"> innerHTML with $("#content").load("about.html #inner-container");. AJAX content about.html does not contain anything extra to try an cloak content for crawlers. about.html file contains enough HTML / CSS / JavaScript to display /about.html as a standalone page with it's own META data... e.g. <html><head><title>About</title>...</head><body></body></html>. about.html has NO OUTER HTML template (i.e. header, navigation menu, footer, etc). about.html <body> contains a <div id="inner-container"> which holds the content that is injected into index.html. about.html has a <noscript> tag as the first child of <body> which explains to non-JavaScript users that they are viewing the about page "inner content" - with a link to navigate to the index.html page to get the full page layout with menu. The (Sneaky?) Redirect Google indexes the /about.html page. However when a person with JavaScript enabled visits that page there is no OUTER html template (e.g. header, navigation menu, footer, etc). So I need to do a JavaScript redirect to get the person over the /#about page (deeplinking to the "about" page "state" in index.html). I'm thinking of doing a "redirect on click or after 10 seconds". The end results is that user ends up on an "enhanced" page back on index.html with all it's OUTER template - but the core "page" content is practically identical. Known issue with inbound links e.g. Share / Bookmarking It seems that if a user shares the URL /#about on their blog, when allocating inbound links to my site Google ignores everything after the # ... it allocates value to the / page - See: http://stackoverflow.com/questions/5028405/hashbang-vs-hijax/5166665#5166665. I can only try an minimise this issue offering "share" buttons on the page with the appropriate urls i.e. /about.html. Duplicate Sorry. I posted this same question over on http://stackoverflow.com/questions/5561686/hijax-sneaky-javascript-redirects-will-i-get-banned-from-google ... then realised it probably belongs more on this Stack Exchange site... Not sure if I should delete the Stack Overflow question? Or just leave it on both sites? Please leave comment.

    Read the article

  • Detecting wins in peer to peer RTS games like Starcraft

    - by user782220
    A typical RTS game is implemented with the standard networking model: peer to peer lockstep. Consider Starcraft 2, given that Battle.net presumably doesn't know anything about the state of game given that there is only communication between the two players in a peer to peer model, how does Battle.net know who was the winner in the end. Relying on the two peers to not try to cheat and report accurate results is naive.

    Read the article

  • How to update a game off a database

    - by James Clifton
    I am currently writing a sports strategy management game (cricket) in PHP, with a MYSQL database, and I have come across one stumbling block - how do I update games where neither player is online? Cricket is a game played between two players, and when they (or one of them) is online then everything is fine; but what if neither player is online? This occurs when championship games are played, and these games need to happen at certain times for game reasons. At the moment I have a private web page that updates every 5 seconds, and each time it loads all games are updated; but then I have the problem that when my private web page stops (for example my computer crashes or my web browser plays up) the game stops updating! Any suggestions?

    Read the article

  • Creating a steady rhythm for music-based game in XNA

    - by A-Type
    I'm looking to develop a game for Windows Phone to explore an idea I had which involves the user building notes into a sequencer while playing a puzzle game. The issue I'm running into is that, while my implementation is very close to being on-beat, there is the occasional pause between beats which makes the whole thing sound sloppy. I'm just not sure how to get around this inside XNA's infrastructure. Currently I'm running this code in the Update method of my GameBoard: public void Update(GameTime gameTime) { onBeat = IsOnBeat(gameTime); [...] if (onBeat) BeatUpdate(); } private bool IsOnBeat(GameTime gameTime) { beatTime += gameTime.ElapsedGameTime.TotalSeconds; if (Math.Abs(beatTime - beatLength) < 0.0166666) { beatTime -= beatLength; return true; } return false; } private void BeatUpdate() { cursor.BeatUpdate(); board.CursorPass((int)cursor.CursorPosition % Board.GRID_WIDTH); } Update checks to see if the time is on beat, and if it is, it calls the BeatUpdate method which moves the cursor over the board (sequencer). The cursor reports its X position to the board, which then plays any notes which are in that position on the sequencer. Notes are SoundEffectInstances, preloaded and ready to play. Oh, and TargetElapsedTime is set to 166666, or 60FPS target. Obviously totaling up the time and then subtracting isn't the most accurate way to go but I can't figure out a way to work within XNA's system in order to overcome this issue. This current system is just horribly unstable. Beats lag and fire too early and it's obvious. I thought about perhaps some sort of threaded solution but I'm not familiar enough with multithreading to figure out how that would work. Any ideas?

    Read the article

  • Collision representation in game overworlds

    - by Akroy
    I'm implementing a 2D overworld where one can walk through an area that is not tile based. I was wondering the best way to implement collisions. In the past when I've done similar things, I've used one image (or set of images) to show an elaborately drawn world and then a second binary image that does nothing but differentiate "wall" and "not wall". Then, I'd use the first for all drawing to the screen, but the second for collision detection. Having another image of the same size to represent collisions seems like lots of overhead. Is there a better way to handle this? (I'm currently using C++ with SDL, although I'm more interested in general concepts)

    Read the article

  • Which java game engine is better? [closed]

    - by user1276078
    I'm new to mobile game development and I have a number of questions to ask. So if you could please answer them, it would be highly appreciated The game I'm trying to release is a 2D arcade game. My intention is to release it on both the iOS platform and the Android platform. My best language is Java, so I would like to use a game engine where I can code with that. Which game engine is the best to accomplish all of this? I know that to make an iOS game with Xcode you need to use a Mac. My question is, do you still need a Mac if you're making a game for iOS without Xcode (like with OpenGL or something Thank you in advance

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part3

    - by ybbest
    In the second part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript and display a message after the modal dialog is closed. In this post, I’d like to show you how to use SPLongOperation with the Modal dialog box. You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. Note that you need to use window.frameElement.commonModalDialogClose instead of window.frameElement.commonModalDialogClose protected void SubmitClicked(object sender, EventArgs e) { //Process stuff string message = "You clicked the Submit button"; string newLocation="http://www.google.com"; string information = string.Format("{{'message':'{0}','location':'{1}' }}", message, newLocation); var longOperation = new SPLongOperation(Page); longOperation.LeadingHTML = "Processing the  application"; longOperation.TrailingHTML = "Please wait while the application is being processed."; longOperation.Begin(); Thread.Sleep(5*1000); var closeDialogScript = GetCloseDialogScriptForLongProcess(information); longOperation.EndScript(closeDialogScript); } protected static string GetCloseDialogScriptForLongProcess(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("window.frameElement.commonModalDialogClose(1,").Append(message).Append(");"); return scriptBuilder.ToString(); }   References: How to: Display a Page as a Modal Dialog Box

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part3

    - by ybbest
    In the second part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript and display a message after the modal dialog is closed. In this post, I’d like to show you how to use SPLongOperation with the Modal dialog box. You can download the source code here. 1. Firstly, modify the element file as follow   2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. Note that you need to use window.frameElement.commonModalDialogClose instead of window.frameElement.commonModalDialogClose References: How to: Display a Page as a Modal Dialog Box

    Read the article

  • How do I calculate someone's age in Java?

    - by nojevive
    I want to return an age in years as an int in a Java method. What I have now is the following where getBirthDate() returns a Date object (with the birth date ;-)): public int getAge() { long ageInMillis = new Date().getTime() - getBirthDate().getTime(); Date age = new Date(ageInMillis); return age.getYear(); } But since getYear() is deprecated I'm wondering if there is a better way to do this? I'm not even sure this works correctly, since I have no unit tests in place (yet).

    Read the article

  • Codeigniter : database configuration

    - by nppCods
    I am beginner for CI so don’t have good knowledge. My problem is: I am not using any database. All the records are fetched from JSON. Therefore I don’t think I need to configure database… As said by CI, it doesn’t necessarily ask for database. So my database.php configuration is : $active_group = ‘default’; $active_record = FALSE; $db[‘default’][‘hostname’] = ‘’; $db[‘default’][‘username’] = ‘’; $db[‘default’][‘password’] = ‘’; $db[‘default’][‘database’] = ‘’; $db[‘default’][‘dbdriver’] = ‘mysql’; $db[‘default’][‘dbprefix’] = ‘’; $db[‘default’][‘pconnect’] = TRUE; $db[‘default’][‘db_debug’] = TRUE; $db[‘default’][‘cache_on’] = FALSE; $db[‘default’][‘cachedir’] = ‘’; $db[‘default’][‘char_set’] = ‘utf8’; $db[‘default’][‘dbcollat’] = ‘utf8_general_ci’; $db[‘default’][‘swap_pre’] = ‘’; $db[‘default’][‘autoinit’] = TRUE; $db[‘default’][‘stricton’] = FALSE; It works in my local system but doesn’t work in live server. I am so surprised. Then I provided hostname, username, password and dbdriver, it works. My question is that, is that necessary to provide all the details if I am not using database? Thank you for your suggestion.

    Read the article

  • Default datetime format in mySQL

    - by Davuz
    I'm coding to search data by compare datetime. In web form, user input value '2012-06-04' store in $_REQUEST['dateSearch']. I create datetime object from that: $dateObj = date_create_from_format("Y-m-d",$_REQUEST['dateSearch']); $dateParam = $dateObj->format("Y-m"); Then I use $dateParam in sql query to find data $sql = " SELECT * FROM `temp` as `t` WHERE `t`.`date` LIKE '$dateParam%' "; Everything is ok, but I'm not sure mySQL alway use only one datetime format "Y-m-d H:i:s". At here, $dateParam = $dateObj->format("Y-m"); I set default format is "Y-m". Is the default format never change? I don't want hard set format "Y-m-d H:i:s" in code, instead of, I think get format string from system to use is better. How do I get default datetime format string from mySQL???

    Read the article

  • How to create two dimensional array in jquery or js

    - by learner
    I need to create dynamic global two dimensional array in jquery or javascript My function is like this <script> var index = 0; var globalArray = new Array(); function createArray(){ var loop = globalArray[index].length; var name = $.("#uname").val(); if(loop == 0){ globalArray[index][0] = uname; }else{ globalArray[index][loop++] = uname; } } </script> <div><input type="text" id="uname"> <input type='button' value='save' onclick='createArray();'> </div> On click of that button I am getting this error "globalArray[index] is undefined" How can I create one global array using jquery or javascript like this. I dont want any hidden field and all. Please help me. Thanks

    Read the article

  • supervisord environment variables setting up application

    - by user1434844
    I'm running an application from supervisord and I have to set up an environment for it. There are about 30 environment variables that need to be set. I've tried putting all on one big environment= line and that doesn't seem to work. I've also tried multiple enviroment= lines, and that doesn't seem to work either. I've also tried both with and without ' around the env value. What's the best way to set up my environment such that it remains intact under supervisord control? Should I be calling my actual program (tornado, fwiw) from a shell script with the environment preloaded there? Ideally, I'd like to put all of the enviroment variables into an include file and load them with supervisor, but I'm open to doing it another way.

    Read the article

  • Getting a value from a row at particular time

    - by Swetha Bindu
    I had a row in my database: starttime:4/6/2012 2:00pm, Endtime:31/12/9999, name:"swetha", status:"open"..... When I update this row I changed the starttime to the current time (getdate()) and have no issues. I am running a Windows Service each day at 1am to modify a value in the row. I would like to know the status of my row at 4/6/2012 11:59 pm when my service runs. There is no need to do an update at 4/6/2012 11:59 pm and the last update may be at any time of the day however my requirement is to get the status value at 4/6/2012 11:59 pm. I would like to have the query in SQL Server 2008. Can anyone please help me to find a solution?

    Read the article

  • Keeping WPF grids from getting out of parent bounds

    - by Jonathan Perry
    In my UI, I have a big grid with two columns and one row. in the right column, I have a grid with three rows where in the top row I have a user control, and in the two bottom rows I have two Expander objects, each containing an ItemsControl with a list that gets populated in runtime. Sometimes, that list gets really long and "spills" from the screen towards the bottom. What I want to do is to allow the user to see both expanders, be able to expand or collapse them while keeping them both in sight. I tried wrapping them in WrapPanels or StackPanel but to no avail. Here's some code to help explain my problem: <Grid Grid.Row="1" x:Name="grid1"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Expander Grid.Row="0" Header="Expander 1" x:Name="expander1" FontSize="14" IsExpanded="True"> <Expander.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFC4C4C4" Offset="0" /> <GradientStop Color="White" Offset="1" /> </LinearGradientBrush> </Expander.Background> <ContentPresenter Content="{Binding ViewModel.OpenAlerts, ElementName=m_viewControl}" ClipToBounds="True"/> </Expander> <Expander Grid.Row="1" x:Name="expander2" Header="Expander 2" FontSize="14" IsExpanded="True"> <Expander.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFC4C4C4" Offset="0" /> <GradientStop Color="White" Offset="1" /> </LinearGradientBrush> </Expander.Background> <ContentPresenter Content="{Binding ViewModel.ClosedAlerts, ElementName=m_viewControl}" ClipToBounds="True"/> </Expander> </Grid> Any assistance or tips will be highly appreciated! Thanks, John.

    Read the article

  • Memory Management iOS dev app doesn't work after a few detail items

    - by user1434846
    I am working on a project with a tableView controller and the detail views contains CMMotionManager.When i open 5 or 6 detailViews all goes well,but after a while the app goes slow and finally crashes.On instruments the only leak is on main.m , also i must say that I'm using ARC and i can't dealloc or realese the instances. Here is the code: First the table view: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.title = @"Movement";//Master View Controller title bar UIImage *image = [UIImage imageNamed:@"jg_navibar.png"]; [self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault]; //Init the array with data bodypartsMutableArray = [NSMutableArray arrayWithCapacity:26]; BodypartData *part1 = [[BodypartData alloc] init]; part1.bodypartname = @"Shoulder"; part1.movementname = @"Flexion"; part1.fullimageStartingPosition=[UIImage imageNamed:@"2_shoulder_flexion_end_position.jpg"]; part1.fullimageEndedPosition=[UIImage imageNamed:@"2_shoulder_flexion_end_position.jpg"]; part1.thumbimage=[UIImage imageNamed:@"1_shoulder_flexion_landmarks_thumb.jpg"]; [bodypartsMutableArray addObject:part1]; ......... } then the cell: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyBasicCell"]; BodypartData *part = [self.bodypartsMutableArray objectAtIndex:indexPath.row]; cell.textLabel.text =[NSString stringWithFormat:part.movementname]; cell.detailTextLabel.text =[NSString stringWithFormat:part.bodypartname]; cell.imageView.image =part.thumbimage; return cell; } and the the detailViewdid load: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // Init motionManager object and set the Update Interval _motionManager = [[CMMotionManager alloc]init]; _motionManager.deviceMotionUpdateInterval=1/60; //60 Hz [_motionManager startGyroUpdates]; if (_motionManager.gyroAvailable) { _motionManager.gyroUpdateInterval = 1.0/60.0; [_motionManager startDeviceMotionUpdatesToQueue:[NSOperationQueue currentQueue] withHandler: ^(CMDeviceMotion *motion, NSError *error) { CMAttitude *attitude = motion.attitude; //Calculation with rotationMatrix m11 = [NSString stringWithFormat:@"%.02f", attitude.rotationMatrix.m11]; m12 = [NSString stringWithFormat:@"%.02f", attitude.rotationMatrix.m12]; m13 = [NSString stringWithFormat:@"%.02f", attitude.rotationMatrix.m13]; ......... }

    Read the article

  • Regex "or" Expression

    - by David
    This is probably a really basic question, but I can't find any answers. I need to match a string by either one or more spaces OR an equals sign. When I split this string: 9 x 13 = (8.9 x 13.4) (89 x 134) with ( +) I get: part 0: 9 x 13 = (8.9 x 13.4) part 1: (89 x 134) When I split it with (=) I get: part 0: 9 x 13 part 1: (8.9 x 13.4) (89 x 134) How can split by BOTH? Something like: (=)OR( +) Edit: This does not work(=)|( +) Test it here: http://myregexp.com/ under "split".

    Read the article

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