Search Results

Search found 629 results on 26 pages for 'ian warner'.

Page 24/26 | < Previous Page | 20 21 22 23 24 25 26  | Next Page >

  • Grails - Simple hasMany Problem - Using CheckBoxes rather than HTML Select in create.gsp

    - by gav
    My problem is this: I want to create a grails domain instance, defining the 'Many' instances of another domain that it has. I have the actual source in a Google Code Project but the following should illustrate the problem. class Person { String name static hasMany[skills:Skill] static constraints = { id (visible:false) skills (nullable:false, blank:false) } } class Skill { String name String description static constraints = { id (visible:false) name (nullable:false, blank:false) description (nullable:false, blank:false) } } If you use this model and def scaffold for the two Controllers then you end up with a form like this that doesn't work; My own attempt to get this to work enumerates the Skills as checkboxes and looks like this; But when I save the Volunteer the skills are null! This is the code for my save method; def save = { log.info "Saving: " + params.toString() def skills = params.skills log.info "Skills: " + skills def volunteerInstance = new Volunteer(params) log.info volunteerInstance if (volunteerInstance.save(flush: true)) { flash.message = "${message(code: 'default.created.message', args: [message(code: 'volunteer.label', default: 'Volunteer'), volunteerInstance.id])}" redirect(action: "show", id: volunteerInstance.id) log.info volunteerInstance } else { render(view: "create", model: [volunteerInstance: volunteerInstance]) } } This is my log output (I have custom toString() methods); 2010-05-10 21:06:41,494 [http-8080-3] INFO bumbumtrain.VolunteerController - Saving: ["skills":["1", "2"], "name":"Ian", "_skills":["", ""], "create":"Create", "action":"save", "controller":"volunteer"] 2010-05-10 21:06:41,495 [http-8080-3] INFO bumbumtrain.VolunteerController - Skills: [1, 2] 2010-05-10 21:06:41,508 [http-8080-3] INFO bumbumtrain.VolunteerController - Volunteer[ id: null | Name: Ian | Skills [Skill[ id: 1 | Name: Carpenter ] , Skill[ id: 2 | Name: Sound Engineer ] ]] Note that in the final log line the right Skills have been picked up and are part of the object instance. When the volunteer is saved the 'Skills' are ignored and not commited to the database despite the in memory version created clearly does have the items. Is it not possible to pass the Skills at construction time? There must be a way round this? I need a single form to allow a person to register but I want to normalise the data so that I can add more skills at a later time. If you think this should 'just work' then a link to a working example would be great. If I use the HTML Select then it works fine! Such as the following to make the Create page; <tr class="prop"> <td valign="top" class="name"> <label for="skills"><g:message code="volunteer.skills.label" default="Skills" /></label> </td> <td valign="top" class="value ${hasErrors(bean: volunteerInstance, field: 'skills', 'errors')}"> <g:select name="skills" from="${uk.co.bumbumtrain.Skill.list()}" multiple="yes" optionKey="id" size="5" value="${volunteerInstance?.skills}" /> </td> </tr> But I need it to work with checkboxes like this; <tr class="prop"> <td valign="top" class="name"> <label for="skills"><g:message code="volunteer.skills.label" default="Skills" /></label> </td> <td valign="top" class="value ${hasErrors(bean: volunteerInstance, field: 'skills', 'errors')}"> <g:each in="${skillInstanceList}" status="i" var="skillInstance"> <label for="${skillInstance?.name}"><g:message code="${skillInstance?.name}.label" default="${skillInstance?.name}" /></label> <g:checkBox name="skills" value="${skillInstance?.id.toString()}"/> </g:each> </td> </tr> The log output is exactly the same! With both style of form the Volunteer instance is created with the Skills correctly referenced in the 'Skills' variable. When saving, the latter fails with a null reference exception as shown at the top of this question. Hope this makes sense, thanks in advance! Gav

    Read the article

  • Common Ruby Idioms

    - by DanSingerman
    One thing I love about ruby is that mostly it is a very readable language (which is great for self-documenting code) However, inspired by this question: http://stackoverflow.com/questions/609612/ruby-code-explained and the description of how ||= works in ruby, I was thinking about the ruby idioms I don't use, as frankly, I don't fully grok them. So my question is, similar to the example from the referenced question, what common, but not obvious, ruby idioms do I need to be aware of to be a truly proficient ruby programmer? By the way, from the referenced question a ||= b is equivalent to if a == nil || a == false a = b end (Thanks to Ian Terrell for the correction) Edit: It turns out this point is not totally uncontroversial. The correct expansion is in fact (a || (a = (b))) See these links for why: http://DABlog.RubyPAL.Com/2008/3/25/a-short-circuit-edge-case/ http://DABlog.RubyPAL.Com/2008/3/26/short-circuit-post-correction/ http://ProcNew.Com/ruby-short-circuit-edge-case-response.html Thanks to Jörg W Mittag for pointing this out.

    Read the article

  • Mantis - Integrate Wiki

    - by Adrian
    I am using Mantis (PHP and MysQL) as a bug tracking tool and I would like to extend it in order to document requirements and technical specifications. Ideally, I should be able to link a defect with a requirement. Is there a way to integrate a Wiki tool (preferably PHP and MySQL based) into Mantis? EDITED: Instructions how to integrate DocuWiki can be found in this article "Integrating DokuWiki with Mantis" Instructions how to integrate MediaWiki can be found here (Thanks Ian) Instructions how to integrate TWiki can be found here and here Suggested alternatives to Mantis: (open source bugtrackers with integrated Wiki) TikiWiki (Php) PhpWiki (Php) Trac (Python) (Thanks ax) Redmine (Ruby on Rails) (Thanks Paul)

    Read the article

  • Recommend an algorithms exercise book?

    - by Parappa
    I have a little book called Problems on Algorithms by Ian Parberry which is chock full of exercises related to the study of algorithms. Can anybody recommend similar books? What I am not looking for are recommendations of good books related to algorithms or the theory of computation. Introduction to Algorithms is a good one, and of course there's the Knuth stuff. Ideally I want to know of any books that are light on instructional material and heavy on sample problems. In a nutshell, exercise books. Preferably dedicated to algorithms rather than general logic or other math problems. By the way, the Parberry book does not seem to be in print, but it is available as a PDF dowload.

    Read the article

  • HTML5 Doctype Support

    - by Metropolis
    Hey Everyone, For a long time I have been using XHTML1.1 because I thought I was cool (yeah right). However, today I read Ian Hickson's Article about how everyone uses the wrong MIME type with XHTML and it opened my eyes a lot. I happen to be one of those people who are serving XHTML with text/html MIME, because like a lot of people, W3C says its "ok" to serve it this way. At the top of that article he says that "now" he would serve it using the HTML5 doctype (!DOCTYPE HTML). What are your thoughts about doing this? If I did not use unsupported functionality, would it be ok? What would the MIME type be in this case? Thanks for any help, Metropolis

    Read the article

  • Inject Html Into a View Programmatically

    - by madcapnmckay
    Hi, I have a tricky problem and I'm not sure where in the view rendering process to attempt this. I am building a simple blog/CMS in MVC and I would like to inject a some html (preferably a partial view) into the page if the user is logged in as an admin (and therefore has edit privileges). I obviously could add render partials to master pages etc. But in my system master pages/views are the "templates" of the CMS and therefore should not contain CMS specific <% % markup. I would like to hook in to some part of the rendering process and inject the html myself. Does anyone have any idea how to do this in MVC? Where would be the best point, ViewPage, ViewEngine? Thanks, Ian

    Read the article

  • Is there a strategy to back-port C# code?

    - by ianmayo
    Hi all, I intend using the Argotic framework in support of a .Net Atom server. Unfortunately my target server (over which I have no control) only has .Net 1.1 - any the Argotic library is only in .Net 2 and 3.5. So, I now need to back-port the code to 1.1. Can anybody provide any strategic tips for this undertaking? I'm aware of the merits of using Unit Tests to verify the ported code (here). should I be looking for automated tools? should I just import the code into VS2003 .Net 1.1 project and work through the compiler warnings? Any tips appreciated. cheers, Ian

    Read the article

  • Java program runtime error

    - by Sam
    public class BooksTestDrive { public static void main(String[] args) { Books [] myBooks = new Books[3]; int x=0; myBooks[0].title = "The Grapes of Jave"; myBooks[1].title = "The Java Gatsby"; myBooks[2].title = "The Java Cookbook"; myBooks[0].author = "bob"; myBooks[1].author = "sue"; myBooks[2].author = "ian"; while (x < 3) { System.out.print(myBooks[x].title); System.out.print("by"); System.out.println(myBooks[x].author); x = x+1; } } } This code compiles but while runtime, its giving nullpointer exception.

    Read the article

  • Create instance of generic type in Java?

    - by David Citron
    Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is "no" (due to type erasure), but I'd be interested if anyone can see something I'm missing: class SomeContainer<E> { E createContents() { return what??? } } EDIT: It turns out that Super Type Tokens could be used to resolve my issue, but it requires a lot of reflection-based code, as some of the answers below have indicated. I'll leave this open for a little while to see if anyone comes up with anything dramatically different than Ian Robertson's Artima Article.

    Read the article

  • [ADVICE] .NET Desktop Application - Client Server C#, SQL

    - by Rillanon
    Hi guys, Recently I've being given a chance to develop a PMS (Practice Management System) software for a small physiotherapy clinic. I'm a computer science student and my course is predominately told on Linux. However, my client runs all their computers on vista or Windows 7. My ideas are to develop the client front end in Visual C# and access a central postgresql server. I'm a beginner in Windows Programming so I'm after advice on best practice on implement user rights and access levels in C# (WPF or Windows FORM). I've had a look into Credential class in Visual C# and access control list but please share your thoughts. I'm probably way over my head on this but this is my first commercial project so I'm keen to test the waters. Cheers Ian

    Read the article

  • what's wrong with my one-liner strncpy: while(*s++ = *t++ && n-- > 0);?

    - by pvd
    #include <stdio.h> #define STR_BUF 10000 #define STR_MATCH 7 void mystrncpy(char* s, char* t, int n) { while(*s++ = *t++ && n-- > 0); } int main() { int result; char str_s[STR_BUF] = "not so long test string"; char buf_1[STR_BUF]; mystrncpy(buf_1, str_s, STR_MATCH); printf ("buf_1 (mystrncpy, 7 chars): %s\n", buf_1); return 0; } When I run it, nothing happened ian@ubuntu:~/tmp$ gcc myncpy.c -o myn&&./myn buf_1 (mystrncpy, 7chars):

    Read the article

  • Up in the Air: Team Oracle Play-by-Play

    - by Aaron Lazenby
    Yesterday, I had the amazing opportunity to fly along with Sean D. Tucker and Team Oracle. Leaving from the San Carols airport, we did a 30 minute flight over the Pacific just south of the coastal town of Half Moon Bay. In that half hour, I rode through a massive 4G loop, survived a crushing hammerhead, and took control of the plane to perform a basic wing over (you can learn what the heck I'm talking about by visiting this website). I have lots of great video, but it's going to take me some time to make sense of it. For now, here's my Twitter-based play-by-play of yesterday's events. Many thanks to Sean D. Tucker and the whole crew (Ben and Ian, especially) for this great opportunity to fly with Team Oracle.Live tweets from @OracleProfitI will be spending the afternoon in a stunt plane, upside down above the San Francisco bay. http://bit.ly/cwkrkIAt the San Carlos airport. More than slightly freaked out. Shaking hands diminish texting ability. Slightly reassuring. http://yfrog.com/1qt61nj There go the doors to the photo plane... #teamoracle http://yfrog.com/58ywljSean D Tucker assures me: "The sky is a great place to be." Helpful, but I'm still nervous. #teamoracle"You get a parachute. He gets a harness." How was this decision made? #teamoracleThe plane with @radu43 has returned. I'm up next...Couldn't help myself...drank a soda before flying. Mistake? We'll see... #teamoracleAdvice of the day "If you pull with two hands, you improve the chances of the chute deploying on the first try." Lovely. #teamoracleI feel so strange. But I flew a high performance airplane. And did an aerobatics move. Wild. #teamoracle"Flying ten feet off he ground, upside-down at 250 miles per hour isn't exciting to me." Sean D. Tucker #teamoracle"What is exciting to me is flying that perfect pattern, just like I imagined it in my head." Sean D. Tucker #teamoracle"You're going to sleep well tonight. You just carried four times your body weight." #teamoracle #gforce Just watched the #teamoracle plane take off for its flight home. I'm waiting for Caltrain. #undignifiedanticlimaxEnough with the #teamoracle. Check http://blogs.oracle.com/profit for the video. Coming soon! 

    Read the article

  • Roll your own free .NET technical conference

    - by Brian Schroer
    If you can’t get to a conference, let the conference come to you! There are a ton of free recorded conference presentations online… Microsoft TechEd Let’s start with the proverbial 800 pound gorilla. Recent TechEds have recorded the majority of presentations and made them available online the next day. Check out presentations from last month’s TechEd North America 2012 or last week’s TechEd Europe 2012. If you start at http://channel9.msdn.com/Events/TechEd, you can also drill down to presentations from prior years or from other regional TechEds (Australia, New Zealand, etc.) The top presentations from my “View Queue”: Damian Edwards: Microsoft ASP.NET and the Realtime Web (SignalR) Jennifer Smith: Design for Non-Designers Scott Hunter: ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more Daniel Roth: Building HTTP Services with ASP.NET Web API Benjamin Day: Scrum Under a Waterfall NDC The Norwegian Developer Conference site has the most interesting presentations, in my opinion. You can find the videos from the June 2012 conference at that link. The 2011 and 2010 pages have a lot of presentations that are still relevant also. My View Queue Top 5: Shay Friedman: Roslyn... hmmmm... what? Hadi Hariri: Just ‘cause it’s JavaScript, doesn’t give you a license to write rubbish Paul Betts: Introduction to Rx Greg Young: How to get productive in a project in 24 hours Michael Feathers: Deep Design Lessons ØREDEV Travelling on from Norway to Sweden... I don’t know why, but the Scandinavians seem to have this conference thing figured out. ØREDEV happens each November, and you can find videos here and here. My View Queue Top 5: Marc Gravell: Web Performance Triage Robby Ingebretsen: Fonts, Form and Function: A Primer on Digital Typography Jon Skeet: Async 101 Chris Patterson: Hacking Developer Productivity Gary Short: .NET Collections Deep Dive aspConf - The Virtual ASP.NET Conference Formerly known as “mvcConf”, this one’s a little different. It’s a conference that takes place completely on the web. The next one’s happening July 17-18, and it’s not too late to register (It’s free!). Check out the recordings from February 2011 and July 2010. It’s two years old and talks about ASP.NET MVC2, but most of it is still applicable, and Jimmy Bogard’s Put Your Controllers On a Diet presentation is the most useful technical talk I have ever seen. CodeStock Videos from the 2011 edition of this Tennessee conference are available. Presentations from last month’s 2012 conference should be available soon here. I’m looking forward to watching Matt Honeycutt’s Build Your Own Application Framework with ASP.NET MVC 3. UserGroup.tv User Group.tv was founded in January of 2011 by Shawn Weisfeld, with the mission of providing User Group content online for free. You can search by date, group, speaker and category tags. My View Queue Top 5: Sergey Rathon & Ian Henehan: UI Test Automation with Selenium Rob Vettor: The Repository Pattern Latish Seghal: The .NET Ninja’s Toolbelt Amir Rajan: Get Things Done With Dynamic ASP.NET MVC Jeffrey Richter: .NET Nuggets – Houston TechFest Keynote

    Read the article

  • More details on America's Cup use of Oracle Data Mining

    - by charlie.berger
    BMW Oracle Racing's America's Cup: A Victory for Database Technology BMW Oracle Racing's victory in the 33rd America's Cup yacht race in February showcased the crew's extraordinary sailing expertise. But to hear them talk, the real stars weren't actually human. "The story of this race is in the technology," says Ian Burns, design coordinator for BMW Oracle Racing. Gathering and Mining Sailing DataFrom the drag-resistant hull to its 23-story wing sail, the BMW Oracle USA trimaran is a technological marvel. But to learn to sail it well, the crew needed to review enormous amounts of reliable data every time they took the boat for a test run. Burns and his team collected performance data from 250 sensors throughout the trimaran at the rate of 10 times per second. An hour of sailing alone generates 90 million data points.BMW Oracle Racing turned to Oracle Data Mining in Oracle Database 11g to extract maximum value from the data. Burns and his team reviewed and shared raw data with crew members daily using a Web application built in Oracle Application Express (Oracle APEX). "Someone would say, 'Wouldn't it be great if we could look at some new combination of numbers?' We could quickly build an Oracle Application Express application and share the information during the same meeting," says Burns. Analyzing Wind and Other Environmental ConditionsBurns then streamed the data to the Oracle Austin Data Center, where a dedicated team tackled deeper analysis. Because the data was collected in an Oracle Database, the Data Center team could dive straight into the analytics problems without having to do any extract, transform, and load processes or data conversion. And the many advanced data mining algorithms in Oracle Data Mining allowed the analytics team to build vital performance analytics. For example, the technology team could remove masking elements such as environmental conditions to give accurate data on the best mast rotation for certain wind conditions. Without the data mining, Burns says the boat wouldn't have run as fast. "The design of the boat was important, but once you've got it designed, the whole race is down to how the guys can use it," he says. "With Oracle database technology we could compare the incremental improvements in our performance from the first day of sailing to the very last day. With data mining we could check data against the things we saw, and we could find things that weren't otherwise easily observable and findable."

    Read the article

  • How do I correct a directory incorrectly copied into itself?

    - by Peter Boughton
    Given the following situation... <path>/mydir1/mydir2 ...where mydir2 should have overwritten mydir1, but was instead placed inside, and both directories actually have the same filename. How is that fixed? Attempting to do mv <path>/mydir/mydir/* <path>/mydir/ or mv <path>/mydir <path>/ results in: mv: cannot move `<path>/mydir/mydir` to a subdirectory of itself, `<path>/mydir` This seems stupidly simple, but it's late here and I can't figure it out. There are seventeen such directories to fix (path differs for each, but same mydir name). To confirm, the error message can be caused with this: # cd /path/to/directory # mv mydir/mydir ./ mv: cannot move `mydir/mydir' to a subdirectory of itself, `./mydir' Also tried: # mv mydir/mydir/* mydir/ mv: cannot move `mydir/mydir/otherdir1' to a subdirectory of itself, `mydir/otherdir1' mv: cannot move `mydir/mydir/otherdir2' to a subdirectory of itself, `mydir/otherdir2' and... # mv /path/to/directory/mydir/mydir/otherdir1 /path/to/directory/mydir/ mv: cannot move `/path/to/directory/mydir/mydir/otherdir1' to a subdirectory of itself, `/path/to/directory/mydir/otherdir1' and using a temporary directory: # mv mydir/mydir ./mydir-temp # mv mydir-temp/* mydir/ mv: cannot move `mydir-temp/otherdir1' to a subdirectory of itself, `mydir/otherdir1' mv: cannot move `mydir-temp/otherdir2' to a subdirectory of itself, `mydir/otherdir2' I found a similar question "How to recursively move all files (including hidden) in a subfolder into a parent folder in *nix?" which suggested that mv bar/{,.}* . would do this. But this also gives the same errors, as well as confusingly picking up . and .. from somewhere. # cd mydir # mv mydir/{,.}* . mv: cannot move `mydir/otherdir1' to a subdirectory of itself, `./otherdir1' mv: cannot move `mydir/otherdir2' to a subdirectory of itself, `./otherdir2' mv: cannot move `mydir/.' to `./.': Device or resource busy mv: cannot move `mydir/..' to `./..': Device or resource busy mv: overwrite `./.file'? y Another similar question "linux mv command weirdness" suggests that mv doesn't overwrite and a copy is required. # cd mydir # cp -rf ./mydir/* ./ cp: overwrite `./otherdir1/file1'? y cp: overwrite `./otherdir1/file2'? y cp: overwrite `./otherdir1/file3'? This appears to be working... except there's a lot of files (and dirs) - I don't want to confirm every one! Isn't the f there supposed to prevent this? Ok, so cp was aliased to cp -i (which I found out with type cp), and bypassed by using \cp -rf ./mydir/* ./ which seems to have worked. Although I've solved the problem of getting dirs/files from one place to another, I'm still curious as to what's going on with the mv stuff - is this really a deliberate feature as suggested by Warner?

    Read the article

  • links for 2011-03-17

    - by Bob Rhubart
    Siba Prasad: Oracle Database on Amazon RDSg Siba Prasad share an analysis of the pros and cons. (tags: oracle database cloud amazon) LIVE WEBCAST March 24 2pm PT- Why Switch from Red Hat and SUSE Linux to Oracle Linux? (Oracle's Linux Blog) Featuring Oracle's Monica Kumar, Sr.Director of Linux, Oracle VM and MySQL and Avi Miller, Principal Sales Consultant, Linux and Virtualization. (tags: oracle linux) Webcast: IBM SOA vs. Oracle SOA, March 24, 1pm ET / 10am PT Maneesh Joshi and Bruce Tierney guide you to a solid understanding of the differences between the Oracle and IBM approach to comprehensive SOA. (tags: oracle soa bpm) Finding the Right Solution to Source and Manage Your Contractors (PeopleSoft Apps Strategy) "Talent has become a primary competitive advantage for most organizations. Contingent labor offers talent on flexible terms; it offers the ability to scale up operations, close skill gaps, and manage risk in the process of delivering services." - Mark Rosenberg (tags: oracle peoplesoft enterprisearchitecture) Oracle Business Intelligence Customers: Have Your Voice Heard in the "2011Wisdom of the Crowds Business Intelligence Market Survey" (BI & Analytics Pulse) "The Wisdom of the Crowds survey combines social media, crowd sourcing, and good old fashioned market research to provide vendors and customers alike an unvarnished and insightful snap shot of what's top of mind with business intelligence professionals." (tags: oracle businessintelligence) Martin Bach: Troubleshooting Grid Infrastructure startup Martin Bach hunts down the problem that caused one of his blades to reboot after an EXT3 journal error. (tags: oracle grid rac) Oracle WebCenter: Social Networking & Collaboration (Oracle Enterprise 2.0 Blog) Kelley Ruppel with information on "how the new release of Oracle WebCenter provides unprecedented Social Networking and Collaboration." (tags: oracle webcenter enterprise2.0 collaboration) VirtaThon: 100% Virtual Java/Oracle/MySQL Conference! | Bex Huff "The goal is simple," says Oracle ACE Director Bex Huff. "Because it's all online, the conference is very cheap. Pricing is not yet announced... but it should be around $300. Also, unlike other conferences, every speaker gets paid a small fee depending on the popularity of his or her session." (tags: oracle oracleace java mysqql) Griffiths Waite Blog: BPM 11g PS3 GW's Ian Heathcock shares a link to "a most interesting article on Oracle's recent release discussing the new features and how PS3 adds value  to the whole SOA message." (tags: oracle soa) The Buttso Blathers: Tutorial: JSF 2.0 and JPA 2.0 with WebLogic Server using NetBeans Should you take application architecture advice from a man named Buttso? In this case, yes. (tags: oracle jsf jpa weblogic) Setting-up a High Available Tuned SOA Environment Middleware Magic (tags: ping.fm) How to Configure Weblogic Messaging Bridge with JBoss Middleware Magic (tags: ping.fm Weblogic JBoss) Richard Veryard on Architecture: Emergent Architecture (tags: ping.fm entarch emergence)

    Read the article

  • How to open python scripts directly by typing in their name in terminal (Mac OS X)

    - by Haffi112
    I'm working on installing django and running it on my system. I have a problem though, in this tutorial creating a project is explained by running the command django-admin.py startproject mysite My issue is that this doesn't work. I changed to the directory where django-admin.py is located and ran the command chmod +x django-admin.py with no results. I tried adding the directory with the file to my path without results. I ended up fixing my problem with this command python /location/of/django-admin.py startproject mysite which yielded the outcome I expected. My problem is: What do I need to change/configure such that command django-admin.py startproject mysite would be sufficient? Here are some experiments: 21:09~/Desktop/HI/NSN/Polls > django-admin.py startproject mysite -bash: django-admin.py: command not found 21:09~/Desktop/HI/NSN/Polls > ./django-admin.py startproject mysite -bash: ./django-admin.py: No such file or directory 21:09~/Desktop/HI/NSN/Polls > python django-admin.py startproject mysite python: can't open file 'django-admin.py': [Errno 2] No such file or directory 21:09~/Desktop/HI/NSN/Polls > /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1 -bash: /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py: /opt/local/bin: bad interpreter: Permission denied 21:09~/Desktop/HI/NSN/Polls > sudo /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1Password: sudo: unable to execute /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py: Permission denied 21:09~/Desktop/HI/NSN/Polls > sudo /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1sudo: unable to execute /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py: Permission denied 21:09~/Desktop/HI/NSN/Polls > python /opt/local/lib/python2.4/site-packages/django/bin/django-admin.py startproject prufa1 21:09~/Desktop/HI/NSN/Polls > ls mysite prufa1 Final edit: The problem is solved, see Ian C's answer for the right solution. Thank you everyone for helping my out, this was very fast!

    Read the article

  • Can't get port based virtual hosts working in Apache2.2 CentOS 5.2, Plesk 8.6

    - by soopadoubled
    I have installed Google Sitemap Generator on my CentOS server, which is running plesk 8.6. Google Sitemap Generator adds an include to an external conf in my httpd.conf as follows: Listen 8181 NameVirtualHost *:8181 <VirtualHost *:8181> DocumentRoot "/usr/local/google-sitemap-generator/admin-console" ScriptAlias /cgi-bin/ "/usr/local/google-sitemap-generator/admin-console/cgi-bin/" <Directory "/usr/local/google-sitemap-generator/admin-console"> Allow from all Options ExecCGI DirectoryIndex index.html </Directory> </VirtualHost> LoadModule google_sitemap_generator_module /usr/local/google-sitemap-generator/lib/mod_sitemap.so After installation I should be able to navigate to myserverip:8181 and access the GSG console. Unfortunately my browser throws up "Safari can’t open the page “http://myserverip:8181/” because the server where this page is located isn’t responding." I've checked the port with netstat and nmap, and it's open and listening. I've added a rule to allow traffic on 8181 in iptables, but no joy. Is there anything obvious I could be missing? Any ideas would be greatly appreciated. Cheers, Ian

    Read the article

  • Nginx Slower than Apache??

    - by ichilton
    Hi, I've just setup 2x identical Rackspace Cloud instances and am doing some comparisons and benchmarks to compare Apache and Nginx. I'm testing with a 3.4k png file and initially 512MB server instances but have now moved to 1024MB server instances. I'm very surprised to see that whatever I try, Apache seems to consistently outperform Nginx....what am I doing wrong? Nginx: Server Software: nginx/0.8.54 Server Port: 80 Document Length: 3400 bytes Concurrency Level: 100 Time taken for tests: 2.320 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 3612000 bytes HTML transferred: 3400000 bytes Requests per second: 431.01 [#/sec] (mean) Time per request: 232.014 [ms] (mean) Time per request: 2.320 [ms] (mean, across all concurrent requests) Transfer rate: 1520.31 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 11 15.7 3 120 Processing: 1 35 76.9 20 1674 Waiting: 1 31 73.0 19 1674 Total: 1 46 79.1 21 1693 Percentage of the requests served within a certain time (ms) 50% 21 66% 39 75% 40 80% 40 90% 98 95% 136 98% 269 99% 334 100% 1693 (longest request) And Apache: Server Software: Apache/2.2.16 Server Port: 80 Document Length: 3400 bytes Concurrency Level: 100 Time taken for tests: 1.346 seconds Complete requests: 1000 Failed requests: 0 Write errors: 0 Total transferred: 3647000 bytes HTML transferred: 3400000 bytes Requests per second: 742.90 [#/sec] (mean) Time per request: 134.608 [ms] (mean) Time per request: 1.346 [ms] (mean, across all concurrent requests) Transfer rate: 2645.85 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 1 3.7 0 27 Processing: 0 3 6.2 1 29 Waiting: 0 2 5.0 1 29 Total: 1 4 7.0 1 29 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 17 95% 19 98% 26 99% 27 100% 29 (longest request) I'm currently using worker_processes 4; and worker_connections 1024; but i've tried and benchmarked different values and see the same behaviour on all - I just can't get it to perform as well as Apache and from what i've read previously, i'm shocked about this! Can anyone give any advice? Thanks, Ian

    Read the article

  • how to authenticate once for multiple servers, using only apache configs?

    - by Wang
    My problem is, I have a number of prepackaged web apps (a print system, a wiki, a bug tracker, an email archive, etc.) running on different Mac OS X Leopard (soon to be SL) servers that each need to authenticate users from the internet at large. Right now every server presents an Apache basic authentication prompt, which takes a shared login, but it's apparently enough of an inconvenience to log in repeatedly that people are sending email without checking the wiki or bug tracker or archive. In the case of the bug tracker, a user [might need to log in twice---once for apache if he hasn't used any other protected service on that server, once for the bug tracker itself so it can distinguish different people. Since the only common component to all these apps is Apache 2 itself, does it have any way of authenticating a user once, in some way that will be respected by other servers and various web apps? Looked at http://serverfault.com/questions/32421/how-is-session-stickiness-achieved-across-multiple-web-servers but it sounds like the answer is assuming that I get to write my own web app. Looked at Ian Bicking's blog but it's four years old and recommends something available only for apache 1.3, not apache 2. Sorry not to hyperlink the second site---apparently I need 10 reputation points. Edit: Shibboleth does what I need, but I should have specified that I'm looking for a really dumb, really simple solution for in-house services that need to handle all of a dozen users, probably not more than three at a time.

    Read the article

  • Windows 2008 R2 Servers Sending Arp Requests for IPs outside Subnet

    - by Kyle Brandt
    By running a packet capture on my my routers I see some of my servers sending ARP requests for IPs that exist outside of its network. For example if my network is: Network: 8.8.8.0/24 Gateway: 8.8.8.1 (MAC: 00:21:9b:aa:aa:aa) Example Server: 8.8.8.20 (MAC: 00:21:9b:bb:bb:bb) By running a capture on the interface that has 8.8.8.1 I see requests like: Sender Mac: 00:21:9b:bb:bb:bb Sender IP: 8.8.8.20 Target MAC: 00:21:9b:aa:aa:aa Target IP: 69.63.181.58 Anyone seen this behavior before? My understanding of ARP is that requests should only go out for IPs within the subnet... Am I confused in my understanding of ARP? If I am not confused, anyone seen this behavior? Also, these seem to happen in bursts and it doesn't happen when I do something like ping an IP outside of the network. Update: In response to Ian's questions. I am not running anything like Hyper-V. I have multiple interfaces but only one is active (Using BACS failover teaming). The subnet mask is 255.255.255.0 (Even if it were something different it wouldn't explain an IP like 69.63.181.58). When I run MS Network Monitor or wireshark I do not see these ARP requests. What happens is that on the router capturing I see a burst of about 10 requests for IPs outside of the network from the host machine. On the machine itself using wireshark or NetMon I see a flood of ARP responses for all the machines on the network. However, I don't see any requests in the capture asking for those responses. So it seems like maybe it is maybe refreshing the arp cache but including IPs that outside of the network. Also when it does this NetMon doesn't show the ARP requests?

    Read the article

  • What should I encrypt in Debian during install?

    - by ianfuture
    I have seen various guides and recommendations on web about how best to do this but nothing that clearly explains the best way and why. So I understand there is a need for part of Debian during install to be un-encrypted on its own partition to allow it to boot. Most info I have seen is call this /boot and set the boot flag. Next I believe the best approach is to create another partition out of all the rest of the disk space, encrypt this, then on top of that create a LVM and then within the LVM create my various partitions , name them , select size, and file system type. Can I include /swap in the encrypted LVM part ? Is this approach sound? If so what are the partitions I should use (this is going to be a minimal server install with a view to install as and when what I need for a dev server)? Finally how does the installer know what to put in each partition I define ? I appreciate there are more than one question but any help and suggestions would be appreciated. If further clarification is needed please mention in the comments . Thanks.. Ian

    Read the article

  • How to add extensions to a lot of files using content of each file?

    - by v8media
    I've got over 10,000 files that don't have extensions from older versions of the Mac OS. They're extremely nested, and they also have all sorts of strange formatting and characters. They don't have file types or creator codes attached to them any longer. A great deal of these files have text in the file that will let me determine extensions (for example Word.Document.8 is in every file created by that version of Word, and Excel.Sheet.8 in every file created with that version of Excel). I found a script that looks like it would work for one of these file types at a time, but it erases parts of filenames after nefarious characters, which is not good. find . -type f -not -name "." -print0 |\ xargs -0 file |\ grep 'Word.Document.8' |\ sed 's/:.*//' |\ xargs -I % echo mv % %.doc So, two questions from that: One is, should I clean the characters in the filenames first, or programmatically deal with those in the script in order to leave them the same? As long as I lose no information from the filenames, I don't see a problem cleaning out slashes and other problem characters. Also, if I clean the filenames, there are likely to be duplicates, so any cleaning script would have to add something like "-1" before the extension to make sure nothing gets lost. 2nd question is how do I change the script so that it will look for more than one file type at the same time and give each the proper extension? I'm not tied to this script, but it is understandable, which is a pro. Mac OS X 10.6 is installed on this file server, but I've got access to any recent versions of OS X. Thanks, Ian

    Read the article

  • count specific values in a multidimensional array

    - by user1680701
    I have an odd set of arrays that I need to count how many times specific values show in the results. Currently I have this bit of code. $nested_arrays = shopp_orders( '2011-11-30 00:00:00', '2012-11-30 12:59:59', false, '', 2 ); print_r($nested_arrays); This code pulls multiple arrays (serialized data) from the database and outputs like this Array ( [30] => Purchase Object ( [purchased] => Array ( ) [columns] => Array ( ) [message] => Array ( ) [data] => Array ( ) [invoiced] => [authorized] => [captured] => [refunded] => [voided] => [balance] => 0 [downloads] => [shipable] => [shipped] => [stocked] => [_position:DatabaseObject:private] => 0 [_properties:DatabaseObject:private] => Array ( ) [_ignores:DatabaseObject:private] => Array ( [0] => _ ) [_map:protected] => Array ( ) [_table] => wp_shopp_demo_shopp_purchase [_key] => id [_datatypes] => Array ( [id] => int [customer] => int [shipping] => int [billing] => int [currency] => int [ip] => string [firstname] => string [lastname] => string [email] => string [phone] => string [company] => string [card] => string [cardtype] => string [cardexpires] => date [cardholder] => string [address] => string [xaddress] => string [city] => string [state] => string [country] => string [postcode] => string [shipname] => string [shipaddress] => string [shipxaddress] => string [shipcity] => string [shipstate] => string [shipcountry] => string [shippostcode] => string [geocode] => string [promos] => string [subtotal] => float [freight] => float [tax] => float [total] => float [discount] => float [fees] => float [taxing] => list [txnid] => string [txnstatus] => string [gateway] => string [paymethod] => string [shipmethod] => string [shipoption] => string [status] => int [data] => string [secured] => string [created] => date [modified] => date ) [_lists] => Array ( [taxing] => Array ( [0] => exclusive [1] => inclusive ) ) [id] => 30 [customer] => 12 [shipping] => 23 [billing] => 23 [currency] => 0 [ip] => 24.125.58.205 [firstname] => test [lastname] => test [email] => [email protected] [phone] => 1234567890 [company] => [card] => 1111 [cardtype] => Visa [cardexpires] => 1420070400 [cardholder] => test [address] => 123 Any Street [xaddress] => [city] => Danville [state] => VA [country] => US [postcode] => 24541 [shipname] => [shipaddress] => 123 Any Street [shipxaddress] => [shipcity] => Danville [shipstate] => VA [shipcountry] => US [shippostcode] => 24541 [geocode] => [promos] => Array ( ) [subtotal] => 49.37 [freight] => 9.98 [tax] => 9.874 [total] => 69.22 [discount] => 0 [fees] => 0 [taxing] => exclusive [txnid] => [txnstatus] => authed [gateway] => TestMode [paymethod] => credit-card-test-mode [shipmethod] => ItemRates-0 [shipoption] => Fast Shipping [status] => 0 [secured] => [created] => 1354096946 [modified] => 1354096946 ) [29] => Purchase Object ( [purchased] => Array ( ) [columns] => Array ( ) [message] => Array ( ) [data] => Array ( ) [invoiced] => [authorized] => [captured] => [refunded] => [voided] => [balance] => 0 [downloads] => [shipable] => [shipped] => [stocked] => [_position:DatabaseObject:private] => 0 [_properties:DatabaseObject:private] => Array ( ) [_ignores:DatabaseObject:private] => Array ( [0] => _ ) [_map:protected] => Array ( ) [_table] => wp_shopp_demo_shopp_purchase [_key] => id [_datatypes] => Array ( [id] => int [customer] => int [shipping] => int [billing] => int [currency] => int [ip] => string [firstname] => string [lastname] => string [email] => string [phone] => string [company] => string [card] => string [cardtype] => string [cardexpires] => date [cardholder] => string [address] => string [xaddress] => string [city] => string [state] => string [country] => string [postcode] => string [shipname] => string [shipaddress] => string [shipxaddress] => string [shipcity] => string [shipstate] => string [shipcountry] => string [shippostcode] => string [geocode] => string [promos] => string [subtotal] => float [freight] => float [tax] => float [total] => float [discount] => float [fees] => float [taxing] => list [txnid] => string [txnstatus] => string [gateway] => string [paymethod] => string [shipmethod] => string [shipoption] => string [status] => int [data] => string [secured] => string [created] => date [modified] => date ) [_lists] => Array ( [taxing] => Array ( [0] => exclusive [1] => inclusive ) ) [id] => 29 [customer] => 13 [shipping] => 26 [billing] => 25 [currency] => 0 [ip] => 70.176.223.40 [firstname] => Bryan [lastname] => Crawford [email] => [email protected] [phone] => 4802323049 [company] => ggg [card] => 1111 [cardtype] => Visa [cardexpires] => 1356998400 [cardholder] => ggg [address] => 1300 W Warner Rd [xaddress] => [city] => Gilbert [state] => AZ [country] => US [postcode] => 85224 [shipname] => [shipaddress] => 1300 W Warner Rd [shipxaddress] => [shipcity] => Gilbert [shipstate] => AZ [shipcountry] => US [shippostcode] => 85224 [geocode] => [promos] => Array ( ) [subtotal] => 29.95 [freight] => 9.98 [tax] => 0 [total] => 39.93 [discount] => 0 [fees] => 0 [taxing] => exclusive [txnid] => [txnstatus] => authed [gateway] => TestMode [paymethod] => credit-card-test-mode [shipmethod] => ItemRates-0 [shipoption] => Fast Shipping [status] => 0 [secured] => [created] => 1353538691 [modified] => 1353538691 ) ) This is order data from only two orders. I need to count how many times each state, each city, shipmethod, etc occur in the array. I tried the following but it only counted the 2 large arrays. function count_nested_array_keys(array &$a, array &$res=array()) { $i = 0; foreach ($a as $key=>$value) { if (is_array($value)) { $i += count_nested_array_keys($value, &$res); } else { if(!isset($res[$key])) $res[$key] = 0; $res[$key]++; $i++; } } return $i; } $total_item_count = count_nested_array_keys($nested_arrays, $count_per_key); echo "count per key: ", print_r($count_per_key), "\n"; If someone could show me how to count how many times each state value occurs, example, VA = 2 NC = 1 I can take it from there. Thank You.

    Read the article

  • Silverlight Cream for March 31, 2010 -- #826

    - by Dave Campbell
    In this Issue: Andrea Boschin, Radenko Zec, Andrej Tozon, Bobby Diaz, Brad Abrams, Wolf Schmidt, Colin Eberhardt, Anand Iyer, Matthias Shapiro, Jaime Rodriguez, Bill Reiss, and Lee. Shoutouts: Cigdem has a post up about here MIX10 Interviewing experiences: MIX10 SilverlightShow Interviews Ian T. Lackey has his material up from his talk Silverlight SEO at the St. Louis .Net Users Group Not Silverlight but definitely WP7 cool, Michael Klucher reports that there are New Windows Phone Samples on Creators Club Online Tim Heuer posted a survey: What tools are the minimum to get started in Silverlight? From SilverlightCream.com: A RoleManager to apply roles declaratively to user interface Andrea Boschin also has a new post at SilverlightShow discussing the use of a RoleManager in WCF RIA Services to apply user roles to elements of the UI... good stuff, Andrea. Virtualization in Silverlight 4 RC Radenko Zec has a post out at SilverlightShow where he explains UI and Data Virtualization then gives some examples of their use in Silverlight 4RC, and some issues as well. MS Word Mail Merge with Silverlight 4 COM Automation Andrej Tozon has a post up at SilverlightShow that I missed in the rush of MIX10. He's doing MailMerge with COM automation and Silverlight 4... actually prett cool stuff and all the source! KISS and Tell - MVVM and the ViewModelLocator Bobby Diaz is blogging about a very popular subject right now: ViewModelLocator. He's not showing production code, but it's a thought... check it out. Silverlight 4 + RIA Services - Ready for Business: Validating Data I'm running behind, but Brad Abrams' next post in his series is about validating data in the business application. He also discusses setting up shared code validation. A One-stop Shopping XAML Namespace for Silverlight Client SDK Controls Wolf Schmidt at the Silverlight SDK has a post up highlighting the SL4 XAML namespace prefix. He starts with SL3 then demonstrates the feature's use in SL4. Binding a Silverlight 3 DataGrid to dynamic data via IDictionary (Updated) Colin Eberhardt has an update to his previous article of the same title. This one is a bug fix on an upgrade to SL3 and also an expansion of the previous post. Demo Apps from MIX10 on Windows Phone 7 Anand Iyer posted links to all the WP7 demos used at MIX10 and at least in the case of FourSquare, the source is on CodePlex. XAML Files for Location Visualizations in Silverlight and WPF Matthias Shapiro has graciously provided XAML for us for Silverlight and WPF for a bunch of different US maps... too cool, now we don't have to be asking 'where did you get that map?'... thanks Matthias! Theming in Windows Phone Jaime Rodriguez has a post up that deep-dives theming in general and demonstrates using it on WP7... end-user configurations and developer stuff. Space Rocks game step 7: Moving the ship It appears that in the heat of battle (blogging) I said Bill Reiss' Space Rocks game he's building is for WP7... obviously it's not, but it's a game folks... :) THis is Episode 7 and he's moving the ship now. SL4(RC) RichTextBox and Access Violation Lee has some code that looks like it should work for a RichTextBox in SL4RC, and it's throwing an error... see if you have a solution for him... or is it a bug? 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

< Previous Page | 20 21 22 23 24 25 26  | Next Page >