Search Results

Search found 563 results on 23 pages for 'doug harris'.

Page 5/23 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Add directory to $PATH if it's not already there

    - by Doug Harris
    Has anybody written a bash function to add a directory to $PATH only if it's not already there? I typically add to PATH using something like: export PATH=/usr/local/mysql/bin:$PATH If I construct my PATH in .bash_profile, then it's not read unless the session I'm in is a login session -- which isn't always true. If I construct my PATH in .bashrc, then it runs with each subshell. So if I launch a Terminal window and then run screen and then run a shell script, I get: $ echo $PATH /usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:.... I'm going to try building a bash function called add_to_path() which only adds the directory if it's not there. But, if anybody has already written (or found) such a thing, I won't spend the time on it.

    Read the article

  • Windows 8 "Upgrade Offer" eligibilty when running the Consumer Preview in a VM?

    - by Dan Harris
    If I have a VM running Windows 8 Consumer/Release Preview, am I allowed to take advantage of the Windows 8 upgrade offer, and install it on that machine? I would have assumed not...as there was never a licensed version of XP SP3 through to Windows 7 installed in that VM. It was a clean installation of the Consumer Preview into a VM. My confusion comes from the notes at the bottom of the download page for the Upgrade offer which states: Offer valid from October 26, 2012 until January 31, 2013 and is for individuals and small businesses needing to upgrade up to five devices. If you are a business customer looking to upgrade more than five devices to Windows 8 Pro, contact your Microsoft partner for more information. To install Windows 8 Pro, customers must be running Windows XP SP3, Windows Vista, Windows 7, Windows 8 Consumer Preview, or Windows 8 Release Preview. I am assuming it's not possible and i'll need to purchase the System Builder edition to install within a VM? My guess is that you can use your downloaded upgrade offer only if you updated Windows 7 to the release preview, and therefore had the Windows 7 license on the machine, I used the serial number from the Microsoft Website when downloading the Release Preview, and did a clean install, so there was never a Windows 7 license on the VM. I have MSDN for development purposes, but I am looking to run in a VM for personal use as well, so my MSDN license is not valid for that particular use.

    Read the article

  • Managing MS Exchange server-side email rules on Mac OS X?

    - by Doug Harris
    Has anybody found an easy way to manage server-side rules from Mac OS X? Here's a brief list of what I know doesn't work: Entourage 2008 - it supports client rules, but not server rules. No good, there are certain actions that should happen before I open my laptop or check my email on my iPhone. Apple Mail - same as Entourage, but at least I don't get as frustrated since, unlike Entourage, this isn't a Microsoft product. Web mail (aka Outlook Web Access) - perhaps you can manage rule in the fancy version which Exchange serves to IE, but not with the browsers available on a Mac. I manage this now by launching a VMWare virtual machine running Windows XP and Outlook. I don't count that as an easy way. Update, post release of Office 2011 Does MS Outlook 2011 have the ability to manage server-side rules? Update, post installation of Office 2011 No. Outlook 2011 doesn't have this ability. I've already removed my account from Outlook and switched back to Apple Mail and iCal

    Read the article

  • links for 2011-02-22

    - by Bob Rhubart
    Eleven BI trends for 2011 | ITWeb Business Intelligence (tags: ping.fm) The Buttso Blathers: WebLogic Schema Files Buttso shares a link. (tags: orale weblogic) Cloud Computing & Enterprise Architecture | Open Group Blog "On the first look, it may seem like Enterprise Architecture is irrelevant in a company if your complete IT is running on Cloud Computing, SaaS and outsourcing/offshoring. I was of the same opinion last year. However, it is not the case. In fact, the complexity is going to get multiplied." (tags: opengroup cloud enterprisearchitecture) James Taylor: Change Logging Level for SOA 11g James says: "I’m sure there are many blogs out there that have this solution. But I seem to get asked this question a lot so I thought I would post it here for my convenience. (tags: oracle middleware soa) David Linthicum: The Truth behind Standards, SOA, and Cloud Computing "Most of the standards we've worked on in the world of SOA over the past several years are applicable to the world of cloud computing. Cloud computing is simply a change in platform, and the existing architectural standards we leverage should transfer nicely to the cloud computing space." - David Linthicum (tags: enterprisearchitecture soa cloud) C. Martin Harris, MD: HIMSS11 Update from the Chairman "We cannot allow ourselves to focus exclusively on near term goals. Our real goal is a technology-driven transformation of healthcare that will never stop. A true transformation is a process of lessons learned and applied, that continually open broad new horizons of opportunity." - C. Martin Harris, MD (tags: enterprisearchitecture modernization)

    Read the article

  • Silverlight Cream for January 04, 2011 -- #1022

    - by Dave Campbell
    In this Issue: Dennis Doomen, Doug Holland, Kunal Chowdhury, Sacha Barber, Paul Sheriff, Mike Snow(-2-), Peter Kuhn(-2-), and Mike Ormond. Above the Fold: Silverlight: "Silverlight: Fixing the BookShelf Sample" Peter Kuhn WP7: "Searching the Windows Phone 7 Marketplace Programmatically" Doug Holland Prism/Cinch: "PRISM 4 Custom Transitioning Region" Sacha Barber Shoutouts: Sacha Barber the author of Cinch asks for some advice from users: Cinch V2 : Question For The Reader Michael Crump introduces us to SnippetManager as a way to organize your Silverlight snippets... I'm thinking any snippet: A better way to organize your Silverlight Code Snippets. Andy Beaulieu announced an update of Physics Helper 4.2 using Farseer 3.2 ... check out the breaking changes though! Dennis Doomen blogged about a new release of his Fluent Assertions: A new year with a new release of Fluent Assertions, with a blog post about it below From SilverlightCream.com: Verifying PropertyChanged events in Silverlight using Fluent Assertions Dennis Doomen release his latest Fluent Assertions for .NET and Silverlight and wrote up a big post about the new event monitoring syntax. Searching the Windows Phone 7 Marketplace Programmatically Doug Holland has a post up on MSDN blogs talking about searching the WP7 Marketplace programmatically... ya know you should be able to do it... here's how. Beginners Guide to Visual Studio LightSwitch (Part - 5) Kunal Chowdhury has Part 5 of a tutorial series on Lightswitch up at SilverlightShow... working with custom validation this time, and for the first time in this series so far actually writes some code! PRISM 4 Custom Transitioning Region Sacha Barber took time to look at Prism4/MEF and Cinch2 and found things to be fine then wrote a custom PRISM region adaptor that uses a TransitionalElement from the Microsoft Transitionals project... code available, blog post to come. Get Application Title from Windows Phone Paul Sheriff has a cool chunk of code up... getting the Application's title programmatically... and other attributes as well, if you were wondering why you might wanna do that. Detecting Users Win7 Mobile Theme Color Mike Snow has a couple as well... first up is how to detect your user's theme... obviously useful if you wanna match it. Selecting an Item in a ComboBox after Adding Items Second for Mike Snow is a general Silverlight issue... setting the selected item on a ComboBox after filling it... if you haven't stumbled across this yet, you will... A Simplified Grid Markup Reloaded Peter Kuhn has a pair of posts up since last time... this first is an extension of Colin Eberhardt's simplified Grid markup system, but it's only useful if you don't plan on using Blend... can we get a show of hands? :) Silverlight: Fixing the BookShelf Sample Next Peter Kuhn has some changes to the Bookshelf code, but more importantly has some excelling tips about shader effects, Effects on Visual Elements and how to make best use of all the above. Displaying HTML Content in Windows Phone 7 Mike Ormond has a WP7 post up describing problems a customer had early on displaying rich text and an attempt to use the WebBrowser control to pull it off and the problems that caused... check out the resultant code, and read the comments as well. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • C++0x rvalue references - lvalues-rvalue binding

    - by Doug
    This is a follow-on question to http://stackoverflow.com/questions/2748866/c0x-rvalue-references-and-temporaries In the previous question, I asked how this code should work: void f(const std::string &); //less efficient void f(std::string &&); //more efficient void g(const char * arg) { f(arg); } It seems that the move overload should probably be called because of the implicit temporary, and this happens in GCC but not MSVC (or the EDG front-end used in MSVC's Intellisense). What about this code? void f(std::string &&); //NB: No const string & overload supplied void g1(const char * arg) { f(arg); } void g2(const std::string & arg) { f(arg); } It seems that, based on the answers to my previous question that function g1 is legal (and is accepted by GCC 4.3-4.5, but not by MSVC). However, GCC and MSVC both reject g2 because of clause 13.3.3.1.4/3, which prohibits lvalues from binding to rvalue ref arguments. I understand the rationale behind this - it is explained in N2831 "Fixing a safety problem with rvalue references". I also think that GCC is probably implementing this clause as intended by the authors of that paper, because the original patch to GCC was written by one of the authors (Doug Gregor). However, I don't this is quite intuitive. To me, (a) a const string & is conceptually closer to a string && than a const char *, and (b) the compiler could create a temporary string in g2, as if it were written like this: void g2(const std::string & arg) { f(std::string(arg)); } Indeed, sometimes the copy constructor is considered to be an implicit conversion operator. Syntactically, this is suggested by the form of a copy constructor, and the standard even mentions this specifically in clause 13.3.3.1.2/4, where the copy constructor for derived-base conversions is given a higher conversion rank than other implicit conversions: A conversion of an expression of class type to the same class type is given Exact Match rank, and a conversion of an expression of class type to a base class of that type is given Conversion rank, in spite of the fact that a copy/move constructor (i.e., a user-defined conversion function) is called for those cases. (I assume this is used when passing a derived class to a function like void h(Base), which takes a base class by value.) Motivation My motivation for asking this is something like the question asked in http://stackoverflow.com/questions/2696156/how-to-reduce-redundant-code-when-adding-new-c0x-rvalue-reference-operator-over ("How to reduce redundant code when adding new c++0x rvalue reference operator overloads"). If you have a function that accepts a number of potentially-moveable arguments, and would move them if it can (e.g. a factory function/constructor: Object create_object(string, vector<string>, string) or the like), and want to move or copy each argument as appropriate, you quickly start writing a lot of code. If the argument types are movable, then one could just write one version that accepts the arguments by value, as above. But if the arguments are (legacy) non-movable-but-swappable classes a la C++03, and you can't change them, then writing rvalue reference overloads is more efficient. So if lvalues did bind to rvalues via an implicit copy, then you could write just one overload like create_object(legacy_string &&, legacy_vector<legacy_string> &&, legacy_string &&) and it would more or less work like providing all the combinations of rvalue/lvalue reference overloads - actual arguments that were lvalues would get copied and then bound to the arguments, actual arguments that were rvalues would get directly bound. Questions My questions are then: Is this a valid interpretation of the standard? It seems that it's not the conventional or intended one, at any rate. Does it make intuitive sense? Is there a problem with this idea that I"m not seeing? It seems like you could get copies being quietly created when that's not exactly expected, but that's the status quo in places in C++03 anyway. Also, it would make some overloads viable when they're currently not, but I don't see it being a problem in practice. Is this a significant enough improvement that it would be worth making e.g. an experimental patch for GCC?

    Read the article

  • filtering itunes library items by file location

    - by Cawas
    3 answers and unfortunately no solution yet. The Problem I've got way more than 1000 duplicated items in my iTunes Library pointing to a non-existant place (the "where" under "get info" window), along with other duplicated items and other MIAs (Missing In Action). Is there any simple way to just delete all of them and only them? From the library, of course. By that I mean some MIAs are pointing to /Volumes while some are pointing to .../music/Music/... or just .../music/.... I want to delete all pointing to /Volumes as to later I'll recover the rest. Check the image below. Some Background I tried searching for a specific key word on the path and creating smart play list, but with no result. Being able to just sort all library by path would be a perfect solution! I believe old iTunes could do that. PowerTunes can do it (sort by path) but I can't do anything with its list. I would also welcome any program able to handle this, then import and properly export back the iTunes library. Since this seems to just not be clear enough... AppleScript doesn't work That's because AppleScript just can't gather the missing info anywhere in iTunes Library. Maybe we could use AppleScript by opening the XML file, but that's a whole nother issue. Here's a quote from my conversation with Doug the man himself Adams last december: I don't think you do understand. There is no way to get the path to the file of a dead track because iTunes has "forgotten" it. That is, by definition, what a dead track is. Doug On Dec 21, 2010, at 7:08 AM, Caue Rego wrote: yes I understand that and have seem the script. but I'm not looking for the file. just the old broken path reference to it. Sent from my iPhone On 21/12/2010, at 10:00, Doug Adams wrote: You cannot locate missing files of dead tracks because, by definition, a dead track is one that doesn't have any file information. If you look at "Super Remove Dead Tracks", you will notice it looks for tracks that have "missing value" for the location property.

    Read the article

  • AT&T Application Resource Analyzer in NetBeans IDE

    - by Geertjan
    Here at Øredev in Malmö I met Doug Sillars who does developer outreach for the AT&T Application Resource Optimizer. In this YouTube clip you see Doug explaining how it works and what it can do for optimizing performance of mobile applications. There's a free and open source Android app on GitHub that you can install on Android to collect data and then there's a Java Swing application for analyzing the results. And here's what that application looks like as a plugin in NetBeans IDE, click to enlarge the image, which shows the Android sources of the Data Collector, as well as the Data Analyzer ready to be used to collect data: Since the ARO Data Analyzer is written in Java and has JPanels defining its UI layer, integrating the user interface wasn't hard. Now working on the Actions, so there'll be a new ARO menu with start/stop data collecting menu items, etc, reusing as much of the original code as possible. That part is actually already working. I started up an Android emulator, then started the data collection process from the IDE. Now need to include the Actions for importing the data into the analyzer, together with a few other related features. A pretty cool feature in ARO is video capture, so that a movie can be made by ARO of all the steps taken on the device during the collection process, which will also be nice to have integrated into the NetBeans plugin. Ultimately, this will be handy for anyone creating Android applications in NetBeans IDE since they'll be able to use AT&T's ARO tool for optimizing the performance of the applications they're developing. It will also be useful for those using the built-in Cordova tools in NetBeans IDE to create iOS applications because ARO is also applicable to analyzing iOS application performance.

    Read the article

  • Another big year for the ADF EMG at OOW12

    - by Chris Muir
    Oracle Open World 2012 has only just started, but in one way it's just finished!  All the ADF EMG's OOW content is over for another year! The unique highlight this year for me was the first ever ADF EMG social night held on Saturday, where I finally had the chance to meet so many ADF community members who I've known over the internet, but never met in person.  What?  You didn't get an invite?  Oh well, better luck next year ;-) Seriously our budget was limited, so in the happy-dictatorship sort of way I had to limit RSVPs to just 40 people.  Hopefully next year we can do something bigger and better for the wider community. Following directly on from the Saturday social night the ADF EMG ran a full day of sessions at the user group Sunday.  I wont go over the content again, but to say thank you very much to all our presenters and helpers, including Gert Poel, Pitier Gillis, Aino Andriessen, Simon Haslam, Ken Mizuta, Lucas Jellema and the FMW roadshow team, Ronald van Luttikhuizen, Guido Schmutz, Luc Bors, Aino Andriessen and Lonneke Dikmans. Also special thanks must go to Doug Cockroft and Bambi Price for their time and effort in organizing the ADF EMG room behind the scenes via the APOUC. To be blunt Doug and Bambi really do deserve serious thanks because they had to wear a lot of Oracle politics behind the scenes to get the rooms organized (oh, and deal with me fretting too! ;-). Finally thanks to all the members and OOW delegates for turning up and supporting the group on the day.  In the end the ADF EMG exists for you, and I hope you found it worthwhile. Onto 2013 (oh, and the rest of OOW12 ;-) 

    Read the article

  • How to show button ‘Done’ on number pad on iPhone OS 4?

    - by Will Harris
    I'd like to add a Done button to the iPhone number pad keyboard. There's even a handy space at the bottom left for just such a button. Previously, I was using a similar trick to those described in Question 584538 and Luzian Scherrer's excellent blog post, but that stopped working in iOS 4. I can do it by creating a custom inputView, but I'd prefer to extend Apple's keyboard instead of writing my own. Is there a new way to add a view to the standard keyboard? Has someone published an OSS inputView for this? Is there another way?

    Read the article

  • decimal.TryParse() drops leading "1"

    - by Martin Harris
    Short and sweet version: On one machine out of around a hundred test machines decimal.TryParse() is converting "1.01" to 0.01 Okay, this is going to sound crazy but bare with me... We have a client applications that communicates with a webservice through JSON, and that service returns a decimal value as a string so we store it as a string in our model object: [DataMember(Name = "value")] public string Value { get; set; } When we display that value on screen it is formatted to a specific number of decimal places. So the process we use is string - decimal then decimal - string. The application is currently undergoing final testing and is running on more than 100 machines, where this all works fine. However on one machine if the decimal value has a leading '1' then it is replaced by a zero. I added simple logging to the code so it looks like this: Log("Original string value: {0}", value); decimal val; if (decimal.TryParse(value, out val)) { Log("Parsed decimal value: {0}", val); string output = val.ToString(format, CultureInfo.InvariantCulture.NumberFormat); Log("Formatted string value: {0}", output); return output; } On my machine - any every other client machine - the logfile output is: Original string value: 1.010000 Parsed decimal value: 1.010000 Formatted string value: 1.01 On the defective machine the output is: Original string value: 1.010000 Parsed decimal value: 0.010000 Formatted string value: 0.01 So it would appear that the decimal.TryParse method is at fault. Things we've tried: Uninstalling and reinstalling the client application Uninstalling and reinstalling .net 3.5 sp1 Comparing the defective machine's regional settings for numbers (using English (United Kingdom)) to those of a working machine - no differences. Has anyone seen anything like this or has any suggestions? I'm quickly running out of ideas... While I was typing this some more info came in: Passing a string value of "10000" to Convert.ToInt32() returns 0, so that also seems to drop the leading 1.

    Read the article

  • Binary file email attachment problem

    - by Alan Harris-Reid
    Hi there, Using Python 3.1.2 I am having a problem sending binary attachment files (jpeg, pdf, etc.) - MIMEText attachments work fine. The code in question is as follows... for file in self.attachments: part = MIMEBase('application', "octet-stream") part.set_payload(open(file,"rb").read()) encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % file) msg.attach(part) # msg is an instance of MIMEMultipart() server = smtplib.SMTP(host, port) server.login(username, password) server.sendmail(from_addr, all_recipients, msg.as_string()) However, way down in the calling-stack (see traceback below), it looks as though msg.as_string() has received an attachment which creates a payload of 'bytes' type instead of string. Has anyone any idea what might be causing the problem? Any help would be appreciated. Alan builtins.TypeError: string payload expected: File "c:\Dev\CommonPY\Scripts\email_send.py", line 147, in send server.sendmail(self.from_addr, all_recipients, msg.as_string()) File "c:\Program Files\Python31\Lib\email\message.py", line 136, in as_string g.flatten(self, unixfrom=unixfrom) File "c:\Program Files\Python31\Lib\email\generator.py", line 76, in flatten self._write(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 101, in _write self._dispatch(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 127, in _dispatch meth(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 181, in _handle_multipart g.flatten(part, unixfrom=False) File "c:\Program Files\Python31\Lib\email\generator.py", line 76, in flatten self._write(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 101, in _write self._dispatch(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 127, in _dispatch meth(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 155, in _handle_text raise TypeError('string payload expected: %s' % type(payload))

    Read the article

  • Templates vs. coded HTML

    - by Alan Harris-Reid
    I have a web-app consisting of some html forms for maintaining some tables (SQlite, with CherryPy for web-server stuff). First I did it entirely 'the Python way', and generated html strings via. code, with common headers, footers, etc. defined as functions in a separate module. I also like the idea of templates, so I tried Jinja2, which I find quite developer-friendly. In the beginning I thought templates were the way to go, but that was when pages were simple. Once .css and .js files were introduced (not necessarily in the same folder as the .html files), and an ever-increasing number of {{...}} variables and {%...%} commands were introduced, things started getting messy at design-time, even though they looked great at run-time. Things got even more difficult when I needed additional javascript in the or sections. As far as I can see, the main advantages of using templates are: Non-dynamic elements of page can easily be viewed in browser during design. Except for {} placeholders, html is kept separate from python code. If your company has a web-page designer, they can still design without knowing Python. while some disadvantages are: {{}} delimiters visible when viewed at design-time in browser Associated .css and .js files have to be in same folder to see effects in browser at design-time. Data, variables, lists, etc., must be prepared in advanced and either declared globally or passed as parameters to render() function. So - when to use 'hard-coded' HTML, and when to use templates? I am not sure of the best way to go, so I would be interested to hear other developers' views. TIA, Alan

    Read the article

  • CSS file pathing problem

    - by Alan Harris-Reid
    Hi there, When designing a HTML template in my favorite editor (TextPad at the moment) I can view my code in a browser by pressing F11 or the appropriate toolbar button. I have my common css rules in a separate file so my HTML contains the code: <link rel="stylesheet" href="commoncss.css" type="text/css"> This works when the .css file is in the same folder as the .html file, or if I fully path the .css file in the href property, eg. ///c:/mycssfolder/commoncss.css However, in a 'live' situation I want the .css file to reside in a common folder which is accessible from a number of .html files (eg. href='css/commoncss.css', where the css folder is configured at web-server level). How can I achieve this design vs. live dilemma without copying css file to all .html folders (and all the maintenance headaches that comes with it)? I am using Python 3.1 with Jinja2, but I guess this problem is applicable across any language and template-engine. Any help would be appreciated. Alan

    Read the article

  • Number of lines in csv.DictReader

    - by Alan Harris-Reid
    Hi there, I have a csv DictReader object (using Python 3.1), but I would like to know the number of lines/rows contained in the reader before I iterate through it. Something like as follows... myreader = csv.DictReader(open('myFile.csv', newline='')) totalrows = ? rowcount = 0 for row in myreader: rowcount +=1 print("Row %d/%d" % (rowcount,totalrows)) I know I could get the total by iterating through the reader, but then I couldn't run the 'for' loop. I could iterate through a copy of the reader, but I cannot find how to copy an iterator. I could also use totalrows = len(open('myFile.csv').readlines()) but that seems an unnecessary re-opening of the file. I would rather get the count from the DictReader if possible. Any help would be appreciated. Alan

    Read the article

  • How do I detect the environment in Salesforce?

    - by Craig Harris
    I am integrating our back end systems with Salesforce using the web services. I have production and stage environments running on different URLs. I need to be able to have the endpoint of the web service call be different depending on whether the code is running in the production or sandbox Salesforce instance. How do I detect the environment. Currently I am considering looking up a user to see if there user name ends in 'devsandbox' as I have been unable to identify a system object that I can query to get the environment. Further clarification: The location I need to determine this is within the Apex code that is invoked when I select a button in Salesforce. My custom controller needs to know if it running in the production or sandbox Salesforce environment.

    Read the article

  • Where to go after Informix 4GL?

    - by Chris Harris
    We have a large homegrown ERP system written in Informix 4GL. Currently we are running on old Sun hardware, Solaris 8, and a ten year old version of 4GL and Informix. We need to move on, and one option obviously is to get the latest versions of 4GL & Informix, installed on new hardware (probably Linux/Intel). However I believe there are options for migrating 4GL programmes to other development platforms. Does anyone have experience of that? If so, what platforms, how did it go, what are the pros and cons?

    Read the article

  • How do you write your QTP Tests?

    - by Josh Harris
    I am experimenting with using QTP for some webapp ui automation testing and I was wondering how people usually write their QTP tests. Do you use the object map, descriptive programming, a combination or some other way all together? Any little code example would be appreciated, Thank you

    Read the article

  • CherryPy configuration tools.staticdir.root problem

    - by Alan Harris-Reid
    Hi there, How can I make my static-file root directories relative to my application root folder (instead of a hard-coded path)? In accordance with CP instructions (http://www.cherrypy.org/wiki/StaticContent) I have tried the following in my configuration file: tree.cpapp = cherrypy.Application(cpapp.Root()) tools.staticdir.root = cpapp.current_dir but when I run cherrpy.quickstart(rootclass, script_name='/', config=config_file) I get the following error builtins.ValueError: ("Config error in section: 'global', option: 'tree.cpapp', value: 'cherrypy.Application(cpapp.Root())'. Config values must be valid Python.", 'TypeError', ("unrepr could not resolve the name 'cpapp'",)) I know I can do configuration from within the main.py file just before quickstart is called (eg. using os.path.abspath(os.path.dirname(file))), but I prefer using the idea of a separate configuration file if possible. Any help would be appreciated (in case it is relevant, I am using CP 3.2 with Python 3.1) TIA Alan

    Read the article

  • Can you cross-site ping another site using C# or JS/Ajax?

    - by Josh Harris
    On our web application I am trying to ping a 3rd party site to see if it is up before redirecting our customers to it. So far I have not seen a way to do this other than from a desktop app or system console. Is this possible? I have heard that there was an image trick in original ASP. Currently we are using .NET MVC with Javascript. Thank you, Josh

    Read the article

  • Copy protection tool to limit number of units

    - by Jonathan Harris
    I have written a winform application to manage a certain type of project. I want to charge my users on a per project basis, e.g. they purchase a base version of my app to manage 3 projects for 300$ and can buy extensions for 100$ per project. Do you know of any good tools that support this type of licensing? Currently the project counter is buried in the database, but I am looking for something more reliable.

    Read the article

  • Multi-part template issue with Jinja2

    - by Alan Harris-Reid
    Hi, When creating templates I typically have 3 separate parts (header, body, footer) which I combine to pass a singe string to the web-server (CherryPy in this case). My first approach is as follows... from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('')) tmpl = env.get_template('Body.html') page_body = tmpl.render() tmpl = env.get_template('Header.html') page_header = tmpl.render() tmpl = env.get_template('Footer.html') page_footer = tmpl.render() page_code = page_header + page_body + page_footer but this contains repetitious code, so my next approach is... def render_template(html_file): from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('')) tmpl = env.get_template(html_file) return tmpl.render() page_header = render_template('Header.html') page_body = render_template('Body.html') page_footer = render_template('Footer.html) However, this means that each part is created in its own environment - can that be a problem? Are there any other downsides to this approach? I have chosen the 3-part approach over the child-template approach because I think it may be more flexible (and easier to follow), but I might be wrong. Anyone like to convince me that using header, body and footer blocks might be better? Any advice would be appreciated. Alan

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >