Search Results

Search found 922 results on 37 pages for 'patrick pellegrino'.

Page 28/37 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • How to use PHP to POST to a web page then get the results back, locally

    - by Patrick Gates
    I have a page on my web server that is PHP that is set to do this if ($_POST['post'] == true) { echo: 'hello, world'; } I want to create a page that calls to that page, posts "post" equal to "true" and then returns the value "hello, world". I have a script that works, but only if the pages are on different servers. Unfortunately, both of these pages are on the same server, so, heres my code, and I'm hoping you guys can help me, Thank you :) function post($site, $post) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$site); curl_setopt($ch, CURLOPT_FAILONERROR,1); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_TIMEOUT, 15); $retValue = curl_exec($ch); curl_close($ch); return $retValue; } echo post('data.php', 'post=true');

    Read the article

  • Drupal, installation to new web server... problems with Views exposed filter

    - by Patrick
    hi, I've moved my drupal installation to a new website (without clean urls support). I'm using a View to display the content of my website with exposed filter (tags multi-selection) When I click on one of the tags something strange happen on the new website.. Even if I select only 1 tag, I get urls like this: http://.../drupal/?tid[]=67&tid[]=66&view_name=Portfolio&view_display_id=page_1&view_args=&view_path=portfolio&view_base_path=portfolio&view_dom_id=1&pager_element=0 instead of the normal url: http://www.sanstitre.ch/drupal/portfolio?tid[0]=67 could you give me some tip ? thanks

    Read the article

  • Visual Studio 2008 having problems with namespaces when used as type in Generic coolection

    - by patrick
    I just upgraded last week from Visual Studio 2005 to 2008. I am having an issue with compiler resolving namespaces when I use a class as a type in a Generic collection. Intellisense recognizes the class and the compiler generates no errors when I use the class except when it is a type in a Generic collection declaration either as return type for a Property or as a parameter to a method. This is happening in my only project that is targeting the 3.5 framework, but changing the project containing the class to use the 3.5 framework doesn't fix the problem. Examples Compile fine MyClass myClass = new MyClass(); SortedList <DateTime,MyClass> listOfClasses = new SortedList<DateTime,MyClass> Compile error - Namespace could not be found public SortedList<DateTime,MyClass> ClassList { get; set; } private void DoSomethingToLists(SortedList<DateTime,MyClass> classList) Intellisense has no problem resolving the namespace, only the compiler. Is this a known bug or am I missing something obvious? Will SP1 fix it? I was able to create a new library containing just this class targeting 3.5 and am now able to successfully use this in both 3.5 and 2.0 projects. My guess is that even though I tried to change the target of my original library, since it was still referencing 2.0 projects there was some conflict.

    Read the article

  • IPhone iOs 5, need help getting my tab bar at the top to work

    - by Patrick
    I wanted to have the tab bar at the top. So i created a new project in XCode. Added a view and then inside that view i added (scrollbar, text and another view). See picture. What i wanted was to have my tab bar at the top. Then in the middle would be the contents from the tab bar and below it a small copyright text. See picture. No idea how to make this correctly. I have tried to create the UITabBarController on the fly and then assign it into the view at the top. (Top white space on the picture dedicated for the tab bar). Here is my code to init the MainWindow. MainWindow.h #import <UIKit/UIKit.h> @class Intro; @interface MainWindow : UIViewController @property (strong, nonatomic) IBOutlet UIScrollView *mainContentFrame; @property (strong, nonatomic) IBOutlet UIView *mainTabBarView; @property (strong, nonatomic) UITabBarController *mainTabBar; @property (nonatomic, strong) Intro *intro; // Trying to get this tab to show in the tab bar @end MainWindow.m #import "MainWindow.h" #import "Intro.h" @interface MainWindow () @end @implementation MainWindow @synthesize mainContentFrame = _mainContentFrame; @synthesize mainTabBarView = _mainTabBarView; @synthesize mainTabBar = _mainTabBar; @synthesize intro = _intro; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { _intro = [[Intro alloc] init]; NSArray *allViews = [[NSArray alloc] initWithObjects:_intro, nil]; [super viewDidLoad]; // Do any additional setup after loading the view. _mainTabBar = [[UITabBarController alloc] init]; [_mainTabBar setViewControllers:allViews]; [_mainTabBarView.window addSubview:_mainTabBar.tabBarController.view]; } - (void)viewDidUnload { [self setMainTabBar:nil]; [self setMainContentFrame:nil]; [self setMainContentFrame:nil]; [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } @end What am i missing to get this to work? Wanted the content to end up in the scrollview so that all tabs are scrollable.

    Read the article

  • Javascript Conflict on PHP page

    - by patrick
    I am having trouble running two javascript files on the same page. I used JQuery.noConflict() (http://api.jquery.com/jQuery.noConflict/) but no luck. <script src="http://www.google.com/jsapi"></script> <script> google.load("prototype", "1.6.0.3",{uncompressed:false}); google.load("scriptaculous", "1.8.1",{uncompressed:false}); </script> <script src="js/jquery.tools.min.js"></script> <script type="text/javascript"> $jQuery.noConflict(); jQuery(document).ready(function($) { $("#download_now").tooltip({ effect: 'slide'}); }); function show_text() { new Ajax.Request('./new.php', { method: 'post', parameters: { userid: $('userid').value }, onSuccess: function(r) { $('update').update(r.responseText) } }); } document.observe("dom:loaded", function() { $('loading').hide(); Ajax.Responders.register({ onCreate: function() { new Effect.Opacity('loading',{ from: 1.0, to: 0.3, duration: 0.7 }); new Effect.toggle('loading', 'appear'); }, onComplete: function() { new Effect.Opacity('loading', { from: 0.3, to: 1, duration: 0.7 }); new Effect.toggle('loading', 'appear'); } }); }); </script>

    Read the article

  • jquery-plugin Masonry: I cannot make it work

    - by Patrick
    hi, I'm using Masonry library (http://desandro.com/resources/jquery-masonry/) to create columns from my content. I cannot make it work.. this is the url with the html code: http://donatellabernardi.ch/drupal/ And this is my javascript line: $('#content-area').masonry({ columnWidth: 50, itemSelector:'.views-row'}); The Masonry function is invoked, but it doesn't add any column... I've also tried: $('#content-area').masonry({ columnWidth: 50, itemSelector:'.node'}); $('#content-area').masonry({ columnWidth: 50 }); $('div.view-content').masonry({ columnWidth: 50 }); What am I doing wrong ? Thanks

    Read the article

  • Twitter oauth php problems

    - by Patrick Gates
    I'm writing some backend script for a twitter app and heres how it's going On the app you click a button that sends you to login.php on my server which logs into my database connects to twitter with my consumer key and secret: $to = new TwitterOAuth($consumer_key, $consumer_secret); $tok = $to->getRequestToken(); $request_link = $to->getAuthorizeURL($tok); and then writes the token and secret to the database, sets a session equal to the id in the database of the token and secret and then redirects to the "$request_link" You then go through the process of logging in and such on twitter and it redirects you to callback.php on my server Callback.php consists of logging into the database again, getting the new token and secret, and then writing the new token and secret to the database and then prompts you to go back to the app Then on the app, all I'm trying to do is access the basic credentials$to->get('account/verify_credentials') and it keeps coming back "could not authenticate you" What am I doing wrong?? Thank you for all the help :)

    Read the article

  • Crash when checking BOF property of pessimistic locked ADO recordset

    - by Patrick
    Bit of an odd one for you: I've got two connections to a database, on one I've opened a _RecordsetPtr with a pessimistic lock. I can no longer send an UPDATE command on the other connection. I can send a SELECT command on the second connection and data is returned. If I use a read only lock then there are no problems however when I use a pessimistic lock on the second connection as well I can check the State == adStateOpen but the program hangs when I test the BOF property! If I don't test the BOF property and try to call moveNext on the second connection the software hangs If I do neither of these I am able to access the data via the second connection but trying to access the data from the first connection causes the software to hang. Any one seen anything similar as I'm a bit stuck? EDIT : it wasn't hanging, someone had put a 30 minute timeout on the connection and I wasn't waiting that long while testing...

    Read the article

  • How can I write an extension method that converts a System.Drawing.Bitmap to a byte array?

    - by Patrick Szalapski
    How can I write an extension method that converts a System.Drawing.Bitmap to a byte array? Why not: <Extension()> _ Public Function ToByteArray(ByVal image As System.Drawing.Bitmap) As Byte() Using ms = New MemoryStream() image.Save(ms, image.RawFormat) Return ms.ToArray() End Using End Function Yet when I use that, I get "System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+." What am I doing wrong?

    Read the article

  • Java: empty ArrayLists in a foor loop

    - by Patrick
    hi, I'm reusing the same ArrayList in a for loop, and I use for loop results = new ArrayList<Integer>(); experts = new ArrayList<Integer>(); output = new ArrayList<String>(); .... to create new ones. I guess this is wrong, because I'm allocating new memory. Is this correct ? If yes, how can I empty them ? Added: another example I'm creating new variables each time I call this method. Is this good practice ? I mean to create new precision, relevantFound.. etc ? Or should I declare them in my class, outside the method to not allocate more and more memory ? public static void computeMAP(ArrayList results, ArrayList experts) { //compute MAP double precision = 0; int relevantFound = 0; double sumprecision = 0; thanks

    Read the article

  • FLEX: how can I remove this space ?

    - by Patrick
    hi, how can I remove the space between my video and control bar... I tried to change margin and padding to all element without success. There is still a thin white space above the controls. http://dl.dropbox.com/u/72686/hSliderMargin.png thanks

    Read the article

  • SQL Server: how to create multiple text files from a table

    - by Patrick
    hi, I need to extract data from my SQL Server database into multiple text files. I have a table with 4 columns: UserID, UserName, Tag, Score. I need to create a text file for each Tag (so basically I need to group by Tag and order by score). Before to start I would like to know what's the fastest way to create several text files: File titles = TAG field each line = userID

    Read the article

  • Drupal: empty CCK Text Area are shown with tag <br />

    - by Patrick
    hi, I'm using several CCK Text Area in my content page. The fields are optional, but if I don't fill them, I see them on the page anyway, and the content is .. i.e. FieldName: <br /> I would like to make them disappear instead.. I found out the problem is that CCKEditor add a even if I've never typed in that window. How can I disable this ? thanks

    Read the article

  • FLEX: sequence of puppets... 3 requirements

    - by Patrick
    hi, I'm implementing this sequence of puppets in flex: http://dl.dropbox.com/u/72686/itemsSequence.png I want to show the caption when the mouse rolls over the puppet I want the user being able to click on the buttons of the caption (so the caption doesn't have to disappear when I move the mouse out from the user over the caption). I don't want the puppet component to become bigger when the caption is added (it becomes visible), because the puppets have to stay nearby each other, I cannot resize the objects. So.. I need some guidelines to do it. More precisely: 1) Should I add the components in MXML or pure actionscript ? 2) If I use MXML, should I add also the caption to the flex model, and make it invisible and then change the value with actionscript ? What's the common way to implement it ? thanks

    Read the article

  • What workflow should I use for JavaScript editing?

    - by Patrick
    Warning: I have very little JavsScript experience. In my past programming experience, I usually have a standalone interpreter/compiler, a text editor and a command line to compile/run my software or my tests (I love test driven development). I really like it this way, since I have the feeling of being in complete control over the tools. However, editing JavaScript I need to put statements in a text file , open my web browser and click on reload. I don't feel comfortable with it, as I cannot really see what is going on (besides some alert boxes). Can you suggest me (I'm on a Mac) another workflow? Perhaps with a debugger? Is there a standalone JavaScript interpreter?

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >