Search Results

Search found 45013 results on 1801 pages for 'example'.

Page 64/1801 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • unix How to compare two files and get results to third file?

    - by Martin Mocik
    I have two files 1st file is like this: www.example.com www.domain.com www.otherexample.com www.other-domain.com www.other-example.com www.exa-ample.com 2nd file is like this (numbers after ;;; are between 0-10): www.example.com;;;2 www.domain.com;;;5 www.other-domain;;;0 www.exa-ample.com;;;4 and i want compare these two files and output to third file like this: www.otherexample.com www.other-example.com Both files have large size (over 500mb)

    Read the article

  • Java language convention; getters/setters

    - by Skogen
    Public class Example { private int number; public Example(int number){ this.number = number; } public int getNumber(){ return number; } public void setNumber(int number){ this.number = number; } public static void main(String[] args){ Example e = new Example(5); What is preffered when accessing a variable within its own class; "e.number" or "e.getNumber()" ?

    Read the article

  • Redirect question using mod_rewrite (no extensions - root of site)

    - by alex
    Hi, I'm having a small problem with mod_rewrite I have the following in my .htacces: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC] This is my index.php file: <?php echo $_GET['name]; ?> This works great for the following url: www.mySite.com/this is an example.htm this would display "this is an example" What i'm trying to do however, is get it to do the same, without the .htm extension: for example: www.mySite.com/this is an example Any ideas? (dont think it's relevant but i'm using xampp to test this)

    Read the article

  • Mod_rewrite and redirects with training forward slash not working

    - by john williams
    I'm using the following lines of code in my .htaccess file to create redirects. The problem is, whenever I go to example.com/register/ it cant find the css files because it's looking for example.com/register/mycss.css instead of example.com/mycss.css. Redirect 301 register.php http://example.com/register RewriteRule ^register/?$ register.php How can I correct this? I'm new to any kind of htaccess/mod_rewrite functions so feel free to point me in the right direction if there are any other flaws.

    Read the article

  • c - difficulties with bit operations

    - by hatorade
    I'm debugging a program with GDB. unsigned int example = ~0; gives me: (gdb) x/4bt example 0xffd99788: 10101000 10010111 11011001 11111111 why is this not all 1's? i defined it as ~0... then the next line of code is: example>>=(31); and GDB gives me this when I try to examine the memory at bits: (gdb) x/4bt example 0xffffffff: Cannot access memory at address 0xffffffff what is going on???

    Read the article

  • Mail Composer Address Problem

    - by Arun Sharma
    I found email composer sample code from iphone OS Ref Library. Here is a code- Code: NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"]; NSArray *ccRecipients = [NSArray arrayWithObjects:@"[email protected]", @"[email protected]", nil]; NSArray *bccRecipients = [NSArray arrayWithObject:@"[email protected]"]; My question is how to take user's input? Here all email address are predefined in code. so what are the IDs of to, CC, Bcc, subject and body fields?

    Read the article

  • Is there a way to specify wildcarded region names when using ehcache with hibernate?

    - by bkent314
    When using Ehcache with Hibernate, is there a way to specify region names with wildcards in the ehcache.xml file? For example, to allow for cache settings at the package level (with * as a wildcard indicator): <cache name="com.example.my.package1.*" ... /> <cache name="com.example.my.package2.*" ... /> (Note: The package-level distinction is just an example. My question is to wildcards in the general case.)

    Read the article

  • SpringBatch Jaxb2Marshaller: different name of class and xml attribute

    - by user588961
    I try to read an xml file as input for spring batch: Java Class: package de.example.schema.processes.standardprocess; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Process", namespace = "http://schema.example.de/processes/process", propOrder = { "input" }) public class Process implements Serializable { @XmlElement(namespace = "http://schema.example.de/processes/process") protected ProcessInput input; public ProcessInput getInput() { return input; } public void setInput(ProcessInput value) { this.input = value; } } SpringBatch dev-job.xml: <bean id="exampleReader" class="org.springframework.batch.item.xml.StaxEventItemReader" scope="step"> <property name="fragmentRootElementName" value="input" /> <property name="resource" value="file:#{jobParameters['dateiname']}" /> <property name="unmarshaller" ref="jaxb2Marshaller" /> </bean> <bean id="jaxb2Marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="classesToBeBound"> <list> <value>de.example.schema.processes.standardprocess.Process</value> <value>de.example.schema.processes.standardprocess.ProcessInput</value> ... </list> </property> </bean> Input file: <?xml version="1.0" encoding="UTF-8"?> <process:process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:process="http://schema.example.de/processes/process"> <process:input> ... </process:input> </process:process> It fires the following exception: [javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schema.example.de/processes/process", local:"input"). Expected elements are <<{http://schema.example.de/processes/process}processInput] at org.springframework.oxm.jaxb.JaxbUtils.convertJaxbException(JaxbUtils.java:92) at org.springframework.oxm.jaxb.AbstractJaxbMarshaller.convertJaxbException(AbstractJaxbMarshaller.java:143) at org.springframework.oxm.jaxb.Jaxb2Marshaller.unmarshal(Jaxb2Marshaller.java:428) If I change to in xml it work's fine. Unfortunately I can change neither the xml nor the java class. Is there a possibility to make Jaxb2Marshaller map the element 'input' to the class 'ProcessInput'?

    Read the article

  • How to find out the exact RSS XML path of a website?

    - by Winston
    How do I get the exact feed.xml/rss.xml/atom.xml path of a website? For example, I supplied "http://www.example.com/news/today/this_is_a_news", but the rss is pointing to "http://www.example.com/rss/feed.xml", most modern browsers have this features already and I'm curious how did they get them. Can you cite an example code in ruby, python or bash?

    Read the article

  • How I can ask a specify Name Server to have the IP of a domain

    - by Yuan Chen
    For example, I have a domain name example.com hosted at some host free, and now I want to know where is the IP of the host. so I can't configure the registrar control panel to point to that IP. So is there any way to know that IP, without configure the name server to point to it. and I know the Name Server of the hosting. for example ns1.hosting.com can I ask the specify ns1.hosting.com to get the IP of example.com Thanks

    Read the article

  • How to save link with tag e parameters in TextField

    - by xRobot
    I have this simple Post model: class Post(models.Model): title = models.CharField(_('title'), max_length=60, blank=True, null=True) body = models.TextField(_('body')) blog = models.ForeignKey(Blog, related_name="posts") user = models.ForeignKey(User) I want that when I insert in the form the links, the these links are saved in the body from this form: http://www.example.com or www.example.com to this form ( with tag and rel="nofollow" parameter ): <a href="http://www.example.com" rel="nofollow">www.example.com</a> How can I do this ? Thanks ^_^

    Read the article

  • Apache2 httpd.conf help

    - by Axsuul
    I have a domain, for example, http://example.com. It is already configured to point to /var/www/ Basically, i want http://example.com to point to /var/www/4.0/ and http://example.com/foobar/ to point to /var/www/moo/ How can I do this with the httpd.conf file for Apache2? Thanks

    Read the article

  • URL redirection if wrong url

    - by xRobot
    I have this method in my book model: def get_absolute_url(self): return "/book/%s/%s/%i/%i/" % ( self.book_title, self.book_editor, self.book_pages, self.id) So the urls of each book are like this: example.com/book/the-bible/gesu-crist/938/12/ I want that if there is an error in the url, then I get redirected to the real url by using book.id in the end of the url. For example if I go to: example.com/book/A-bible/gesu-crist/938/12/ the I will get redirected to: example.com/book/the-bible/gesu-crist/938/12/ How can I do that ?

    Read the article

  • question on src folders in eclipse

    - by Jeff Colapietro
    So, I've been doing android application tutorials and everytime I create a package, for example the helloAndroid tutorial is com.example.android. When it saves this to src it creates a folder for com, another for example and one last one for android. So it gives me the error "class com.example.android does not exist" because its broken into different folders. If anyone can help me out please email me at: [email protected] Thank you very much.

    Read the article

  • exim redirect mail to a script

    - by DevilWAH
    I am looking to set up a mail relay so that any mail sent to for example @example.com gets parsed be a PHP script. I know to do this for indervidual address I could do some thing like (from the following web site http://evolt.org/incoming_mail_and_php) Con figure an Aliases such as script: |/our/script.php then any emails sent to [email protected] will be passed to the script given.. but how can I make it that every email to @example.com is passed to the script? thank you

    Read the article

  • How can I retrieve all the returned variables from a function?

    - by user1447941
    import random def some_function(): example = random.randint(0, 1) if example == 1: other_example = 2 else: return False return example, other_example With this example, there is a chance that either one or two variables will be returned. Usually, for one variable I'd use var = some_function() while for two, var, var2 = some_function(). How can I tell how many variables are being returned by the function?

    Read the article

  • How to save links with tags and parameters in TextField

    - by xRobot
    I have this simple Post model: class Post(models.Model): title = models.CharField(_('title'), max_length=60, blank=True, null=True) body = models.TextField(_('body')) blog = models.ForeignKey(Blog, related_name="posts") user = models.ForeignKey(User) I want that when I insert in the form the links, then these links are saved in the body from this form: http://www.example.com or www.example.com to this form ( with tag and rel="nofollow" parameter ): <a href="http://www.example.com" rel="nofollow">www.example.com</a> How can I do this ? Thanks ^_^

    Read the article

  • PHP: What's the best way to check equality of $_SERVER['HTTP_REFERER'] ?

    - by Hank
    I have a PHP script that checks the HTTP Referer. if ($_SERVER['HTTP_REFERER'] == 'http://www.example.com/') {...} However, this seems inherintly unsafe ... because what happens if the user goes to 'http://example.com/' or 'http://www.ExaMple.com' (both of which don't match the equality test). Question: what's a better equality test to ensure that the HTTP Referer is coming from 'example.com' ?

    Read the article

  • Apache Solr Admin on Tomcat Deployed in WebApps Directory

    - by KM01
    I am trying to get Apache Solr to work on Redhat6 and Tomcat6 (using these instructions), but get this error when browsing to the admin section, http://localhost:8080/solr-example/admin: HTTP Status 404 - missing core name in path type Status report message missing core name in path description The requested resource (missing core name in path) is not available. http://localhost:8080/solr-example loads fine, with a link to "Solr Admin." My setup is as follows: tomcat6: /etc/tomcat6 Solr: /app/solr/example I have a solr-example.xml in /etc/tomcat6/Catalina/localhost/, which reads: <?xml version="1.0" encoding="utf-8"?> <Context docBase="/app/solr/example/apache-solr-3.4.0.war" debug="0" crossContext="true"> <Environment name="solr/home" type="java.lang.String" value="/app/solr/example" override="true"/> </Context> I don't see anything in the logs (/var/log/tomcat6) ... only entires in catalina.out are regarding the starting and stopping of tomcat6. My questions are: 1.What else do I need to do to get "Solr Admin" to work under Tomcat? 2.Where are these "cores" supposed to be specified? I see an entry in /app/solr/example/solr/solr.xml ? <solr persistent="false"> adminPath: RequestHandler path to manage cores. If 'null' (or absent), cores will not be manageable via request handler <cores adminPath="/admin/cores" defaultCoreName="collection1"> <core name="collection1" instanceDir="." /> </cores> </solr> 3.How do I got about ensuring that logs are working correctly? I can't find logs that contain mention of the 404 above. Update in response to @quanta's comment: Downloaded former (apache-solr-3.4.0.tgz) dataDir was not set, now set to: <dataDir>${solr.data.dir:../solr/data}</dataDir> JAVA_OPTS: /usr/lib/jvm/java/bin/java -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/usr/share/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/usr/share/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start catalina.out contains no indication of the above error

    Read the article

  • Rails 3 shows 404 error instead of index.html (nginx + unicorn)

    - by Miko
    I have an index.html in public/ that should be loading by default but instead I get a 404 error when I try to access http://example.com/ The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. This has something to do with nginx and unicorn which I am using to power Rails 3 When take unicorn out of the nginx configuration file, the problem goes away and index.html loads just fine. Here is my nginx configuration file: upstream unicorn { server unix:/tmp/.sock fail_timeout=0; } server { server_name example.com; root /www/example.com/current/public; index index.html; keepalive_timeout 5; location / { try_files $uri @unicorn; } location @unicorn { proxy_pass http://unicorn; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_redirect off; } } My config/routes.rb is pretty much empty: Advertise::Application.routes.draw do |map| resources :users end The index.html file is located in public/index.html and it loads fine if I request it directly: http://example.com/index.html To reiterate, when I remove all references to unicorn from the nginx conf, index.html loads without any problems, I have a hard time understanding why this occurs because nginx should be trying to load that file on its own by default. -- Here is the error stack from production.log: Started GET "/" for 68.107.80.21 at 2010-08-08 12:06:29 -0700 Processing by HomeController#index as HTML Completed in 1ms ActionView::MissingTemplate (Missing template home/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/www/example.com/releases/20100808170224/app/views", "/www/example.com/releases/20100808170224/vendor/plugins/paperclip/app/views", "/www/example.com/releases/20100808170224/vendor/plugins/haml/app/views"): /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/paths.rb:14:in `find' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/lookup_context.rb:79:in `find' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/base.rb:186:in `find_template' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/render/rendering.rb:45:in `_determine_template' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/render/rendering.rb:23:in `render' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/haml-3.0.15/lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml' etc... -- nginx error log for this virtualhost comes up empty: 2010/08/08 12:40:22 [info] 3118#0: *1 client 68.107.80.21 closed keepalive connection My guess is unicorn is intercepting the request to index.html before nginx gets to process it.

    Read the article

  • Rails 3 shows 404 error instead of index.html (nginx + unicorn)

    - by Miko
    I have an index.html in public/ that should be loading by default but instead I get a 404 error when I try to access http://example.com/ The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. This has something to do with nginx and unicorn which I am using to power Rails 3 When take unicorn out of the nginx configuration file, the problem goes away and index.html loads just fine. Here is my nginx configuration file: upstream unicorn { server unix:/tmp/.sock fail_timeout=0; } server { server_name example.com; root /www/example.com/current/public; index index.html; keepalive_timeout 5; location / { try_files $uri @unicorn; } location @unicorn { proxy_pass http://unicorn; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_redirect off; } } My config/routes.rb is pretty much empty: Advertise::Application.routes.draw do |map| resources :users end The index.html file is located in public/index.html and it loads fine if I request it directly: http://example.com/index.html To reiterate, when I remove all references to unicorn from the nginx conf, index.html loads without any problems, I have a hard time understanding why this occurs because nginx should be trying to load that file on its own by default. -- Here is the error stack from production.log: Started GET "/" for 68.107.80.21 at 2010-08-08 12:06:29 -0700 Processing by HomeController#index as HTML Completed in 1ms ActionView::MissingTemplate (Missing template home/index with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :haml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/www/example.com/releases/20100808170224/app/views", "/www/example.com/releases/20100808170224/vendor/plugins/paperclip/app/views", "/www/example.com/releases/20100808170224/vendor/plugins/haml/app/views"): /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/paths.rb:14:in `find' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/lookup_context.rb:79:in `find' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/base.rb:186:in `find_template' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/render/rendering.rb:45:in `_determine_template' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/actionpack-3.0.0.beta4/lib/action_view/render/rendering.rb:23:in `render' /usr/local/rvm/gems/ruby-1.9.2-rc2/gems/haml-3.0.15/lib/haml/helpers/action_view_mods.rb:13:in `render_with_haml' etc... -- nginx error log for this virtualhost comes up empty: 2010/08/08 12:40:22 [info] 3118#0: *1 client 68.107.80.21 closed keepalive connection My guess is unicorn is intercepting the request to index.html before nginx gets to process it.

    Read the article

  • Reach self hosted server from LAN

    - by Freefri
    I have a self hosted server with Apache2 pointed with the domain example.com. I have also some virtual servers www.example.com, cloud.examle.com, etc. This server is in my LAN, and when I try to acces to my server within the lan throw www.examle.com y get my router's configuration page. From outside the LAN www.example.com and cloud.examle.com works properly. From inside the LAN 192.168.1.33 (server internal IP) shows the default webpage (www.examle.com), but I can not get cloud.examle.com I also have a LAN name server in 192.168.1.33 with bind9. I set up my gateway 192.168.1.1 with my LAN-NS as primary NS I solve this problem creating a new dns zone in the NS. This are my config files: ;ZONE-1 $ORIGIN . $TTL 86400 ; 1 day home.lan. IN SOA server.home.lan. hostmaster.home.lan. ( 2008080901 ; serial 8H ; refresh 4H ; retry 4W ; expire 1D ; minimum ) home.lan. IN NS server.home.lan. $ORIGIN home.lan. ; Set the address for localhost.home.lan localhost IN A 127.0.0.1 router IN A 192.168.1.1 server IN A 192.168.1.33 mypc IN A 192.168.1.132 ;ZONE-2 $ORIGIN . $TTL 86400 ; 1 day example.com. IN SOA www.example.com hostmaster.home.lan. ( 2008080902 ; serial 8H ; refresh 4H ; retry 4W ; expire 1D ; minimum ) example.com. IN NS 192.168.1.33 $ORIGIN examle.com. localhost IN A 127.0.0.1 www IN A 192.168.1.33 cloud IN A 192.168.1.33 My DNS and my names are working properly now My question are: What do you think about my solution? Can I change the A zone with CNAME to server.home.lan (this is the domain in the LAN to the server)? How can I set a default IP for all my whatever.example.com?

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >