Daily Archives

Articles indexed Thursday May 13 2010

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

  • Prevent find from printing .git folders

    - by Nathan Neff
    I have a find command that I run, to find files named 'foo' in a directory. I want to skip the ".git" directory. The command below works except it prints an annoying ".git" any time it skips a .git directory: find . ( -name .git ) -prune -o -name '*foo*' How can I prevent the skipped ".git" directories from printing to stdout?

    Read the article

  • Getting error in integrating Contacts APIs in Android 1.6 and 2.0

    - by dhaiwat
    Hi All, I have seen the BusinessCard example provide in Android examples. I am using ContactAccessor abstract class to seperate out the SDK versions. My code is running fine for 2.0 onwards, but when I am trying to build the code in Adnroid 1.6 I am getting the following errors: Build.VERSION_CODES.ECLAIR is not resolved. Getting errors in the whole class in which I have used Contacts APIs from 2.0 (say in class ContactAccessorSdk5.java). How to resolve these issues? I want to run my App on both the versions. Please help me. Regards, Dhaiwat Bhavsar.

    Read the article

  • How to add external library properly in Eclipse?

    - by Peter
    So today I downloaded Apache Commons Lang library (binary, zip format). I extracted it to C:\eclipse\commons-lang-2.5 folder. There are a commons-lang-2.5.jar, a commons-lang-2.5-javadoc.jar, and a commons-lang-2.5-sources.jar inside, and a folder for HTML Javadoc. I started Eclipse, added commons-lang-2.5.jar, and set its source and Javadoc respectively as the screenshot below. My question is, is there a convenient or standard way to add external libraries? Or am I actually doing the right thing?

    Read the article

  • How do I return the ancestors of an object with LINQ?

    - by Chris
    I have a District class that looks like this: public class District { public int Id { get; set; } public string Name { get; set; } public District Parent { get; set; } public IEnumerable<District> Ancestors { get { /* what goes here? */ } } } I would like to be able to get a list of each District's ancestors. So if District "1.1.1" is a child of District "1.1", which is a child of District "1", getting Ancestors on District "1.1.1" would return a list that contains the District objects whose names are "1.1" and "1". Does this involve the yield return statement (I never totally understood that)? Can it be done in one line?

    Read the article

  • What do browsesr use to auto suggest values in web forms?

    - by nedlud
    If I come back to a web site after having filled in a form previously, the browser remembers my username (for example). I'm not talking about cookies remembering user names and passwords, but the way a browser will suggest a value for a previously submitted field. What controls this behaviour? My issue at the moment is that I have login forms on several small apps all running under the one domain. (eg www.example.com/app1/login/ and www.example.com/app2/login/). If I use my user name for app1, then go over to app2 where I use a different username, it only ever auto suggests my app1 user name. How can I change this behaviour? Do browsers use the fields ID to help remember this stuff? If I change the ID of the fields in the login form, will they auto suggest the correct values in future?

    Read the article

  • arm-apple-darwin9-g++ Bus error problem

    - by overboming
    I want to create a mobilesubstrate plugin for iPhone OS 3.2 or I tried to setup toolchain on the iPad device. I have installed the iphone-gcc_4.2-20090304-1-9_iphoneos-arm package and all the relevant packages from Cydia, but when it comes to compiling the simplest source file shows the following error: arm-apple-darwin9-g++ -I /var/toolchain/sys/ -c -dynamiclib ExampleHookLibrary.mm -o ExampleHookLibrary.o arm-apple-darwin9-g++: Internal error: Bus error (program cc1objplus) Please submit a full bug report. See <URL:http://developer.apple.com/bugreporter> for instructions. make: *** [ExampleHookLibrary.o] Error 1 Is it because the iphone-gcc doesn't yet support this device or am I missing anything here? Thanks.

    Read the article

  • Routing generated paths in Ruby on Rails

    - by True Soft
    I'm a beginner in ruby-on-rails and I spent my last hour trying to do the following thing: I have a ruby-on-rails application - the blog with posts and categories. I want to have another URL for the posts (I would like to have http://localhost:3000/news instead of http://localhost:3000/posts) First I tried to replace the controller and classes from Posts to News, but I gave up(because of the annoyng singular-plural thing). Then in my I replaced map.resources :posts (case 1) to map.resources :news, :controller => "posts" #case 2 or map.resources :posts, :as => 'news' #case 3 in routes.rb as I saw on some websites. It doesn't work either. How can I do this? EDIT: the output of rake routes is (only first lines): for case 1 and 3: posts GET /posts {:action=>"index", :controller=>"posts"} formatted_posts GET /posts.:format {:action=>"index", :controller=>"posts"} POST /posts {:action=>"create", :controller=>"posts"} POST /posts.:format {:action=>"create", :controller=>"posts"} new_post GET /posts/new {:action=>"new", :controller=>"posts"} formatted_new_post GET /posts/new.:format {:action=>"new", :controller=>"posts"} edit_post GET /posts/:id/edit {:action=>"edit", :controller=>"posts"} formatted_edit_post GET /posts/:id/edit.:format {:action=>"edit", :controller=>"posts"} post GET /posts/:id {:action=>"show", :controller=>"posts"} formatted_post GET /posts/:id.:format {:action=>"show", :controller=>"posts"} PUT /posts/:id {:action=>"update", :controller=>"posts"} PUT /posts/:id.:format {:action=>"update", :controller=>"posts"} DELETE /posts/:id {:action=>"destroy", :controller=>"posts"} DELETE /posts/:id.:format {:action=>"destroy", :controller=>"posts"} the output for case 2: news_index GET /news {:action=>"index", :controller=>"posts"} formatted_news_index GET /news.:format {:action=>"index", :controller=>"posts"} POST /news {:action=>"create", :controller=>"posts"} POST /news.:format {:action=>"create", :controller=>"posts"} new_news GET /news/new {:action=>"new", :controller=>"posts"} formatted_new_news GET /news/new.:format {:action=>"new", :controller=>"posts"} edit_news GET /news/:id/edit {:action=>"edit", :controller=>"posts"} formatted_edit_news GET /news/:id/edit.:format {:action=>"edit", :controller=>"posts"} news GET /news/:id {:action=>"show", :controller=>"posts"} formatted_news GET /news/:id.:format {:action=>"show", :controller=>"posts"} PUT /news/:id {:action=>"update", :controller=>"posts"} PUT /news/:id.:format {:action=>"update", :controller=>"posts"} DELETE /news/:id {:action=>"destroy", :controller=>"posts"} DELETE /news/:id.:format {:action=>"destroy", :controller=>"posts"} I have errors in case 2, because in my sourcecode I don't have edit_news, I have for example <%= link_to 'Edit', edit_post_path(post) %>

    Read the article

  • Archiving an Entire Rails Site

    - by Pygmalion
    I have a Ruby on Rails site that was only needed for a short period of time during which users added various objects to a mySQL database, commenting on them, associating themselves with them, etc. etc. etc. The question is this: the site is no longer needed until a week next year around this time when I will clear the database and use it again (starting from scratch). What's the best way to archive the current site so that the existing content is still viewable but no new content can be added? By best way, I mean the method by which the least system resources will be used, the server will be the safest, etc. Any suggestions?

    Read the article

  • Need troubleshooting advice for intermittent dns problems with requests on isp nameservers

    - by Mnebuerquo
    I've been having some intermittent dns problems with a web server, where certain isp's dns servers don't have my hostnames in cache and fail to look them up. At the same time, queries to opendns for those hostnames resolve correctly. It's intermittent, and it always works fine for me, so it's hard to identify the problem when someone reports connectivity problems to my site. My website is on a server running linux with Plesk. My dns records are configured with plesk (so my server is its own dns master). Domain name is registered with godaddy. I'm not real knowledgeable about dns, so I don't really know how to begin with troubleshooting. I've started learning to use dig, but while I can read the manpage to learn the syntax, I don't really know what questions to ask. Since the problem is intermittent I haven't been able to really catalog many symptoms. Symptoms I have observed: Certain people repeatedly reported intermittent problems connecting to my website. This was only from certain networks. (Ex: One guy could connect reliably from his office but not his home.) Sometimes I notice my browser taking a long time looking up the hostname for my site (Firefox shows a message in the status bar at the bottom). For me this is in the ten second range. ssh connections from anywhere to my server take a long time to connect but then seem to work fine once connected. So hopefully the folks on serverfault can point me to a good beginner tutorial for understanding dns, and suggest troubleshooting questions to ask next time one of my users reports connectivity problems.

    Read the article

  • Hey Guy , I want ot streaming video by using VideView class . Can anyone tell me what format is it s

    - by eddyxd
    Hi , I am the newbie of android, but i hava seen the tutorial and implement some simple applications. The question i met is that I am tring to stream some video from my server to android, but the android VideoView class just plays the audition sololy without "image"@@!~ Here is my setting and android code : 1. android core code: mVideoView01.setVideoURI(Uri.parse("rtsp://192.168.16.1:8080/test.sdp")); mVideoView01.start(); 2. my streaming server is VLC and the command is: vlc -vvv d:\nobody.mp4 --sout=#transcode{vcodec=h264,width=320,hegiht=240}:rtp{dst=192.168.16.1,port=4444,sdp=rtsp://192.168.16.1:8080/test.sdp} ps: My ip is got from DHCP but I have checked it really can be connected(Android could play audition after all) ps2: I haved trid to stream some video from "http://www.americafree.tv/" and the playing is good!!@@ So I guess that the problem maybe is caused by streaming Video format, but I have almost tried every figument option form VLC, and it still don't workQQ. So Have anyone done the same test as me can give me some advice?? Thanks a lot!!!!! by eddy

    Read the article

  • new image makes http request even though cached?

    - by joshs
    I have a javascript slide show that creates the next slide dynamically and then moves it into view. Since the images are actually sprites, the src is transparent.png and the actual image is mapped via background:url(.. in css. Everytime (well, most of the time) the script creates a new Element, Firefox makes an http request for transparent.png. I have a far-future expires header, and Firefox is respecting all other files' expiries. Is there a way to avoid these unnecessary requests. Even though the server is returning 304 unmodified responses, it would be nice if Firefox would respect the expiries on dynamically created images. I suspect that if I injected a simple string instead of using new Element, this might solve the problem, but I use some methods on Prototypes extended Element object, so I would like to avoid a bunch of html strings in my js file. This is a nit-picky question, but I'm working on front-end optimization now, so I thought I would address it. Thanks.

    Read the article

  • Nibernate, DynamicProxy, and Spring AOP

    - by jeff
    We have an Spring IOC managed application that uses NHibernate in its persistence layer. We have use the Spring AOP and understand its terminology and capabilities. We have some investment in Spring proxies. Now, we want to add a PropertyChangedMixin and a ValidatorInterceptor (not nhibernate validator, but based on Spring validation) onto our NHibernate managed objects. I've looked at the hooks for NHiberate IInterceptor and EventListeners and that gives me a place to apply the desired proxies. If I use the Spring proxies is it going to play nice with the existing nhibernate proxies. We don't lazy load. From the simple nhibernate stuff the benefits of DynamicProxy look appealing. I can go either way, but I'd like to hear suggestions. Thanks, jeff

    Read the article

  • .pl or .cgi for perl web script file

    - by Nano HE
    HI. I created two files 'hello.pl' and 'hello.cgi' with the code below. #!/usr/bin/perl print "Content-type:text/html\n\n"; print "hello world"; I can view the page via both http://www.mydomain.com/cgi-bin/hello.pl and http://www.mydomain.com/cgi-bin/hello.cgi. Which one is more sense in Perl web dev? BTW, the directory of 'cgi-bin' created by my VPS server, Do I need contact with my VPS support to remove it or just remain it like this URL style? Maybe http://www.mydomain.com/perDev/hello.cgi is better?

    Read the article

  • Getting anchor text from a webpage using xpath within YQL

    - by Matt
    SELECT content FROM html WHERE url="http://en.wikipedia.org/wiki/List_of_United_States_National_Parks_by_state" AND xpath="//a/text()" does not work, whereas SELECT * FROM html WHERE url="http://en.wikipedia.org/wiki/List_of_United_States_National_Parks_by_state" AND xpath="//a/text()" does. SELECT content FROM html WHERE url="http://en.wikipedia.org/wiki/List_of_United_States_National_Parks_by_state" AND xpath="//a" also works, it seems YQL has a bug, or am I missing something?

    Read the article

  • Jetty RewriteHandler and RewriteRegexRule

    - by Justin
    I'm trying to rewrite a URL for a servlet. The URL gets rewritten correctly, but the context doesn't match after that. Any idea how to get this to work? RewriteHandler rewriteHandler = new RewriteHandler(); rewriteHandler.setRewriteRequestURI(true); rewriteHandler.setRewritePathInfo(true); rewriteHandler.setOriginalPathAttribute("requestedPath"); RewriteRegexRule rewriteRegexRule = new RewriteRegexRule(); rewriteRegexRule.setRegex("/r/([^/]*).*"); rewriteRegexRule.setReplacement("/r?z=$1"); rewriteHandler.addRule(rewriteRegexRule); ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection(); Context servletContext = new Context(contextHandlerCollection, "/"); servletContext.addServlet(new ServletHolder(new RedirectServlet()), "/r"); So basically /r/asdf gets rewritten to /r?z=asdf. However, the rewritten /r?z=asdf is now not processed by the servlet. Also, /r?z=asdf does work if called directly.

    Read the article

  • C# HTTP Headers crafting

    - by rukqoa
    Since Http Headers can be crafted and customize, how would I change or modify the IP part of it using C# 's HttpWebRequest class. In other words, how can IP Spoofing be done using C#. Thanks for reading.

    Read the article

  • How to add a right button to a UINavigationController?

    - by Artilheiro
    I am trying to add a refresh button to the top bar of a navigation controller with no success. Here is the header: @interface PropertyViewController : UINavigationController { } Here is how I am trying to add it: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Show" style:UIBarButtonItemStylePlain target:self action:@selector(refreshPropertyList:)]; self.navigationItem.rightBarButtonItem = anotherButton; } return self; }

    Read the article

  • Linux script to find time difference and send an email if need

    - by Gnanam
    Hi, I'm not an expert in writing shell scripts but also I'm looking for a very specific solution. OS: CentOS release 5.2 (Final) I've a Java standalone which keeps writing (all System.out.println) to a log file. For some unknown reason, this Java standalone stops working at some point of time in my server and eventually logs writing also stops working. I want to have a script which checks the last modified date & time of the log file with current date & time in the server. If the time difference exceeds more than 5 minutes, I want to send an email immediately to my recipients list. This way I'll come to know when this Java standalone has stopped working. I'll move this script to crontab and make it run for every 1 minute, so that this whole process is automated. Log file location: /usr/local/logs/standalone.log

    Read the article

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