Search Results

Search found 659 results on 27 pages for 'joel alejandro'.

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

  • Getting past dates in HP-UX with ksh

    - by Alejandro Atienza Ramos
    Ok, so I need to translate a script from a nice linux & bash configuration to ksh in hp-ux. Each and every command expects a different syntax and i want to kill myself. But let's skip the rant. This is part of my script anterior=`date +"%Y%0m" -d '1 month ago'` I basically need to get a past date in format 201002. Never mind the thing that, in the new environment, %0m means "no zeroes", while actually in the other one it means "yes, please put that zero on my string". It doesn't even accept the "1 month ago". I've read the man date for HP-UX and it seems you just can't do date arithmetic with it. I've been looking around for a while but all i find are lengthy solutions. I can't quite understand that such a typical administrative task like adding dates needs so much fuss. Isn't there a way to convert my one-liner to, well, i don't know, another one? Come on, i've seen proposed solutions that used bc, had thirty plus lines and magic number all over the script. The simplest solutions seem to use perl... but i don't know how to modify them, as they're quite arcane. Thanks!

    Read the article

  • Mathematica ListcontourPlot3D

    - by Alejandro
    I have data in the form { {x,y,z,f}...} I am using ListContourPlot3D but all I get is an empty box with dimensions -1,1 in each direction. Here is my code: ListContourPlot3D[data5, PlotRange - All, AxesLabel - {"[Beta]", "[Omega]", "Vo"}, Contours - {1500}]. These are the first 5 points of my data:( the whole set has 55 points) {{200, 20000 10^(1/3), 2000, 1226}, {200, 20000 10^(1/3), 2600, 1422}, {200, 20000 10^(1/3), 3200, 1581}, {200, 20000 10^(1/3), 3800, 1761}, {200, 20000 10^(1/3), 4400, 1872}} Dimensions[data5] returns {55,4} If I do IntegerPart[data5] it does it correctly so it must recognize the numbers in my data. I appreciate any ideas. Thank you.

    Read the article

  • AS3: Array of objects parsed from XML remains with zero length

    - by Joel Alejandro
    I'm trying to parse an XML file and create an object array from its data. The data is converted to MediaAlbum classes (class of my own). The XML is parsed correctly and the object is loaded, but when I instantiate it, the Albums array is of zero length, even when the data is loaded correctly. I don't really know what the problem could be... any hints? import Nem.Media.*; var mg:MediaGallery = new MediaGallery("test.xml"); trace(mg.Albums.length); MediaGallery class: package Nem.Media { import flash.net.URLRequest; import flash.net.URLLoader; import flash.events.*; public class MediaGallery { private var jsonGalleryData:Object; public var Albums:Array = new Array(); public function MediaGallery(xmlSource:String) { var loader:URLLoader = new URLLoader(); loader.load(new URLRequest(xmlSource)); loader.addEventListener(Event.COMPLETE, loadGalleries); } public function loadGalleries(e:Event):void { var xmlData:XML = new XML(e.target.data); var album; for each (album in xmlData.albums) { Albums.push(new MediaAlbum(album.attribute("name"), album.photos)); } } } } XML test source: <gallery <albums <album name="Fútbol 9" <photos <photo width="600" height="400" filename="foto1.jpg" / <photo width="600" height="400" filename="foto2.jpg" / <photo width="600" height="400" filename="foto3.jpg" / </photos </album <album name="Fútbol 8" <photos <photo width="600" height="400" filename="foto4.jpg" / <photo width="600" height="400" filename="foto5.jpg" / <photo width="600" height="400" filename="foto6.jpg" / </photos </album </albums </gallery

    Read the article

  • AS3: Accessing variable declared on MovieClip's parent

    - by Joel Alejandro
    I have a frame which contains an mcMenubar MovieClip. On the frame, I have this code: import Nem.* import fl.transitions.Tween; import fl.transitions.easing.*; import fl.motion.Color; var pageLoader:SwfLoader = new SwfLoader(root, 199, 144); On the mcMenubar clip, I want to access that same pageLoader instance: var pageFile:String = "page-" + e.target.name.replace(/btn/gi, "").toLowerCase() + ".swf"; this.parent.loadPage("loadertest.swf"); // THIS WON'T WORK // var tweenMove:Tween = new Tween(gfxSelected, "x", Bounce.easeOut, gfxSelected.x, e.target.x, 1, true); currentlySelected = e.target.name; Apparently I'm getting this error: TypeError: Error #1010: A term is undefined and has no properties. at MethodInfo-71() How can I fix this?

    Read the article

  • Public Cell ID databases

    - by Alejandro Mezcua
    Hi. I'm building a location aware mobile application which uses GPS, but i'd like to be able to add cell location too. The best thing I have found so far is to use Google Gears, which has a location API available, but my application is not web based. Are there any good public cell id databases that can be accessed from any kind of application? I have found a few interesting projects out there like OpenCellID, but the database is very poor right now.

    Read the article

  • NSMutableDictionary with UIButton* as keys - iPhone development

    - by Alejandro A.
    Hi, I'm new to iPhone development and I have a question that may have a very simple answer. I am trying to add buttons to a view and these buttons are associated with a custom class that I defined. When I add the buttons to the view, I would like to know what class these buttons correspond to. This is because when I press the button, I need to get some information about the class, but the receiver of the message is another class. I couldn't find information about an error that I'm getting on the web. The problem I have is that I'm trying to create an NSMutableDictionary where the keys are of type UIButton* and the values are of my custom type: // create button for unit UIButton* unitButton = [[UIButton alloc] init]; [sourceButtonMap setObject:composite forKey:unitButton]; Of course, the sourceButtonMap is defined in the class and initialized in the init function as sourceButtonMap = [[NSMutableDictionary alloc] init]; The error I get when I try to add the key-value pair is: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIButton copyWithZone:]: unrecognized selector sent to instance 0x3931e90' Is this happening because I can't store UIButton* as keys? Can anyone point me why I'm getting this error? Thank you all, aa

    Read the article

  • MooTools Classes and JsDoc

    - by Joel Alejandro
    I have the following Moo class: Nem.Ui.Window = new Class({ Implements: [Options, Events], options: { caption: "Ventana", icon: $empty, centered: true, id: $empty, width: $empty, height: $empty, modal: false, desktop: $empty, x: $empty, y: $empty, layout: $empty }, initialize: function(options) { this.setOptions(options); /* ... */ }, setHtmlContents: function(content) { /* ... */ }, setText: function(text) { /* ... */ }, close: function(win) { /* ... */ }, /* ... */ }); I want to document it with JsDoc. I read you can use @lends [class].prototype inside new Class and mark initialize with the @constructs tag. How can I mark methods and events such? I.E.: setHtmlContents should be a method, close should be an event. Also, can the elements under options be documented, somehow?

    Read the article

  • Redirect Desktop Internal Pages to Correct Mobile Internal Pages with Htaccess

    - by Luis Alejandro Ramrez Gallardo
    I have built a Mobile site in a sub-domain. I have successfully implemented the redirect 302 from: www.domain.com to m.domain.com in htaccess. What I'm looking to achieve now it to redirect users from: www.domain.com/internal-page/ > 302 > m.domain.com/internal-page.html Notice that URL name for desktop and mobile is not the same. The code I'm using looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress # Mobile Redirect # Verify Desktop Version Parameter RewriteCond %{QUERY_STRING} (^|&)ViewFullSite=true(&|$) # Set cookie and expiration RewriteRule ^ - [CO=mredir:0:www.domain.com:60] # Prevent looping RewriteCond %{HTTP_HOST} !^m.domain.com$ # Define Mobile agents RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "sony|symbian|nokia|samsung|mobile|windows ce|epoc|opera" [NC,OR] RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR] RewriteCond %{HTTP_USER_AGENT} "blackberry|ericsson,|panasonic|philips|sanyo|sharp|sie-"[NC,OR] RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|palm|series60|palmsource|pocketpc"[NC,OR] RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|iPhone|android"[NC] # Verify if not already in Mobile site RewriteCond %{HTTP_HOST} !^m\. # We need to read and write at the same time to set cookie RewriteCond %{QUERY_STRING} !(^|&)ViewFullSite=true(&|$) # Verify that we previously haven't set the cookie RewriteCond %{HTTP_COOKIE} !^.*mredir=0.*$ [NC] # Now redirect the users to the Mobile Homepage RewriteRule ^$ http://m.domain.com [R] RewriteRule $/internal-page/ http://m.domain.com/internal-page.html [R,L]

    Read the article

  • How to manipulate *huge* amounts of data

    - by Alejandro
    Hi there! I'm having the following problem. I need to store huge amounts of information (~32 GB) and be able to manipulate it as fast as possible. I'm wondering what's the best way to do it (combinations of programming language + OS + whatever you think its important). The structure of the information I'm using is a 4D array (NxNxNxN) of double-precission floats (8 bytes). Right now my solution is to slice the 4D array into 2D arrays and store them in separate files in the HDD of my computer. This is really slow and the manipulation of the data is unbearable, so this is no solution at all! I'm thinking on moving into a Supercomputing facility in my country and store all the information in the RAM, but I'm not sure how to implement an application to take advantage of it (I'm not a professional programmer, so any book/reference will help me a lot). An alternative solution I'm thinking on is to buy a dedicated server with lots of RAM, but I don't know for sure if that will solve the problem. So right now my ignorance doesn't let me choose the best way to proceed. What would you do if you were in this situation? I'm open to any idea. Thanks in advance!

    Read the article

  • Flash Player scripting + IE8

    - by Joel Alejandro
    I've developed a small control bar for a Flash viewer generated by a third-party software. It has a First, Prev, Next & Last button, and a Zoom command. While Zoom works fine in all browsers, the navigation buttons seem to fail at Internet Explorer 8. I use at least two functions. This one locates the Flash object I want to manipulate: function getFlashMovieObject(movieName) { if (window.document[movieName]) { return window.document[movieName]; } if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document.getElementById(movieName); } } ...and any of these ones handles the frame navigation: var currentFrame = 0; function gotoFirst(id) { getFlashMovieObject(id + "Blueprints").Rewind(); currentFrame = 0; $("currentFrame").innerHTML = currentFrame + 1; $("frameTitle").innerHTML = frameTitles[id][currentFrame]; } function gotoPrev(id) { var movie = getFlashMovieObject(id + "Blueprints"); if (currentFrame 0) { currentFrame--; } movie.GotoFrame(currentFrame); $("currentFrame").innerHTML = currentFrame + 1; $("frameTitle").innerHTML = frameTitles[id][currentFrame]; } function gotoNext(id) { var movie = getFlashMovieObject(id + "Blueprints"); if (currentFrame < movie.TotalFrames() - 1) { currentFrame++; } movie.GotoFrame(currentFrame); $("currentFrame").innerHTML = currentFrame + 1; $("frameTitle").innerHTML = frameTitles[id][currentFrame]; } function gotoLast(id) { var movie = getFlashMovieObject(id + "Blueprints"); currentFrame = movie.TotalFrames() - 1; movie.GotoFrame(currentFrame); $("currentFrame").innerHTML = currentFrame + 1; $("frameTitle").innerHTML = frameTitles[id][currentFrame]; } Btw, that $ is MooTools, not jQuery. Anyway, IE dies on the movie.TotalFrames() call. What can I do to solve this? Keep in mind I need this to be done via JavaScript, as I cannot edit the SWF.

    Read the article

  • Placement of a call to the parent method

    - by Alejandro
    I have a class that has a method. That class has a child class that overrides that method. The child's method has to call the parent's method. In all OO that I've seen or written calls to the parent's version of the same method were on the first line of the method. On a project that I am working on circumstances call for placing that method call at the end of a method. Should I be worried? Is that a code smell? Is this code inherently bad? class Parent { function work() { // stuff } } class Child { function work() { // do thing 1 // do thing 2 parent::work(); // is this a bad practice? // should I call the parent's work() method before // I do anything in this method? } }

    Read the article

  • How do I identify an ASP.NET MVC website?

    - by Alejandro
    I am trying to determine whether a company has websites built with ASP.NET MVC in their portfolio. Is there a reliable way of determining that without asking them assuming that I can visit the website in question in my browser? This might seem simple, but I wasn't able to find this information online. I would think that the lack of viewstate related stuff in the HTML source and the noun-verb URL structure would be good indicators. Are there any other indicators?

    Read the article

  • Fast read of certain bytes of multiple files in C/C++

    - by Alejandro Cámara
    I've been searching in the web about this question and although there are many similar questions about read/write in C/C++, I haven't found about this specific task. I want to be able to read from multiple files (256x256 files) only sizeof(double) bytes located in a certain position of each file. Right now my solution is, for each file: Open the file (read, binary mode): fstream fTest("current_file", ios_base::out | ios_base::binary); Seek the position I want to read: fTest.seekg(position*sizeof(test_value), ios_base::beg); Read the bytes: fTest.read((char *) &(output[i][j]), sizeof(test_value)); And close the file: fTest.close(); This takes about 350 ms to run inside a for{ for {} } structure with 256x256 iterations (one for each file). Q: Do you think there is a better way to implement this operation? How would you do it?

    Read the article

  • AFNetworking PostPath php Parameters are null

    - by Alejandro Escobar
    I am trying to send a username and password from an iOS app using AFNetworking framework to a php script. The iOS app continues to receive status code 401 which I defined to be "not enough parameters". I have tried returning the "username" from the php script to the iOS app and receive . Based on what I've been investigating so far, it seems as though: 1) The php script is not decoding the POST parameters properly 2) The iOS app is not sending the POST parameters properly The following is the iOS function - (IBAction)startLoginProcess:(id)sender { NSString *usernameField = usernameTextField.text; NSString *passwordField = passwordTextField.text; NSDictionary *parameters = [NSDictionary dictionaryWithObjectsAndKeys:usernameField, @"username", passwordField, @"password", nil]; NSURL *url = [NSURL URLWithString:@"http://localhost/~alejandroe1790/edella_admin/"]; AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; [httpClient defaultValueForHeader:@"Accept"]; [httpClient setParameterEncoding:AFJSONParameterEncoding]; [httpClient postPath:@"login.php" parameters:parameters success:^(AFHTTPRequestOperation *operation, id response) { NSLog(@"operation hasAcceptableStatusCode: %d", [operation.response statusCode]); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"Error with request"); NSLog(@"%@",[error localizedDescription]); }]; } The following is the php script function checkLogin() { // Check for required parameters if (isset($_POST["username"]) && isset($_POST["password"])) { //Put parameters into local variables $username = $_POST["username"]; $password = $_POST["password"]; $stmt = $this->db->prepare("SELECT Password FROM Admin WHERE Username=?"); $stmt->bind_param('s', $username); $stmt->execute(); $stmt->bind_result($resultpassword); while ($stmt->fetch()) { break; } $stmt->close(); // Username or password invalid if ($password == $resultpassword) { sendResponse(100, 'Login successful'); return true; } else { sendResponse(400, 'Invalid Username or Password'); return false; } } sendResponse(401, 'Not enough parameters'); return false; } I feel like I may be missing something. Any assistance would be great.

    Read the article

  • How to make Subversion use Linux system accounts for authentication?

    - by Alejandro García Iglesias
    Hi all, I've set up a Ubuntu Server for Subversion with Apache/WebDAV interface to share repositories with other developers. My question is, how can I make Subversion use the linux system accounts for authentication? This would lead to very easy Subversion account management. Subversion with Apache/WebDAV is currently working with this configuration: Contents of /etc/apache2/mods-available/dav_svn.conf: <Location /svn> DAV svn SVNParentPath /home/svn SVNListParentPath On AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </Location> I have tried changing AuthUserFile /etc/apache2/dav_svn.passwd with AuthUserFile /etc/shadow with no success. This makes the server to respond with a error 500 internal server error. It's logical, why the Web service should have access to system authentication file? Thanks a lot in advance!

    Read the article

  • Socket server for 2D MMORPG

    - by Alejandro
    I'm starting a 2D browser multiplayer game consisting of a city with many kinds of transports (metro, buses, tunnels), players using those transports and having some interaction between them. I have started the client side in Actionscript, server side in PHP (but now i'm moving to Java) and persistence in MySQL. Which socket server (non commercial) will be preferable, RedDwarf (former DarkStar), Red5, ... ? Those servers are Flash Remoting (AMF) capable ? Those servers manage all the object's game persistence? Then there's no need to create a database ?

    Read the article

  • .htaccess & mod_rewrite for passing GET parameters

    - by Joel Alejandro
    Currently I use this to pass GET parameters on an "elegant" way: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]*)/$ index.php?module=$1 [L] RewriteRule ^([^/]*)/([^/]*)/$ index.php?module=$1&object=$2 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/$ index.php?module=$1&object=$2&submodule=$3 [L] This works great for 3 parameters max., (and I'm sure it's seriously ugly). Any way to do the same thing, for n-paremeters?

    Read the article

  • Partner outreach on the Oracle Fusion Applications user experience begins

    - by mvaughan
    by Misha Vaughan, Architect, Applications User Experience I have been asked the question repeatedly since about December of last year: “What is the Applications User Experience group doing about partner outreach?”  My answer, at the time, was: “We are thinking about it.”  My colleagues and I were really thinking about the content or tools that the Applications UX group should be developing. What would be valuable to our partners? What will actually help grow their applications business, and fits within the applications user experience charter?In the video above, you’ll hear Jeremy Ashley, vice president of the Applications User Experience team, talk about two fundamental initiatives that our group is working on now that speaks straight to partners.  Special thanks to Joel Borellis, Kelley Greenly, and Steve Hoodmaker for helping to make this video happen so flawlessly. Steve was responsible for pulling together a day of Oracle Fusion Applications-oriented content, including David Bowin, Director, Fusion Applications Strategy, on some of the basic benefits of Oracle Fusion Applications.  Joel Borellis, Group Vice President, Partner Enablement, and David Bowin in the Oracle Studios.Nigel King, Vice President Applications Functional Architecture, was also on the list, talking about co-existence opportunities with Oracle Fusion Applications.Me and Nigel King, just before his interview with Joel. Fusion Applications User Experience 101: Basic education  Oracle has invested an enormous amount of intellectual and developmental effort in the Oracle Fusion Applications user experience. Find out more about that at the Oracle Partner Network Fusion Learning Center (Oracle ID required). What you’ll learn will help you uncover how, exactly, Oracle made Fusion General Ledger “sexy,” and that’s a direct quote from Oracle Ace Director Debra Lilley, of Fujitsu. In addition, select Applications User Experience staff members, as well as our own Fusion User Experience Advocates,  can provide a briefing to our partners on Oracle’s investment in the Oracle Fusion Applications user experience. Looking forward: Taking the best of the Fusion Applications UX to your customersBeyond a basic orientation to one of the key differentiators for Oracle Fusion Applications, we are also working on partner-oriented training.A question we are often getting right now is: “How do I help customers build applications that look like Fusion?” We also hear: “How do I help customers build applications that take advantage of the next-generation design work done in Fusion?”Our answer to this is training and a tool – our user experience design patterns – these are a set of user experience best-practices. Design patterns are re-usable, usability-tested, user experience components that make creating Fusion Applications-like experiences straightforward.  It means partners can leverage Oracle’s investment, but also gain an advantage by not wasting time solving a problem we’ve already solved. Their developers can focus on helping customers tackle the harder development challenges. Ultan O’Broin, an Apps UX team member,  and I are working with Kevin Li and Chris Venezia of the Oracle Platform Technology Services team, as well as Grant Ronald in Oracle ADF, to bring you some of the best “how-to” UX training, customized for your local area. Our first workshop will be in EMEA. Stay tuned for an assessment and feedback from the event.

    Read the article

  • SR Activity Summaries Via Direct Email? You Bet!

    - by PCat
    Courtesy of Ken Walker. I’m a “bottom line” kind of guy.  My friends and co-workers will tell you that I’m a “Direct Communicator” when it comes to work or my social life.  For example, if I were to come up with a fantastic new recipe for a low-fat pan fried chicken, I’d Tweet, email, or find a way to blast the recipe directly to you so that you could enjoy it immediately.  My friends would see the subject, “Awesome New Fried Chicken” and they’d click and see the recipe there before them.Others are “Indirect Communicators.”  My friend Joel is like this.  He would post the recipe in his blog, and then Tweet or email a link back to his blog with a subject, “Fried Chicken.”  Then Joel would sit back and expect his friends to read the email, AND click the link to his blog, and then read the recipe.  As a fan of the “Direct” method, I wish there was a way for me to “Opt-in” for immediate updates from Joel so I could see the recipe without having to click over to his blog to search for it.The same is true for MOS.  If you’ve ever opened a Service Request through My Oracle Support (MOS), you know that most of the communication between you and the Oracle Support Engineer with respect to the issue in the SR, is done via email.  Which type of email would you rather receive in your email account? Example1:Your SR has been updated.  Click HERE to see the update. Or Example2:Your SR has been updated.  Here is the update:  “Hi John, Oracle Development has completed the patch we’ve been waiting for!  Here’s a direct “LINK” to the patch that should resolve your issue.  Please download and install the patch via the instructions (included with the link) and let me know if it does, in fact, resolve your issue!”Example2 is available to you!  All you need to do is to “Opt-In” for the direct email updates.  The default is for the indirect update as seen in Example1.  To turn on “Service Request Details in Email” simply follow these instructions (aided by the screenshot below):1.    Log into MOS, and click on your name in the upper right corner.  Select “My Account.”2.    Make sure “My Account” is highlighted in bold on the left.3.    Turn ON, “Service Request Details in Email” That’s it!  You will now receive the SR Updates, directly in your email account without having to log into MOS, click the SR, scroll down to the updates, etc.  That’s better than Fried Chicken!  (Well; almost better....).

    Read the article

  • Turning PHP page calling Zend functions procedurally into Zend Framework MVC-help!

    - by Joel
    Hi guys, I posted much of this question, but if didn't include all the Zend stuff because I thought it'd be overkill, but now I'm thinking it's not easy to figure out an OO way of doing this without that code... So with that said, please forgive the verbose code. I'm learning how to use MVC and OO in general, and I have a website that is all in PHP but most of the pages are basic static pages. I have already converted them all to views in Zend Framework, and have the Controller and layout set. All is good there. The one remaining page I have is the main reason I did this...it in fact uses Zend library (for gData connection and pulling info from a Google Calendar and displaying it on the page. I don't know enough about this to know where to begin to refactor the code to fit in the Zend Framework MVC model. Any help would be greatly appreciated!! .phtml view page: <div id="dhtmltooltip" align="left"></div> <script src="../js/tooltip.js" type="text/javascript"> </script> <div id="container"> <div id="conten"> <a name="C4"></a> <?php function get_desc_second_part(&$value) { list(,$val_b) = explode('==',$value); $value = trim($val_b); } function filterEventDetails($contentText) { $data = array(); foreach($contentText as $row) { if(strstr($row, 'When: ')) { ##cleaning "when" string to get date in the format "May 28, 2009"## $data['duration'] = str_replace('When: ','',$row); list($when, ) = explode(' to ',$data['duration']); $data['when'] = substr($when,4); if(strlen($data['when'])>13) $data['when'] = trim(str_replace(strrchr($data['when'], ' '),'',$data['when'])); $data['duration'] = substr($data['duration'], 0, strlen($data['duration'])-4); //trimming time zone identifier (UTC etc.) } if(strstr($row, 'Where: ')) { $data['where'] = str_replace('Where: ','',$row); //pr($row); //$where = strstr($row, 'Where: '); //pr($where); } if(strstr($row, 'Event Description: ')) { $event_desc = str_replace('Event Description: ','',$row); //$event_desc = strstr($row, 'Event Description: '); ## Filtering event description and extracting venue, ticket urls etc from it. //$event_desc = str_replace('Event Description: ','',$contentText[3]); $event_desc_array = explode('|',$event_desc); array_walk($event_desc_array,'get_desc_second_part'); //pr($event_desc_array); $data['venue_url'] = $event_desc_array[0]; $data['details'] = $event_desc_array[1]; $data['tickets_url'] = $event_desc_array[2]; $data['tickets_button'] = $event_desc_array[3]; $data['facebook_url'] = $event_desc_array[4]; $data['facebook_icon'] = $event_desc_array[5]; } } return $data; } // load library require_once 'Zend/Loader.php'; Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar'); Zend_Loader::loadClass('Zend_Http_Client'); // create authenticated HTTP client for Calendar service $gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; $user = "[email protected]"; $pass = "xxxxxxxx"; $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal); $gcal = new Zend_Gdata_Calendar($client); $query = $gcal->newEventQuery(); $query->setUser('[email protected]'); $secondary=true; $query->setVisibility('private'); $query->setProjection('basic'); $query->setOrderby('starttime'); $query->setSortOrder('ascending'); //$query->setFutureevents('true'); $startDate=date('Y-m-d h:i:s'); $endDate="2015-12-31"; $query->setStartMin($startDate); $query->setStartMax($endDate); $query->setMaxResults(30); try { $feed = $gcal->getCalendarEventFeed($query); } catch (Zend_Gdata_App_Exception $e) { echo "Error: " . $e->getResponse(); } ?> <h1><?php echo $feed->title; ?></h1> <?php echo $feed->totalResults; ?> event(s) found. <table width="90%" border="3" align="center"> <tr> <td width="20%" align="center" valign="middle"><b>;DATE</b></td> <td width="25%" align="center" valign="middle"><b>VENUE</b></td> <td width="20%" align="center" valign="middle"><b>CITY</b></td> <td width="20%" align="center" valign="middle"><b>DETAILS</b></td> <td width="15%" align="center" valign="middle"><b>LINKS</b></td> </tr> <?php if((int)$feed->totalResults>0) { //checking if at least one event is there in this date range foreach ($feed as $event) { //iterating through all events //pr($event);die; $contentText = stripslashes($event->content->text); //striping any escape character $contentText = preg_replace('/\<br \/\>[\n\t\s]{1,}\<br \/\>/','<br />',stripslashes($event->content->text)); //replacing multiple breaks with a single break //die(); $contentText = explode('<br />',$contentText); //splitting data by break tag $eventData = filterEventDetails($contentText); $when = $eventData['when']; $where = $eventData['where']; $duration = $eventData['duration']; $venue_url = $eventData['venue_url']; $details = $eventData['details']; $tickets_url = $eventData['tickets_url']; $tickets_button = $eventData['tickets_button']; $facebook_url = $eventData['facebook_url']; $facebook_icon = $eventData['facebook_icon']; $title = stripslashes($event->title); echo '<tr>'; echo '<td width="20%" align="center" valign="middle" nowrap="nowrap">'; echo $when; echo '</td>'; echo '<td width="20%" align="center" valign="middle">'; if($venue_url!='') { echo '<a href="'.$venue_url.'" target="_blank">'.$title.'</a>'; } else { echo $title; } echo '</td>'; echo '<td width="20%" align="center" valign="middle">'; echo $where; echo '</td>'; echo '<td width="20%" align="center" valign="middle">'; $details = str_replace("\n","<br>",htmlentities($details)); $duration = str_replace("\n","<br>",$duration); $detailed_description = "<b>When</b>: <br>".$duration."<br><br>"; $detailed_description .= "<b>Description</b>: <br>".$details; echo '<a href="javascript:void(0);" onmouseover="ddrivetip(\''.$detailed_description.'\')" onmouseout="hideddrivetip()" onclick="return false">View Details</a>'; echo '</td>'; echo '<td width="20%" valign="middle">'; if(trim($tickets_url) !='' && trim($tickets_button)!='') { echo '<a href="'.$tickets_url.'" target="_blank"><img src="'.$tickets_button.'" border="0" ></a>'; } if(trim($facebook_url) !='' && trim($facebook_icon)!='') { echo '<a href="'.$facebook_url.'" target="_blank"><img src="'.$facebook_icon.'" border="0" ></a>'; } else { echo '......'; } echo '</td>'; echo '</tr>'; } } else { //else show 'no event found' message echo '<tr>'; echo '<td width="100%" align="center" valign="middle" colspan="5">'; echo "No event found"; echo '</td>'; } ?> </table> <h3><a href="#pastevents">Scroll down for a list of past shows.</a></h3> <br /> <a name="pastevents"></a> <ul class="pastShows"> <?php $startDate='2005-01-01'; $endDate=date('Y-m-d'); /*$gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; $user = "[email protected]"; $pass = "silverroof10"; $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal); $gcal = new Zend_Gdata_Calendar($client); $query = $gcal->newEventQuery(); $query->setUser('[email protected]'); $query->setVisibility('private'); $query->setProjection('basic');*/ $query->setOrderby('starttime'); $query->setSortOrder('descending'); $query->setFutureevents('false'); $query->setStartMin($startDate); $query->setStartMax($endDate); $query->setMaxResults(1000); try { $feed = $gcal->getCalendarEventFeed($query); } catch (Zend_Gdata_App_Exception $e) { echo "Error: " . $e->getResponse(); } if((int)$feed->totalResults>0) { //checking if at least one event is there in this date range foreach ($feed as $event) { //iterating through all events $contentText = stripslashes($event->content->text); //striping any escape character $contentText = preg_replace('/\<br \/\>[\n\t\s]{1,}\<br \/\>/','<br />',stripslashes($event->content->text)); //replacing multiple breaks with a single break $contentText = explode('<br />',$contentText); //splitting data by break tag $eventData = filterEventDetails($contentText); $when = $eventData['when']; $where = $eventData['where']; $duration = $eventData['duration']; $title = stripslashes($event->title); echo '<li class="pastShows">' . $when . " - " . $title . ", " . $where . '</li>'; } } ?> </div> </div>

    Read the article

  • Microsoft Word restores all open documents when clicking on a .DOC file

    - by Joel Spolsky
    I tend to have a few Word documents that I keep open all the time, with notes for a long-running project. Normally they are all minimized. The problem is that when I click on a different .doc or .docx file in Windows Explorer, even though the new document opens in its own window, the other, minimized Word documents get restored, too. Now I have several restored windows that I wanted to keep minimized. I started noticing this problem on Windows 7, but I'm not sure if it's unique to Windows 7. I'm using Word 2007.

    Read the article

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