Search Results

Search found 1329 results on 54 pages for 'rob smallshire'.

Page 31/54 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Prevent users from being able to access a webpage via web browser?

    - by Rob
    My friend and I are working on a program. This program is going to submit GET data to our webpage. However, we don't want users accessing the webpage any other way than the program. We can prevent users from sharing the program using HWID authentication, but nothing prevents them from using a packet scanner to get the URL of the webpage. We thought about user-agent authentication, which we will implement, but user-agents can easily be spoofed. So my question is, how can we prevent users from accessing the webpage directly, instead of through the program? Even if you don't have an answer that will completely work, anything that will help deter them would be nice. Currently we will be implementing: HWID Authentication to use the program User-Agent Authentication to access the web page Instant IP Blacklisting to anyone accessing the webpage without the proper User-Agent

    Read the article

  • 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

  • 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

  • VB.NET function that takes other functions as a parameter, and executes them

    - by rob
    Hello, Is there a way in vb.net to create a sub/function that will take as an argument some kind of pointer to another function, and allow this new sub/function to execute the passed function? What I have are 10-12 xml-rpc functions I am calling against a remote server. Each of these functions has different argument lists (one takes 1 string, another might take 3 strings and one int, etc). All of them return an object. As I am calling these, it seems like it should be able to be factored better. For instance, everytime I call any of these functions, I want to test the return value for a session drop, and do something to try and reconnect to the remote system, etc. Using .net 3.5 Thanks! -R

    Read the article

  • iPhone code to create new NSUserDefaults objects?

    - by Rob
    I have NSUserDefaults storing a number of string variables for things like name, date of birth, address, etc. What I would like to know is how to write a code that will create a new object for each new user. For example, I have a spinning wheel that shows up immediately after the first time the user runs the app. What I want, is for that wheel to have one single option - "New User". Once that New User fills out a bunch of text fields that I am using NSUserDefaults to save, I want that user to be saved on that spinning wheel so that the next time they open up the app they have the option of returning to all of the variables that they previously put in, or creating a new user so they can input all new variables. I know how to do everything except write the code to create new users automatically. Potentially, the program should allow for a limitless number of these user objects and then just use something arbitrary like their last name to input into the spinning wheel. I would assume that the code would need to be put somewhere in the following code used to save the NSUserDefaults: NSUserDefaults *userData = [NSUserDefaults standardUserDefaults]; [userData setObject:txtName.text forKey:@"name"];

    Read the article

  • Do you have any tips for comments to keep them in step with the code? [closed]

    - by Rob Wells
    Possible Duplicate: How do you like your comments? G'day, I've read both of Steve McConnell's excellent Code Complete books "Code Complete" and "Code Complete 2" and was wondering if people have any other suggestions for commenting code. My commenting mantra could be summed up by the basic idea of expressing "what the code below cannot say". While enjoying this interesting blog post by Jeff about commenting I was still left wondering "When coding, when do you feel a comment is required?" Edit: Oops. Seems to be a duplicate of this question http://stackoverflow.com/questions/121945/how-do-you-like-your-comments so sorry for the noise. Thanks to my, seemingly, SO shadow for pointing it out - wouldn't have thought I was that interesting. Now off to read the original post and see if it is relevant. Edit: I meant to emphasise the best appraoch to ensure that your comments will stay in step with the code. Maybe expressing an intent rather than the mechansim for instance.

    Read the article

  • Getting Revisions from CVS repository

    - by Rob
    Hi, I am trying to get somehow all the revision log that were made to a particular file, but I seem to stupid to do that :( To checkout a module I do the following CVSROOT="/home/projects/stuff/" cvs co myworkingdir within myworkingdir I have a testfile called paper.tex and from this I wanna try to get the revisions but I tried the following but nothing works ... CVSROOT="/home/projects/stuff/" cvs log paper.tex cvs log: cannot open CVS/Entries for reading: No such file or directory cvs log: nothing known about paper.tex -bash-3.2$ CVSROOT="/home/projects/stuff/" cvs log myworkingdir/paper.tex cvs [log aborted]: no such directory `myworkingdir' Anyone an idea how I could get the log of the revisions of the paper.tex file in the myworkingdir module? Many thanks for your help! Claus

    Read the article

  • How can I get the nickname and message from raw IRC data in vb.net

    - by Rob
    Well basically I've got a vb.net script connecting to IRC, and I'm working on making it a basic chat system, but I've run into a problem. Say I receive this: :[email protected] PRIVMSG #channel :message I want to grab specific information to output to the user. I want to grab nickname and message How can I go about doing this? I thought about using regex, but I can't figure out how to make regex grab message since there's nothing after it.

    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

  • 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

  • HQL query for entity with max value

    - by Rob
    I have a Hibernate entity that looks like this (accessors ommitted for brevity): @Entity @Table(name="FeatureList_Version") @SecondaryTable(name="FeatureList", pkJoinColumns=@PrimaryKeyJoinColumn(name="FeatureList_Key")) public class FeatureList implements Serializable { @Id @Column(name="FeatureList_Version_Key") private String key; @Column(name="Name",table="FeatureList") private String name; @Column(name="VERSION") private Integer version; } I want to craft an HQL query that retrieves the most up to date version of a FeatureList. The following query sort of works: Select f.name, max(f.version) from FeatureList f group by f.name The trouble is that won't populate the key field, which I need to contain the key of the record with the highest version number for the given FeatureList. If I add f.key in the select it won't work because it's not in the group by or an aggregate and if I put it in the group by the whole thing stops working and it just gives me every version as a separate entity. So, can anybody help?

    Read the article

  • Using the Microsoft Ajax Minifier with Web Setup project & Source Control

    - by Rob
    I've just started investigating the Microsoft Ajax Minifer 4.0 for use with a Visual Studio 2008 Web Application I work on. It's proven easy enough to hook it into the .csproj file so it produced .min.js files for all scripts, however I'm stumped as to how to integrate this with the Web Setup project & Source Control. Essentially what I want to do is have the resultant .min.js files included in the Web Setup project without having them included in Source Control because: Having to check them out prior to the build being executing is a pain (the minifier cannot modify them if they're not checked out). As they're created as a "build artifact" it just seems wrong to have them stored under source control. The only option I've managed to come across so far is to explicitly include the .min.js files as part of the Setup project by right clicking on the Web Setup project and choosing "Add File", and then having the relevant folder hierarchy duplicated in "File System on Target Machine" so that I can force the file to the correct location. This is neither elegant or simple/robust as: It requires me to manually add every minified js file to the Web Setup project by hand Maintain a copy of the relevant directory structure in both the Web Application project and the Web Setup project Remember to add any new js files minified versions to the Web Setup project Is there a better way of doing this?

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

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