Search Results

Search found 529 results on 22 pages for 'readme'.

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

  • Eager-loading association count with Arel (Rails 3)

    - by Matchu
    Simple task: given that an article has many comments, be able to display in a long list of articles how many comments each article has. I'm trying to work out how to preload this data with Arel. The "Complex Aggregations" section of the README file seems to discuss that type of situation, but it doesn't exactly offer sample code, nor does it offer a way to do it in two queries instead of one joined query, which is worse for performance. Given the following: class Article has_many :comments end class Comment belongs_to :article end How can I preload for an article set how many comments each has?

    Read the article

  • Ninject : ninject.web - How to apply on a regular ASP.Net Web (!MVC)

    - by No Body
    What I am looking is something similar to the below (http://github.com/ninject/ninject.web.mvc): README.markdown This extension allows integration between the Ninject core and ASP.NET MVC projects. To use it, just make your HttpApplication (typically in Global.asax.cs) extend NinjectHttpApplication: public class YourWebApplication : NinjectHttpApplication { public override void OnApplicationStarted() { // This is only needed in MVC1 RegisterAllControllersIn("Some.Assembly.Name"); } public override IKernel CreateKernel() { return new StandardKernel(new SomeModule(), new SomeOtherModule(), ...); // OR, to automatically load modules: var kernel = new StandardKernel(); kernel.AutoLoadModules("~/bin"); return kernel; } } Once you do this, your controllers will be activated via Ninject, meaning you can expose dependencies on their constructors (or properties, or methods) to request injections.

    Read the article

  • Sparse checkout in Git 1.7.0?

    - by davr
    With the new sparse checkout feature in Git 1.7.0, is it possible to just get the contents of a subdirectory like how you can in SVN? I found this example, but it preserves the full directory structure. Imagine that I just wanted the contents of the 'perl' directory, without an actual directory named 'perl'. -- EDIT -- Example: My git repository contains the following paths repo/.git/ repo/perl/ repo/perl/script1.pl repo/perl/script2.pl repo/images/ repo/images/image1.jpg repo/images/image2.jpg repo/doc/ repo/doc/readme.txt repo/doc/help.txt What I want is to be able to produce from the above repository this layout: repo/.git/ repo/script1.pl repo/script2.pl However with the current sparse checkout feature, it seems like it is only possible to get repo/.git/ repo/perl/script1.pl repo/perl/script2.pl which is NOT what I want. Thanks.

    Read the article

  • Websockify to wrap a forking server

    - by Gurjeet Singh
    I came across Websockify [1] and the accompanying Websock client-side javascript library. AIUI from the Wrap a Programsection in README, Websockify can help you launch a TCP server and rebind its port so that incoming Websockets-based communication is parsed and forwarded to the server on the proper (rebinded) port. My question is, can this mechanism be used to wrap a server that forks its children which in turn communicate with the client on a different port. Specifically, I am interested in websockifying a Postgres server, which typically listens on port 5432 and for a new incoming connection it forks a child which serves all future request from that client. (If it helps, Oracle RDBMS and many other servers, RDBMS or not, also use similar method.) [1] https://github.com/kanaka/websockify

    Read the article

  • Testing sample code in python modules

    - by Andrew Walker
    I'm in the process of writing a python module that includes some samples. These samples aren't unit-tests, and they are too long and complex to be doctests. I'm interested in best practices for automatically checking that these samples run. My current project layout is pretty standard, except that there is an extra top level makefile that has build, install, unittest, coverage and profile targets, that delegate responsibility to setup.py and nose as required. projectname/ Makefile README setup.py samples/ foo-sample foobar-sample projectname/ __init__.py foo.py bar.py tests/ test-foo.py test-bar.py I've considered adding a sampletest module, or adding nose.tools.istest decorators to the entry-point functions of the samples, but for a small number of samples, these solutions sound a bit ugly. This question is similar to http://stackoverflow.com/questions/301365/automatically-unit-test-example-code, but I assume python best practices will differ from C#

    Read the article

  • Where can I find the Visual Studio 2010 RTM release notes?

    - by Lernkurve
    Question Where can I find a list of changes introduced to Visual Studio 2010 Ultimate RTM that were added since Visual Studio 2010 Ultimate RC? In fact, I'm only interested in changes related to MS Test Manager 2010 and Coded UI Tests. Where I have looked so far I have searched the Internet, looked for a readme.txt in the installation folder, looked into the Visual Studio help (F1) and browsed the "What's new in Visual Studio 2010" section on MSDN. No luck. Found Scott Guthrie's blog post Visual Studio 2010 and .NET 4 Released, but that's not exactly what I am looking for. It's not a changelog since VS2010RC. I suppose there is no such file because they made too many changes to document and hand out to end users. But if there was, I'd be glad if someone could point me to it. Thanks.

    Read the article

  • Problems Executing iPhone "GenericKeychain" Example

    - by AO
    I can't get apple's "GenericKeychain" example to run. I have replaced all 5 occurrences, as mentioned in the readme file, of "YOUR_APP_ID_HERE.com.yourcompany" with my own string: se.[company name].[project name].demo. The compilation goes fine but when trying to run it on the phone, an error saying "The executable was signed with invalid entitlements" appears. And yes, I have an ad hoc provisioning profile installed. I've tried to add "Entitlements.plist" with "get-task-allow" checked but with the same result. Has anyone been able to run the example? If that is the case, provide me with instructions on how you got it to run, please. URL: http://developer.apple.com/iphone/library/samplecode/GenericKeychain/index.html

    Read the article

  • Combining Hg Commits Before Pushing?

    - by Rob
    Let's say I am working on a feature branch cloned from an hg repository - I make some commits and then push the changes back to the repository as expected. However, is there any way to combine multiple commits into a single changeset for the push? For example, today I committed some changes and then remembered I hadn't updated the README file - which meant a 'single' set of changes actually consisted of 2 commits to my local repository. When I pushed these changes back to the original repository it would of been useful to combine the two as a single entity to save cluttering up the repository history.

    Read the article

  • Including libraries in project. Best practise.

    - by mridang
    Hi guys, I'm writing a Python open-source app. My app uses some open source Python libraries. These libraries in turn use other open-source libraries. I intend to release my code at Sourceforge or Google Code but do I need to include the sources of the other libraries? Is this a good practice? ...or should I simply write this information into a README file informing the use about the other required libraries. I've placed all these libraries into a libs sub folder in my source directory. When checking my code into SVN, should I use something called svn:externals to link to other sources? Is there a way to dynamically update my libraries to the latest version or is this something I have to do manually when I release a new version. My sincerest apologies if my question sounds vague but I'm pretty lost in this matter and I don't know what to Google for. Thanks all.

    Read the article

  • Install Bash completion together with distutils / pip

    - by ifischer
    I have created a simple Python module and want to distribute it with pip. I also want to install a Bash completion file together with the module. I'm installing the module with Python 2.7.1+ and pip 0.8.2. I have this setup.py: setup( name='jenkinsmon', version='0.0.1', description='Jenkins Job Monitor', long_description=open('README.txt').read(), scripts=['bin/jenkinsmon'], data_files=[ ('/etc/bash_completion.d', ['extras/jenkinsmon.completion']), ], install_requires = [ 'autojenkins', 'argparse' ], ) Now if I try to install the package with pip install -e ., the Bash completion file never gets installed together with the package. I also tried workarounds by specifying a MANIFEST.in, like described here: MANIFEST.in: include extras/jenkinsmon.completion But this also doesn't help - the completion files won't get installed. What can I do to install the Bash completion files?

    Read the article

  • Compile 32bit mercurial on x86_64

    - by krashalot
    I'm using the academic version of EPD (Enthought Python Distribution) which is 32bit. My computer is Linux x86_64. platform.architecture() returns ('32bit','ELF') I want to install Mercurial. The instructions in README didn't work at first, because make gave this error: "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." I commented out that line in pyport.h and then it compiled fine. Now, after successful compilation I get this error when running it: ImportError: /scratch/epd/lib/python2.6/site-packages/mercurial/osutil.so: wrong ELF class: ELFCLASS64 It appears that I compiled a 64bit version of hg, and it won't run with my 32bit python. I don't see any arch flags in the mercurial makefile. How can I force it to compile in 32bit mode?

    Read the article

  • Confusion on using django socialauth

    - by Fedor
    http://github.com/uswaretech/Django-Socialauth/tree/master/socialauth/ I'm a bit confused on how I should use this. Of course, I read the notes at the bottom but I'm a Django novice so I'll need a little hand holding. The structure of this looks like a project structure since it contains a urls.py but I'm also aware that applications can also have that. It also has a manage.py which leads me to believe it's a project ( plus the subdirectories ). So should I just be integrating portions of this into my existing project? This isn't an application, right? The README also mentions grabbing API Keys. So if I want a standard interface where you click on a google/yahoo logo and it forwards itself via Javascript to the authentication page where you login if you already aren't logged in, kicks you back to your own page, would I need API keys? Any other special tips are appreciated.

    Read the article

  • Compiling PAR for Perl under Windows

    - by lngo
    I've downloaded PAR from http://par.perl.org/wiki/Main_Page and compiled it after reading the README file. I've used dmake-4.12-20090907 instead of nmake ('cause 1.5 does not work) from http://search.cpan.org/dist/dmake/. No problems during the installing proccess (repeating the install proccess doesn't help farther, no warnings, just less text output), but there is no pp.exe or something similar. I'm using Windows XP, all compilations were done on the c drive. perl -v "This is perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x86-multi-thread"

    Read the article

  • On Ubuntu, how do you install a newer version of python and keep the older python version?

    - by Trevor Boyd Smith
    Background: I am using Ubuntu The newer python version is not in the apt-get repository (or synaptic) I plan on keeping the old version as the default python when you call "python" from the command line I plan on calling the new python using pythonX.X (X.X is the new version). Given the background, how do you install a newer version of python and keep the older python version? I have downloaded from python.org the "install from source" *.tgz package. The readme is pretty simple and says "execute three commands: ./configure; make; make test; sudo make install;" If I do the above commands, will the installation overwrite the old version of python I have (I definitely need the old version)?

    Read the article

  • Google minify - Get a timestamped URI to a minified resource using the default Minify install

    - by Adi
    Hi, I am using Google Minify and I want a timestamped URI. The readme.txt suggests this: <link rel="stylesheet" type="text/css" href="<?php echo Minify_groupUri('css'); ?>" /> <script type="text/javascript" src="<?php echo Minify_groupUri('js'); ?>"></script> but it also says: 'Before including this file, /min/lib must be in your include_path.' Where is the include_path set?? A.

    Read the article

  • DirectoryIndex not working because of mod_rewrite?

    - by Kjensen
    Requests to www.domainname.com and domainname.com should display index.html, not index.php as it does now. This is the .htaccess file: # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress I tried adding a DirectoryIndex index.html to the file, but that did not work. I suspect that has something to do with the mod_rewrite stuff, but being an apache-n00b I am really just grasping for straws. Can I add a rewriterule, or what should I do?

    Read the article

  • Logging with log4j on tomcat jruby-rack for a Rails 3 application

    - by John
    I just spent the better part of 3 hours trying to get my Rails application logging with Log4j. I've finally got it working, but I'm not sure if what I did is correct. I tried various methods to no avail until my various last attempt. So I'm really looking for some validation here, perhaps some pointers and tips as well -- anything would be appreciated to be honest. I've summarized all my feeble methods into three attempts below. I'm hoping for some enlightenment on where I went wrong with each attempt -- even if it means I get ripped up. Thanks for the help in advance! System Specs Rails 3.0 Windows Server 2008 Log4j 1.2 Tomact 6.0.29 Java 6 Attempt 1 - Configured Tomcat to Use Log4J I basically followed the guide on the Apache Tomcat website here. The steps are: Create a log4j.properties file in $CATALINA_HOME/lib Download and copy the log4j-x.y.z.jar into $CATALINA_HOME/lib Replace $CATALINA_HOME/bin/tomcat-juli.jar with the tomcat-juli.jar from the Apache Tomcat Extras folder Copy tomcat-juli-adapters.jar from the Apache Tomcat Extras folder into $CATALINA_HOME/lib Delete $CATALINA_BASE/conf/logging.properties Start Tomcat (as a service) Expected Results According to the Guide I should have seen a tomcat.log file in my $CATALINA_BASE/logs folder. Actual Results No tomcat.log Saw three of the standard logs instead jakarta_service_20101231.log stderr_20101231.log stdout_20101231.log Question Shouldn't I have at least seen a tomcat.log file? Attempt 2 - Use default Tomcat logging (commons-logging) Reverted all the changes from the previous setup Modified $CATALINA_BASE/conf/logging.properties by doing the following: Adding a setting for my application in the handlers line: 5rails3.org.apache.juli.FileHandler Adding Handler specific properties 5rails3.org.apache.juli.FileHandler.level = FINE 5rails3.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 5rails3.org.apache.juli.FileHandler.prefix = rails3. Adding Facility specific properties org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rails3].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rails3].handlers = 4host-manager.org.apache.juli.FileHandler Modified my web.xml by adding the following context parameter as per the Logging section of the jruby-rack readme (I also modified my warbler.rb accordingly, but I did opted to change the web.xml directly to test things faster). <context-param> <param-name>jruby.rack.logging</param-name> <param-value>commons_logging</param-value> </context-param> Restarted Tomcat Results A log file was created (rails3.log), however there was no log information in the file. Attempt 2A - Use Log4j with existing set up I decided to go Log4j another whirl with this new web.xml setting. Copied the log4j.jar into my WEB-INF/lib folder Created a log4j.properties file and put it into WEB-INF/classes log4j.rootLogger=INFO, R log4j.logger.javax.servlet=DEBUG log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.base}/logs/rails3.log log4j.appender.R.MaxFileSize=5036KB log4j.appender.R.MaxBackupIndex=4 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} [%t] %-5p %c %x - %m%n Restarted Tomcat Results Same as Attempt 2 NOTE: I used log4j.logger.javax.servlet=DEBUG because I read in the jruby-rack README that all logging output is automatically redirected to the javax.servlet.ServletContext#log method. So I though this would capture it. I was obviously wrong. Question Why didn't this work? Isn't Log4J using the commons_logging API? Attempt 3 - Tried out slf4j (WORKED) A bit uncertain as to why Attempt 2A didn't work, I thought to myself, maybe I can't use commons_logging for the jruby.rack.logging parameter because it's probably not using commons_logging API... (but I was still not sure). I saw slf4j as an option. I have never heard of it and by stroke of luck, I decided to look up what it is. After reading briefly about what it does, I thought it was good of a shot as any and decided to try it out following the instructions here. Continuing from the setup of Attempt 2A: Copied slf4j-api-1.6.1.jar and slf4j-simple-1.6.1.jar into my WEB-INF/lib folder I also copied slf4j-log4j12-1.6.1.jar into my WEB-INF/lib folder Restarted Tomcat And VIOLA! I now have logging information going into my rails3.log file. So the big question is: WTF? Even though logging seems to be working now, I'm really not sure if I did this right. So like I said earlier, I'm really looking for some validation more or less. I'd also appreciate any pointers/tips/advice if you have any. Thanks!

    Read the article

  • OpenFileDialog - only display filenames that have no extensions

    - by fraXis
    Hello, I have the following code in my C# program: OpenFileDialog fDialog = new OpenFileDialog(); fDialog.Title = "Open a file"; fDialog.Filter = "NCF files (*.ncf)|*.ncf|All files (*.*)|*.*|No Extensions (*.)|*."; I want to be able to have the user pick from the following: .NCF (files with .NCF extension only) *.* (all files) and files that have no extensions such as: readme (with no .txt) I know *.* will do this, but it also displays the .NCF, .TXT, and all other files in the same directory. I just want to be able to display filenames that have no extensions. Filtering with *. does not do the trick. Is there a way I can do this with C#? Thanks.

    Read the article

  • Rails: restful authentication setup help

    - by SuperString
    Hi I downloaded the plugin from http://github.com/techweenie/restful-authentication.git Then I run rails generate plugin authenticated user session This is the result I got: create vendor/plugins/authenticated create vendor/plugins/authenticated/MIT-LICENSE create vendor/plugins/authenticated/README create vendor/plugins/authenticated/Rakefile create vendor/plugins/authenticated/init.rb create vendor/plugins/authenticated/install.rb create vendor/plugins/authenticated/uninstall.rb create vendor/plugins/authenticated/lib create vendor/plugins/authenticated/lib/authenticated.rb invoke test_unit inside vendor/plugins/authenticated create test create test/authenticated_test.rb create test/test_helper.rb Then I tried to do rake db:migrate But I got error that says rake tasks in restful-authentication/tasks/auth.rake are deprecated. Use lib/tasks instead. I am new to rails, tried looking online but things seem to be outdated. Please help!

    Read the article

  • ruby c extensions: character values over 127

    - by Adrian
    I am trying to make a C extension for Ruby that includes a method returning a string, which will sometimes have character values that need to be in an unsigned char. In http://github.com/shyouhei/ruby/blob/trunk/README.EXT, all of the functions listed for turning C strings into Ruby strings take signed chars. So I couldn't do this: unsigned char bytes[] = {0xf0, 0xf1, 0xf2}; return rb_str_new(bytes, 3); How could I make a method that returns these types of strings? In other words, how would I make a C extension with a method returning "\xff"?

    Read the article

  • changing the htaccess file in php

    - by tibin mathew
    Hi, I want to change the maximum file upload size in my website, for this i'm going to add some code lines in my .htaccess file. i have searched in google and i got the lines of code to add in .htaccess file. But i don't know exactly were to add that lines of code . Below is the lines of code currently in my .htaccess file code below -FrontPage- IndexIgnore .htaccess /.?? *~ *# /HEADER */README* */_vti* order deny,allow deny from all allow from all order deny,allow deny from allenter code here AuthName www.mysite.com AuthUserFile /www/htdocs/domains/s11/01712/www.mysite.com/webdocs/_vti_pvt/service.pwd AuthGroupFile /www/htdocs/domains/s11/01712/www.mysite.com/webdocs/_vti_pvt/service.grp AddHandler php5-script .php Here is the code to add php_value post_max_size 50M php_value upload_max_filesize 50M how to add this lines of code in .htaccess file and where?? Please help me.. Thanks

    Read the article

  • How to use pom.xml/Maven to initialize a local thoughtsite (App Engine sample) project in Eclipse?

    - by ovr
    This sample app ("thoughtsite") for App Engine contains a pom.xml in its trunk: http://code.google.com/p/thoughtsite/source/browse/#svn/trunk But I don't know what command to run in Maven to set up the project locally. (The README doesn't mention anything about Maven.) I tried to just import the project code directly into Eclipse but it doesn't look like it's in an appropriate format for a direct import. So I assume I need to do something with Maven to get it set up correctly. I haven't really used Maven before so I'm not sure what command I would need to run to set everything up. The pom.xml seems like it downloads a bunch of dependencies for the project like the Spring jar files which I don't see anywhere else in the svn repository.

    Read the article

  • how can I make pip/setuptools understand that my package is in ./src?

    - by Giacomo Lacava
    I have a library with a layout like this in Github: README setup.py src/ somelibrary.py Note: I cannot change the layout, but I can change setup.py. I want to be able to reference this library from requirements.txt, so that people can do pip install -r requirements.txt and have it installed automagically. So I add a line like this into requirements: -e git+http://blablabla/blabla#egg=somelibrary This will clone the repository under ./src/somelibrary and then run setup.py develop on it, which will just add a link to ./src/somelibrary under site-packages. Unfortunately, because the library is actually under ./src/somelibrary/src, it seems like python can't see the library correctly. What am I missing? I guess it must be a setup.py option I'm not using correctly.

    Read the article

  • "No architectures" error when compiling objective flickr for iphone device

    - by user176723
    I'm getting the following error when I attempt to compile my XCode project to debug on my device. No architectures to compile for (ARCHS=x86_64, VALID_ARCHS=armv6 armv7). I've included ObjectiveFlickr in my project just as the readme describes. I've gone through the process several times and redownloaded objectiveFlickr a few times to start over. I've gotten objectiveFlickr to work on devices in the past. I don't know why I am suddenly having trouble. Can anybody point me to something that might hold the clue I need? Any other info I need to provide? I made only changes to my project that are specified by the OF documentation. I also get this error when compiling the included snap-n-run example project provided with OF. So I must be missing something beneath my project. Thanks, Charlie

    Read the article

  • Git remote has master but no HEAD

    - by dwynne
    I'm new to Git, so I suspect that I'm misunderstanding something here, but I'll ask anyway. Via TortoiseGit I do the following: Init a new Git repo locally Add a readme file to it and commit Add a new remote Push the new repo to the orgin (remote) If I then Browse Refs I see the following: heads/master remotes/origin/master What I find odd is that I don't see a HEAD on the remotes. If I delete my local repo and then clone it from the server (I just pushed to above) and then browse the refs I see: heads/master remotes/origin/HEAD remotes/origin/master So why don't I see a remote head after the initial push? NB. I've done the same via Git Bash command (ie. not Tortoise Git) and am seeing the same thing.

    Read the article

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