Daily Archives

Articles indexed Saturday December 8 2012

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

  • Inserting an element into a sorted list

    - by Russell Cargill
    Ok I'm using getSharedPreferences to store my high score but before I fill it up I wanted to sort the scores into ascending order via and array, but if it finds a Score less than it in the first pos then it wont check the rest for the smallest? //function to add score to array and sort it public void addscoretoarray(int mScore){ for(int pos = 0; pos< score.length; pos++){ if(score[pos] > mScore){ //do nothing }else { //Add the score into that position score[pos] = mScore; break; } } sortArray(score); } should I call sortArray() before and after the loop to fix this problem or is there a better method to achive the same results? I should also mention that the sortArray(score) funtion is just calling Arrays.sort(score) where score is an array of mScore

    Read the article

  • parsing xml using dom4j

    - by D3GAN
    My XML structure is like this: <rss> <channel> <yweather:location city="Paris" region="" country="France"/> <yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/> <yweather:wind chill="-1" direction="40" speed="11.27"/> <yweather:atmosphere humidity="87" visibility="9.99" pressure="1015.92" rising="0"/> <yweather:astronomy sunrise="8:30 am" sunset="4:54 pm"/> </channel> </rss> when I tried to parse it using dom4j SAXReader xmlReader = createXmlReader(); Document doc = null; doc = xmlReader.read( inputStream );//inputStream is input of function log.info(doc.valueOf("/rss/channel/yweather:location/@city")); private SAXReader createXmlReader() { Map<String,String> uris = new HashMap<String,String>(); uris.put( "yweather", "http://xml.weather.yahoo.com/ns/rss/1.0" ); uris.put( "geo", "http://www.w3.org/2003/01/geo/wgs84_pos#" ); DocumentFactory factory = new DocumentFactory(); factory.setXPathNamespaceURIs( uris ); SAXReader xmlReader = new SAXReader(); xmlReader.setDocumentFactory( factory ); return xmlReader; } But I got nothing in cmd but when I print doc.asXML(), my XML structure print correctly!

    Read the article

  • scrollLeft works but scrollTop doesn't work

    - by Xiao Jia
    I have the following HTML with CSS .container { overflow: scroll; } etc. <body> <div class="container"> <div id="markers"></div> <img id="map" src="/img/map.jpg"/> </div> </body> map.jpg is very large and I want to scroll to a fixed position like this: $(function(){ console.log($('.container').scrollTop()); $('.container').scrollTop(1000); console.log($('.container').scrollTop()); console.log($('.container').scrollLeft()); $('.container').scrollLeft(1750); console.log($('.container').scrollLeft()); }); scrollLeft works fine but scrollTop doesn't. Below is the console output. 0 0 0 1750 I've been searching for half an hour but still don't know how to fix it... UPDATE: CSS about .container #markers and #map .container { overflow: scroll; width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; } #map { width: 5000px; max-width: 5000px; height: 2907px; max-height: 2907px; cursor: crosshair; } #markers { position: relative; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; }

    Read the article

  • Microsoft Access and Java JDBC-ODBC Error

    - by user1638362
    Trying to insert some values in a Microsoft access database using java. I can an error however, java.sql.SQLException: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application Exception in thread "main" java.lang.NullPointerException To create the data source im using SysWoW64 odbcad32 and adding it the datasource to system DNS. I say this as i have seen else where there are problems which occur with 64bit systems. However it still doesn't work for me. Microsoft Office 32bit. import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class RMIAuctionHouseJDBC { /** * @param args */ public static void main(String[] args) { String theItem = "Car"; String theClient="KHAN"; String theMessage="1001"; Connection conn =null; // Create connection object try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); System.out.println("Driver Found"); } catch(Exception e) { System.out.println("Driver Not Found"); System.err.println(e); } // connecting to database try{ String database ="jdbc:odbc:Driver={Microsoft Access Driver (*.accdb)};DBQ=AuctionHouseDatabase.accdb;"; conn = DriverManager.getConnection(database,"",""); System.out.println("Conn Found"); } catch(SQLException se) { System.out.println("Conn Not Found"); System.err.println(se); } // Create select statement and execute it try{ /*String insertSQL = "INSERT INTO AuctionHouse VALUES ( " +"'" +theItem+"', " +"'" +theClient+"', " +"'" +theMessage+"')"; */ Statement stmt = conn.createStatement(); String insertSQL = "Insert into AuctionHouse VALUES ('Item','Name','Price')"; stmt.executeUpdate(insertSQL); // Retrieve the results conn.close(); } catch(SQLException se) { System.out.println("SqlStatment Not Found"); System.err.println(se); } } } java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source) at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)

    Read the article

  • Insert coding query in yii

    - by nerd
    I need to auto insert the next orders_id into an Orders table in a database. orders_id is not the primary Key, and it does not auto-increment I need to query the database, find the last (highest) id value, increment 1, and insert it in Orders table in database. Actually, I have a shipping action which will provide address of shipping of orders. So as soon as the user fills address form and move to payments page, I want to simultaneously fill my Orders table by max(orders_id)+1. I have built relations between Address table and Orders table but my orders Table is not getting populated. Please detail me correct codes to implement it in my controller in Yii

    Read the article

  • Serial.begin(speed, config) not compiling for Leonardo Board

    - by forgemo
    I would like to configure my serial communication to have no parity, 1 start- and 2 stop-bits. The documentation for Serial.begin(speed, config) states: (...) An optional second argument configures the data, parity, and stop bits. The default is 8 data bits, no parity, one stop bit. The documentation also lists the possible configuration-values. According to my (limited) understanding, I need SERIAL_7N2 or SERIAL_8N2 to meet my requirements. (I'm not sure how the data-bits relate to the the 1-start-bit that I need.) However, I can't even compile because I have no idea how to supply that config value to the begin method. (I don't have much Arduino/C++ experience) I've tried in my code the following two variants: Serial.begin(9600, SERIAL_8N2); Serial.begin(9600, "SERIAL_8N2"); Am I missing something? Additional Information: Serial.begin(speed, config) has been introduced with the latest Arduino 1.0.2 IDE version. The code defining/implementing the begin methods can be found here. HardwareSerial.h HardwareSerial.cpp Edit: According to the replies from PeterJ and borges, the following variant is correct. Serial.begin(9600, SERIAL_8N2); However, it's still not working. I found that the compile error doesn't occur if I change the configured board from my Arduino Leonardo to Arduino uno. Therefore, it could be a bug occurring only with a subset of boards ... or maybe it's not supported?!

    Read the article

  • gevent, sockets and syncronisation

    - by schlamar
    I have multiple greenlets sending on a common socket. Is it guaranteed that each package sent via socket.sendall is well separated or do I have to acquire a lock before each call to sendall. So I want to prevent the following scenario: g1 sends ABCD g2 sends 1234 received data is mixed up, for example AB1234CD expected is either ABCD1234 or 1234ABCD Update After a look at the sourcecode I think this scenario cannot happen. But I have to use a lock because g1 or g2 can crash on the sendall. Can someone confirm this?

    Read the article

  • how to fix facebook Circular Redirect?

    - by user1057679
    I have a page that redirects to other page I try to test my url on: https://developers.facebook.com/tools/debug i get this error: Errors That Must Be Fixed: Circular Redirect:? Circular redirect path detected (see Redirect Path section for details). Warnings That Should Be Fixed: ?The og:url property should be explicitly provided, even if a value can be inferred from other tags.? how can i fix this problem? how to detect facebook and if it is facebook dont redirect?

    Read the article

  • JavaScript multithreading

    - by Krzysztof Hasinski
    I'm working on comparison for several different methods of implementing (real or fake) multithreading in JavaScript. As far as I know only webworkers and Google Gears WorkerPool can give you real threads (ie. spread across multiple processors with real parallel execution). I've found the following methods: switch between tasks using yield() use setInterval() (or other non-blocking function) with threads waiting one for another use Google Gears WorkerPool threads (with plugin) use html5 web workers I read related questions and found several variations of the above methods, but most of those questions are old, so there might be a few new ideas. I'm wondering - how else can you achieve multithreading in JavaScript? Any other important methods? UPDATE: As pointed out in comments what I really meant was concurrency. UPDATE 2: I found information that Silverlight + JScript supports multithreading, but I'm unable to verify this. UPDATE 3: Google deprecated Gears: http://code.google.com/apis/gears/api_workerpool.html

    Read the article

  • How to refresh the properties view in Eclipse RCP?

    - by geejay
    I am using the properties view in RCP, i.e org.eclipse.ui.views.properties.PropertySheet. I want to be able to refresh the content of these properties programmatically. It seems RCP is geared towards the use case where this changes only when a selection changes. Is there any way I can fire a dummy event to get this to refresh (without having ugly UI artifacts such as visibly switching between parts) ?

    Read the article

  • BizTalk: Internals: the Partner Direct Ports and the Orchestration Chains

    - by Leonid Ganeline
    Partner Direct Port is one of the BizTalk hidden gems. It opens simple ways to the several messaging patterns. This article based on the Kevin Lam’s blog article. The article is pretty detailed but it still leaves several unclear pieces. So I have created a sample and will show how it works from different perspectives. Requirements We should create an orchestration chain where the messages should be routed from the first stage to the second stage. The messages should not be modified. All messages has the same message type. Common artifacts Source code can be downloaded here. It is interesting but all orchestrations use only one port type. It is possible because all ports are one-way ports and use only one operation. I have added a B orchestration. It helps to test the sample, showing all test messages in channel. The Receive shape Filter is empty. A Receive Port (R_Shema1Direct) is a plain Direct Port. As you can see, a subscription expression of this direct port has only one part, the MessageType for our test schema: A Filer is empty but, as you know, a link from the Receive shape to the Port creates this MessageType expression. I use only one Physical Receive File port to send a message to all processes. Each orchestration outputs a Trace.WriteLine(“<Orchestration Name>”). Forward Binding This sample has three orchestrations: A_1, A_21 and A_22. A_1 is a sender, A_21 and A_22 are receivers. Here is a subscription of the A_1 orchestration: It has two parts A MessageType. The same was for the B orchestration. A ReceivePortID. There was no such parameter for the B orchestration. It was created because I have bound the orchestration port with Physical Receive File port. This binding means the PortID parameter is added to the subscription. How to set up the ports? All ports involved in the message exchange should be the same port type. It forces us to use the same operation and the same message type for the bound ports. This step as absolutely contra-intuitive. We have to choose a Partner Orchestration parameter for the sending orchestration, A_1. The first strange thing is it is not a partner orchestration we have to choose but an orchestration port. But the most strange thing is we have to choose exactly this orchestration and exactly this port.It is not a port from the partner, receive orchestrations, A_21 or A_22, but it is A_1 orchestration and S_SentFromA_1 port. Now we have to choose a Partner Orchestration parameter for the received orchestrations, A_21 and A_22. Nothing strange is here except a parameter name. We choose the port of the sender, A_1 orchestration and S_SentFromA_1 port. As you can see the Partner Orchestration parameter for the sender and receiver orchestrations is the same. Testing I dropped a test file in a file folder. There we go: A dropped file was received by B and by A_1 A_1 sent a message forward. A message was received by B, A_21, A_22 Let’s look at a context of a message sent by A_1 on the second step: A MessageType part. It is quite expected. A PartnerService, a ParnerPort, an Operation. All those parameters were set up in the Partner Orchestration parameter on both bound ports.     Now let’s see a subscription of the A_21 and A_22 orchestrations. Now it makes sense. That’s why we have chosen such a strange value for the Partner Orchestration parameter of the sending orchestration. Inverse Binding This sample has three orchestrations: A_11, A_12 and A_2. A_11 and A_12 are senders, A_2 is receiver. How to set up the ports? All ports involved in the message exchange should be the same port type. It forces us to use the same operation and the same message type for the bound ports. This step as absolutely contra-intuitive. We have to choose a Partner Orchestration parameter for a receiving orchestration, A_2. The first strange thing is it is not a partner orchestration we have to choose but an orchestration port. But the most strange thing is we have to choose exactly this orchestration and exactly this port.It is not a port from the partner, sent orchestrations, A_11 or A_12, but it is A_2 orchestration and R_SentToA_2 port. Now we have to choose a Partner Orchestration parameter for the sending orchestrations, A_11 and A_12. Nothing strange is here except a parameter name. We choose the port of the sender, A_2 orchestration and R_SentToA_2 port. Testing I dropped a test file in a file folder. There we go: A dropped file was received by B, A_11 and by A_12 A_11 and A_12 sent two messages forward. The messages were received by B, A_2 Let’s see what was a context of a message sent by A_1 on the second step: A MessageType part. It is quite expected. A PartnerService, a ParnerPort, an Operation. All those parameters were set up in the Partner Orchestration parameter on both bound ports. Here is a subscription of the A_2 orchestration. Models I had a hard time trying to explain the Partner Direct Ports in simple terms. I have finished with this model: Forward Binding Receivers know a Sender. Sender doesn’t know Receivers. Publishers know a Subscriber. Subscriber doesn’t know Publishers. 1 –> 1 1 –> M Inverse Binding Senders know a Receiver. Receiver doesn’t know Senders. Subscribers know a Publisher. Publisher doesn’t know Subscribers. 1 –> 1 M –> 1 Notes   Orchestration chain It’s worth to note, the Partner Direct Port Binding creates a chain opened from one side and closed from another. The Forward Binding: A new Receiver can be added at run-time. The Sender can not be changed without design-time changes in Receivers. The Inverse Binding: A new Sender can be added at run-time. The Receiver can not be changed without design-time changes in Senders.

    Read the article

  • Creating a DNS Server

    - by c.adhityaa
    OK, I am a complete newbie to all this, so please bear with me. I want to create a DNS Server (like Google does - 8.8.8.8). I understand that a DNS Server is a Server that gives a IP on being given a hostname, ie. when I ask it what is the IP of google.com, it says "64.233.160.0". So, what I want to do is create a similar one that holds records of what translates to what. I thought of this since it looks to be similar to a webserver - ask for a page and it gives back the page. That is, when my machine has the IP xxx.xxx.xxx.xxx and people chose xxx.xxx.xxx.xxx as their Primary DNS Server, then when they ask "www.google.com", I sould be able to tell "64.233.160.0". So, how do I create this DNS Server that is accessible to everyone in the world ? It would be easier if we have something like EasyPHP which is the analogue to a webserver here. I am sorry if I have caused any trauma because this might seem rubbish to experts ;) Adhityaa

    Read the article

  • IIS 8 Random 503 service unavailable

    - by Ivo
    We migrated a busy website to Windows Server 2012 with IIS 8. The website randomly gives the error "503 service unavailable" after an user presses F5 the error is gone again. The website is build in ASP.NET MVC 3. The website runs on one application pool, with default settings There are around 500 to 900 concurrent users on the website during the day, and the error happens more often when there are more 650 users. The CPU and the memory use on the server is stable. There is nothing about the 503 errors in the application log, the IIS log and the event log. Does anyone has any clue what the problem can be or how we can trace the the problem?

    Read the article

  • Logging Apache2 payload to evaluate SOAP message

    - by Phil
    I am trying to log webservice specific information with Apache (Apache acts as a load-balancer by use of mod_jk). For instance I want to know how long the responsetime of each webservice-call takes. To do this I definitely would need to know the name of the webservice-method in the log-file. As a matter of fact, the name of the webservice-method is wrapped in the SOAP-body, to which I have no access to with the default-configuration. Does anybody know an Apache module to extend the log-information? Or are there any other ideas to solve this challenge? Thx!

    Read the article

  • VirtualHost on WAMPSERVER not working

    - by Martin C
    I currently have WAMPSERVER 2.2 set up on my PC. I'm trying to set up a new host called pplocal.local I made the changes in httpd.conf to uncomment this: Include conf/extra/httpd-vhosts.conf Then, I edited httpd-vhosts.cong and I added the following: NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "E:/wamp2/www/" ServerName localhost </VirtualHost> <VirtualHost 127.0.0.1> DocumentRoot "E:/wamp2/www/pp/" ServerName pplocal.local <Directory "E:/wamp2/www/pp/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> CustomLog "E:\wamp2\logs\pplocal-access.log" common ErrorLog "E:\wamp2\logs\pplocal-error.log" Im my windows 'hosts' file I added: 127.0.0.1 localhost 127.0.0.1 pplocal.local Then, I restarted apache. If I type localhost in my browser I get the files at E:/wamp2/www/ If I type pplocal.local in my browser I get the files at E:/wam2/www/ instead of those at E:/wamp2/www/pp/ I have followed several tutorials and can't see what I'm doing wrong. I'm new to editing the files associated with apache so any advice is appreciated. Thanks

    Read the article

  • Linux policy routing - packets not coming back

    - by Bugsik
    i am trying to set up policy routing on my home server. My network looks like this: Host routed VPN gateway Internet link through VPN 192.168.0.35/24 ---> 192.168.0.5/24 ---> 192.168.0.1 DSL router 10.200.2.235/22 .... .... 10.200.0.1 VPN server The traffic from 192.168.0.32/27 should be and is routed through VPN. I wanted to define some routing policies to route some traffic from 192.168.0.5 through VPN as well - for start - from user with uid 2000. Policy routing is done using iptables mark target and ip rule fwmark. The problem: When connecting using user 2000 from 192.168.0.5 tcpdump shows outgoing packets, but nothing comes back. Traffic from 192.168.0.35 works fine (here I am not using fwmark but src policy). Here is my VPN gateway setup: # uname -a Linux placebo 3.2.0-34-generic #53-Ubuntu SMP Thu Nov 15 10:49:02 UTC 2012 i686 i686 i386 GNU/Linux # iptables -V iptables v1.4.12 # ip -V ip utility, iproute2-ss111117 IPtables rules (all policies in table filter are ACCEPT) # iptables -t mangle -nvL Chain PREROUTING (policy ACCEPT 770K packets, 314M bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 767K packets, 312M bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5520 packets, 1920K bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 782K packets, 901M bytes) pkts bytes target prot opt in out source destination 74 4707 MARK all -- * * 0.0.0.0/0 0.0.0.0/0 owner UID match 2000 MARK set 0x3 Chain POSTROUTING (policy ACCEPT 788K packets, 903M bytes) pkts bytes target prot opt in out source destination # iptables -t nat -nvL Chain PREROUTING (policy ACCEPT 996 packets, 51172 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 7 packets, 432 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 1364 packets, 112K bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 2302 packets, 160K bytes) pkts bytes target prot opt in out source destination 119 7588 MASQUERADE all -- * vpn 0.0.0.0/0 0.0.0.0/0 Routing: # ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master lan state UNKNOWN qlen 1000 link/ether 00:40:63:f9:c3:8f brd ff:ff:ff:ff:ff:ff valid_lft forever preferred_lft forever 3: lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:40:63:f9:c3:8f brd ff:ff:ff:ff:ff:ff inet 192.168.0.5/24 brd 192.168.0.255 scope global lan inet6 fe80::240:63ff:fef9:c38f/64 scope link valid_lft forever preferred_lft forever 4: vpn: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 100 link/none inet 10.200.2.235/22 brd 10.200.3.255 scope global vpn # ip rule show 0: from all lookup local 32764: from all fwmark 0x3 lookup VPN 32765: from 192.168.0.32/27 lookup VPN 32766: from all lookup main 32767: from all lookup default # ip route show table VPN default via 10.200.0.1 dev vpn 10.200.0.0/22 dev vpn proto kernel scope link src 10.200.2.235 192.168.0.0/24 dev lan proto kernel scope link src 192.168.0.5 # ip route show default via 192.168.0.1 dev lan metric 100 10.200.0.0/22 dev vpn proto kernel scope link src 10.200.2.235 192.168.0.0/24 dev lan proto kernel scope link src 192.168.0.5 TCP dump showing no traffic coming back when connection is made from 192.168.0.5 user 2000 # tcpdump -i vpn tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on vpn, link-type RAW (Raw IP), capture size 65535 bytes ### Traffic from user 2000 on 192.168.0.5 ### 10:19:05.629985 IP 10.200.2.235.37291 > 10.100-78-194.akamai.com.http: Flags [S], seq 2868799562, win 14600, options [mss 1460,sackOK,TS val 6887764 ecr 0,nop,wscale 4], length 0 10:19:21.678001 IP 10.200.2.235.37291 > 10.100-78-194.akamai.com.http: Flags [S], seq 2868799562, win 14600, options [mss 1460,sackOK,TS val 6891776 ecr 0,nop,wscale 4], length 0 ### Traffic from 192.168.0.35 ### 10:23:12.066174 IP 10.200.2.235.49247 > 10.100-78-194.akamai.com.http: Flags [S], seq 2294159276, win 65535, options [mss 1460,nop,wscale 4,nop,nop,TS val 557451322 ecr 0,sackOK,eol], length 0 10:23:12.265640 IP 10.100-78-194.akamai.com.http > 10.200.2.235.49247: Flags [S.], seq 2521908813, ack 2294159277, win 14480, options [mss 1367,sackOK,TS val 388565772 ecr 557451322,nop,wscale 1], length 0 10:23:12.276573 IP 10.200.2.235.49247 > 10.100-78-194.akamai.com.http: Flags [.], ack 1, win 8214, options [nop,nop,TS val 557451534 ecr 388565772], length 0 10:23:12.293030 IP 10.200.2.235.49247 > 10.100-78-194.akamai.com.http: Flags [P.], seq 1:480, ack 1, win 8214, options [nop,nop,TS val 557451552 ecr 388565772], length 479 10:23:12.574773 IP 10.100-78-194.akamai.com.http > 10.200.2.235.49247: Flags [.], ack 480, win 7776, options [nop,nop,TS val 388566081 ecr 557451552], length 0

    Read the article

  • using nginx with proxy_pass on a subdomain

    - by marcus3006
    a have a rails app that should listen on the subdomain redmine.example.com (using proxy_pass). all other requests for *.example.com should just redirect to a normal index.html. Here is my configuration: server { server_name www.example.com example.com; root /home/deploy/static/example; } upstream redmine { server unix:/tmp/redmine.socket fail_timeout=0; } server { # you could put a list of other domain names this application answers server_name redmine.example.com; root /home/deploy/rails/redmine/public; access_log /var/log/nginx/redmine_access.log; rewrite_log on; location * { proxy_pass http://redmine; } location ~ ^/(assets)/ { root /home/deploy/rails/redmine/public; gzip_static on; # to serve pre-gzipped version expires max; add_header Cache-Control public; } } anyone knows what's going wrong here? requests to example.com and www.example.com are handled correctly. when i try to acces redmine.example.com = "couldn't resolve host"

    Read the article

  • Apache Bench reports different result with same page

    - by Aspis
    I'm running into a little problem base-lining an Apache2/fcgi/php-fpm server I am setting up. 1) If I run: ab -n 15000 http://mysite.com/index.php. Apache Bench returns Time per request: 41ms but document length: 0 bytes and html transferred: 0 bytes. The Transfer rate: 7.9Kb/s. 2) If I run: ab -n 15000 http://mysite.com/ Apache Bench returns Time per request: 83ms along with the accurate document length and html transferred total. The APC cache status reports identical hit counts from both test. Also Apache Bench reports no errors in either case. Overall, no errors on any test sites and all logs are clean, etc. DocumentRoot is set to index.php so I would expect both of these test runs to produced a similar result. My 2 question(s) are: 1) why the discrepancy? 2) which is the correct result? I've seen plenty of results like test 1 posted (with out question) but frankly from my own experience and those of others, accurate testing is hard to come by. Even with out goofy issues like this.

    Read the article

  • How to check that all ZFS snapshots within a pool are without holds before destroying that pool

    - by Graham Perrin
    Question Already I can check each snapshot of a filesystem individually, manually. I would prefer to check all at once (all with a single command or script). Please: can that be done with a script? Background From the man page for zfs(8): zfs holds [-H] [-r] snapshot… … -r Specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems. I wondered whether recent snapshots are treated as descendants of older snapshot. No: Last login: Sat Dec 8 09:02:26 on ttys003 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-12-08-081957 NAME TAG TIMESTAMP macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255 NAME TAG TIMESTAMP gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012 macbookpro08-centrim:~ gjp22$ zfs hold experiment gjp22@2012-12-08-081957 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255 NAME TAG TIMESTAMP gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-12-08-081957 NAME TAG TIMESTAMP gjp22@2012-12-08-081957 experiment Sat Dec 8 9:04 2012 macbookpro08-centrim:~ gjp22$ zfs holds -r gjp22@2012-10-28-212255 NAME TAG TIMESTAMP gjp22@2012-10-28-212255 problem with LocalStorage for WOT for Safari Mon Oct 29 6:44 2012 macbookpro08-centrim:~ gjp22$

    Read the article

  • upgraded php to 5.3.19 and memcached stopped working

    - by Andrey
    I have a server with centos 6.3 and cPanel After the upgrade from php 5.3.16 to php 5.3.19 my site stopped working. When I try to execute an index.php manually I'm receiving the following error. php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20090626/memcached.so: undefined symbol: memcached_last_error_errno Reinstalled memcached and memcache via pecl and manually but not helped. What is causing this problem and how to fix it ?

    Read the article

  • how're routing tables populated?

    - by Robbie Mckennie
    i've been reading "tcp/ip illustrated" and i started reading about ip forwarding. all about how you can receive a datagram and work out where to send it next based on the desination ip and your routing table. but what confused me is how (in a home network setting) the table itself is populated. is there a lower layer protocol at work here? does it come along with dhcp? or is it simply based on the ip address and netmask of each interface? i do know (from other books) that in the early days of ethernet one had to set up routing tables by hand, but i know i didn't do that.

    Read the article

  • end_request: I/O error, dev sda, sector xxxxxxxxx

    - by muruga
    I have a IBM server. This server contains 3 hard disk with RAID 5. It was working fine earlier. Unfortunately this machine got the following error message. After that I have rebooted the systems. After that I am getting the following error message in kern.log and demsg kernel: [65896.678870] end_request: I/O error, dev sda, sector 17430271 kernel: [69263.783957] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK : [69263.783957] sd 0:0:0:0: [sda] Sense Key : Hardware Error [current] kernel: [69263.783957] sd 0:0:0:0: [sda] Add. Sense: Internal target failure Whether it is kernel problem or hard disk problem or Raid problem

    Read the article

  • Email notification and mail server

    - by Jerr Wu
    I am building a web application with email notification just like Facebook, which will host in http://www.linode.com/. When a user A comment to a post, the poster will get an email notification from '[email protected]' with the comment message written by user A. (Not spam) I really like Google Apps but they have sending limits 2000 sending per day, that is not suit for my case becuz I cannot have sending limits. There will be many email notifications. http://support.google.com/a/bin/answer.py?hl=en&answer=166852 I also need company email accounts for team members use which I prefer Google Apps. My web application will host in linode, I am considering "Amazon Simple Notification Service" for the email notification. My questions are Any other recommend email service provider suits my case for me? Can I bind company email accounts(ex: [email protected]) with Google Apps and bind [email protected] with other email service provider?

    Read the article

  • HAProxy MySQL Failover is not starting

    - by thiesdiggity
    I am trying to setup HAProxy with MySQL failover with Ubuntu. I used a setup similar to this serverfault question, however I am getting the following error when starting haproxy: [ALERT] 341/220001 (17405) : parsing [/etc/haproxy/haproxy.cfg:29] : unknown option 'mysql-check'. [ALERT] 341/220001 (17405) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg [ALERT] 341/220001 (17405) : Fatal errors found in configuration. I even tried installing the lastest version of HAProxy (1.4.22). Does anyone know how to fix this? I have Google'd the heck out of it and can't find any solution. Thanks for your time!

    Read the article

  • Public static ip for vagrant box

    - by Numbata
    I have server (Debian Squeeze) with 1 ethernet card and 2 public static IPs (188.120.245.4 and 188.120.244.5). What I want: Setup virtual box (Ubuntu) with access via static IP (188.120.244.5). What I was trying: config.vm.forward_port - good idea: setup interface "eth1:1" with 188.120.244.5 on host-machine, and add to Vagrant file "config.vm.forward_port = hmm..?" config.vm.network :hostonly, "188.120.244.5" - not working. Was created new interface on host-machine with ip "188.120.244.1". Of course 188.120.244.1 IP isn't mine and I can't access my server via this IP. config.vm.network :bridged - I'm confused how this works :) What I have now: Not working configuration. Debian-host-machine# cat Vagrantfile Vagrant::Config.run do |config| config.vm.define :gitlab do |box_config| box_config.vm.box = "ubuntu" box_config.vm.host_name = "ubuntu" box_config.vm.network :bridged box_config.vm.network :hostonly, "188.120.244.5", :auto_config => false end end Debian-host-machine# ifconfig eth1 Link encap:Ethernet HWaddr 00:15:17:69:71:bb inet addr:188.120.245.4 Bcast:188.120.247.255 Mask:255.255.248.0 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00 inet addr:188.120.244.1 Bcast:188.120.246.255 Mask:255.255.255.0 Ubuntu-virtual-machine# ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:ee:8d:0c inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 eth1 Link encap:Ethernet HWaddr 08:00:27:45:71:87 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 How I can access virtual box via public static IP from network? I'm using Oracle VM VirtualBox Manager 4.1.18 and Vagrant version 1.0.3. Thanks in advance for your feedback.

    Read the article

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