w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
update running balance using hibernate in multiuser environment
Since the entities representing the table rows are independent of each other, hibernate can not know that the calculation of the balance is based on outdated data. Solution 1 (by far my preferred one): Calculate the balance in the db (using triggers) and mark the balance attribute as @Generated(value = GenerationTime.ALWAYS) so that the entity will be updated after a write. Hibernate and database will take care of the rest. If you have to do the balance calculation on the application level multiple solutions with some drawbacks come to mind: Solution 2: Don't use user transactions to commit multi-user dependent data. Create something (e.g. some queuing mechanism) to serialize the save requests. Do the processing in a user independent transaction. Drawback: The user won't see th

Categories : Java

Amazon web service load balancer unable to balance the load equally
There could be a number of reasons for this. Its without doing more digging, its hard to know which one you are experiencing. Sticky sessions can result in instances traffic becoming unbalanced. Although this depends heavily on usage patterns and your application. Cached DNS resolution. Part of how the ELB works is to direct traffic round robin on a DNS level. If a large number of users are all using the same DNS system provided by an ISP, they might all get sent to the same zone. Couple this with sticky sessions and you will end up with a bunch of traffic that will never switch. Using Route 53 with ALIAS records may reduce this somewhat. If you can't get the ELB to balance your traffic better, you can set up something similar with vanish cache or other software load balancer. Not as c

Categories : Amazon

Error in if statement for setting balance
console.log("Your balance is (balance - 5.00)."); should be console.log("Your balance is %s.", (balance - 5.00)); The former will just say "Your balance is (balance - 5.00)" because JavaScript does not treat words like "balance" as variable references when they appear inside a string literal. In the second, the message format string is distinct from the expression you want to display, and console.log replaces %s sequences with the other arguments.

Categories : Javascript

How can you adjust white balance setting for a custom iOS Camera App?
I haven't been able to find any info on setting the camera's white balance (though I don't know for sure that it's not possible). But, you can always post-process with the white balance Core Image filter (aka CIWhitePointAdjust). You can read about applying Core Image filters here.

Categories : IOS

Load Balance wso2 ESB
You can add following parameter to http and https transport receivers of WSO2 ESB . <parameter name="WSDLEPRPrefix" locked="false">[load-balancer-url]</parameter> For example: <parameter name="WSDLEPRPrefix" locked="false">http://esb.cloud-test.wso2.com:8280</parameter> You need to edit following file. <WSO2-ESB-HOME>repository/conf/axis2/axis2.xml This step is necessary for configuring WSO2 ELB also. See following ELB doc for more information. http://docs.wso2.org/wiki/pages/viewpage.action?pageId=26839403

Categories : Wso2

Load Balance: Node.js - Socket.io - Redis
Redis only syncs from the master to the slaves. It never syncs from the slaves to the master. So, if you're writing to all 3 of your machines, then the only messages that will wind up synced across all three servers will be the ones hitting the master. This is why it looks like you're missing messages. More info here. Read only slave Since Redis 2.6 slaves support a read-only mode that is enabled by default. This behavior is controlled by the slave-read-only option in the redis.conf file, and can be enabled and disabled at runtime using CONFIG SET. Read only slaves will reject all the write commands, so that it is not possible to write to a slave because of a mistake. This does not mean that the feature is conceived to expose a slave instance to the internet or

Categories : Node Js

Azure Traffic Manager Load Balance Options
Traffic manager comes into picture only when your application is deployed across multiple cloud services within same data center or in different data centers. If your application is hosted in a single cloud service (with multiple instances of course) , then the instances are load balanced using Round Robin pattern. This is the default load balancing pattern and comes to you without any extra charge. You can read more about traffic manager here: https://azure.microsoft.com/en-us/documentation/articles/traffic-manager-overview/

Categories : Azure

Azure windows virtual machine load balance
You need both the virtual machines to be under the same cloud service. Only then you get the option to load balance them. There is no way add existing VMs to the same network. there are operations in the Service management API (usable through powershell) to create a new VM. You can use that to create a fresh VM from your existing image and connect it to the same service as your first VM. Then you'llhave the necessary options enabled for load balancing.

Categories : Azure

Why doesn't Nginx load balancing balance bandwidth?
It sounds like the configuration is doing exactly what you asked it to do. You configured a proxy on the first server IP, right? So data has to go from the user to the proxy, then to the server, then the reply from the server back to the proxy and then to the user. It's triple because the first server sees three flows (both servers' output from the proxy and the second server's input to the proxy) while the second server sees one (its output to the proxy). It is perfectly balancing the traffic into equal flows, the first server just sees three flows and the second just one. As for how you fix it, it depends what's wrong with it and what you're trying to accomplish, which you haven't told us.

Categories : Nginx

Does SQL Server Service Broker load balance when External Activator is used?
To utilise the built-in load balancing you would need to deploy the service to more than one sql server instance. I suspect that isn't quite what you are planning, so you will have to come up with a custom method, such as having an internal activated procedure that forwards your arriving messages into one of your four queues that the external activation processes look at.

Categories : Sql Server

how to internally load balance multiple instances of web/worker roles in Azure?
There is no internal load balancer in Windows Azure. The only load balancer is the one that has the public IP Addresses. If you want to load balance only internal addresses (workers) you have to maintain it yourself. Meaning you have to install some kind of a load balancer on Azure VM, which is part of the same VNet. That load balancer may be of your choice (Windows or Linux). And you have to implement a watchdog service for when topology changes - i.e. workers are being recycled, hardware failure, scaling events. I would not recommend this approach unless this is absolutely necessary. Last option is to have a (cached) pool of IP Endpints of all the workers and randomly chose one when you need.

Categories : Asp Net

Setting SSRS Tablix Minimum Height
There isn't an easy way of doing that but you can create empty rows outside the groups of the tablix and then hide them (using the Row Visibility property) if the data in your dataset contains a certain number of rows.

Categories : Reporting Services

setting up VFP IDE environment for debugging
If the main program is setting the environment, you will likely be overwriting some of the settings by not using the ADDITIVE keyword. In your example, it looks like this is the case for SET PATH and SET CLASSLIB. Example One - without ADDITIVE *--- Main program SET PATH TO "C:VFP9" *--- Debug setup SET PATH TO "D:Debug" ?set('Path') Output: D:Debug Example Two - with ADDITIVE *--- Main program SET PATH TO "C:VFP9" *--- Debug setup SET PATH TO "D:Debug" ADDITIVE ?set('Path') Output: D:Debug;C:VFP9

Categories : Debugging

Setting up my Java Environment. Jar/CLASSPATH
1) How do I know what my CLASSPATH is? It is a system environment variable. On UNIX/Linux, you type "echo $CLASSPATH" to see what it is set to. 2) In the first statement, I have written the complete address of the folder it is in. Even then it wont find it? Does my project has to be pointed by CLASSPATH only? That is a package name. It tells Java where to look within the classpath. Normally, the package name doesn't match the absolute path of the file. For example, suppose I have a class located on my file system /user/local/com/stackoverflow/foo. Java needs the classpath set to /usr/local so it knows where to look for the class. Similarly, the file might be in the jar and the classpath says were to look in the jar. 3) Say my CLASSPATH points to Desktop [i.e. I set

Categories : Java

Setting up virtual environment in PyCharm
In settings, under the Project section (in the left pane) go to Interpreters. From there you can select a found environment or click the + to add your own from a path. Find the environment you created and add it to the list. Then, once you select the environment you can see the installed modules underneath. You can add new modules through their built in pip. After that, it'll take you to the first page where you have to select your custom environment from a drop down. Good luck! Edit: Reread your question. Sometimes when I can't get the module to be recognized in PyCharm, I do a pip install through the command line in the virtual environment. Then restart PyCharm. Navigate to the environment in cmd and run python -m pip install -U SOUNDCLOUD_MODULE and it'll work.

Categories : Python

Setting environment variables Linux
I think the other simple round about can the changing the user of the TOMCAT. Set it to the root user. This will be useful only if you have set correct path and tomcat is working properly with root user. I also dont know if this is recommended or not.

Categories : Java

Setting up a developing environment with appfog
If you are already using a hosted database service for your app, then you can use the same database on both local and production servers. There are many binds available on AppFog. But if you are going with SQLite, you should consider using a persistent database solution. It is not recommended on production environment in AppFog. Every time you update your app, your SQLite database will be blown away. Since AppFog databases are not externally accessible, you'll have to tunnel into them. You will find more information here: http://blog.appfog.com/how-to-manage-your-appfog-database-from-your-desktop-on-the-other-side-of-the-world/

Categories : Database

Setting environment variable using .htaccess
Check that the htaccess is being read at all, make sure you've configured your host so that it allows (at the very least) "FILEINFO", or better yet, set it to "ALL" AllowOverride ALL If not, make sure your mod_env module is being loaded in your server config. Make sure you're looking in the right place. Apache internal environment variables are passed along to php via the $_SERVER[] array (on the phpinfo() page, under Apache Environment) and they are different from php runtime environment variables.(which are under Environment),

Categories : PHP

installing tomcat and setting environment variables
Go to file --> New --> Other. In that windows, there is an option like Show all wizards. Check that box and then try to find Dynamic web project under Web menu.

Categories : Java

Setting environment specific htaccess rules
No there isn't any way to set those things via some url detection. You can't make normal if conditions surrounding some of the things you want (AddType SetHandlers and ErrorDocument). You could use env variables and mod rewrite but I don't think you'll like the end result. You'll have to do something like this using env|E=[!]VAR[:VAL] syntax If you were in the httpd.conf or vhost file you might be able to separate your different setups by using <directory> sections </directory>. But Directory is not allowed in htaccess. Also I wouldn't do this in a production environment anyways since something could go wrong and I would think the detection is slower and not needed. Perhaps you may want to look into a build script you run to create/deploy your different setups for developmen

Categories : Htaccess

Having trouble setting an environment variable for apache on Mac
I do hope no one has wasted time looking at this issue. I have been caught out by a predecessor who set up an alias for apachectl in /etc/bashrc! It turns out I was not executing /usr/sbin/apachectl but, instead, /opt/local/apache2/bin/apachectl This script imports /opt/local/apache2/bin/envvars and not /usr/sbin/envvars. Nor does it use launchctl... the explains why none of my steps to set the environment worked. Once discovered I got it working straightaway. Sorry to have troubled you all.

Categories : Osx

Setting up development Environment for android mini PC
i solved it myself and solution goes like this :- Install driver for the rk30sdk using moborobo edit android_winusb.inf and add following line : %SingleAdbInterface% = USB_Install, USBVID_2207&PID_0006 %CompositeAdbInterface% = USB_Install, USBVID_2207&PID_0006&MI_01 %SingleAdbInterface% = USB_Install, USBVID_2207&PID_0010 %CompositeAdbInterface% = USB_Install, USBVID_2207&PID_0010&MI_01 in both Google.NTx86 and Google.NTamd64 area. add driver vendor ID to the "C:Users.androidadb_usb.ini" file. I did it and it WORKED!!! Here is it looks: ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT. USE 'android update adb' TO GENERATE. 1 USB VENDOR ID PER LINE. 0x2207 MiniPC driver

Categories : Android

Setting AIR_ANDROID_SDK_HOME environment variable for Flash Builder / ADT
On Windows 7 (others might be slightly different, but the general idea is the same) it is: Start, right click on Computer, then Properties, then Advanced System Settings, Environment Variables. There, you click 'New' and enter variable name (AIR_ANDROID_SDK_HOME) and value (full path to the directory).

Categories : Android

Environment variable is not set on terminal session after setting it with "os" package
When a new process is created, the environment of the parent process is copied. Changes to the environment in the new process do not affect the parent process. You would have to have your program start a shell after modifying the environment.

Categories : Go

Why Laravel uses wrong database file after setting environment?
If you are trying to use artisan in your terminal and you want to set the environment variable once and for all, you can do : export APPLICATION_ENV=local And check you current environment using php artisan env

Categories : Laravel

Setting up a WingIDE environment for python scripting for MCEdit
If you are running MCEdit from sources you can probably set up a Wing project with mcedit.py as the main debug file and just debug the whole thing, then you'll be able to set breakpoints, etc also in filters. Alternatively, you could copy wingdbstub.py from your Wing installation into the same directory as the filters and add 'import wingdbstub' to start debugging when the filter is run. You will need to click on the bug in lower left of Wing's main window to Enable Passive Listen (or "Accept Debug Connections" in Wing 5+). You may want to set kEmbedded=True in wingdbstub.py (if Wing drops the debug connection after the filter is used once, this indicates the filters are invoked in a way that requires this flag to be set). If you still run into problems w/ dropped debugger connections

Categories : Python

Setting an environment variable with visual basic 2010
By default, the environment variable is only set for the current process (and inherited in any child processes that spawn from it). You're probably looking for the overload which lets you specify an EnvironmentVariableTarget (either Machine or User for your case).

Categories : Vb.Net

Why NetBeans' environment variable does not confirm to the system's setting?
The env variable is set in any bash window you might open up, but it is not set any other way. It seems you will have to resort to desperate measures to get this environment variable set up, which entails setting the variable from the command line and then starting NetBeans from the command line. I can't think of any other way.

Categories : Java

(Spring + JSP + jQuery-AJAX + JSON ) setting environment for UTF-8 issue?
I would try some debugging in the browser. Use some developer tools in your browser (Developer Tools in Chrome, Firebug extension for Firefox or any other such tool in any other browser) and try to check HTTP response you are getting for your ajax - check if HTTP headers are correctly set (utf8 encoding, etc.) and maybe if ypur special characters are displayed correctly there - so you can see, if you are getting correct answer from the server. BTW - I dont see any error in code you posted, everything looks good. Just double check, that page on that you are displaying response with ajax, has utf8 encoding set...

Categories : Java

Setting Django secret key in environment variable fails due to special character
Surround the string with single or double quotes. For longer strings (more than one line), you can use single or double quotes in sets of three. For more information and examples, refer to http://docs.python.org/release/2.5.2/ref/strings.html.

Categories : Django

Setting up a java/j2ee development environment with: Eclipse, Tomcat and Vagrant
What files/folders am I supposed to share? (not the whole eclipse workspace I suppose) IMHO, share the project you are working on is enough. This way you may have one VM for each project. You have two options to generate the war: build on host; build on VM (preferred). If you choose Option 1: Since your project folder is shared with VM, you can copy the war to $CATALINA_HOME/webapps once you ssh to VM. I would suggest Option 2 because you could keep the build environment as close to your production environment as possible. Am I better off using a exploded or a normal war archive? I would use normal war archive, but there's not much difference here. How do I configure Eclipse (which lives on the host) to see the remote Tomcat (the one that lives on the guest). You have two opt

Categories : Eclipse

some environment variables not load under certain circumstances
Use /etc/environment for now and restart your LMDE session. Gnome sources the environment from ~/.gnomerc or something, and I imagine LMDE has an equivalent too, but for now /etc/environment should work for you.

Categories : Linux

How to load Bootstrap scripts in environment that might have them already?
Use RequireJS to load in your own scripts and wrap them with some closure. // let's say tooltip was defined already $.fn.tooltip = function(data){ $(this).mouseover(function(){ console.log(data.title); }); }; // we'll apply the old tooltip to .tooltip1 $('.tooltip1').tooltip({ title: 'tada', placement: 'bottom' }); // what version of jquery did we have out here console.log($.fn.jquery); require({ "paths": { "jquery": "//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min", "bootstrap": "//twitter.github.io/bootstrap/assets/js/bootstrap.min" }, shim: { "bootstrap": { deps: ['jquery'], exports: '$.fn.tooltip' } } }, ['jquery', 'bootstrap'], function($){ // what version of jquery do we have

Categories : Javascript

BASH: setting an environment variable from within my script doesn't set it anywhere else - how can I export globally? Simple example within
Instead you should try the following : PROMPT>. ./init Notice the extra dot . and the space between ./init. That is important. It is similar to source init.

Categories : Bash

Setting development environment flag and eliminating debug code when deploying to production
This question is not specific to Sublime Text at all, or any text editor, but a generic question how to preprocess and debug (JavaScript) source code. First, the easiest approach would be have some kind of global debug flag in your codebase. window.DEBUG = true; function log(a, b, c, d) { if(DEBUG) { console.log(a, b, c, d); } } if(DEBUG) { // Do dev stuff } else { // Do produection stuff } log("foobar") // Does not need to be wrapper, as log() itself is functional only in debug mode You can set the debug flag depending on your URL: if(window.location.href.indexOf("localhost") >= 0) { window.DEBUG = true; } When you deploy your JavaScript to production, you usually run it through minimizing and bundling tool. One popul

Categories : Javascript

Automated Deployment to an F5 Load Balanced Environment
I haven't used it, but have you looked at the F5 iControl web service API and the F5 iControl PowerShell cmdlets provided by F5. The PowerShell cmdlets have been around since 2007 and can be downloaded from F5 DevCentral. It looks like there are Enable-Member and Disable-Member cmdlets that you'll be able to use.

Categories : Dotnet

Load codeigniter environment to a javascript file
CI relies on the bootstrap system/core/CodeIgniter.php to kick off the application.. There isn't a magic file that you can include that will give you access to the functions.. Solution 1: The best solution for your base_url problem is to add a base tag as described by Phil Sturgeon.. <base href="<?php echo base_url(); ?>"> Solution 2: define a js base_url in a view <script> var base_url = "<?php echo base_url(); ?>"; </script> In your js you would access it like.. $('#example').dataTable( { "bProcessing": true, "sAjaxSource": base_url }); What you are asking for: If you rely on CI functions in your js and css, then your approach should be revisited, nevertheless, here is a possible solution.. Create a controller application/controller

Categories : PHP

SpringNet load configuration file from environment variable?
Ok, after much research, it works! <object type="Spring.Objects.Factory.Config.VariablePlaceholderConfigurer, Spring.Core"> <property name="VariableSources"> <list> <object type="Spring.Objects.Factory.Config.EnvironmentVariableSource, Spring.Core"/> <object type="Spring.Objects.Factory.Config.PropertyFileVariableSource, Spring.Core"> <property name="Location" value="${root.config}/envars.properties" /> <property name="IgnoreMissingResources" value="false"/> </object> </list> </property> </object> path to property file depends upon the environment variable. Variables are replaced by the values obtained from the properties file. I

Categories : C#

Load user environment when executing process with execvp();
sudo has the additional option -H, which sets the $HOME variable. So you could try sudo -H -u user command instead of your su command line.

Categories : C++

Rake task failing to load :environment properly
In a nutshell, Rails doesn't eager load models (or anything else) when running rake tasks on Production. The simplest way to work with a model is to require it when you begin the rake task, and it should work as expected, in this case: # explicitly require model require 'application_wide_setting' It's possible to eager load the entire rails app with: Rails.application.eager_load! However, you may have issues with some initializers (ie. devise)

Categories : Ruby On Rails



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.