Search Results

Search found 1950 results on 78 pages for 'matt parker'.

Page 9/78 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Payment gateways and XSS

    - by Rowan Parker
    Hi all, I'm working on a website which takes payment from a customer. I'm using Kohana 2.3.4 and have created a library to handle the payment gateway I use (www.eway.com.au). Basically I'm just using their sample code, copied into it's own class. Anyway, the code works fine and I can make payments, etc. The issue I have is when the payment gateway is returning the user to my site. The payment gateway uses HTTPS so that is secure, and it is sending the user back to a HTTPS page on my site. However I have the NoScript plugin installed in Firefox, and when I get sent back to the page on my website (which also handles storing the transaction data) I get an error message saying that NoScript has blocked a potential XSS attack. Now I understand why it's unsecure (POST data being sent across two different domains) but what should I be doing instead? Obviously during my testing here I temporarily disable NoScript and it all works fine, but I can't rely on that for the end users. What's the best practice here?

    Read the article

  • How can I return a sql select into a sql variable

    - by Matt
    Hi, I'm trying to put the results of a SELECT into a variable and loop through the results to manipulate that data, all in the same stored proceedure... Here's what I have so far: DECLARE @i int @Result = (SELECT * FROM UserImport) SET @i = 0 WHILE @i < (SELECT Count(@Result) As Count) BEGIN /* Do Stuff */ END I know I'm way off because it's saying @Result was not declared, but I'm not sure how to declare a variable to be able to hold the results of a SELECT statement. Can anyone tell me where i'm going wrong and how to fix it? Thanks, Matt

    Read the article

  • jQuery Date Picker where text input is read only

    - by Rowan Parker
    Hi all, I want to use the Jquery datepicker. I've got it setup using an the alt field option. I'm displaying Y-M-D in the text field, but submitting Y-M-D. Everything works fine so far, sending the correct data, etc. However I want to stop the user from being able to manually type a date. I add originally set the INPUT field to disabled, which worked in every browser except IE. In IE it would popup the date picker but then not close after clicking a date. Does anyone know the best way to do this?

    Read the article

  • not getting output from parmiko/ssh command

    - by Matt
    I am using paramiko/ssh/python to attempt to run a command on a remote server. When I ssh manually and run the command in question, I get the results I want. But if I use the python (co-opted from another thread on this site) below, there is no returned data. If I modify the command to be something more basic like 'pwd' or 'ls' I can then get the output. Any help is appreciated. Thanks, Matt import paramiko import time import sys, os, select import select username='medelman' password='Ru5h21iz' hostname='10.15.27.166' hostport=22 cmd='tail -f /x/web/mlog.txt' #works cmd='' #doesn't work client = paramiko.SSHClient() client.load_system_host_keys() client.connect(hostname=hostname, username=username, password=password) transport = client.get_transport() channel = transport.open_session() channel.exec_command(cmd) while True: rl, wl, xl = select.select([channel],[],[],0.0) if len(rl) 0: # Must be stdout print channel.recv(1024) time.sleep(1)

    Read the article

  • What is the best way to format Django urls for two parameters, either of which are optional?

    - by Parker
    I'm designing a gallery application for viewing vehicle pictures and there are two parameters: Manufacturer Vehicle type Right now you can view either, but not both. Urls go like so: /manufacturer/# /type/# Where # is an ID number. How/can I format my URLs so it can accept both? My current solution is to do: /both/#/# but this requires some retooling since the application doesn't know when you want to filter by both. Any insight would be appreciated.

    Read the article

  • How am I supposed to deploy an ASP.NET MVC 4.0 website?

    - by Matt Frear
    What's the recommended way to deploy a website created with ASP.NET 4.0 and Visual Studio 2010? I've previously always added a web setup project to my solution, and used that to create an MSI, even for small applications. But when I build a web setup project in VS2010 it kind of works but some stuff still seems broken: 1. I need to turn on IIS 6 Compatibility on a Win 2008 R2 box to get the msi to run. 2. The msi includes web.config, web.debug.config, and web.release.config. I thought VS's web.config transformations was supposed to take care of that. -Matt

    Read the article

  • Grabbing rows from MySql where current date is in between start date and end date (Check if current date lies between start date and end date)

    - by Jordan Parker
    I'm trying to select from the database to get the "campaigns" that dates fall into the month. So far i've been successful in grabbing rows that starts or ends inside the current month. What I need to do now is select rows that start in one month and ends a few months down the line ( EG: It's the 3rd month in the year, and there's a "campaign" that runs from the 1st month until the 5th. other example There is a "campaign" that runs from 2012 until 2013 ) I'm hoping there is some way to select via MySql all rows in which a capaign may run. If not should I grab all data in the database and only show the ones that run via the current month. I have already made a function that displays all the days inbetween each date inside an array, which is called "dateRange". I've also created another which shows how many days the campaign runs for called "runTime". Select all (Obviously) $result = mysql_query("SELECT * FROM campaign"); Select Starting This Month $result = mysql_query("SELECT * FROM campaign WHERE YEAR( START ) = YEAR( CURDATE( ) ) AND MONTH( START ) = MONTH( CURDATE( ) )"); Select Ending This Month $result = mysql_query("SELECT * FROM campaign WHERE YEAR( END ) = YEAR( CURDATE( ) ) AND MONTH( END ) = MONTH( CURDATE( ) ) LIMIT 0 , 30"); Code sample while($row = mysql_fetch_array($result)) { $dateArray = dateRange($row['start'], $row['end']); echo "<h3>" . $row['campname'] . "</h3> Start " . $row['start'] . "<br /> End " . $row['end']; echo runTime($row['start'], $row['end']); print_r($dateArray); } In regards to the dates, MySql database only holds start date and end date of the campaign.

    Read the article

  • Basic Login Script using php and mysql inquiry

    - by Matt
    Attempting to write a check for a login script to see if the username is available. Would the best way to write this query be to check if isset(!_POST[]) for both values (nick and pass) then connect to database WHERE the mysql database for the usernick requested return the user id if the usernick exists evaluate if isset($id) to see if the user name is taken and use that to continue to creating an entry Does this logically sound like a method to check for login without using excessive code sorry for not posting the code, it is on another computer and this computer is locked down by my administrator at work... Also, is there another way to evaluate if a value exists in the database? For instance, instead of setting $id to the return value of the mysql database can i just ping the mysql database for the information and have it return a Boolean result so I am not putting out any user information. Thanks, Matt

    Read the article

  • How is your Mac set up for Windows development?

    - by Matt Brailsford
    Hi Guys, I'm looking at buying a MacBook Pro to replace my tiring laptop. My day to day job is as a .NET web developer so I am looking to use VMware Fusion to run VS and SQL server etc. As I've not run my dev environment in a VM before, I would like to know how others are setup. What apps to you have installed? In which environment? Where do you store your files? Within each environment, or some shared drive? Are there any gotchas? Or essentials I should know. Many thanks Matt

    Read the article

  • Flash causing jerky javascript animations

    - by Matt Brailsford
    Hi Guys, I'm developing a site which has a flash background playing a small video loop scaled to fill the whole background. Over the top I have a number of HTML elements which are animated using javascript. The problem I am having is that (predominantly in FF, but also in others to a lesser degree) the flash seems to be causing my javascript animations to run rather jerky, and in some cases missing the animation altogether and just jumping to the end state. Does anybody have any thoughts on how to make the 2 work together nicely? Many thanks Matt

    Read the article

  • PHP: session isnt saving before header redirect

    - by Matt
    Hi guys, I have read through the php manual for this problem and it seems quite a common issue but i have yet to find a solution. I am saving sessions in a database. My code is as follows: // session $_SESSION['userID'] = $user->id; header('Location: /subdirectory/index.php'); Then at the top of index.php after the session_start(), i have var_dumped the $_SESSION global and the userID is not in there. As i said ive looked through the PHP manual (http://php.net/manual/en/function.session-write-close.php) and neither session_write_close or session_regenerate_id(true) worked for me. Does anybody know a solution? Edit: I have session_start() at the top of my file. When i var_dump the session global before the header redirect, i see the userID in there, but not in the other file, which is in a subdirectory of this script Thanks, Matt

    Read the article

  • Really new to XCode. Why won't the thing run?

    - by Matt W
    Hi, I'm trying to follow the April 2009 and Winter 2010 Stanford iPhone app development videos and I'm running up against the same problems with both. First, they don't appear to be using the latest version of XCode - the Outlets and Actions panels are in a different window and there is little info on the net about this (other than one other post on S.O.F.) Second, having got to the point where I've managed to connect the slider, label and changedLabelText connections, I save, build and run the app - the simulator loads, the app loads and then promptly closes again. What's going on? I have not written any code yet and I still have an app which, while it compiles, does not behave! Is there a better starting point for an XCode noob than the Stanford vids? Thanks, Matt.

    Read the article

  • How to call a function from another class file

    - by Guy Parker
    I am very familiar with writing VB based applications but am new to Xcode (and Objective C). I have gone through numerous tutorials on the web and understand the basics and how to interact with Interface Builder etc. However, I am really struggling with some basic concepts of the C language and would be grateful for any help you can offer. Heres my problem… I have a simple iphone app which has a view controller (FirstViewController) and a subview (SecondViewController) with associated header and class files. In the FirstViewController.m have a function defined @implementation FirstViewController (void) writeToServer:(const uint8_t ) buf { [oStream write:buf maxLength:strlen((char)buf)]; } It doesn't really matter what the function is. I want to use this function in my SecondViewController, so in SecondViewController.m I import FirstViewController.h import "SecondViewController.h" import "FirstViewController.h" @implementation SecondViewController -(IBAction) SetButton: (id) sender { NSString *s = [@"Fill:" stringByAppendingString: FillLevelValue.text]; NSString *strToSend = [s stringByAppendingString: @":"]; const uint8_t *str = (uint8_t *) [strToSend cStringUsingEncoding:NSASCIIStringEncoding]; FillLevelValue.text = strToSend; [FirstViewController writeToServer:str]; } This last line is where my problem is. XCode tells me that FirstViewController may not respond to writeToServer. And when I try to run the application it crashes when this function is called. I guess I don't fully understand how to share functions and more importantly, the relationship between classes. In an ideal world I would create a global class to place my functions in and call them as required. Any advice gratefully received.

    Read the article

  • fastest way to crawl recursive ntfs directories in C++

    - by Peter Parker
    I have written a small crawler to scan and resort directory structures. It based on dirent(which is a small wrapper around FindNextFileA) In my first benchmarks it is surprisingy slow: around 123473ms for 4500 files(thinkpad t60p local samsung 320 GB 2.5" HD). 121481 files found in 123473 milliseconds Is this speed normal? This is my code: int testPrintDir(std::string strDir, std::string strPattern="*", bool recurse=true){ struct dirent *ent; DIR *dir; dir = opendir (strDir.c_str()); int retVal = 0; if (dir != NULL) { while ((ent = readdir (dir)) != NULL) { if (strcmp(ent->d_name, ".") !=0 && strcmp(ent->d_name, "..") !=0){ std::string strFullName = strDir +"\\"+std::string(ent->d_name); std::string strType = "N/A"; bool isDir = (ent->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) !=0; strType = (isDir)?"DIR":"FILE"; if ((!isDir)){ //printf ("%s <%s>\n", strFullName.c_str(),strType.c_str());//ent->d_name); retVal++; } if (isDir && recurse){ retVal += testPrintDir(strFullName, strPattern, recurse); } } } closedir (dir); return retVal; } else { /* could not open directory */ perror ("DIR NOT FOUND!"); return -1; } }

    Read the article

  • WPF UserControl Embedded Animation

    - by Matt B
    Hi all, I have a UserControl called Beetle.xaml which has animation makeing the legs move. So far so good. I added this to my Background.xaml page by decaring the xmlns and xaml as: xmlns:my="clr-namespace:Intellident.Liber8.GUI.Theme.Jungle" and <my:Beetle VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="180,0,0,175"> <UserControl.RenderTransform> <MatrixTransform x:Name="trnBeetle" /> </UserControl.RenderTransform> </my:Beetle> However I get errors telling me that I can't declare my:Name as I'm in the wrong scope. I can't declare my:Name as this doesn't exist. How do I do this, I want to create a path animation on the beetle to make him walk around... Ta, Matt. EDIT: THought I'd point out that both Beetle.xaml and Background.xaml live in Intellident.Liber8.GUI.Theme.Jungle namescope.

    Read the article

  • jQuery Validation using the class instead of the name value

    - by Matt
    Hi, I'd like to validate a form using the jquery validate plugin, but I'm unable to use the 'name' value within the html - as this is a field also used by the server app. Specifically, I need to limit the number of checkboxes checked from a group. (Maximum of 3.) All of the examples I have seen, use the name attribute of each element. What I'd like to do is use the class instead, and then declare a rule for that. html This works: <input class="checkBox" type="checkbox" id="i0000zxthy" name="salutation" value="1" /> This doesn't work, but is what I'm aiming for: <input class="checkBox" type="checkbox" id="i0000zxthy" name="i0000zxthy" value="1" /> javascript: var validator = $(".formToValidate").validate({ rules:{ "salutation":{ required:true, }, "checkBox":{ required:true, minlength:3 } } }); Is it possible to do this - is there a way of targeting the class instead of the name within the rules options? Or do I have to add a custom method? Cheers, Matt

    Read the article

  • Rails on Google App Engine - Error on OS X development machine

    - by Phillip Parker
    Hi, I'm running through the Ruby on Rails tutorial at http://guides.rubyonrails.org/getting_started.html (adjusting where appropriate for Google's App Engine). All is well up till section 6.3: when I try to click "New Post", I get the following error: Internal Server Error (500) Request Method: GET Request URL: http://localhost:8080/500.html access denied (java.io.FilePermission /dev/urandom read) It works fine when I upload the application to Google's App Engine; it's just on my development machine (OS X 10.6) that it doesn't work. Thanks in advance.

    Read the article

  • Is it possible to prevent a locally-running SWF (AS3) from downloading from my website?

    - by Matt
    I've got a crossdomain.xml file which allows SWFs running on only a certain few domains to download resources from my domain. However, one simple way around this is for a user to download the SWF to their local machine, and run it there (i.e. by double-clicking on it within Windows Explorer, not by running through http://localhost). It seems that when this happens, the crossdomain.xml file is ignored. I understand that in my actionscript, I can do this: if (Security.sandboxType.indexOf(Security.REMOTE) == -1) // running locally - don't allow However it is incredibly easy for someone to decompile the SWF and simply remove this line. Is it possible to do something on the server side to stop a locally running SWF to download from my site? I tried checking the referrer but this field often isn't populated. Does anyone have any other ideas? Thanks, Matt

    Read the article

  • How can I make Access combo boxes unfurl on arrow key down?

    - by Matt Parker
    With combo box controls, I'm used to being able tab to them, click the down arrow key to open up the options, and then use the up and down arrow keys to navigate those options. In an Access form I've designed, pressing down while a combo box is active moves to the next control. I already have tab for that, so how can I get the down arrow to behave as I expect? These combo boxes are the only thing between me and a mouse-free form, which I consider essential for data entry. Thanks in advance for your help!

    Read the article

  • Qt moc not error

    - by Robert Parker
    So I'm pretty new to Qt, and I've just inherited a project from someone else who is also new to Qt. He isn't around this week btw. We are using Visual Studio 2008, and have the latest version of Qt installed(4.6.2). The project builds on my coworker's machine fine, and I can get the project from svn and build it directly. But under any other circumstances it refuses to build on my machine, and it doesn't give me much of an explanation why. Even if I just do a 'build clean' and then a 'build' it doesn't work. Any slight modification will make it fail. When I try to build the entire project I get the error message: 1Moc'ing MatrixTypeInterface.h... 1moc: Cannot create .\GeneratedFiles\Debug\moc_MatrixTypeInterface.cpp;.\GeneratedFiles\Debug\moc_matrixtypeinterface.cpp 1Project : error PRJ0019: A tool returned an error code from "Moc'ing MatrixTypeInterface.h..." The moc tool doesn't give any sort of error message as to why it isn't working, and I wasted most of yesterday trying to figure out why. I got the command that VS was using to call moc, and I entered in the command line myself. It didn't write anything to the screen. Any ideas?

    Read the article

  • How do I retain a requested url with parameters after redirecting to a login page?

    - by Brent Parker
    I have been asked to set up some authentication for some content on our website using JSP. What I would like to do seems simple to me but I can't quite figure out how to do it in JSP. What I would like to do is this: When a user requests a page that you must be logged in to see, I have a tag that checks their cookies for an authentication token. If it is not there, they are redirected to a login page. After they log in, I want to redirect them back to the page they first requested along with any parameters they were sending. Now, I have the tag that is checking their authentication and redirecting them to the login page. That part is working just fine. But I'm not sure how to maintain the first requested url and parameters so they can be redirected after they login. How might I accomplish this?

    Read the article

  • Correct association mapping in Entity Framework

    - by Matt Thrower
    Hi, Trying to change two relationships in our entity framework from many-to-one to many-to-many relationships. So I tried the obvious thing: clicked on each association on the diagram, changed the appropriate end of the association accordingly and then changed the name of the navigation property to a plural to reflect the change. This lead to the following build error, or one each for the two changes I've made: Error 3002: Problem in mapping fragments starting at line 1761:Potential runtime violation of table CustomerServices's keys (CustomerServices.Id): Columns (CustomerServices.Id) are mapped to EntitySet CompiledDatabaseCustomerService's properties (CompiledDatabaseCustomerService.CustomerService.Id) on the conceptual side but they do not form the EntitySet's key properties (CompiledDatabaseCustomerService.CompiledDatabase.Id, CompiledDatabaseCustomerService.CustomerService.Id) I'm not entirely sure why this is happening, so unsurprisngly I haven't had much luck fixing it. I've tried fiddling with the mapping details and adding referential constraints to no avail. Anyone point me in the right direction? cheers, Matt

    Read the article

  • how to implement a game character task queue

    - by Stephen Lee Parker
    I'm working on a personal game engine in C# and need to give certain characters / sprites responses to conditions or certain patterns that they follow and since these patterns will be repeated over and over for other characters / sprites, I don't want to tie the patterns to the character / sprite. I will likely want to define the conditions / actions in level data files... I plan to use this for platformers, space shooters, and pack man like games... Almost an extenable AI system. Any suggestions on how this can be implemented?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >