Search Results

Search found 841 results on 34 pages for 'balance'.

Page 12/34 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Scala always returning true....WHY?

    - by jhamm
    I am trying to learn Scala and am a newbie. I know that this is not optimal functional code and welcome any advice that anyone can give me, but I want to understand why I keep getting true for this function. def balance(chars: List[Char]): Boolean = { val newList = chars.filter(x => x.equals('(') || x.equals(')')); return countParams(newList, 0) } def countParams(xs: List[Char], y: Int): Boolean = { println(y + " right Here") if (y < 0) { println(y + " Here") return false } else { println(y + " Greater than 0") if (xs.size > 0) { println(xs.size + " this is the size") xs match { case xs if (xs.head.equals('(')) => countParams(xs.tail, y + 1) case xs if (xs.head.equals(')')) => countParams(xs.tail, y - 1) case xs => 0 } } } return true; } balance("()())))".toList) I know that I am hitting the false branch of my if statement, but it still returns true at the end of my function. Please help me understand. Thanks.

    Read the article

  • Why is this giving me an infinite loop?

    - by Chase Yuan
    I was going through a code used to calculate investments until it has doubled and I received an infinite loop that I can't seem to solve. Can anyone figure out why this is giving me an infinite loop? I've gone through myself but I can't seem to find the problem. The "period" referred is how many times per year the interest is compounded. double account = 0; //declares the variables to be used double base = 0; double interest = 0; double rate = 0; double result = 0; double times = 0; int years = 0; int j; System.out.println("This is a program that calculates interest."); Scanner kbReader = new Scanner(System.in); //enters in all data System.out.print("Enter account balance: "); account = kbReader.nextDouble(); System.out.print("Enter interest rate (as decimal): "); rate = kbReader.nextDouble(); System.out.println(" " + "Years to double" + " " + "Ending balance"); base = account; result = account; for (j=0; j<3; j++){ System.out.print("Enter period: "); times = kbReader.nextDouble(); while (account < base*2){ interest = account * rate / times; account = interest + base; years++; } account = (((int)(account * 100))/100.0); //results System.out.print(" " + i + " " + account + "\n"); account = result; } The code should ask for three "periods", or three different times the entered data is compounded per year (ex annually, monthly, daily etc.) Thanks a lot!

    Read the article

  • Doubt in switch case

    - by user302593
    Hi.. When i executes the following program it get the user input for account details and then print it correctly...But it cannot read the opt value(y/n)..it automatically calls again..i want to exit the program when i press n value... please help to solve this problem.. char opt; do { //Getting user input printf("\n Enter the Account Number:\n "); scanf("%d",&gAccNo_i); printf("\n Enter the Account Holder's Name:\n "); scanf("%s",gCustName_c); printf("\n Enter the Balance Amount:\n "); scanf("%f",&gBlncAmt_f); //Printing the inputted data. printf("\n Account Number : %d",gAccNo_i); printf("\n Customer Name : %s",gCustName_c); printf("\n Balance Amount : %f",gBlncAmt_f); printf("\n Do u want to wish to continue?(y/n)"); scanf("%c",&opt); }while(opt!='n');

    Read the article

  • Opensource Dns based incoming Load balancing ?

    - by sahil
    Hi, I am using Linkproof device for incoming load balancing based on which is based on dns. For example my linkprrof have 3 isp link.... it also act as a dns sevrer for my sites...so when someone connect me by using my dns name my linkprrof give them ip from 3 isp which ever is responding fast. so is there any same kind of open source solution for dns based incoming load balance is possible ??? sahil

    Read the article

  • Should I move to an Azure database?

    - by Mike Flynn
    I am currently using a database from an installed instance on my web server in a VM on Azure. I was thinking about moving it to an actual Azure Database so I could load balance the web server. Does the Azure database work the same way as a straight install? Will it cost more or the same since I am just moving to a new server? Basically looking for advantages and disadvantages. I am familiar with SQL Server Management Studio.

    Read the article

  • HAProxy - forward to a different web server based on URI

    - by Saggi Malachi
    I have an HTTP farm with the following configuration: listen webfarm 10.254.23.225:80 mode http balance roundrobin cookie SERVERID insert option httpclose option forwardfor option httpchk HEAD /check.txt HTTP/1.0 server webA 10.254.23.4:80 cookie A check server webB 10.248.23.128:80 cookie B check I would like to add some option which would forward all requests for a specific URI (i.e /special) to a 3rd web server. How should I do it?

    Read the article

  • iTunes mono play?

    - by Seth Glickman
    I've got a set of speakers, but one of them doesn't work. Is there any way to get iTunes to output to mono, but with both channels? I'm on Leopard, and going to System Preferences - Sound - Output and sliding the Balance all the way to one side doesn't help, as it doesn't combine the channels.

    Read the article

  • DBRD dual primary Heartbeat resource management

    - by Jon Skarpeteig
    I have the following setup: Two servers with DRBD running dual primary with OCFS2 Heartbeat with two virtual ips, one for each server Round robin DNS to load balance NFS across the two vIPs Shutting down Server1 for a period of time, cause Server2 to take over the vIP for failover. However, when Server1 returns - it takes over the designated vIP as soon as heartbeat gets connection again - even though the DRBD is running sync (and thus not up to date) How can I configure heartbeat to perform failback as soon as Server1 again is in sync with Server2 ? (And not before)

    Read the article

  • HAProxy + Percona XtraDB Cluster

    - by rottmanj
    I am attempting to setup HAproxy in conjunction with Percona XtraDB Cluster on a series of 3 EC2 instances. I have found a few tutorials online dealing with this specific issue, but I am a bit stuck. Both the Percona servers and the HAproxy servers are running ubuntu 12.04. The HAProxy version is 1.4.18, When I start HAProxy I get the following error: Server pxc-back/db01 is DOWN, reason: Socket error, check duration: 2ms. I am not really sure what the issue could be. I have verified the following: EC2 security groups ports are open Poured over my config files looking for issues. I currently do not see any. Ensured that xinetd was installed Ensured that I am using the correct ip address of the mysql server. Any help with this is greatly appreciated. Here are my current config Load Balancer /etc/haproxy/haproxy.cfg global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 4096 user haproxy group haproxy debug #quiet daemon defaults log global mode http option tcplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 frontend pxc-front bind 0.0.0.0:3307 mode tcp default_backend pxc-back frontend stats-front bind 0.0.0.0:22002 mode http default_backend stats-back backend pxc-back mode tcp balance leastconn option httpchk server db01 10.86.154.105:3306 check port 9200 inter 12000 rise 3 fall 3 backend stats-back mode http balance roundrobin stats uri /haproxy/stats MySql Server /etc/xinetd.d/mysqlchk # default: on # description: mysqlchk service mysqlchk { # this is a config for xinetd, place it in /etc/xinetd.d/ disable = no flags = REUSE socket_type = stream port = 9200 wait = no user = nobody server = /usr/bin/clustercheck log_on_failure += USERID #only_from = 0.0.0.0/0 # recommended to put the IPs that need # to connect exclusively (security purposes) per_source = UNLIMITED } MySql Server /etc/services Added the line mysqlchk 9200/tcp # mysqlchk MySql Server /usr/bin/clustercheck # GNU nano 2.2.6 File: /usr/bin/clustercheck #!/bin/bash # # Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly # # Author: Olaf van Zandwijk <[email protected]> # Documentation and download: https://github.com/olafz/percona-clustercheck # # Based on the original script from Unai Rodriguez # MYSQL_USERNAME="testuser" MYSQL_PASSWORD="" ERR_FILE="/dev/null" AVAILABLE_WHEN_DONOR=0 # # Perform the query to check the wsrep_local_state # WSREP_STATUS=`mysql --user=${MYSQL_USERNAME} --password=${MYSQL_PASSWORD} -e "SHOW STATUS LIKE 'wsrep_local_state';" 2>${ERR_FILE} | awk '{if (NR!=1){print $2}}' 2>${ERR_FILE}` if [[ "${WSREP_STATUS}" == "4" ]] || [[ "${WSREP_STATUS}" == "2" && ${AVAILABLE_WHEN_DONOR} == 1 ]] then # Percona XtraDB Cluster node local state is 'Synced' => return HTTP 200 /bin/echo -en "HTTP/1.1 200 OK\r\n" /bin/echo -en "Content-Type: text/plain\r\n" /bin/echo -en "\r\n" /bin/echo -en "Percona XtraDB Cluster Node is synced.\r\n" /bin/echo -en "\r\n" else # Percona XtraDB Cluster node local state is not 'Synced' => return HTTP 503 /bin/echo -en "HTTP/1.1 503 Service Unavailable\r\n" /bin/echo -en "Content-Type: text/plain\r\n" /bin/echo -en "\r\n" /bin/echo -en "Percona XtraDB Cluster Node is not synced.\r\n" /bin/echo -en "\r\n" fi

    Read the article

  • Load balancing application servers with Alteon 2424-SSL

    - by antispam
    We are having problems with load balancing configuration and we would like to clear the situation. We need to load balance among four JavaEE web application servers. The servers are configured as host1 port 7001 host1 port 7002 host2 port 7001 host2 port 7002 Do any of you know if it is possible with Nortel 2424-SSL application switch? Which would be the best configuration for it? (vips, ports, groups, services, ...) Thank you very much.

    Read the article

  • HAProxy causing delay

    - by user1221444
    I am trying to configure HAProxy to do load balancing for a custom webserver I created. Right now I am noticing an increasing delay with HAProxy as the size of the return message increases. For example, I ran four different tests, here are the results: Response 15kb through HAProxy: Avg. response time: .34 secs Transacation rate: 763 trans/sec Throughput: 11.08 MB/sec Response 2kb through HAProxy: Avg. response time: .08 secs Transaction rate: 1171 trans / sec Throughput: 2.51 MB/sec Response 15kb directly to server: Avg. response time: .11 sec Transaction rate: 1046 trans/sec throughput: 15.20 MB/sec Response 2kb directly to server: Avg. Response time: .05 secs Transaction rate: 1158 trans/sec Throughput: 2.48 MB/sec All transactions are HTTP requests. As you can see, there seems to be a much bigger difference between response times for when the response is bigger, than when it is smaller. I understand there will be a slight delay when using HAProxy. Not sure if it matters, but the test itself was run using siege. And during the test there was only one server behind the HAProxy(the same that was used in the direct to server tests). Here is my haproxy.config file: global log 127.0.0.1 local0 log 127.0.0.1 local1 notice maxconn 10000 user haproxy group haproxy daemon #debug defaults log global mode http option httplog option dontlognull retries 3 option redispatch option httpclose maxconn 10000 contimeout 10000 clitimeout 50000 srvtimeout 50000 balance roundrobin stats enable stats uri /stats listen lb1 10.1.10.26:80 maxconn 10000 server app1 10.1.10.200:8080 maxconn 5000 I couldn't find much in terms of options in this file that would help my problem. I have heard suggestions that I may have to adjust a few of my sysctl settings. I could not find a lot of information on this however, most documentation is for Linux 2.4 and 2.6 on the sysctl stuff, I am running 3.2(Ubuntu server 12.04), which seems to auto tuning, so I have no clue what I should or shouldn't be changing. Most settings changes I tried had no effect or a negative effect on performance. Just a notice, this is a very preliminary test, and my hope is that at deployment time, my HAProxy will be able to balance 10k-20k requests/sec to many servers, so if anyone could provide information to help me reach that goal, it would be much appreciated. Thank you very much for any information you can provide. And if you need anymore information from me please let me know, I will get you anything I can.

    Read the article

  • FTP Load Balancer on EC2

    - by inakiabt
    I need an EC2 instance to balance all incoming FTP connections to a list of FTP servers (EC2 instances too). This list will be changed dynamically due to the load of the FTP servers (launch a new FTP server when the FTP servers are overloaded or shutdown a FTP server when the load is low). What you recommend? a FTP proxy? DNS server? Load balancer? Note: The FTP servers must support Passive Mode

    Read the article

  • FTP Load Balancer

    - by inakiabt
    I need an EC2 instance to balance all incoming FTP connections to a list of FTP servers (EC2 instances too). This list will be changed dynamically due to the load of the FTP servers (launch a new FTP server when the FTP servers are overloaded or shutdown a FTP server when the load is low). What you recommend? a FTP proxy? DNS server? Load balancer? Note: The FTP servers must support Passive Mode

    Read the article

  • What is the best solution for ad blocking with FireFox and Explorer 8?

    - by Edward Tanguay
    What is the best way to block annoying ads but allow useful ads on Firefox and Explorer (8), basically I would like to: block animated flash ads block animated silverlight ads block animated gif ads allow subtle google ads and ads on e.g. StackOverflow which are graphics but often useful information allow flash in general allow silverlight in general allow animated gif in general What is the best way to strike this balance?

    Read the article

  • Load Balancing Linux Web Services and Change Config Without Restart

    - by Eric J.
    What options are available to load balance web service traffic on Linux with the ability to add or remove servers from the server pool without restarting the load balancer? This post: http://serverfault.com/questions/71437/mod-proxy-change-without-restart looks like a very promising way to switch between two servers, but I don't know enough about mod_proxy and mod_rewrite to understand how/if I can use an external file to specify the BalancerMember entries for a section. Are there other open source load balancers that support reconfiguration without restart?

    Read the article

  • Does anyone know of a program that can search database objects (i.e. StoredProcedures) for keywords?

    - by hcabnettek
    Hi All, Is there such a tool that would look through a group of stored procedures for source code keywords? A client has a lot of business logic coded into their database and I need to find where it is using certain strings of text? I.E. what procedure contains 'was applied to their balance', so I can refactor that out into business logic. Does anyone know of such a tool? perhaps something from Red-Gate? Thanks, ~ck in San Diego

    Read the article

  • haproxy backend default location

    - by magd1
    If you go to www.company.com, I want it to redirect to /something/something on my server, but the URL still shows www.company.com Is this possible in haproxy? backend new_marketing_server *** set default URL to /something/something*** mode http balance roundrobin timeout server 10m option httpclose server server1 10.86.151.142:80 minconn 32000 maxconn 3200 check port 80 inter 2000 server server2 10.122.13.189:80 minconn 32000 maxconn 3200 check port 80 inter 2000

    Read the article

  • Basic Weight Questions with HAProxy

    - by Kyle Brandt
    Do weights assigned to servers only effect the balance within that particular backend? When implementing weights for the first time, if I give all the servers in a backend the same number, would that be the same as before when there we no weights? How do I calculate just how much traffic I am shiffting by adjust weights by certain amounts. For example: server web1 10.10.10.10 weight 100 server web2 10.10.10.11 weight 100 server web3 10.10.10.12 weight 90 server web4 10.10.10.13 weight 90

    Read the article

  • Upcoming Webcast: “Supporting References” In Release 12 - SLA

    - by Oracle_EBS
    ADVISOR WEBCAST: “Supporting References” In Release 12 - SLAPRODUCT FAMILY: Receivables, Payables, General Ledger April 18, 2012 at 14:00 UK / 15:00 CET / 06:00 am Pacific / 7:00 am Mountain / 9:00 am Eastern "Supporting References” enables users to enter additional information for the “Journal Entry Header” and “Journal Entry Lines” that can be used for analytical purposes. This functionality was earlier known as “Analytical Criteria”. In 11i, additional data was interfaced to GL on the journals using “Descriptive Flexfields” whereas using this feature in R12, customers can create customized sources as ‘Supporting References’ and pass values into those sources from Subledgers like AP / AR / PA, etc. TOPICS WILL INCLUDE: Supporting References Business information about a subledger journal entry at the header or line level Establishing a subledger balance for a particular source value or combination of source values for a particular account To assist with reconciliation of account balances Financial and managerial analysis A short, live demonstration (only if applicable) and question and answer period will be included. Oracle Advisor Webcasts are dedicated to building your awareness around our products and services. This session does not replace offerings from Oracle Global Support Services. Current Schedule can be found on Note 740966.1 Post Presentation Recordings can be found on Note 740964.1

    Read the article

  • Look for Oracle at the 2010 ISM San Diego Conference

    - by [email protected]
    Oracle is sponsoring and exhibiting at ISM's 95th Annual International Supply Management Conference and Educational Exhibit on April 25th through 28th.   Be sure to catch our presentation with Hackett that explores how procurement can use payables to boost an organization's balance and income statements. Pierre Mitchell from Hackett will be sharing groundbreaking new research that identifies explicit links between a strategic approach to supplier payments and world-class performance.   If your organization can benefit from increased margin, improved working capital, greater efficiency, and reduced risk, then you can't afford to miss this session. We'll be presenting on Monday at 5:00pm in Exhibit  Hall D.       Some of Oracle's top talent will be available to answer your questions in booth number 527. It is a great opportunity to learn about Oracle's innovations for supplier management, spend classification, invoice automation, and On Demand delivery of procurement applications.  

    Read the article

  • IASA Kansas City to host discussion on Google Fiber Project in Kansas City

    - by Patrick Liekhus
    One of the groups that I am currently President of (IASA Kansas City) is hosting an event by Rachel Hack (Google Community Manager) about the Google Fiber Project in Kansas City.  The event will be hosted at Balance Point’s office off 92nd and Ward Parkway on the Missouri side of the state line.  If you are interested, please check out further details here and get registered.  It is after work hours from 6 to 8 PM on the night of November 29, 2011.  It is free to attend and open to anyone who gets registered.  Come one, come all and bring your friends. Thanks

    Read the article

  • TechDays 2010 Portugal - The Day After

    - by Ricardo Peres
    Well, TechDays 2010 Portugal is over, time for a balance. I really enjoyed being a speaker, although my presentation took a lot more time than it should, it was gratifying to see so many people staying until the end. Lots of subjects were left behind, though. My presentation is available at my SkyDrive, here. Soon I will place there the source code, too. I would like to know if you've been there, and, if so, what do you think of my presentation! Feel free to send your thoughts, whatever they are. On the other hand, I saw some really interesting presentations, to name a few, from Nuno Antunes, Nuno Godinho, Filipe Prezado, Nuno Silva and my friend André Lage. I also had the chance to finally meet Caio Proiete and Pedro Perfeito. Perhaps we'll meet again at TechDays Remix, who knows.

    Read the article

  • World Record Batch Rate on Oracle JD Edwards Consolidated Workload with SPARC T4-2

    - by Brian
    Oracle produced a World Record batch throughput for single system results on Oracle's JD Edwards EnterpriseOne Day-in-the-Life benchmark using Oracle's SPARC T4-2 server running Oracle Solaris Containers and consolidating JD Edwards EnterpriseOne, Oracle WebLogic servers and the Oracle Database 11g Release 2. The workload includes both online and batch workload. The SPARC T4-2 server delivered a result of 8,000 online users while concurrently executing a mix of JD Edwards EnterpriseOne Long and Short batch processes at 95.5 UBEs/min (Universal Batch Engines per minute). In order to obtain this record benchmark result, the JD Edwards EnterpriseOne, Oracle WebLogic and Oracle Database 11g Release 2 servers were executed each in separate Oracle Solaris Containers which enabled optimal system resources distribution and performance together with scalable and manageable virtualization. One SPARC T4-2 server running Oracle Solaris Containers and consolidating JD Edwards EnterpriseOne, Oracle WebLogic servers and the Oracle Database 11g Release 2 utilized only 55% of the available CPU power. The Oracle DB server in a Shared Server configuration allows for optimized CPU resource utilization and significant memory savings on the SPARC T4-2 server without sacrificing performance. This configuration with SPARC T4-2 server has achieved 33% more Users/core, 47% more UBEs/min and 78% more Users/rack unit than the IBM Power 770 server. The SPARC T4-2 server with 2 processors ran the JD Edwards "Day-in-the-Life" benchmark and supported 8,000 concurrent online users while concurrently executing mixed batch workloads at 95.5 UBEs per minute. The IBM Power 770 server with twice as many processors supported only 12,000 concurrent online users while concurrently executing mixed batch workloads at only 65 UBEs per minute. This benchmark demonstrates more than 2x cost savings by consolidating the complete solution in a single SPARC T4-2 server compared to earlier published results of 10,000 users and 67 UBEs per minute on two SPARC T4-2 and SPARC T4-1. The Oracle DB server used mirrored (RAID 1) volumes for the database providing high availability for the data without impacting performance. Performance Landscape JD Edwards EnterpriseOne Day in the Life (DIL) Benchmark Consolidated Online with Batch Workload System Rack Units BatchRate(UBEs/m) Online Users Users /Units Users /Core Version SPARC T4-2 (2 x SPARC T4, 2.85 GHz) 3 95.5 8,000 2,667 500 9.0.2 IBM Power 770 (4 x POWER7, 3.3 GHz, 32 cores) 8 65 12,000 1,500 375 9.0.2 Batch Rate (UBEs/m) — Batch transaction rate in UBEs per minute Configuration Summary Hardware Configuration: 1 x SPARC T4-2 server with 2 x SPARC T4 processors, 2.85 GHz 256 GB memory 4 x 300 GB 10K RPM SAS internal disk 2 x 300 GB internal SSD 2 x Sun Storage F5100 Flash Arrays Software Configuration: Oracle Solaris 10 Oracle Solaris Containers JD Edwards EnterpriseOne 9.0.2 JD Edwards EnterpriseOne Tools (8.98.4.2) Oracle WebLogic Server 11g (10.3.4) Oracle HTTP Server 11g Oracle Database 11g Release 2 (11.2.0.1) Benchmark Description JD Edwards EnterpriseOne is an integrated applications suite of Enterprise Resource Planning (ERP) software. Oracle offers 70 JD Edwards EnterpriseOne application modules to support a diverse set of business operations. Oracle's Day in the Life (DIL) kit is a suite of scripts that exercises most common transactions of JD Edwards EnterpriseOne applications, including business processes such as payroll, sales order, purchase order, work order, and manufacturing processes, such as ship confirmation. These are labeled by industry acronyms such as SCM, CRM, HCM, SRM and FMS. The kit's scripts execute transactions typical of a mid-sized manufacturing company. The workload consists of online transactions and the UBE – Universal Business Engine workload of 61 short and 4 long UBEs. LoadRunner runs the DIL workload, collects the user’s transactions response times and reports the key metric of Combined Weighted Average Transaction Response time. The UBE processes workload runs from the JD Enterprise Application server. Oracle's UBE processes come as three flavors: Short UBEs < 1 minute engage in Business Report and Summary Analysis, Mid UBEs > 1 minute create a large report of Account, Balance, and Full Address, Long UBEs > 2 minutes simulate Payroll, Sales Order, night only jobs. The UBE workload generates large numbers of PDF files reports and log files. The UBE Queues are categorized as the QBATCHD, a single threaded queue for large and medium UBEs, and the QPROCESS queue for short UBEs run concurrently. Oracle's UBE process performance metric is Number of Maximum Concurrent UBE processes at transaction rate, UBEs/minute. Key Points and Best Practices Two JD Edwards EnterpriseOne Application Servers, two Oracle WebLogic Servers 11g Release 1 coupled with two Oracle Web Tier HTTP server instances and one Oracle Database 11g Release 2 database on a single SPARC T4-2 server were hosted in separate Oracle Solaris Containers bound to four processor sets to demonstrate consolidation of multiple applications, web servers and the database with best resource utilizations. Interrupt fencing was configured on all Oracle Solaris Containers to channel the interrupts to processors other than the processor sets used for the JD Edwards Application server, Oracle WebLogic servers and the database server. A Oracle WebLogic vertical cluster was configured on each WebServer Container with twelve managed instances each to load balance users' requests and to provide the infrastructure that enables scaling to high number of users with ease of deployment and high availability. The database log writer was run in the real time RT class and bound to a processor set. The database redo logs were configured on the raw disk partitions. The Oracle Solaris Container running the Enterprise Application server completed 61 Short UBEs, 4 Long UBEs concurrently as the mixed size batch workload. The mixed size UBEs ran concurrently from the Enterprise Application server with the 8,000 online users driven by the LoadRunner. See Also SPARC T4-2 Server oracle.com OTN JD Edwards EnterpriseOne oracle.com OTN Oracle Solaris oracle.com OTN Oracle Database 11g Release 2 Enterprise Edition oracle.com OTN Oracle Fusion Middleware oracle.com OTN Disclosure Statement Copyright 2012, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Results as of 09/30/2012.

    Read the article

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