Search Results

Search found 341 results on 14 pages for 'brett w thompson'.

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

  • How to Fake a AsyncToken return in ActionScript 3

    - by Brett
    Using Parsley, I have a service that I access through a [Command(selector='list')] public function getRssFeed( msg:RssEvent ):AsyncToken { return service.list() as AsyncToken; } when I point to the "Real" RssService, everything works as expected. My problem is when I point to the "Mock" RssService. I can't figure out how to fake a AsyncToken with some dummy data return... does anyone knows how to do this ?

    Read the article

  • How can I save BioPerl sequence nested features in genbank or embl format?

    - by Ryan Thompson
    In BioPerl, a sequence object can have any number of features, and each of these can have subfeatures nested within them. For example, a feature may be a complete coding sequence of a gene, and its subfeatures might be individual exons that are concatenated to form the full coding sequence. However, when I use BioPerl to write a sequence object to a file in genbank or embl format, only the top-level features are written to the file, not the sub-features nested within the top-level features. How can I store my subfeatures in sequence files? Should I just convert all my subfeatures into top-level features, and then reconstruct the tree structure next time I read in the sequence?

    Read the article

  • Nasty redirect loop in WordPress (trailing slash, no trailing slash, and so on)

    - by Brett W. Thompson
    Hi, I read a ton of pages and tried lots of solutions but none have worked yet! My problem is that: test.asifa.net/asifa-wp Redirects to: test.asifa.net/asifa-wp/ Which redirects to the first page. What's a little bizarre is asifa-wp produces: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="http://test.asifa.net/asifa-wp/">here</a>.</p> </body></html> Whereas asifa-wp/ produces an empty page but the following headers (curl -v output): * About to connect() to test.asifa.net port 80 (#0) * Trying 69.163.203.138... connected * Connected to test.asifa.net (69.163.203.138) port 80 (#0) > GET /asifa-wp/ HTTP/1.1 > User-Agent: curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.0.3 zlib/1.2.3 libidn/0.6.14 libssh2/0.18 > Host: test.asifa.net > Accept: */* > < HTTP/1.1 301 Moved Permanently < Date: Sun, 13 Jun 2010 05:40:12 GMT < Server: Apache < X-Powered-By: PHP/5.2.13 < X-Pingback: http://test.asifa.net/asifa-wp/xmlrpc.php < Set-Cookie: _icl_current_language=en; expires=Mon, 14-Jun-2010 05:40:12 GMT; path=/asifa-wp/ < Location: http://test.asifa.net/asifa-wp < Vary: Accept-Encoding < Content-Length: 0 < Content-Type: text/html; charset=UTF-8 .htaccess looks like: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /asifa-wp/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /asifa-wp/index.php [L] </IfModule> # END WordPress Any help at all would be tremendously appreciated!!!

    Read the article

  • NoSql Crash Course/Tutorial

    - by Chris Thompson
    Hi all, I've seen NoSQL pop up quite a bit on SO and I have a solid understanding of why you would use it (from here, Wikipedia, etc). This could be due to the lack of concrete and uniform definition of what it is (more of a paradigm than concrete implementation), but I'm struggling to wrap my head around how I would go about designing a system that would use it or how I would implement it in my system. I'm really stuck in a relational-db mindset thinking of things in terms of tables and joins... At any rate, does anybody know of a crash course/tutorial on a system that would use it (kind of a "hello world" for a NoSQL-based system) or a tutorial that takes an existing "Hello World" app based on SQL and converts it to NoSQL (not necessarily in code, but just a high-level explanation). I see this having one solid answer, but if you guys feel like it should be community wiki, I'll be happy to change it. Thanks! Chris

    Read the article

  • Access to Perl's empty angle "<>" operator from an actual filehandle?

    - by Ryan Thompson
    I like to use the nifty perl feature where reading from the empty angle operator <> magically gives your program UNIX filter semantics, but I'd like to be able to access this feature through an actual filehandle (or IO::Handle object, or similar), so that I can do things like pass it into subroutines and such. Is there any way to do this? This question is particularly hard to google, because searching for "angle operator" and "filehandle" just tells me how to read from filehandles using the angle operator.

    Read the article

  • Using C preprocessor to construct a string literal for scanf?

    - by Brett
    I'm attempting to create an sscanf string literal to aid in buffer overrun prevention in C99. The goal is something like: #define MAX_ARG_LEN 16 char arg[MAX_ARG_LEN] = ""; if (sscanf(arg, "%"(MAX_ARG_LEN-1)"X", &input) > 0) The obvious "manual" solution is something like: #define MAX_ARG_LEN 16 #define MAX_ARG_CHARS "15" char arg[MAX_ARG_LEN] = ""; if (sscanf(arg, "%"MAX_ARG_CHARS"X", &input) > 0) However, I would prefer something to automatically generate "%15X" given a buffer size of 16. This link is almost works for my application: http://stackoverflow.com/questions/240353/convert-a-preprocessor-token-to-a-string but it does not handle the -1. Suggestions?

    Read the article

  • ado.net slow updating large tables

    - by brett
    The problem: 100,000+ name & address records in an access table (2003). Need to iterate through the table & update detail with the output from a 3rd party dll. I currently use ado, and it works at an acceptable speed (less than 5 minutes on a network share). We will soon need to update to access 2007 and its 'non jet' accdb format to maintain compatability with clients. I've tried using ado.net datsets, but updating the records takes hours! We process 5-10 of these tables per day - so this cannot be a solution. Any ideas on the fastest way to update individual records using ado.net? Surely we didn't take such a hugh backward step with ado.net? Any help would be appreciated.

    Read the article

  • WPF Issues with Control Layout

    - by Brett Powell
    I am making an application that connects to our billing software using its API, and I am running into a few issues getting the layout working properly. I want to make it so that when one of the expanders is minimized, the other window fills the gap, and when it is expanded again the other expander goes back to where it was. Right now when the arrow is clicked on one, there is just an empty gap. I used a DockPanel as the parent which I assumed would automatically do this, but it isn't working. Second question, is there a way to make these areas resizable? I don't want to try and get too frisky with allowing the user to undock the menus (don't even know if that is possible with just straight WPF) but it would be nice if they could change the width/height of them. Also, just a newbie question to C#, but what is the equivalent of a C++ header file? It looks like you just use .cs files, but I am not sure. I want to extract all of my functions that pull the data from the billing software and put them into a different file to clean up the code. Here is my XAML... <Window x:Class="WpfApplication3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Billing Management" Height="550" Width="754" xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared" WindowStartupLocation="CenterScreen" WindowStyle="ThreeDBorderWindow"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="22" /> <RowDefinition /> </Grid.RowDefinitions> <Menu Height="22" Name="menu1" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" HorizontalContentAlignment="Left" IsEnabled="True" IsMainMenu="True"> <MenuItem Header="_File"> <MenuItem Header="_Open" /> <MenuItem Header="_Close" /> <Separator/> <MenuItem Header="_Exit" /> </MenuItem> </Menu> <TabControl Name="tabControl1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" BorderThickness="1" Padding="0" TabStripPlacement="Bottom" UseLayoutRounding="False" FlowDirection="LeftToRight" Grid.Row="1"> <TabItem Header="Main" Name="tabItem1" Margin="0"> <DockPanel Name="dockPanel1" LastChildFill="True"> <ListBox Height="100" Name="listBox3" DockPanel.Dock="Top" /> <ListBox Name="listBox4" Width="200" DockPanel.Dock="Right" /> <DockPanel Height="Auto" Name="dockPanel2" Width="Auto" VerticalAlignment="Stretch" LastChildFill="True"> <shared:AnimatedExpander Header="Staff Online" Width="200" Name="expanderStaffOnline" IsExpanded="True" Height="194" BorderThickness="0" DockPanel.Dock="Top" VerticalContentAlignment="Stretch"> <ListBox Name="listboxStaffOnline" Width="Auto" Height="Auto" Margin="0" VerticalAlignment="Stretch" Loaded="listboxStaffOnline_Loaded" /> </shared:AnimatedExpander> <shared:AnimatedExpander Header="Test Menu 2" Height="Auto" Name="animatedExpander1" BorderThickness="1" Margin="0,0,0,0" IsExpanded="True" VerticalContentAlignment="Stretch"> <ListBox Height="Auto" HorizontalAlignment="Stretch" Name="listBox6" VerticalAlignment="Stretch" Margin="0" BorderThickness="1" /> </shared:AnimatedExpander> </DockPanel> <ListBox Height="100" Name="listboxAdminLogs" DockPanel.Dock="Bottom" Loaded="listboxAdminLogs_Loaded" /> <ListBox Name="listBox5" /> </DockPanel> </TabItem> <TabItem Header="Support" Name="tabItem2" Margin="0"> </TabItem> <TabItem Header="Clients" /> <TabItem Header="Billing" /> <TabItem Header="Orders" /> </TabControl> </Grid> </Window>

    Read the article

  • When to use or not use symbols in PHP

    - by brett
    I'm reading a PHP book where the author says that symbols should be avoided except when it's valid to use them. Very informative stuff, if he could only elaborate or give code examples but he doesn't. Can someone from the experienced PHP bunch give me an example of what these symbols are, and when it makes sense to use them or not. I'm looking for a code example that I can wrap my head around since I don't quite get it in plain English. Code is more plain English to me.

    Read the article

  • WCF competitive consumer pattern

    - by Simon Thompson
    Is it possible to create a WCF service (web service) that only accepts a single connection at any one time with all other calls either queued or rejected. Need to implement the competitive consumer pattern where there are a number of clients which could deal with task at hand but when a client askes for more work a task must go to only one of them. Usual done as part of an enterprise service bus but can not find one that I'm happy to start using so looking to get this behaviour through a WCF service. Any ideas people ?

    Read the article

  • How to read from a method that returns a filehandle in perl?

    - by Ryan Thompson
    I have an object with a method that returns a filehandle, and I want to read from that handle. The following doesn't work, because the right angle bracket of the method call is interpreted as the closing angle bracket of the input reader: my $input = <$object->get_handle()>; That gets parsed as: my $input = ( < $object- > ) get_handle() >; which is obviously a syntax error. Is there any way I can perform a method call within an angle operator, or do I need to break it into two steps like this? my $handle = $object->get_handle(); my $input = <$handle>;

    Read the article

  • Can An Assembly Be Installed In The GAC but not Show Up In Gacutil.exe?

    - by Brett Bim
    I've got an application where some assemblies are copied to C:\Windows\assembly upon deployment under the assumption that this installs them in the GAC. The application seems to work but when I run gacutil.exe on the copied assemblies, it says the Global Assembly Cache contains 0 assemblies. Should all assemblies in c:\Windows\assembly show up in gacutil? If not, why not? How can I verify that the assembly is in fact installed in the GAC? I have always used gacutil.exe in the past to register assemblies so doing a file copy is new to me and I'm trying to understand the ramifications.

    Read the article

  • Invalid method declaration, return type required

    - by Brett Steen
    I am getting an error at public Rectangle(double width, double height){ saying that it's an invalid method declaration, return type required. I'm not sure how to fix it. These are also my instructions for my assignment: Write a super class encapsulating a rectangle. A rectangle has two attributes representing the width and the height of the rectangle. It has methods returning the perimeter and the area of the rectangle. This class has a subclass, encapsulating a parallelepiped, or box. A parallelepiped has a rectangle as its base, and another attribute, its length. It has two methods that calculate and return its area and volume. `public class Rectangle1 { private double width; private double height; public Rectangle1(){ } public Rectangle(double width, double height){ this.width = width; this.height = height; } public double getWidth(){ return width; } public void setWidth(double width) { this.width = width; } public double getHeight(){ return height; } public void setHeight(double height){ this.height = height; } public double getArea(){ return width * height; } public double getPerimeter(){ return 2 * (width + height); } } public class TestRectangle { public static void main(String[] args) { Rectangle1 rectangle = new Rectangle1(2,4); System.out.println("\nA rectangle " + rectangle.toString()); System.out.println("The area is " + rectangle.getArea()); System.out.println("The perimeter is " + rectangle.getPerimeter()); } }`

    Read the article

  • Routing zend request through a default controller when controller not found.

    - by Brett Pontarelli
    Below is a function defined in my Bootstrap class. I must be missing something fundamental in the way Zend does routing and dispatching. What I am trying to accomplish is simple: For any request /foo/bar/* that is not dispatchable for any reason try /index/foo/bar/. The problem I'm having is when the FooController exists I get Action "foo" does not exist. Basically, the isDispatchable is always false. public function run() { $front = Zend_Controller_Front::getInstance(); $request = $front->getRequest(); $dispatcher = $front->getDispatcher(); //$controller = $dispatcher->getControllerClass($request); if (!$dispatcher->isDispatchable($request)) { $route = new Zend_Controller_Router_Route( ':action/*', array('controller' => 'index') ); $router = $front->getRouter(); $router->addRoute('FallBack', $route); } $front->dispatch(); }

    Read the article

  • 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

  • SWI-Prolog Semantic Web Library and Python Interface

    - by John Peter Thompson Garcés
    I want to write a Python web application that queries RDF triples using Prolog. I found pyswip for interfacing Python with SWI-Prolog, and I am currently looking into SWI-Prolog's RDF capabilities. I am wondering if anyone has tried this before--and if anyone has: what did your setup look like? How do you get pyswip to work with the SWI-Prolog semantic web library? Or is there another Python-Prolog interface that makes this easier?

    Read the article

  • Integration (math) in C++

    - by Chris Thompson
    Hi all, I'm looking for a library to find the integral of a given set of random data (rather than a function) in C++ (or C, but preferably C++). There is another question asking about integration in C but the answers discuss more how to integrate a function (I think...). I understand that this can be done simply by calculating the area under the line segment between each pair of points from start to finish, but I'd rather not reinvent the wheel if this has already been done. I apologize in advance if this is a duplicate; I searched pretty extensively to no avail. My math isn't as strong as I'd like it so it's entirely possible I'm using the wrong terminology. Thanks in advance for any help! Chris

    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

  • When opening a file in perl, how can I automatically use STDIN/OUT if the file name is "-"?

    - by Ryan Thompson
    I have a perl program that takes input and output file arguments, and I'd like to support the convention of using "-" to specify standard input/output. The problem is that I can't just open the file name, because open(my $input, '<', '-') opens a file called -, not standard input. So I have to do something like this: my $input_fh; if ($input_filename eq '-') { # Special case: get the stdin handle $input_fh = *STDIN{IO}; } else { # Standard case: open the file open($input_fh, '<', $input_filename); } And similarly for the output file. Is there any way to do this without testing for the special case myself? I know I could hack the ARGV filehandle to do this for input, but that won't work for output.

    Read the article

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