Search Results

Search found 2033 results on 82 pages for 'andrew g johnson'.

Page 19/82 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Cannot upload media via Wordpress uploader

    - by Justin Johnson
    This has to do with media uploading in Wordpress. Every time WP creates a folder for new uploads (it organizes uploads by year and month: yyyy/mm), it creates it with the "apache:apache' user and group, with full access to all (777 or drwxrwxrwx). However, after that, WP cannot create a folder within that folder (e.g.: mkdir 2011 succeeds, but mkdir 2011/01 fails). Also, uploads cannot be moved into these newly created folders even though the permissions are 777 (rwxrwxrwx). Once a month, I have to chown the newly created folders to be the same as user:group as the rest of the files. Once I do that, uploading works fine (which doesn't make sense to me The really frustrating part is that this problem doesn't exist in other WP installs on other domains on the same server. * I wasn't sure if this should be here or on serverfault. Edit: The containing directory /.../httpdocs/blog/wp-content/uploads has the correct ownership drwxrwxrwx 5 myuser psaserv 4096 Jun 3 18:38 uploads This is a Plesk/CentOS environment hosted by Media Temple (dv). I've written the following test script to simulate the problem <pre><?php $d = "d" . mt_rand(100, 500); var_dump( get_current_user(), $d, mkdir($d), chmod($d, 0777), mkdir("$d/$d"), chmod("$d/$d", 0777), fileowner($d), getmyuid() ); The script always creates the first directory mkdir($d) successfully. On domain A, where the WP problem is, it cannot create the nested directory mkdir("$d/$d"). However, on domain B, both directories are successfully created. I am running each script at /var/www/vhosts/domainA/httpdocs/tmp/t.php and /var/www/vhosts/domainB/httpdocs/tmp/t.php respectively I checked the permissions on tmp, httpdocs, and domain[AB] and they are the same for each path. The only thing that differs is the user.

    Read the article

  • Access 2003 VBA: Return only the index of the last item selected in a ListBox

    - by Eric D. Johnson
    I will preface this with saying, this is my first time using listboxes and earlier posts were criticized for lacking detail. So, all help is greatly appreciated and I hope this is enough information without being overkill. Currently, I have a listbox updating a junction table with an on click event (iterates through selected items and if they are not in the table it adds them). The list box is also updated by an option group (based on the option group value a query populates the list with the appropriate items and they are selected/highlighted based on the junction table). Also, when items are a "sub-category" the "category" is also selected. This functions perfectly until I ask it to do more... Problem 1: I need to differentiate "categories" of items from each other. So, I have included a blank item to the list box to add a space between categories. When the blank items are present the listbox does not update the junction table properly and vice versa. Problem 2: My users want to be able to deselect the "category" under certain circumstances. This is fine, just de-select the "category" after the "sub-category" is selected. However, the "category" is re-selected whenever the listbox is clicked again because it iterates through all entries. Perceived solution for both problems: Return only the index of the item (de)selected and manipulate accordingly. Is this possible? If so, how? OR: Should I take a different approach?

    Read the article

  • Algorithm(s) for rearranging simple symbolic algebraic expressions

    - by Gabe Johnson
    Hi, I would like to know if there is a straightforward algorithm for rearranging simple symbolic algebraic expressions. Ideally I would like to be able to rewrite any such expression with one variable alone on the left hand side. For example, given the input: m = (x + y) / 2 ... I would like to be able to ask about x in terms of m and y, or y in terms of x and m, and get these: x = 2*m - y y = 2*m - x Of course we've all done this algorithm on paper for years. But I was wondering if there was a name for it. It seems simple enough but if somebody has already cataloged the various "gotchas" it would make life easier. For my purposes I won't need it to handle quadratics. (And yes, CAS systems do this, and yes I know I could just use them as a library. I would like to avoid such a dependency in my application. I really would just like to know if there are named algorithms for approaching this problem.)

    Read the article

  • Google App Engine Needs Index Error

    - by Andrew Johnson
    I am currently getting a needs index error on my app engine app: http://www.gaiagps.com/wiki/home. I believe this index should have been created automatically by my index.yaml file (see below). Googling a bit, I think I just need to wait for my index to be built. Is this correct, or do I need to do something manually? Is there some sort of index-building queue? My tables are very, very small right now. EDIT: I added the line "indexes:" to my app.yaml, and now app engine reports the index is building, so I think this is fixed. It's weird that this file was wrong considering I've never touched it. indexes: # AUTOGENERATED # This index.yaml is automatically updated whenever the dev_appserver # detects that a new type of query is run. If you want to manage the # index.yaml file manually, remove the above marker line (the line # saying "# AUTOGENERATED"). If you want to manage some indexes # manually, move them above the marker line. The index.yaml file is # automatically uploaded to the admin console when you next deploy # your application using appcfg.py. - kind: Revision properties: - name: name - name: created The app works on my dev server, but not in production. However, on my dev console, I have noticed this error (EDIT: THIS ERROR IS GONE NOW THAT I ADDED indexes: to the app.yaml file above): ERROR 2009-10-18 04:46:51,908 dev_appserver_index.py:176] Error parsing /gaiagps.com/index.yaml: 'NoneType' object is not callable in "<string>", line 13, column 3: - kind: Revision ^

    Read the article

  • Should I expect Comet to be this slow?

    - by Chad Johnson
    I have the following in a Rails controller: def poll records = [] start_time = Time.now.to_i while records.length == 0 do records = Something.uncached{Something.find(:all, :conditions => { :some_condition => false})} if records.length > 0 break end sleep 1 if Time.now.to_i - start_time >= 20 break end end responseData = [] records.each do |record| responseData << { 'something' => record.some_value } # Flag message as received. record.some_condition = true record.save end render :text => responseData.to_json end and then I have Javascript performing an AJAX request. The request sits there for 20 seconds or until the controller method finds a record in the database, waiting. That works. function poll() { $.ajax({ url: '/my_controller/poll', type: 'GET', dataType: 'json', cache: false, data: 'time=' + new Date().getTime(), success: function(response) { // show response here }, complete: function() { poll(); }, error: function() { alert('error'); poll(); } }); } When I have 5 - 10 tabs open in my browser, my web application becomes super slow. Is this to be expected? Or is there some obvious improvement(s) I can make?

    Read the article

  • Rate My Script: Finding Flash Files Embedded in Office Files

    - by Shaun Johnson
    Can anyone improve on this? Requires Sysinternals Strings date /T >N:\output.txt net use z: /delete net use z: \\svr-002\rmstudentwork @cd /d "z:\" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.xls | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.ppt | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.doc | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.xlsx | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.pptx | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.docx | findstr \.swf >> "N:\output.txt" date /T >>N:\output.txt net use z: /delete /yes >>N:\output.txt net use z: \\svr-003\rmstudentwork "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.xls | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.ppt | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.doc | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.xlsx | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.pptx | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.docx | findstr \.swf >> "N:\output.txt" net use z: /delete /yes Basically it mounts a share as a network drive then runs through the share looking for swf files inside office documents.

    Read the article

  • Why do software engineers hate writing documentation?

    - by Stewart Johnson
    I ask because I quite enjoy it! I'm talking about design documentation and implementation notes (NOT user manuals), which are non-existent in most of the codebases I've been handed. I can understand why a developer wouldn't want to write requirements (that's the analyst's job) or the user documentation (that's a technical writer's job) but I don't get why developers hate writing design docs. I don't think I would feel as if I'd finished the job if I only wrote the code and walked away -- mainly because when I've been introduced to code-only situations I've seen how hard it is to figure out what's been done and what the software does. I would hate for people to suffer the same situation when inheriting my code. What makes you loath writing supporting documentation for your code?

    Read the article

  • Search and replace hundreds of strings in tens of thousands of files?

    - by C Johnson
    I am looking into changing the file name of hundreds of files in a (C/C++) project that I work on. The problem is our software has tens of thousands of files that including (i.e. #include) these hundreds of files that will get changed. This looks like a maintenance nightmare. If I do this I will be stuck in Ultra-Edit for weeks, rolling hundreds of regex's by hand like so: ^\#include.*["<\\/]stupid_name.*$ with #include <dir/new_name.h> Such drudgery would be worse than peeling hundreds of potatoes in a sunken submarine in the antarctic with a spoon. I think it would rather be ideal to put the inputs and outputs into a table like so: stupid_name.h <-> <dir/new_name.h> stupid_nameb.h <-> <dir/new_nameb.h> stupid_namec.h <-> <dir/new_namec.h> and feed this into a regular expression engine / tool / app / etc... My Ultimate Question: Is there a tool that will do that? Bonus Question: Is it multi-threaded? I looked at quite a few search and replace topics here on this website, and found lots of standard queries that asked a variant of the following question: standard question: Replace one term in N files. as opposed to: my question: Replace N terms in N files. Thanks in advance for any replies.

    Read the article

  • Return an Oracle Associative Array from a function

    - by Paul Johnson
    Does anybody know if it is possible to return an associative array as the result of an Oracle function, if so do you have any examples? I have an Oracle package which contains an associative array declaration as defined below: TYPE EVENTPARAM IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; This is then used in a stored procedure outside the package as follows: v_CompParams areva_interface.eventparam; The intention is to store an associative array of strings in the variable v_CompParams, returned from a Parse function in another package. The definition for which is as follows: PACKAGE STRING_MANIP IS TYPE a_array IS TABLE OF NUMBER INDEX BY BINARY_INTEGER; FUNCTION Parse (v_string VARCHAR2, v_delim VARCHAR2) RETURN a_array; FUNCTION RowCount(colln IN a_array) RETURN NUMBER; END; The code which implements this is: v_CompParams := STRING_MANIP.PARSE(v_CompID,v_Delim); Unfortunately it doesn't work, I get the error 'PLS-00382: expression is of wrong type'. I foolishly assumed, that since a_array derives from the same source Oracle type as the variable v_CompParams, that there would be no problem casting between them. Any help much appreciated. Kind Regards Paul J.

    Read the article

  • Can iPad/iPhone Touch Points be Wrong Due to Calibration?

    - by Kristopher Johnson
    I have an iPad application that uses the whole screen (that is, UIStatusBarHidden is set true in the Info.plist file). The main window's frame is set to (0, 0, 768, 1024), as is the main view in that frame. The main view has multitouch enabled. The view has code to handle touches: - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { CGPoint location = [touch locationInView:nil]; NSLog(@"touchesMoved at location %@", NSStringFromCGPoint(location)); } } When I run the app in the simulator, it works pretty much as expected. As I move the mouse from one edge of the screen to the other, reported X values go from 0 to 767. Reported Y values go from 20 to 1023, but it is a known issue that the simulator doesn't report touches in the top 20 pixels of the screen, even when there is no status bar. Here's what's weird: When I run the app on an actual iPad, the X values go from 0 to 767 as expected, but reported Y values go from -6 to 1017. The fact that it seems to work properly on the simulator leads me to suspect that real devices' touchscreens are not perfectly calibrated, and mine is simply reporting values six pixels too low. Can anyone verify that this is the case? Otherwise, is there anything else that could account for the Y values being six pixels off from what I expect? (In a few days, I should have a second iPad, so I can test this with another device and compare the results.)

    Read the article

  • When building a web Application project, TFS 2008 Builds two spearate projects in the _PublishedFold

    - by Steve Johnson
    Hi all, I am trying to a perform build automation on one of web application projects built using VS 2008. The _PublishedWebSites contains two folders: Web and Deploy. I just want the TFS 2008 to generate only the Deploy Folder and Not the Web Folder. Here is my TFSBuild.proj File <Project ToolsVersion="3.5" DefaultTargets="Compile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\WebDeployment\v9.0\Microsoft.WebDeployment.targets" /> <ItemGroup> <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/MySoftware.sln"> <Targets></Targets> <Properties></Properties> </SolutionToBuild> </ItemGroup> <ItemGroup> <ConfigurationToBuild Include="Release|AnyCPU"> <FlavorToBuild>Release</FlavorToBuild> <PlatformToBuild>Any CPU</PlatformToBuild> </ConfigurationToBuild> </ItemGroup> <!--<ItemGroup> <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/MySoftware.sln"> <Targets></Targets> <Properties></Properties> </SolutionToBuild> </ItemGroup> <ItemGroup> <ConfigurationToBuild Include="Release|x64"> <FlavorToBuild>Release</FlavorToBuild> <PlatformToBuild>x64</PlatformToBuild> </ConfigurationToBuild> </ItemGroup>--> <ItemGroup> <AdditionalReferencePath Include="C:\3PR" /> </ItemGroup> <Target Name="GetCopyToOutputDirectoryItems" Outputs="@(AllItemsFullPathWithTargetPath)" DependsOnTargets="AssignTargetPaths;_SplitProjectReferencesByFileExistence"> <!-- Get items from child projects first. --> <MSBuild Projects="@(_MSBuildProjectReferenceExistent)" Targets="GetCopyToOutputDirectoryItems" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)" Condition="'@(_MSBuildProjectReferenceExistent)'!=''"> <Output TaskParameter="TargetOutputs" ItemName="_AllChildProjectItemsWithTargetPathNotFiltered"/> </MSBuild> <!-- Remove duplicates. --> <RemoveDuplicates Inputs="@(_AllChildProjectItemsWithTargetPathNotFiltered)"> <Output TaskParameter="Filtered" ItemName="_AllChildProjectItemsWithTargetPath"/> </RemoveDuplicates> <!-- Target outputs must be full paths because they will be consumed by a different project. --> <CreateItem Include="@(_AllChildProjectItemsWithTargetPath->'%(FullPath)')" Exclude= "$(BuildProjectFolderPath)/../../Development/Main/Web/Bin*.pdb; *.refresh; *.vshost.exe; *.manifest; *.compiled; $(BuildProjectFolderPath)/../../Development/Main/Web/Auth/MySoftware.dll; $(BuildProjectFolderPath)/../../Development/Main/Web/BinApp_Web_*.dll;" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always' or '%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'" > <Output TaskParameter="Include" ItemName="AllItemsFullPathWithTargetPath"/> <Output TaskParameter="Include" ItemName="_SourceItemsToCopyToOutputDirectoryAlways" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='Always'"/> <Output TaskParameter="Include" ItemName="_SourceItemsToCopyToOutputDirectory" Condition="'%(_AllChildProjectItemsWithTargetPath.CopyToOutputDirectory)'=='PreserveNewest'"/> </CreateItem> </Target> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.WebDeployment.targets. <Target Name="BeforeBuild"> </Target> <Target Name="BeforeMerge"> </Target> <Target Name="AfterMerge"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> I want to build everything that the builtin Deploy project is doing for me. But i dont want the generated Web Project as it conatains App_Web_xxxx.dll assemblies instead of a single compiled assembly. Please help. Thanks

    Read the article

  • How do you compile an OpenGL program on Ubuntu?

    - by Steve Johnson
    I'm a Ubuntu user who is interested in learning OpenGL. I found a page with some samples on it: http://www.opengl.org/resources/code/samples/glut_examples/examples/examples.html but when I try to compile the first one using: cc -o abgr abgr.c -lglut -lGLU -lGL -lXmu -lXext -lX11 -lm I get an error message saying: /usr/bin/ld: cannot find -lXmu collect2: ld returned 1 exit status What is "lXmu"? How do I get this to compile? I'm 15 years old and new to computer programming. Thanks!

    Read the article

  • How would you sample a real-time stream of coordinates to create a Speed Graph?

    - by Andrew Johnson
    I have a GPS device, and I am receiving continuous points, which I store in an array. These points are time stamped. I would like to graph distance/time (speed) vs. distance in real-time; however, I can only plot 50 of the points because of hardware constraints. How would you select points from the array to graph? For example, one algorithm might be to select every Nth point from the array, where N results in 50 points total. Code: float indexModifier = 1; if (MIN(50,track.lastPointIndex) == 50) { indexModifier = track.lastPointIndex/50.0f; } index = ceil(index*indexModifier); Another algorithm might be to keep an array of 50 points, and throw out the point with the least speed change each time you get a new point.

    Read the article

  • A scheme for expiring downloaded content?

    - by Chad Johnson
    I am going to offer a web API service that allows users to download and "rent" content for a monthly subscription fee. The API will either be open to everyone or possibly just select parties (not sure yet). Each developer must agree to a license, and they receive a developer key for their person. Each software application will have its own key as well. So then end-users will download the software which will interact with my service's API. Each user will have a key for each application as well (probably using OAuth). Content will be cached on first download and accessible offline via just the third-party application that cached the content. If a user cancels their subscription, I plan on doing the following: Deactivate the user's OAuth key for all applications. Do not allow the user's account to download new content via the API (and subsequently any software that uses the API). Now, the big question is: how do I make content expire if they cancel their subscription? If they cancel, they should not have access to content anymore. Here are ideas I've thought of (some of these are half-solutions, not yet fully fleshed out): Require that applications encrypt downloaded content using the user's OAuth key, making it available to only the application. This will prevent most users from going to the cache directory and just copying and keeping files. Update the user's key once a month, forcing content to re-cache on a monthly basic. Users could then access content for a month after they cancel their subscription. Require applications to "phone home" [to the service] periodically and check whether the user's subscription has terminated. If so, require in the API developer license that applications expire cache. If it is found that applications do not comply, their keys (and possibly keys for all developers) are permanently deactivated as a consequence. One major worry is that some applications may blatantly ignore constraints of the license. Is it generally acceptable to rely on applications abiding by the licensing constraints? Bad idea? Any other ideas? Maybe a way to make content auto-expire after x days? Something else? I'm open to out-of-the-box ideas.

    Read the article

  • QML 5.3 iOS compilation of pure QML app

    - by Nathaniel Johnson
    I have an application written in QML. Initially, I used the standard C++ bootstrap for the app. int main(int argc, char *argv[]) { QApplication app(argc, argv); // A bunch of components and data models written in C++ QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:///main.qml"))); return app.exec(); } The bulk of the app is in QML and the more I work with QML, the happier I am with it and the more I feel comfortable converting the C++ pieces to QML. So, it comes to one risk that I wanted to ask about. If I convert the app to a pure QML application like the kind generated by the Qt Quick UI application wizard with no C++ and designed to be run with qmlscene will I be able to compile it for iOS when the time to port it comes or will I end up just converting it back to the C++ loader form? TL;DR Can pure QML (no C++) apps be compiled and run on iOS devices?

    Read the article

  • Test iPhone in-app purchases on a different bundle?

    - by Andrew Johnson
    We have a group of beta testers for iPhone app. Recently, we added in-app purchases to the app. Before this, we would send out ad hoc builds to beta testers using a separate bundle ID and name so that they could have the store build and the ad hoc build on their phones. However, it seems like we have to build the ad hoc copy with the same Bundle ID to test in-app purchases, and this means we can't send out a seperate beta copy - our beta file (annoyingly) overwrites the user's store-bought app. Is there any way to test in-app purchases in a different bundle ID? Do I need to set up fake, test in-app purchases for the test build too?

    Read the article

  • In ASP.NET MVC, why can't I inherit from "MyCustomView" without specifying the full type name?

    - by Seth Petry-Johnson
    In my MVC apps I normally declare a base view type that all of my views inherit from. I get a parser error when I specify Inherits="MyView" in my Page declaration, but not if I specify Inherits="MyApp.Web.Views.MyView". Strangely enough, it also works fine if I specify Inherits="MyView<T> (where T is any valid type). Why can I specify a strongly typed view without the full type name, but not a generic view? My base view class is declared like this: namespace MyApp.Web.Views { public class MyView : MyView<object> { } public class MyView<TModel> : ViewPage<TModel> where TModel : class { } }

    Read the article

  • Geshi on WebSVN makes my code files appear blank

    - by Travis Johnson
    In config.php, if i uncomment the following line $config->useGehsi(); Suddenly, when I load up a C# file, instead of showing the document, it's just a blank page. As soon as I comment out the code above, I'm able to see my C# file, but there's no syntax highlighting. Anyone have a solution to get GeSHi working with WebSVN when this kind of error occurs?

    Read the article

  • acts_as_taggable_on and auto_complete returning no results

    - by Sean Johnson
    I'm using acts_as_taggable_on in a model, and am trying to implement the auto_complete plugin. It seems as though I have everything hooked up correctly, but the search isn't returning any results. Here's what I have so far: In the view: <%= text_field_with_auto_complete(:link, :tag_list, {}, {:tokens => ','}) %> In the controller: def auto_complete_for_link_tag_list @tags = Link.tag_counts_on(:tags).where('tags.name LIKE ?', params[:link][:tag_list]) render :inline => "<%= auto_complete_result(@tags, 'name') %>", :layout => false logger.info "#{@tags.size} tags found." end The logger keeps returning 0 tags, and nothing shows up in the view (yeah, the layout includes the javascript defaults). Any thoughts or advice would be awesome.

    Read the article

  • API for accessing PHP documentation?

    - by Chad Johnson
    I'm done some Googling, and I've found nothing. I'm scoping out writing a plugin for an editor I use, and I am wondering whether there is a way I can access the PHP documentation via an API? For instance, I'd like to get raw access to the information (besides the comments) located here: http://php.net/file_exists. php.net seemingly uses MediaWiki which provides an API. The tutorial provides the example URL, http://en.wikipedia.org/w/api.php?action=login&format=xml. This does not work for php.net, however (http://php.net/w/api.php?action=login&format=xml). I'm just looking for a little information on how to interface with the PHP documentation.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >