Search Results

Search found 434 results on 18 pages for 'kristopher johnson'.

Page 11/18 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • 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

  • 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

  • When building a web application project, TFS 2008 builds two separate projects in _PublishedFolder.

    - by Steve Johnson
    I am trying to perform build automation on one of my web application projects built using VS 2008. The _PublishedWebSites contains two folders: Web and Deploy. I want 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 don't want the generated web project as it contains App_Web_xxxx.dll assemblies instead of a single compiled assembly. How can I do this?

    Read the article

  • Creating an HTTP-Redirected Virtual Directopry in IIS 6.0 without specifying physical path & WMI/ADS

    - by Steve Johnson
    My question is : Is it possible to create a working IIS 6.0 Virtual Directory with providing Physical Path of the Virtual Directory.? I know that manually, it is not possible via IIS but programmatically such a virtual directory can be created. If an HTTPRedirect is set on that virtual directory but the site physical path is not specified, then will it work? Simply stated, how to create an HTTp-redirected Virtual Directory , directly without specifying any physical path to a folder or network share. Here is my code. Try If Directory.Exists(HomeDirectory) = False And Path.StartsWith("http://") = False Then Directory.CreateDirectory(HomeDirectory) End If Dim website As DirectoryEntry website = New DirectoryEntry("IIS://" & IISServer & "/W3SVC/" & WebsiteId & "/Root") Dim NewVDir As DirectoryEntry = website.Children.Add(VDirName, "IIsWebVirtualDir") If Path.StartsWith("http://") = False Then NewVDir.Properties("Path")(0) = Path NewVDir.Properties("HttpRedirect").Clear() Else NewVDir.Properties("HttpRedirect")(0) = Path End If If ((Perm And Permission.Read) = Permission.Read) Then NewVDir.Properties("AccessRead")(0) = True End If If ((Perm And Permission.Write) = Permission.Write) Then NewVDir.Properties("AccessWrite")(0) = True End If If ((Perm And Permission.DirBrowse) = Permission.DirBrowse) Then NewVDir.Properties("EnableDirBrowsing")(0) = True End If If ((Perm And Permission.CreatetApplication) = Permission.CreatetApplication) Then NewVDir.Invoke("AppCreate", True) End If If ((Perm And Permission.ScriptOnly) = Permission.ScriptOnly) Then NewVDir.Properties("AccessScript")(0) = True End If If ((Perm And Permission.ScriptNExecute) = Permission.ScriptNExecute) Then NewVDir.Properties("AccessExecute")(0) = True End If NewVDir.Properties("AuthAnonymous")(0) = True NewVDir.Properties("AuthNTLM")(0) = True NewVDir.Properties("AnonymousUserName")(0) = AnonUserName NewVDir.Properties("AnonymousUserPass")(0) = AnonPassword NewVDir.Properties("AppFriendlyName")(0) = AppFriendlyName NewVDir.CommitChanges() website.CommitChanges() NewVDir.Close() website.Close() Success = True Catch Err As Exception Throw New Exception("My Custom Exception Here: " & Err.Message) End Try

    Read the article

  • Sharepoint Workflow doesn't trigger after created/edited tickets

    - by Brad Johnson
    I have a workflow created in Sharepoint designer that works fine when manually triggered. I want it to trigger when a new ticket is created and when an existing ticket is edited. I have tried everything, but it makes no sense that it works when manually triggered, but does not appear to trigger when tickets are created/modified. Any help would be appreciated.

    Read the article

  • Where are the new languages?

    - by Johnson William
    Most now mainstream/popular (interpreted|scripting) programming languages were created around the 1990's. (Perl, Python, Ruby, PHP just to name a few). How many people knew about those languages around 1-2 years after they had been first published? Are there languages with potential of becoming as important as e.g.: Python or PHP being developed at the moment? I mean ... is there someone even seriously trying to create a new one? If the first version of a programming language is published and nearly nobody knows about it, as it was with all the languages I've mentioned above, where could I find out? Is there some sort of "list" or "network" dealing just with non-language-specific news? Is the area where Perl, Python, Ruby and PHP fit in already fully covered? Do you know of concrete examples of new programming languages being seriously developed or rising at the moment? (Except Google's go!)

    Read the article

  • Switching Android SensorManager speed. What's a good practice?

    - by Johnson Tey
    Hello stackoverflow! I'm interested to switch between different sensor orientation speeds over time to optimize the program ie.. battery life. The routine may be called very often. I'm looking for the right practice. sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); sensorManager.registerListener(sensorListener, SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_FASTEST); //... 1) unregister then register new speed OR //... 2) register new speed without registering sensorManager.unregisterListener(sensorListener); Should I unregister the listener and then register with SensorManager.SENSOR_DELAY_NORMAL OR Should I not bother unregistering the listener? thanks.

    Read the article

  • New to C# and trying to use a global variable

    - by Andrew G. Johnson
    Is it possible to use global variables in C#? I'm coming from mainly a PHP background so variables are either accessible everywhere or just a global definition away. My main issue is I have a User class that I built myself to wrap around the current users table on my company's database. I am defining it in the MasterPage but can't seem to access it from the actual pages (I don't know if there's a better word to describe them but they are the pages that inherit the styles and format from the MasterPage) Any general tips or implementation practices for me? EDIT: here's some code snippets of what I'm trying to do: Site.master.cs public partial class SiteMaster : System.Web.UI.MasterPage { public User user = new User(); } logout.aspx <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="logout.aspx.cs" Inherits="logout" %> <%@ MasterType virtualPath="~/Site.master"%> logout.aspx.cs public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { User user = Master.user; } }

    Read the article

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