Search Results

Search found 241 results on 10 pages for 'brett powell'.

Page 8/10 | < Previous Page | 4 5 6 7 8 9 10  | Next Page >

  • PHP can be exclusively accessed by SWF

    - by brett
    I'm not sure how to describe this, but basically I have a PHP class file: class HelloHello { public function getSomeData($input_parameter){ // code to retrieve data from the database } public function deleteSomeData($input_parameter){ // code to delete data from the database } } This class is on the server and is part of the backend that connects with a database, and it's meant to be accessed by the frontend SWF only (not to be directly accessed). I've setup Flex to read this class and access it. But how do I make sure that someone doesn't develop a script that can call this php file directly and access its methods? For example using a script to add data in a fast automated way, or use the delete method directly, ouch. Is this a legitimate concern, or this can't be done?

    Read the article

  • How do I process Proxy Digg JSON for use with jQuery?

    - by Brett
    I'm trying to deal with: "Requests made from Javascript running on your web pages must be proxied to avoid same-origin policy conflicts." I know how to work with the JSON once I've got it. But aside from copy-pasting the JSON results via my browser, I don't know how to localize it for use.

    Read the article

  • Help with Assembly/SSE Multiplication

    - by Brett
    I've been trying to figure out how to gain some improvement in my code at a very crucial couple lines: float x = a*b; float y = c*d; float z = e*f; float w = g*h; all a, b, c... are floats. I decided to look into using SSE, but can't seem to find any improvement, in fact it turns out to be twice as slow. My SSE code is: Vector4 abcd, efgh, result; abcd = [float a, float b, float c, float d]; efgh = [float e, float f, float g, float h]; _asm { movups xmm1, abcd movups xmm2, efgh mulps xmm1, xmm2 movups result, xmm1 } I also attempted using standard inline assembly, but it doesn't appear that I can pack the register with the four floating points like I can with SSE. Any comments, or help would be greatly appreciated, I mainly need to understand why my calculations using SSE are slower than the serial C++ code? I'm compiling in Visual Studio 2005, on a Windows XP, using a Pentium 4 with HT if that provides any additional information to assit. Thanks in advance!

    Read the article

  • Group / User based security. Table / SQL question

    - by Brett
    Hi, I'm setting up a group / user based security system. I have 4 tables as follows: user groups group_user_mappings acl where acl is the mapping between an item_id and either a group or a user. The way I've done the acl table, I have 3 columns of note (actually 4th one as an auto-id, but that is irrelevant) col 1 item_id (item to access) col 3 user_id (user that is allowed to access) col 3 group_id (group that is allowed to access) So for example item1, peter, , item2, , group1 item3, jane, , so either the acl will give access to a user or a group. Any one line in the ACL table with either have an item - user mapping, or an item group. If I want to have a query that returns all objects a user has access to, I think I need to have a SQL query with a UNION, because I need 2 separate queries that join like.. item - acl - group - user AND item - acl - user This I guess will work OK. Is this how its normally done? Am I doing this the right way? Seems a little messy. I was thinking I could get around it by creating a single user group for each person, so I only ever deal with groups in my SQL, but this seems a little messy as well..

    Read the article

  • SQL SELECT across two tables

    - by Brett Spurrier
    Hi there, I am a little confused as to how to approach this SQL query. I have two takes (equal number of records), and I would like to return a column with which is the division between the two. In other words, here is my not-working-correctly query: SELECT( (SELECT v FROM Table1) / (SELECT DotProduct FROM Table2) ); How would I do this? All I want it a column where each row equals the same row in Table1 divided by the same row in Table2. The resulting table should have the same number of rows, but I am getting something with a lot more rows than the original two tables. I am at a complete loss. Any advice?

    Read the article

  • Subversion post-commit hook to sync rep with FTP server ( for a website )

    - by Brett
    I've installed a repository on my computer locally. What I'm trying to do is be able to work on a website locally on my computer and see changes using something like MAMP. When I commit a change though I'd like it to sync my repo with the live website source files on a remote FTP server. I've done a bit of digging and I know that people keep saying to use a post-commit hook but I'm not sure how to configure it or even how to install it locally. Also i'm not sure if it's possible to do from my computer to an FTP. Could someone be a huge help and walk me through how to do this I've been trying for hours to figure out how to do it. thanks so much.

    Read the article

  • Java M4A atom tagging free space issue

    - by Brett
    Hey, I've been trying to be able to read and write iTunes style M4A atoms and while I've successfully done the reading part, I've come to a bit of a halt in regards to the free space atoms. I figured that I should be able edit and shift the padding around to accommodate writing an atom with more data than it originally had. I've been stuck on this for about a day now, and I've been trying to figure out how to determine the closest free space atom with enough size to accommodate the new data. so far I have: private freeAtom acquireFreeSpaceAtom( long position ) { long atomStart = Long.MAX_VALUE; freeAtom atom = null; for( freeAtom a : freeSpace ) { if( Math.abs( position - atomStart ) > Math.abs( position - a.getAtomStart() ) ) atomStart = ( atom = a ).getAtomStart(); } return atom; } That code only takes into account the closest free space atom and completely disregards the fact that it should be greater than or equal to a certain size, but I can't quite figure out how I should check for both closeness and size efficiently.

    Read the article

  • Determining line orientation using vertex shaders

    - by Brett
    Hi, I want to be able to calculate the direction of a line to eye coordinates and store this value for every pixel on the line using a vertex and fragment shader. My idea was to calculate the direction gradient using atan2(Gy/Gx) after a modelview tranformation for each pair of vertices then quantize this value as a color intensity to pass to a fragment shader. How can I get access to the positions of pairs of vertices to achieve this or is there another method I should use? Thanks

    Read the article

  • ado sql update table with result of group by query

    - by brett
    I am trying to update records in an .mdb table with the number of records containing the same value The sql below does not work but I think gives an indication of what I am trying to achieve. UPDATE table1 AS A INNER JOIN (SELECT PH_BSP , Count(PH_BSP) AS PHCOUNT FROM table1 GROUP BY PH_BSP) AS B ON A.PH_BSP=B.PH_BSP SET A.PH_SORT = B.PHCOUNT; any ideas?

    Read the article

  • Error loading SQL_VARIANT data type using Python

    - by Brett D
    I am using Python and SQLAlchemy to query a database that I did not create. I have run into a problem querying a table that contains the SQL_VARIANT data type. I get the error: sqlalchemy.exc.DBAPIError: (Error) ('ODBC data type -150 is not supported. Cannot read column Value.', 'HY000') I confirmed with the database creator that the "Value" column is of type SQL_VARIANT. Does anyone know a way to load this data type using Python? I am currently using mssql with pyodbc. Thank you for any help you can offer! Versions: Python 2.7, SQLAlchemy 0.7.8

    Read the article

  • jQuery UL sortable list, CSS how to align column style data

    - by Brett
    Hi, I'm using jQuery UI, sortable on an ul element. All good, except over time the data in my li elements has become table like, in the sense there are multiple columns of data. They aren't aligning correctly because this seems to be hard to do in ul, and indeed not what ul's are designed for. I have 2 choices the way I see Work out some really cool css to make my ul / li format nicely Work out how to convert this to a sortable table With option 2., looking at a few plugins that exist (tablednd for example), they seem very old. I don't believe the jQuery UI Anyone got any recommendations as far as a direction I should head?

    Read the article

  • Failure remediation strategy for File I/O

    - by Brett
    I'm doing buffered IO into a file, both read and write. I'm using fopen(), fseeko(), standard ANSI C file I/O functions. In all cases, I'm writing to a standard local file on a disk. How often do these file I/O operations fail, and what should the strategy be for failures? I'm not exactly looking for stats, but I'm looking for a general purpose statement on how far I should go to handle error conditions. For instance, I think everyone recognizes that malloc() could and probably will fail someday on some user's machine and the developer should check for a NULL being returned, but there is no great remediation strategy since it probably means the system is out of memory. At least, this seems to be the approach taken with malloc() on desktop systems, embedded systems are different. Likewise, is it worth reattempting a file I/O operation, or should I just consider a failure to be basically unrecoverable, etc. I would appreciate some code samples demonstrating proper usage, or a library guide reference that indicates how this is to be handled. Any other data is, of course, welcome.

    Read the article

  • Windows Azure - access webrole local storage from separate workerrole

    - by Brett Smith
    I'm running an application on windows azure, the MVC views need to be dynamic, I started by storing them as records in the database, but am quite keen to move them to a physical location. My concept was to create the physical file via code... which worked great and speeds up the page load dramatically. This was of course before I realised that the files were only available for the duration of the role Next I looked at a start up task to create the files when the role was started - however I then realised that any separate instances weren't going to sync up unless I monitored the database for changes. So I moved from a start up task to a function in the run method of the role that checks the database every 10 minutes to see if changes have occurred. The problem is that this seems to choke up the application (at least in the warm up stage). Ideally I would like to move the run function to it's own worker role that can sit there and push files out to web role instances, but I'm unsure on how I would go about accessing the web roles local storage from the worker role. Can anybody tell me whether this is actually possible? and hopefully point me in the right direction to achieve this? Just to clarify what I'm trying to achieve -View is created in user interface running on web role and stored in database -Separate web role (front end) has clientside application with virtualpath provider pointing Views requests to local storage (localresource) -separate worker role to create View structure and load this into clientside web role local storage

    Read the article

  • Massive speed diff in upgrade to Java 7

    - by Brett Rigby
    We use Java within our build process, as it is used to resolve/publish our dependencies via Ivy. No problem, nor have we had with it for 2 years, until we've tried to upgrade Java 6 Update 26 to Version 7 Update 7, whereas a build on a local developer PC (WinXP) now takes 2 hours to complete, instead of 10 minutes!! Nothing else has changed on the PC, making it the absolute target for our concerns. Does anyone know of any reason as to why version 7 of Java would make such a speed difference like this?

    Read the article

  • How do I specify a project dependency with Hudson?

    - by Brett Ryan
    We have common library projects shared amongst many projects that are required to be checked out into a "Libraries" folder which a developer needs to checkout prior to opening the main project in visual studio. How I tell hudson that there is this dependency? I figured one thing I could do is setup a custom workspace and specify the location for all projects, but how do I wire up the dependency between them all? Is simply specifying "Build after other projects are built" enough?

    Read the article

  • Testing for the existence of a field in a class

    - by Brett
    Hi, i have a quick question. I have a 2D array that stores an instance of a class. The elements of the array are assigned a particular class based on a text file that is read earlier in the program. Since i do not know without looking in the file what class is stored at a particular element i could refer to a field that doesn't exist at that index (referring to appearance when an instance of temp is stored in that index). i have come up with a method of testing this, but it is long winded and requires a second matrix. Is there a function to test for the existence of a field in a class? class temp(): name = "default" class temp1(): appearance = "@"

    Read the article

  • Is everyone baking the same CI cake?

    - by Brett Rigby
    I can't help but wonder about this whole Continous Integration process and wanted to know what you think about it all. From my perspective, we're constructing our own 'flavour' of NAnt/Ivy/CruiseControl.Net in-house and can't help but get the feeling that other dev shops are doing exactly the same work, but then everybody is finding out the same problems and pitfalls with it. I'm not complaining about NAnt, Ivy or CruiseControl at all, as they've been brilliant in helping our team of developers become more sure of the quality of their code, but it just seems strange that these tools are very popular, yet we're all re-inventing the CI-wheel. Is there a pre-made solution for building .Net applications, using the tools mentioned above, and if so, why aren't we all using them??

    Read the article

  • jQuery getting these functions to work together

    - by brett
    I'm new to jQuery and have tried looking around for an answer on how to do this. I have 2 functions and I would like both to work together. The one function is submitHandler and its used to hide a form and at the same time add a class to a hidden element to unhide it - ie a thank you for submitting h1. The other function is to grab the input data and display it onsubmit in the form. So the problem is that I can get that one to work but then the other doesnt. Ie on form submit I can see the data input but not the h1 Thank you message. Here are the functions: SubmitHandler: submitHandler: function() { $("#content").empty(); $("#content").append( "<p>If you want to be kept in the loop...</p>" + "<p>Or you can contact...</p>" ); $('h1.success_').removeClass('success_').addClass('success_form'); $('#contactform').hide(); }, onsubmit="return inputdata()" function inputdata(){ var usr = document.getElementById('contactname').value; var eml = document.getElementById('email').value; var msg = document.getElementById('message').value; document.getElementById('out').innerHTML = usr + " " + eml + msg; document.getElementById('out').style.display = "block"; return true; }, The form uses PHP and jQuery - I dont know about AJAX but after some reading even less sure. Please help me out I dont know what I'm doing and at the moment I am learning but its a long road for me still. Thank you The form: <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" id="contactform" onsubmit="return inputdata()"> <div class="_required"><p class="label_left">Name*</p><input type="text" size="50" name="contactname" id="contactname" value="" class="required" /></div><br/><br/> <div class="_required"><p class="label_left">E-mail address*</p><input type="text" size="50" name="email" id="email" value="" class="required email" /></div><br/><br/> <p class="label_left">Message</p><textarea rows="5" cols="50" name="message" id="message" class="required"></textarea><br/> <input type="submit" value="submit" name="submit" id="submit" /> </form> The PHP bit: <?php $subject = "Website Contact Form Enquiry"; //If the form is submitted if(isset($_POST['submit'])) { //Check to make sure that the name field is not empty if(trim($_POST['contactname']) == '') { $hasError = true; } else { $name = trim($_POST['contactname']); } //Check to make sure sure that a valid email address is submitted if(trim($_POST['email']) == '') { $hasError = true; } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) { $hasError = true; } else { $email = trim($_POST['email']); } //Check to make sure comments were entered if(trim($_POST['message']) == '') { $hasError = true; } else { if(function_exists('stripslashes')) { $comments = stripslashes(trim($_POST['message'])); } else { $comments = trim($_POST['message']); } } //If there is no error, send the email if(!isset($hasError)) { $emailTo = '[email protected]'; //Put your own email address here $body = "Name: $name \n\nEmail: $email \n\nComments:\n $comments"; $headers = 'From: My Site <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; mail($emailTo, $subject, $body, $headers); $emailSent = true; } } ? The Jquery Validate bit: $(document).ready(function(){ $('#contactform').validate({ showErrors: function(errorMap, errorList) { //restore the normal look $('#contactform div.xrequired').removeClass('xrequired').addClass('_required'); //stop if everything is ok if (errorList.length == 0) return; //Iterate over the errors for(var i = 0;i < errorList.length; i++) $(errorList[i].element).parent().removeClass('_required').addClass('xrequired'); }, Here is the full jQuery bit: $(document).ready(function(){ $('#contactform').validate({ showErrors: function(errorMap, errorList) { //restore the normal look $('#contactform div.xrequired').removeClass('xrequired').addClass('_required'); //stop if everything is ok if (errorList.length == 0) return; //Iterate over the errors for(var i = 0;i < errorList.length; i++) $(errorList[i].element).parent().removeClass('_required').addClass('xrequired'); }, submitHandler: function() { $('h1.success_').removeClass('success_').addClass('success_form'); $("#content").empty(); $("#content").append('#sadhu'); $('#contactform').hide(); }, }); }); Latest edit - Looks like this: $(document).ready(function(){ $('#contactform').validate({ showErrors: function(errorMap, errorList) { //restore the normal look $('#contactform div.xrequired').removeClass('xrequired').addClass('_required'); //stop if everything is ok if (errorList.length == 0) return; //Iterate over the errors for(var i = 0;i < errorList.length; i++) $(errorList[i].element).parent().removeClass('_required').addClass('xrequired'); }, function submitHandler() { $('h1.success_').removeClass('success_').addClass('success_form'); $("#content").empty(); $("#content").append('#sadhu'); $('#contactform').hide(); }, function inputdata() { var usr = document.getElementById('contactname').value; var eml = document.getElementById('email').value; var msg = document.getElementById('message').value; document.getElementById('out').innerHTML = usr + " " + eml + msg; document.getElementById('out').style.display = "block"; }, $(document).ready(function(){ $('#contactForm').submit(function() { inputdata(); submitHandler(); }); }); });

    Read the article

  • does the condition after && always get evaluated

    - by brett
    I have this if statement that tests for the 2 conditions below. The second one is a function `goodToGo() so I want to call it unless the first condition is already true $value = 2239; if ($value < 2000 && goodToGo($value)){ //do stuff } function goodToGo($value){ $ret = //some processing of the value return $ret; } My question is about the 2 if conditions $value < 2000 && goodToGo($value). Do they both get evaluated or does the second one only get evaluated when the first one is true? In other words, are the following 2 blocks the same? if($value < 2000 && goodToGo($value)) { //stuff to do } if($value < 2000) { if (goodToGo($value)){ //stuff to do } }

    Read the article

  • jQuery sibling selector?

    - by Brett
    Hi, I have a table which I'm trying to do a pricing list, that auto-computes the tax component.. I'm getting the value from price_1, applying a math cal, and saving it to tax_1. I could read the number of the end of the id, but hopefully there is a cleaner way with jQuery. E.g. I would have a lot of fields like.. price_1 price_2 price_3 tax_1 tax_2 tax_3 etc... I can use the following code to call jQuery on change of a price, and get the value of that price. How do I update the tax field next to it? should I use a sibling selector or something?? $('#pricing').delegate("input", "change", function(){ $(this).val() /* the value of the price */; })

    Read the article

  • Is there a way to write System.Drawing.Graphics to PDF from C#?

    - by Brett Ryan
    I have a whole bunch of 2D graphics that is being used for both rendering controls on screen and used to print, it's pretty custom graphics that couldn't be done by any 3rd party reporting tools or off the shelf controls. The program can generate PDF files of the printed content but when I wrote it I cheated and just print the Graphics object to an in memory image and then embed that into the PDF page. Since the users are emailing the documents they're finding they are too large. I've started writing the PDF from scratch using iText, however is there a way to get System.Drawing.Graphics content directly into PDF? The way iText works and Graphics works is completely different.

    Read the article

< Previous Page | 4 5 6 7 8 9 10  | Next Page >