Search Results

Search found 392 results on 16 pages for 'luis oscar'.

Page 13/16 | < Previous Page | 9 10 11 12 13 14 15 16  | Next Page >

  • Call phpexcel from joomla

    - by Oscar Calderon
    i have a problem about phpexcel and joomla. I'm developing some filter form to load excel reports, so i used phpexcel library to do this. Right now i have only a report, it works fine, but after that i upload inside joomla using PHP pages component that allows me to put php files inside joomla and call it. When i put them, i change a little bit the form that calls the php that generates the excel report, i call the php using a link like this: h**p://www.whiblix.com/index.php?option=com_php&Itemid=24 That is, calling it from Joomla, not directly the php. If i wanna call the php directly i could use this path: h**p://www.whiblix.com/components/com_php/files/repImportaciones.php What's the problem? The problem is, when i call the php that generates the excel through joomla, the excel that is downloaded is corrupt and only shows symbols in one cell when i open it. But if i call the php directly the report is generated fine. I could call the php directly, the problem is that if i call it directly i can't use this line of code: defined( '_JEXEC' ) or die( 'Restricted access' ); That is used to deny the direct access to php from call it directly, because it doesn' work because the security. Where's the problem? This is the code of php that generates the report (ommiting the code where generates the rows and cells): <?php //defined( '_JEXEC' ) or die( 'Restricted access' ); /** Error reporting */ error_reporting(E_ALL); date_default_timezone_set('Europe/London'); require_once 'Classes/PHPExcel.php'; // Create new PHPExcel object $objPHPExcel = new PHPExcel(); // Set properties $objPHPExcel->getProperties()->setCreator("Maarten Balliauw") ->setLastModifiedBy("Maarten Balliauw") ->setTitle("Office 2007 XLSX Test Document") ->setSubject("Office 2007 XLSX Test Document") ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") ->setKeywords("office 2007 openxml php") ->setCategory("Test result file"); // Rename sheet $objPHPExcel->getActiveSheet()->setTitle('Reporte de Importaciones'); // Set active sheet index to the first sheet, so Excel opens this as the first sheet $objPHPExcel->setActiveSheetIndex(0); // Redirect output to a client’s web browser (Excel5) header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="repPrueba.xls"'); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); exit;

    Read the article

  • C++: call original definition of operator equals

    - by Luis Daniel
    I am overloading the operator equals (==) as show bellow: #include <string> #include <algorithm> bool operator == (std::string str1, std::string str2) { std::transform(str1.begin(), str1.end(), str1.begin(), ::tolower); std::transform(str2.begin(), str2.end(), str2.begin(), ::tolower); return (str1 == str2); } but, the problem appear on line return (str1 == str2), because operator == is called recursively. So, how can I call the original definition for operator equals (not the overloaded) ? Best regards

    Read the article

  • jQuery Plugin with $.getJSON Returning undefined?

    - by Oscar Godson
    Inside of a jQuery plugin I made I have: $.getJSON(base_url,{ agenda_id:defaults.id, action:defaults.action+defaults.type, output:defaults.output },function(json){ return json; }); And in a separate JS file (yes, it comes after the plugin): json = $('#agenda-live-preview').agenda({action:'get',type:'agenda',output:'json'}); alert(json[0].agenda_id); If i do the above $.getJSON and put an alert inside of the $.getJSON it works and returns "3", which is correct. If I do it like the json=$('#agenda-live-preview').agenda(...)... it returns undefined. My JSON is valid, and the json[0].agenda_id is correct also, I know it's in a callback, so how do I get the stuff inside of a callback in a function return?

    Read the article

  • MSSQL add count column near existing select columns

    - by Luis
    Hi, i have a query that returns something like this. ID | Company| Total_Money | no_items | count_Total_Money_For_Company ----------------------------------------------------------- 1 | A | 1000 | 1 | 2001 2 | A | 1001 | 0 | 2001 3 | B | 1001 | 1 | 5010 4 | B | 1002 | 1 | 5010 5 | B | 1003 | 1 | 5010 6 | B | 1004 | 1 | 5010 7 | B | 1000 | 1 | 5010 How can i add that column with the count for that company?

    Read the article

  • Converting old Mailer to Rails 3 (multipart/mixed)

    - by Oscar Del Ben
    I'm having some difficulties converting this old mailer api to rails 3: content_type "multipart/mixed" part :content_type => "multipart/alternative" do |alt| alt.part "text/plain" do |p| p.body = render_message("summary_report.text.plain.erb", :message = message.gsub(/<.br./,"\n"), :campaign=campaign, :aggregate=aggregate, :promo_messages=campaign.participating_promo_msgs) end alt.part "text/html" do |p| p.body = render_message("summary_report.text.html.erb", :message = message, :campaign=campaign, :aggregate=aggregate,:promo_messages=campaign.participating_promo_msgs) end end if bounce_path attachment :content_type => "text/csv", :body=> File.read(bounce_path), :filename => "rmo_bounced_emails.csv" end attachment :content_type => "application/pdf", :body => File.read(report_path), :filename=>"rmo_report.pdf" In particular I don't understand how to differentiate the different multipart options. Any idea?

    Read the article

  • Looping through Markers with Google Maps API v3 Problem

    - by Oscar Godson
    I'm not sure why this isn't working. I don't have any errors, but what happens is, no matter what marker I click on, it clicks the 3rd one (which is the last one out of 4 markers. Array starts at 0, obviously) and shows the number "3", which is correct for THAT one, but I'm not clicking that one. Here is most of my code, just not the array of [place-name, coordinates] (var locations, which you will see): function initialize() { var latlng = new google.maps.LatLng(45.522015,-122.683811); var settings = { zoom: 15, center: latlng, disableDefaultUI:true, mapTypeId: google.maps.MapTypeId.SATELLITE }; var map = new google.maps.Map(document.getElementById("map_canvas"), settings); var infowindow = new Array(); var marker = new Array(); for(x in locations){ console.log(x); infowindow[x] = new google.maps.InfoWindow({content: x}); marker[x] = new google.maps.Marker({title:locations[x][0],map:map,position:locations[x][1]}); google.maps.event.addListener(marker[x], 'click', function() {infowindow[x].open(map,marker[x]);}); } } initialize() The console.log output is (its correct, and what i expect): 0 1 2 3 So, any ideas?

    Read the article

  • Making JSON Feed Work Server to Server

    - by Oscar Godson
    I have a JSON feed (which I don't directly control, I have to ask the server admins to update it), that is returning NULL, or otherwise not working when I try to access it from another server. The actual feed works fine, but I can't get it to work like a normal API. Why can I use Flickr, WhitePages, Twitter, etc's JSON APIs, but for: http://portlandoregon.gov/shared/cfm/json.cfm It returns NULL in the browser when using JS. If I call it on the same server, it's fine though. If this is a server issue, what do I ask the admins to change, and if this is a local (browser) based issue, what am I doing wrong for this one feed that works for every other JSON API?

    Read the article

  • Sort months ( with strings ) algorithm

    - by Oscar Reyes
    I have this months array: ["January", "March", "December" , "October" ] And I want to have it sorted like this: ["January", "March", "October", "December" ] I'm currently thinking in a "if/else" horrible cascade but I wonder if there is some other way to do this. The bad part is that I need to do this only with "string" ( that is, without using Date object or anything like that ) What would be a good approach?

    Read the article

  • How to update Xcode to install "UNIX Development Support"

    - by Oscar Reyes
    I installed Xcode a long time ago. Apparently I didn't check back then the "UNIX Developemtn Support" checkbox. Now I want to have them bu when I click on the installation this is what appears: The UNIX Development Support check box is disabled Q. ¿How can I install the UNIX Development Support? Is there a way to run some script that creates all the needed links from /Developer/ to /usr/bin ? Thanks in advance.

    Read the article

  • Count the unread emails in exchange for each user

    - by Luis
    Hi, i want to count the unread emails in exchange with c# i all conected to the exchange, and get all users and the corresponding email. for the connection i have .. RunspaceConfiguration rsConfig = RunspaceConfiguration.Create(); PSSnapInException snapInException = null; PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapInException); Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsConfig); myRunSpace.Open(); Pipeline pipeline = myRunSpace.CreatePipeline(); Command myCommand = new Command("Get-Mailbox"); pipeline.Commands.Add(myCommand); Collection<PSObject> commandResults = pipeline.Invoke(); // Ok, now we've got a bunch of mailboxes, cycle through them foreach (PSObject mailbox in commandResults) { //define which properties to get foreach (String propName in new string[] { "Name", "EmailAddresses", "Database", "OrganizationalUnit", "UserPrincipalName" }) { //grab the specified property of this mailbox Object objValue = mailbox.Properties[propName].Value; .......

    Read the article

  • Loading table sections when using headers

    - by Luis Tovar
    I cant seem to wrap my head around this. I have googled, and overstacked for hours now looking for examples that i can relate to. What I have is two arrays. The name of my first NSMutableArray is "showDates". I have 3 objects in here. Object 0: "Today, May 20th" Object 1: "Tomorrow, May 21st" Object 2: "Saturday, May 22nd" Then I have my second NSMutableArray named "showTimes" I have about 15 objects in there with strings in each object. ( i hope that makes sense? ) Each object is structured like this: Object 0: showID @"98022" eventID @"833" showTime @"1:30pm" showDate @"Today, May 20th" auditorium @"9" venue @"2991" Object 1: showID @"98222" eventID @"813" showTime @"2:30pm" showDate @"Tomorrow, May 21st" auditorium @"9" venue @"2991" Etc, etc, .... I have the headers working great in my tableView, but I cant seem to figure out how to add the objects in my "showTimes" array under the correct header. Any help would be greatly appreciated.

    Read the article

  • Linking a template class using another template class (error LNK2001)

    - by Luís Guilherme
    I implemented the "Strategy" design pattern using an Abstract template class, and two subclasses. Goes like this: template <class T> class Neighbourhood { public: virtual void alter(std::vector<T>& array, int i1, int i2) = 0; }; and template <class T> class Swap : public Neighbourhood<T> { public: virtual void alter(std::vector<T>& array, int i1, int i2); }; There's another subclass, just like this one, and alter is implemented in the cpp file. Ok, fine! Now I declare another method, in another class (including neighbourhood header file, of course), like this: void lSearch(/*parameters*/, Neighbourhood<LotSolutionInformation> nhood); It compiles fine and cleanly. When starting to link, I get the following error: 1>SolverFV.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall lsc::Neighbourhood<class LotSolutionInformation>::alter(class std::vector<class LotSolutionInformation,class std::allocator<class LotSolutionInformation> > &,int,int)" (?alter@?$Neighbourhood@VLotSolutionInformation@@@lsc@@UAEXAAV?$vector@VLotSolutionInformation@@V?$allocator@VLotSolutionInformation@@@std@@@std@@HH@Z)

    Read the article

  • after dragging up, animate viewport up and after dragging down, animate viewport down...

    - by Luis
    I been trying to make this work for the last couple of days, I'm a new into web designing so I hope someone can help me out with this. I'm trying to run an animation after dragging the div container depending if the user is dragging up or down. This is the code that Im working on. this is the code when calling the jquery widget $ $('#container').draggable({scroll:true, axis: 'y', //scrollSensitivity: 1000, stop: function(event, ui) { if(scrollY <= 0){ $('#container').animate({ top: '-2000px' }, 500); } if(scrollY -= 0){ $('#container').animate({ top: '0' }, 500); } } });

    Read the article

  • “OnClick” action to asp.net dropdownlist item.

    - by Luís Custódio
    My situation is a little strange I guess, suggestion of engineering is acceptable. I have a DropDownList, on my "user" creation, called "city". When I'm creating the user I can create other city, but for this I have a button which redirect to other page. So, ok. I've created the new City and now I click on my DropDownList of cities and guess what?! The field is not reloaded. My first idea is every that I click on DropDownList, reload the data, but I can't find some OnClick action for Asp.Net DropDownList. This is my question, some idea? Thanks in advance.

    Read the article

  • Core Plot: only works ok with three plots

    - by Luis
    I am adding a scatter plot to my app (iGear) so when the user selects one, two or three chainrings combined with a cogset on a bike, lines will show the gears meters. The problem is that Core Plot only shows the plots when three chainrings are selected. I need your help, this is my first try at Core Plot and I'm lost. My code is the following: iGearMainViewController.m - (IBAction)showScatterIpad:(id)sender { cogsetToPass = [NSMutableArray new]; arrayForChainringOne = [NSMutableArray new]; arrayForChainringTwo = [NSMutableArray new]; arrayForChainringThree = [NSMutableArray new]; //behavior according to number of chainrings switch (self.segmentedControl.selectedSegmentIndex) { case 0: // one chainring selected for (int i = 1; i<= [cassette.numCogs intValue]; i++) { if (i <10) { corona = [NSString stringWithFormat:@"cog0%d",i]; }else { corona = [NSString stringWithFormat:@"cog%d",i]; } float one = (wheelSize*[_oneChainring.text floatValue]/[[cassette valueForKey:corona]floatValue])/1000; float teeth = [[cassette valueForKey:corona] floatValue]; [cogsetToPass addObject:[NSNumber numberWithFloat:teeth]]; [arrayForChainringOne addObject:[NSNumber numberWithFloat:one]]; } break; case 1: // two chainrings selected for (int i = 1; i<= [cassette.numCogs intValue]; i++) { if (i <10) { corona = [NSString stringWithFormat:@"cog0%d",i]; }else { corona = [NSString stringWithFormat:@"cog%d",i]; } float one = (wheelSize*[_oneChainring.text floatValue]/[[cassette valueForKey:corona]floatValue])/1000; //NSLog(@" gearsForOneChainring = %@",[NSNumber numberWithFloat:one]); float two = (wheelSize*[_twoChainring.text floatValue]/[[cassette valueForKey:corona]floatValue])/1000; [cogsetToPass addObject:[NSNumber numberWithFloat:[[cassette valueForKey:corona]floatValue]]]; [arrayForChainringOne addObject:[NSNumber numberWithFloat:one]]; [arrayForChainringTwo addObject:[NSNumber numberWithFloat:two]]; } break; case 2: // three chainrings selected for (int i = 1; i<= [cassette.numCogs intValue]; i++) { if (i <10) { corona = [NSString stringWithFormat:@"cog0%d",i]; }else { corona = [NSString stringWithFormat:@"cog%d",i]; } float one = (wheelSize*[_oneChainring.text floatValue]/[[cassette valueForKey:corona]floatValue])/1000; float two = (wheelSize*[_twoChainring.text floatValue]/[[cassette valueForKey:corona]floatValue])/1000; float three = (wheelSize*[_threeChainring.text floatValue]/[[cassette valueForKey:corona]floatValue])/1000; [cogsetToPass addObject:[cassette valueForKey:corona]]; [arrayForChainringOne addObject:[NSNumber numberWithFloat:one]]; [arrayForChainringTwo addObject:[NSNumber numberWithFloat:two]]; [arrayForChainringThree addObject:[NSNumber numberWithFloat:three]]; } default: break; } ScatterIpadViewController *sivc = [[ScatterIpadViewController alloc]initWithNibName: @"ScatterIpadViewController" bundle:nil]; [sivc setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; sivc.records = [cassetteNumCogs integerValue]; sivc.cogsetSelected = self.cogsetToPass; sivc.chainringOne = self.arrayForChainringOne; sivc.chainringThree = self.arrayForChainringThree; sivc.chainringTwo = self.arrayForChainringTwo; [self presentViewController:sivc animated:YES completion:nil]; } And the child view with the code to draw the plots: ScatterIpadViewController.m #pragma mark - CPTPlotDataSource methods - (NSUInteger)numberOfRecordsForPlot: (CPTPlot *)plot { return records; } - (NSNumber *)numberForPlot: (CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index{ switch (fieldEnum) { case CPTScatterPlotFieldX: return [NSNumber numberWithInt:index]; break; case CPTScatterPlotFieldY:{ if ([plot.identifier isEqual:@"one"]==YES) { //NSLog(@"chainringOne objectAtIndex:index = %@", [chainringOne objectAtIndex:index]); return [chainringOne objectAtIndex:index]; }else if ([plot.identifier isEqual:@"two"] == YES ){ //NSLog(@"chainringTwo objectAtIndex:index = %@", [chainringTwo objectAtIndex:index]); return [chainringTwo objectAtIndex:index]; }else if ([plot.identifier isEqual:@"three"] == YES){ //NSLog(@"chainringThree objectAtIndex:index = %@", [chainringThree objectAtIndex:index]); return [chainringThree objectAtIndex:index]; } default: break; } } return nil; } The error returned is an exception on trying to access an empty array. 2012-11-15 11:02:42.962 iGearScatter[3283:11603] Terminating app due to uncaught exception 'NSRangeException', reason: ' -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' First throw call stack: (0x1989012 0x1696e7e 0x192b0b4 0x166cd 0x183f4 0x1bd39 0x179c0 0x194fb 0x199e1 0x43250 0x14b66 0x13ef0 0x13e89 0x3b5753 0x3b5b2f 0x3b5d54 0x3c35c9 0x5c0814 0x392594 0x39221c 0x394563 0x3103b6 0x310554 0x1e87d8 0x27b3014 0x27a37d5 0x192faf5 0x192ef44 0x192ee1b 0x29ea7e3 0x29ea668 0x2d265c 0x22dd 0x2205 0x1)* libc++abi.dylib: terminate called throwing an exception Thank you!

    Read the article

  • Is it redundant to say: "JavaScript + AJAX"?

    - by Oscar Reyes
    In a recent discussion I had, somebody told me that is incorrect to say that because Ajax is Javascript already. The contenxt: "How do I blablablabal in a webpage so it doesn't have to do a page refresh" My answer: "Use JavaScript + Ajax" EDIT Ok, it is, so... how should I say it? "Use AJAX"? or "Use Javascript"?

    Read the article

  • Add device driver to Windows CE 6.0 through Platform Builder

    - by Luís Mendes
    I'm trying to add a device driver to a Windows CE 6.0 image that I'm creating through Platform Builder. The driver in question, for the VIA 6656 chipset (used in many USB Wi-Fi adapters/dongles), is available in the manufacturer's website and consists of several files: .PDB, .REG, .BIB, .DLL, .MAP and .REL. I understand that the REG file must be imported in my OSDesign.reg, the BIB file to my OSDesign.bib and the DLL must be placed in the /Windows folder of my image. What I don't understand is what to do with the remaining files (PDB, MAP and REL). Could anyone assist me in this matter? Thank you in advance!

    Read the article

  • jKey (JavaScript key shortcut plugin) Issue

    - by Oscar Godson
    Me and a friend are writing a plugin for jQuery that makes it easy for devs to add key shortcuts and we're damn close but no cigar. We're having issues with the key combos. It seems like we are having issues when you call the same selector multiple times on a page. Try pressing alt+a... youll see it works one time, then gets all mangled up. Anyone know how to fix it? It'll be on github after it's corrected and I'd be happy to add "thank you to" link to whoever can fix this in the header with the copyright info :) It's nicely documented and i have all the code and stuff here. So... anyone? http://jsbin.com/azaha4

    Read the article

  • How should I organize my C# classes? [closed]

    - by oscar.fimbres
    I'm creating an email generator system. I'm creating some clases and I'm trying to make things right. By the time, I have created 5 classes. Look at the class diagram: I'm going to explain you each one. Person. It's not a big deal. Just have two constructors: Person(fname, lname1, lname2) and Person(token, fname, lname1, lname2). Note that email property stays without value. StringGenerator. This is a static class and it has only a public function: Generate. The function receives a Person class and it will return a list of patterns for the email. MySql. It contains all the necessary to connect to a database. Database. This class inherits from MySql class. It has particular functions for the database. This gets all the registries from a table (function GetPeople) and return a List. Each person from the list contains all data except Email. Also it can add records (List but this must contains an available email). An available email is when an email doesn't have another person. For that reason, I have a method named ExistsEmail. Container. This is the class which is causing me some problems. It's like a temporary container. It supposed to have a people list from GetPeople (in Database class) and for each person it adds, it must generate a list of possible names (StringGenerator.Generate), then it selects one of the list and it must check out if exists in the database or in the same container. As I told above this is temporal, it may none of the possible emails is available. So the user can modify or enter a custom email available and update the list in this container. When all the email's people are available, it sends a list to add in the database, It must have a Flush method, to insert all the people in the database. I'm trying to design correct class. I need a little help to improve or edite the classes, because I want to separate the logic and visual, and learn of you. I hope you've been able to understand me. Any question or doubt, please let me know. Anyway, I attached the solution here to better understand it: http://www.megaupload.com/?d=D94FH8GZ

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16  | Next Page >