Search Results

Search found 1375 results on 55 pages for 'rob sanders'.

Page 33/55 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • ASIHTTPRequest wrapper usage for Macs

    - by Rob
    I am trying to apply the ASIHTTPRequest wrapper to a very basic Objective C program. I have already copied over the necessary files into my program and after giving myself an extreme headache trying to figure out how it works through their website I thought I would post a question on here. The files copied over were: ASIHTTPRequestConfig.h ASIHTTPRequestDelegate.h ASIProgressDelegate.h ASIInputStream.h ASIInputStream.m ASIHTTPRequest.h ASIHTTPRequest.m ASIFormDataRequest.h ASIFormDataRequest.m My program is very basic: #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // Defining the various variables. char firstName[20]; char lastName[20]; char rank[5]; int leaveAccrued; int leaveRequested; // User Input. NSLog (@"Please input First Name:"); scanf("%s", &firstName); NSLog (@"Please input Last Name:"); scanf("%s", &lastName); NSLog (@"Please input Rank:"); scanf("%s", &rank); NSLog (@"Please input the number leave days you have accrued:"); scanf("%i", &leaveAccrued); NSLog (@"Please input the number of leave days you are requesting:"); scanf("%i", &leaveRequested); // Print results. NSLog (@"Name: %s %s", firstName, lastName); NSLog (@"Rank: %s", rank); NSLog (@"Leave Accrued: %i", leaveAccrued); NSLog (@"Leave Requested: %i", leaveRequested); [pool drain]; return 0; } How do I utilize the wrapper to export these 5 basic variables to a web server via an http request?

    Read the article

  • What does PHP stand for?

    - by Rob
    PHP Hypertext Preprocessor So the abbreviation is an infinite loop of itself. PHP = PHP Hypertext Preprocessor Hypertext Preprocessor Which is = PHP Hypertext Preprocessor Hypertext Preprocessor Hypertext Preprocessor Or easier to understand: <? $php = $php . "Hypertext Preprocessor"; echo $php; ?> So uh, my question is: What the hell?

    Read the article

  • How can a Windows program temporarily change its time zone?

    - by Rob Kennedy
    I've written a function to return the time_t value corresponding to midnight on a given day. When there is no midnight for a given day, it returns the earliest time available; that situation can occur, for example, when Egypt enters daylight-saving time. This year, the time change takes effect at midnight on the night of April 29, so the clock goes directly from 23:59 to 01:00. Now I'm writing unit tests for this function, and one of the tests should replicate the Egypt scenario. In Unix, I can accomplish it like this: putenv("TZ", "Egypt", true); tzset(); After doing that, further calls to localtime behave as if they're in Egypt instead of Minnesota, and my tests pass. Merely setting the environment variable doesn't have any effect on Windows, though. What can I do to make the unit test think it's somewhere else without affecting the rest of the programs running on the system?

    Read the article

  • Using Bundler along with preinstalled gems

    - by Rob Cameron
    So I've got thin installed the old fashioned way: gem install thin I put an app on the server and installed all of its required gems via bundler: bundle install But, when I tried to start the app with thin start, it can't find any of the bundler-installed gems since they're not installed in the default gems directory. My question is: how do I make this work? Do I need to install thin via bundler as well? Will that still set up the thin executable in /usr/bin so I can start it from the command line like normal? Thanks!

    Read the article

  • VBScript: Disable caching of response from server to HTTP GET URL request

    - by Rob
    I want to turn off the cache used when a URL call to a server is made from VBScript running within an application on a Windows machine. What function/method/object do I use to do this? When the call is made for the first time, my Linux based Apache server returns a response back from the CGI Perl script that it is running. However, subsequent runs of the script seem to be using the same response as for the first time, so the data is being cached somewhere. My server logs confirm that the server is not being called in those subsequent times, only in the first time. This is what I am doing. I am using the following code from within a commercial application (don't wish to mention this application, probably not relevant to my problem): With CreateObject("MSXML2.XMLHTTP") .open "GET", "http://myserver/cgi-bin/nsr/nsr.cgi?aparam=1", False .send nsrresponse =.responseText End With Is there a function/method on the above object to turn off caching, or should I be calling a method/function to turn off the caching on a response object before making the URL? I looked here for a solution: http://msdn.microsoft.com/en-us/library/ms535874(VS.85).aspx - not quite helpful enough. And here: http://www.w3.org/TR/XMLHttpRequest/ - very unfriendly and hard to read. I am also trying to force not using the cache using http header settings and html document header meta data: Snippet of server-side Perl CGI script that returns the response back to the calling client, set expiry to 0. print $httpGetCGIRequest-header( -type = 'text/html', -expires = '+0s', ); Http header settings in response sent back to client: <html><head><meta http-equiv="CACHE-CONTROL" content="NO-CACHE"></head> <body> response message generated from server </body> </html> The above http header and html document head settings haven't worked, hence my question.

    Read the article

  • PayPal IPN "FAIL"

    - by Rob
    Hey all... I'm trying to figure out how to use PayPal's IPN and I've run into a wall. I want a buyer to be forwarded to a success page after making a purchase, and I want that page to show the details of their transaction. I choose IPN instead of the PDT because I also want to do some other behind the scenes stuff with their data. Anyway, here's the code I'm using -- I'm testing in sandbox mode -- but it returns "FAIL" every time. $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header = "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // PAYMENT VALIDATED & VERIFIED! echo "Validated!"; } else if (strcmp ($res, "INVALID") == 0) { // PAYMENT INVALID & INVESTIGATE MANUALY! echo "Invalid!"; } } fclose ($fp); }

    Read the article

  • AVAudioPlayer not unloading cached memory after each new allocation

    - by Rob
    I am seeing in Instruments that when I play a sound via the standard "AddMusic" example method that Apple provides, it allocates 32kb of memory via the prepareToPlay call (which references the AudioToolBox framework's Cache_DataSource::ReadBytes function) each time a new player is allocated (i.e. each time a different sound is played). However, that cached data never gets released. This obviously poses a huge problem if it doesn't get released and you have a lot of sound files to play, since it tends to keep allocating memory and eventually crashes if you have enough unique sound files (which I unfortunately do). Have any of you run across this or what am I doing wrong in my code? I've had this issue for a while now and it's really bugging me since my code is verbatim of what Apple's is (I think). How I call the function: - (void)playOnce:(NSString *)aSound { // Gets the file system path to the sound to play. NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:aSound ofType:@"caf"]; // Converts the sound's file path to an NSURL object NSURL *soundURL = [[NSURL alloc] initFileURLWithPath: soundFilePath]; self.soundFileURL = soundURL; [soundURL release]; AVAudioPlayer * newAudio=[[AVAudioPlayer alloc] initWithContentsOfURL: soundFileURL error:nil]; self.theAudio = newAudio; // automatically retain audio and dealloc old file if new m4a file is loaded [newAudio release]; // release the audio safely // this is where the prior cached data never gets released [theAudio prepareToPlay]; // set it up and play [theAudio setNumberOfLoops:0]; [theAudio setVolume: volumeLevel]; [theAudio setDelegate: self]; [theAudio play]; } and then theAudio gets released in the dealloc method of course.

    Read the article

  • SYN flooding still a threat to servers?

    - by Rob
    Well recently I've been reading about different Denial of Service methods. One method that kind of stuck out was SYN flooding. I'm a member of some not-so-nice forums, and someone was selling a python script that would DoS a server using SYN packets with a spoofed IP address. However, if you sent a SYN packet to a server, with a spoofed IP address, the target server would return the SYN/ACK packet to the host that was spoofed. In which case, wouldn't the spoofed host return an RST packet, thus negating the 75 second long-wait, and ultimately failing in its attempt to DoS the server?

    Read the article

  • Where can I find information on the Get, Set and Address methods for multidimensional System.Array i

    - by Rob Smallshire
    System.Array serves as the base class for all arrays in the Common Language Runtime (CLR). According to this article, For each concrete array type, [the] runtime adds three special methods: Get/Set/Address. and indeed if I disassemble this C# code, int[,] x = new int[1024,1024]; x[0,0] = 1; x[1,1] = 2; x[2,2] = 3; Console.WriteLine(x[0,0]); Console.WriteLine(x[1,1]); Console.WriteLine(x[2,2]); into CIL I get, IL_0000: ldc.i4 0x400 IL_0005: ldc.i4 0x400 IL_000a: newobj instance void int32[0...,0...]::.ctor(int32, int32) IL_000f: stloc.0 IL_0010: ldloc.0 IL_0011: ldc.i4.0 IL_0012: ldc.i4.0 IL_0013: ldc.i4.1 IL_0014: call instance void int32[0...,0...]::Set(int32, int32, int32) IL_0019: ldloc.0 IL_001a: ldc.i4.1 IL_001b: ldc.i4.1 IL_001c: ldc.i4.2 IL_001d: call instance void int32[0...,0...]::Set(int32, int32, int32) IL_0022: ldloc.0 IL_0023: ldc.i4.2 IL_0024: ldc.i4.2 IL_0025: ldc.i4.3 IL_0026: call instance void int32[0...,0...]::Set(int32, int32, int32) IL_002b: ldloc.0 IL_002c: ldc.i4.0 IL_002d: ldc.i4.0 IL_002e: call instance int32 int32[0...,0...]::Get(int32, int32) IL_0033: call void [mscorlib]System.Console::WriteLine(int32) IL_0038: ldloc.0 IL_0039: ldc.i4.1 IL_003a: ldc.i4.1 IL_003b: call instance int32 int32[0...,0...]::Get(int32, int32) IL_0040: call void [mscorlib]System.Console::WriteLine(int32) IL_0045: ldloc.0 IL_0046: ldc.i4.2 IL_0047: ldc.i4.2 IL_0048: call instance int32 int32[0...,0...]::Get(int32, int32) IL_004d: call void [mscorlib]System.Console::WriteLine(int32) where the calls to the aforementioned Get and Set methods can be clearly seen. It seems the arity of these methods is related to the dimensionality of the array, which is presumably why they are created by the runtime and are not pre-declared. I couldn't locate any information about these methods on MSDN and their simple names makes them resistant to Googling. I'm writing a compiler for a language which supports multidimensional arrays, so I'd like to find some official documentation about these methods, under what conditions I can expect them to exist and what I can expect their signatures to be. In particular, I'd like to know whether its possible to get a MethodInfo object for Get or Set for use with Reflection.Emit without having to create an instance of the array with correct type and dimensionality on which to reflect, as is done in the linked example.

    Read the article

  • Unwanted Shell expansion when assigning the output of a shell command to a variable

    - by Rob Goodwin
    I am exporting a portion of a local prototypte svn repository to import into a different repo. We have a number of svn properties set throughout the repo so I figured I would write a script to list the file elements and their corresponding properties. How hard can that be right. So I write started writing a bash script that would assign the output of the svn proplist -v to a variable so I could check if the specified file had any properties. #!/bin/bash svn proplist -v $1 o=$(svn proplist -v "$1") echo $o now this works fine and echos the output of the svn proplist command. But if the proplist command returns something like svn:ignore : * build it performs a shell expansion on the * and inserts the entire directory listing prior to the build property value. So if the directory had a.txt, b.txt and build files/dirs in it, the output would look like. svn:ignore a.txt b.txt build I figure I need to somehow escape the output or something to keep the expansion from happening, but have yet to find something that works. There are other ways to do this, but I hate when I cannot figure something out. and I have to admin, I think this one beat me ( well given the time I can spend on it )

    Read the article

  • SQL partial max

    - by Rob
    Struggling with the following SQL problem Assume a three dimensional table with entries (h,t,q) 1,A,20 1,A,10 1,B,5 2,A,10 2,B,3 2,B,8 3,C,50 4,A,10 etc. I would like to extract 1,30 2,11 3,50 etc. group by first element and then return the maximum q value of same type, i.e. for header number 2 there are 10 As and 11 Bs, so return 11 The "max" element (A in case 1, B in case 2 and C in case 3) is irrelevant, I just need to get out the header and that maximum value. This shouldnt be too tricky, but cant get it to work. Using MS Access, but can use SQL within.

    Read the article

  • Setting up Subsonic 3.0 on a ASP.NET web application on Visual Studio 2008

    - by Rob Paul
    I followed the steps on this tutorial video by at subsonic website. Everything seems to be self explanatory but when I copy the .tt files into my Visual Studio nothing happens. I have read other question relating to this problem on this website but they don't seem to fix this problem. I also went into the regedit to find out the generator key for .tt files and it is properly set. This is not a visual studio express or anything but a professional edition also I am trying to build a ASP.net web application and not a MVC application like the demo. Any help will be greatly appreciated. Thank You

    Read the article

  • Google Maps on IPhone won't zoom

    - by Rob Bonner
    Hello, I have an iPhone app that loads the following URL: http://maps.google.com?q=Apple Stores&ll=37.331689,-122.030731&z=3 As expected, the google maps app loads on the phone, but zooms to the entire US. It does not appear to be respecting the z= parameter, or at least, not allowing a zoom level that shows stores in the area.

    Read the article

  • Best practice PHP Form Action

    - by Rob
    Hi there i've built a new script (from scratch not a CMS) and i've done alot of work on reducing memory usage and the time it takes for the page to be displayed (caching HTML etc) There's one thing that i'm not sure about though. Take a simple example of an article with a comments section. If the comment form posts to another page that then redirects back to the article page I won't have the problem of people clicking refresh and resending the information. However if I do it that way, I have to load up my script twice use twice as much memory and it takes twice as long whilst i'm still only displaying the page once. Here's an example from my load log. The first load of the article is from the cache, the second rebuilds the page after the comment is posted. Example 1 0 queries using 650856 bytes of memory in 0.018667 - domain.com/article/1/my_article.html 9 queries using 1325723 bytes of memory in 0.075825 - domain.com/article/1/my_article/newcomment.html 0 queries using 650856 bytes of memory in 0.029449 - domain.com/article/1/my_article.html Example 2 0 queries using 650856 bytes of memory in 0.023526 - domain.com/article/1/my_article.html 9 queries using 1659096 bytes of memory in 0.060032 - domain.com/article/1/my_article.html Obviously the time fluctuates so you can't really compare that. But as you can see with the first method I use more memory and it takes longer to load. BUT the first method avoides the refresh problem. Does anyone have any suggestions for the best approach or for alternative ways to avoid the extra load (admittadely minimal but i'd still like to avoid it) whilst also avoiding the refresh problem?

    Read the article

  • Invalid character in a Base-64 string when Concatenating and Url encoding a string

    - by Rob
    I’m trying to write some encryption code that is passed through a Url. For the sake of the issue I’ve excluded the actual encryption of the data and just shown the code causing the problem. I take a salt value, convert it to a byte array and then convert that to a base64 string. This string I concatenate to another base64 string (which was previously a byte array). These two base64 strings are then Url encoded. Here’s my code... using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Cryptography; using System.IO; using System.Web; class RHEncryption { private static readonly Encoding ASCII_ENCODING = new System.Text.ASCIIEncoding(); private static readonly string SECRET_KEY = "akey"; private static string md5(string text) { return BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(ASCII_ENCODING.GetBytes(text))).Replace("-", "").ToLower(); } public string UrlEncodedData; public RHEncryption() { // encryption object RijndaelManaged aes192 = new RijndaelManaged(); aes192.KeySize = 192; aes192.BlockSize = 192; aes192.Mode = CipherMode.CBC; aes192.Key = ASCII_ENCODING.GetBytes(md5(SECRET_KEY)); aes192.GenerateIV(); // convert Ivector to base64 for sending string base64IV = Convert.ToBase64String(aes192.IV); // salt value string s = "maryhadalittlelamb"; string salt = s.Substring(0, 8); // convert to byte array // and base64 for sending byte[] saltBytes = ASCII_ENCODING.GetBytes(salt.TrimEnd('\0')); string base64Salt = Convert.ToBase64String(saltBytes); //url encode concatenated base64 strings UrlEncodedData = HttpUtility.UrlEncode(base64Salt + base64IV, ASCII_ENCODING); } public string UrlDecodedData() { // decode the url encode string string s = HttpUtility.UrlDecode(UrlEncodedData, ASCII_ENCODING); // convert back from base64 byte[] base64DecodedBytes = null; try { base64DecodedBytes = Convert.FromBase64String(s); } catch (FormatException e) { Console.WriteLine(e.Message.ToString()); Console.ReadLine(); } return s; } } If I then call the UrlDecodedData method I get a “Invalid character in a Base-64 string” exception. This is generated because the base64Salt variable contains an invalid character (I’m guessing a line termination) but I can’t seem to strip it off.

    Read the article

  • jQuery fadeIn() not working in IE

    - by Rob Bennet
    [js] $(document).ready(function() { //Default Action $(".tab_content").hide(); //Hide all content $("ul.tabs li:first").addClass("active").show(); //Activate first tab $(".tab_content:first").show(); //Show first tab content //On Click Event $("ul.tabs li").click(function() { $("ul.tabs li").removeClass("active"); //Remove any "active" class $(this).addClass("active"); //Add "active" class to selected tab $(".tab_content").hide(); //Hide all tab content var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content $(activeTab).fadeIn("slow"); //Fade in the active content return false; }); }); [/js] Works in everything but IE?

    Read the article

  • Techniques for Visualizing Data

    - by Rob Wilkerson
    I'm looking into providing several methods of visualizing a large volume of data. This may include, but will not be limited to, simple graphing. The techniques I'm exploring will involve shapes, text and lines. It will also involve interaction with elements (hiding, focusing, etc.) and animation (shifting, dragging, systematic reorganizing, etc.) of those elements. SVG or Canvas seem like the obvious choices (in conjunction with a JS library--probably jQuery), but the lack of cross-browser availability is a concern. I'd prefer to avoid Flash/Flex, but right now it's the only rock solid, cross-browser technology I've found if support for IE7/8 is a requirement. Does anyone have any other suggestions or any additional information that would make a technology I've listed seem even more appealing? Thanks.

    Read the article

  • InfoPath FormControl on STA worker thread

    - by Rob Ford
    I have a .NET class that exposes two public methods: one to create an InfoPath form and another to Export to one of the supported formats. I’m using the Microsoft FormControl to do this. It’s hosted by a Form that does not get displayed. I get called by a Winforms app, but on an MTA worker thread instead of the UI thread. So I create an STA thread and execute on that, which works exactly once and then results in this exception: System.InvalidOperationException was unhandled Message="Unable to get the window handle for the 'FormControl' control. Windowless ActiveX controls are not supported." Source="System.Windows.Forms" StackTrace: at System.Windows.Forms.AxHost.EnsureWindowPresent() at System.Windows.Forms.AxHost.InPlaceActivate() at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state) at System.Windows.Forms.AxHost.CreateHandle() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.AxHost.EndInit() at InfoPathCreateStaThreadTest.FormControlHost.InitializeComponent() in C:\Windows\Temp\InfoPathCreateStaThreadTest\InfoPathCreateStaThreadTest\FormControlHost.Designer.cs:line 65 After some experimenting, I started to suspect this is a message pumping problem. I then came across this, which makes me more strongly suspect so: http://blogs.msdn.com/cbrumme/archive/2004/02/02/66219.aspx I tried various methods of pumping messages with no luck. I should mention that the alternative of automating the InfoPath app is not viable unless I can figure out how to hide the app. Any help would be much appreciated.

    Read the article

  • Helper functions & prototype methods to replace heavy frameworks?

    - by Rob
    All frameworks aside, what are some of the common helper functions/prototype methods you use on a daily basis? Please note I am not arguing against frameworks. I've simply found that the majority of what I do on a daily basis can, most often, be done with a few dozen Array, String and Element.prototype methods. With the addition of a few helper functions like $ (getElementsById) and $$$ (getElementsByClass), I am able to satisfy some of the core benefits, however basic, of a much heavier framework. If you were to collect a small library of basic methods and functions to replace the core functionality of some of the popular frameworks, what would they be?

    Read the article

  • How do I get selected background color from SecondView to pass to FirstView?

    - by rob
    I am going insane! This is a simple app with two Views. FirstView is a text field with info button to flip to SecondView. In SecondView I have 6 buttons for background color choice. When button is pushed the color of background changes perfectly but cannot make it also change background color for FirstView. Any help would be GREAT! Thanks! I am using Objective C class working on a iPhone app. Sorry new at this. The SecondView acts almost like a settings page in the fact that when a button is pushed the background color changes to the button color. I need it so when I push the "back" button to go back to FirstView the background color has also changed to that color choice. Been thru sooooooooo many tutorials and codes that now I am totally lost......... Thanks again!

    Read the article

  • Hibernate Bi- Directional many to many mapping advice!

    - by Rob
    hi all, i woundered if anyone might be able to help me out. I am trying to work out what to google for (or any other ideas!!) basically i have a bidirectional many to many mapping between a user entity and a club entity (via a join table called userClubs) I now want to include a column in userClubs that represents the role so that when i call user.getClubs() I can also work out what level access they have. Is there a clever way to do this using hibernate or do i need to rethink the database structure? Thank you for any help (or just for reading this far!!) the user.hbm.xml looks a bit like <set name="clubs" table="userClubs" cascade="save-update"> <key column="user_ID"/> <many-to-many column="activity_ID" class="com.ActivityGB.client.domain.Activity"/> </set> the activity.hbm.xml part <set name="members" inverse="true" table="userClubs" cascade="save-update"> <key column="activity_ID"/> <many-to-many column="user_ID" class="com.ActivityGB.client.domain.User"/> </set> The current userClubs table contains the fields id | user_ID | activity_ID I would like to include in there id | user_ID | activity_ID | role and be able to access the role on both sides...

    Read the article

  • How can I show characters for an ASP.net password textbox control after assigning its .Text property

    - by Rob Segal
    I am assigning a value to .Text of a textbox retrieved from a database in Page_Load() but no characters are shown in the textbox after doing this. The value is indeed there when I try to read from it after the assignment. I would like to present some characters to the user even though they are the "dotted" password characters so they know a password has been entered here. Is it possible to do this?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >