Search Results

Search found 480 results on 20 pages for 'exclusive'.

Page 8/20 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Can Java's random function be zero?

    - by ThirdD3gree
    Just out of curiosity, can Math.random() ever be zero? For example, if I were to have: while (true){ if (Math.random() == 0) return 1; } Would I ever actually get a return of one? There's also rounding error to consider because Math.random() returns a double. I ask because my CS professor stated that random() goes from 0 to 1 inclusive, and I always thought it was exclusive.

    Read the article

  • Can lazy loading be considered an example of RAII?

    - by codemonkey
    I have been catching up on my c++ lately, after a couple years of exclusive Objective-C on iOS, and the topic that comes up most on 'new style' c++ is RAII To make sure I understand RAII concept correctly, would you consider Objective-C lazy loading property accessors a type of RAII? For example, check the following access method - (NSArray *)items { if(_items==nil) { _items=[[NSArray alloc] initWithCapacity:10]; } return _items } Would this be considered an example of RAII? If not, can you please explain where I'm mistaken?

    Read the article

  • What happens to an ad hoc installed iPhone/iPad app when a new iTunes profile is synced against?

    - by user363100
    I'm currently involved in a project where a number of iPads loaded with a special app are given away to a number of people at a certain event. Both because of time constraints as well as our desire to give these people a really exclusive app, we decided to prepare these devices using ad hoc installs of the app. What will happen to the app when the recipients of the device decide to sync it with their existing iTunes account instead one of our "recipient x" accounts?

    Read the article

  • Is it good practice to use the XOR (^) operator in Java for boolean checks?

    - by Pete
    I personally like the 'exclusive or' operator when it makes sense in context of boolean checks because of its conciseness. I much prefer to write if (boolean1 ^ boolean2) { //do it } than if((boolean1 && !boolean2) || (boolean2 && !boolean1)) { //do it } but I often get confused looks (from other experienced java developers, not just the newbies), and sometimes comments about how it should only be used for bitwise operations. I'm curious as to the best practices others use around the '^' operator.

    Read the article

  • How to make RadioButtons Mutually excusive

    - by Gaddigesh
    I have 7 RadioButtons on a Form 3 of them belongs one group and 4 of them to other group I want the RadioButtons to be mutually exclusive within the group. This can be achieved by putting them in two GroupBoxes, Is there any way we can achieve this without putting them in a container like groupbox

    Read the article

  • cflock do not throw timeout for same url called in same browser

    - by Pritesh Patel
    I am trying lock block on page test.cfm and below is code written on page. <cfscript> writeOutput("Before lock at #now()#"); lock name="threadlock" timeout="3" type="exclusive" { writeOutput("<br/>started at #now()#"); thread action="sleep" duration="10000"; writeOutput("<br/>ended at #now()#"); } writeOutput("<br/>After lock at #now()#"); </cfscript> assuming my url for page is http://localhost.local/test.cfm and running it on browser in two different tabs. I was expecting one of the url will throw timeout error after 3 second since another url lock it atleast for 10 seconds due to thread sleep. Surprisingly I do not get any timeout error rather second page call run after 10 seconds as first call finish execution. But I am appending some url parameter (e.g. http://localhost.local/test.cfm?q=1) will throw error. Also I am calling same url in different browser then one of the call will throw timeout issue. Is lock based on session and url? Update Here is output for two different cases: Case 1: TAB1 Url: http://localhost.local/test/test.cfm Before lock at {ts '2013-10-18 09:21:35'} started at {ts '2013-10-18 09:21:35'} ended at {ts '2013-10-18 09:21:45'} After lock at {ts '2013-10-18 09:21:45'} TAB2 Url: http://localhost.local/test/test.cfm Before lock at {ts '2013-10-18 09:21:45'} started at {ts '2013-10-18 09:21:45'} ended at {ts '2013-10-18 09:21:55'} After lock at {ts '2013-10-18 09:21:55'} Case 2: TAB1 Url: http://localhost.local/test/test.cfm Before lock at {ts '2013-10-18 09:27:18'} started at {ts '2013-10-18 09:27:18'} ended at {ts '2013-10-18 09:27:28'} After lock at {ts '2013-10-18 09:27:28'} TAB2 Url: http://localhost.local/test/test.cfm? (Added ? at the end) Before lock at {ts '2013-10-18 09:27:20'} A timeout occurred while attempting to lock threadlock. The error occurred in C:/inetpub/wwwroot/test/test.cfm: line 13 11 : 12 : <cfoutput>Before lock at #now()#</cfoutput> 13 : <cflock name="threadlock" timeout="3" type="exclusive"> 14 : <cfoutput><br/>started at #now()#</cfoutput> 15 : <cfthread action="sleep" duration="10000"/> ... Result for case 2 as expected. For case 1, strange thing I just noticed is tab 2 output "Before lock at {ts '2013-10-18 09:21:45'} indicates that whole request start after 10 seconds (means after the complete execution of first tab) when I have fired it in second URL just after 2 seconds of first tabs.

    Read the article

  • controlling PDF inside safari using javascript

    - by neeks
    Please help about controlling PDFs through JavaScript loaded inside Safari. Safari uses a PDF plugin of its own something exclusive to Safari and not present in other webkit based browsers like Chrome. Any of the or js commands that would work with the Adobe's plugin don't seem to work. Any help / pointers would be appreciated.

    Read the article

  • combobox in j2me

    - by learn
    how can i keep the combobox on the form in j2me with out using frameworks? i have tried this but it is not showing any drop down for selection. ChoiceGroup CoursePOP = new ChoiceGroup ("Pop Up choice", Choice.EXCLUSIVE, new String[] {"Python", "J2ME","Symbian"}, null);

    Read the article

  • How to generate a random BigInteger value in Java?

    - by Bill the Lizard
    I need to generate arbitrarily large random integers in the range 0 (inclusive) to n (exclusive). My initial thought was to call nextDouble and multiply by n, but once n gets to be larger than 253, the results would no longer be uniformly distributed. BigInteger has the following constructor available: public BigInteger(int numBits, Random rnd) Constructs a randomly generated BigInteger, uniformly distributed over the range 0 to (2numBits - 1), inclusive. How can this be used to get a random value in the range 0 - n, where n is not a power of 2?

    Read the article

  • two threads going to do func()

    - by nisnis84
    2 threads going to use the same func(). The 2 threads should be mutually exclusive. How do I get it to work properly? (output should be "abcdeabcde") char arr[] = "ABCDE"; int len = 5; void func(){ for(int i = 0; i <len;i++) printf("%c,arr[i]); }

    Read the article

  • Is there any way to get the SHA of a commit from its message?

    - by Benjol
    When doing a git tag, I'm not always great at remembering if HEAD~6 (for example) is inclusive or exclusive. Given that most of my commits are prefixed with an issue number, I wondered if there is some magic command for searching for the commit SHA from part of its message. I know it's easy to do a git log and work from there, but I want more easy :)

    Read the article

  • Is there anyway to get the SHA of a commit from its message?

    - by Benjol
    When doing a git tag, I'm not always great at remembering if HEAD~6 (for example) is inclusive or exclusive. Given that most of my commits are prefixed with an issue number, I wondered if there is some magic command for searching for the commit SHA from part of its message. I know it's easy to do a git log and work from there, but I want more easy :)

    Read the article

  • Can Django be used for non web apps?

    - by Leeks and Leaks
    I noticed in the main Django introductin they show a feature that maps python objects to the database. This doesn't strike me as being mutually exclusive with with development, is there any reason why this can't be used for non web apps? Is it easy to separate out?

    Read the article

  • How to make database acces for multiple user acces?

    - by Yusan Susandi
    I have database acces(.mdb) for my application desktop(c#) like billing application, i want that database shared to open database by multiple user. Realy now i'm use that database in computer one that fine connection succesfully but when i'm try to open database in computer two i have error message like "database has open exclusive by other user or you not have permision" what i'm to do... Please anyone help me.. tanks. Regards, Yusan Susandi

    Read the article

  • RHCS: GFS2 in A/A cluster with common storage. Configuring GFS with rgmanager

    - by Pavel A
    I'm configuring a two node A/A cluster with a common storage attached via iSCSI, which uses GFS2 on top of clustered LVM. So far I have prepared a simple configuration, but am not sure which is the right way to configure gfs resource. Here is the rm section of /etc/cluster/cluster.conf: <rm> <failoverdomains> <failoverdomain name="node1" nofailback="0" ordered="0" restricted="1"> <failoverdomainnode name="rhc-n1"/> </failoverdomain> <failoverdomain name="node2" nofailback="0" ordered="0" restricted="1"> <failoverdomainnode name="rhc-n2"/> </failoverdomain> </failoverdomains> <resources> <script file="/etc/init.d/clvm" name="clvmd"/> <clusterfs name="gfs" fstype="gfs2" mountpoint="/mnt/gfs" device="/dev/vg-cs/lv-gfs"/> </resources> <service name="shared-storage-inst1" autostart="0" domain="node1" exclusive="0" recovery="restart"> <script ref="clvmd"> <clusterfs ref="gfs"/> </script> </service> <service name="shared-storage-inst2" autostart="0" domain="node2" exclusive="0" recovery="restart"> <script ref="clvmd"> <clusterfs ref="gfs"/> </script> </service> </rm> This is what I mean: when using clusterfs resource agent to handle GFS partition, it is not unmounted by default (unless force_unmount option is given). This way when I issue clusvcadm -s shared-storage-inst1 clvm is stopped, but GFS is not unmounted, so a node cannot alter LVM structure on shared storage anymore, but can still access data. And even though a node can do it quite safely (dlm is still running), this seems to be rather inappropriate to me, since clustat reports that the service on a particular node is stopped. Moreover if I later try to stop cman on that node, it will find a dlm locking, produced by GFS, and fail to stop. I could have simply added force_unmount="1", but I would like to know what is the reason behind the default behavior. Why is it not unmounted? Most of the examples out there silently use force_unmount="0", some don't, but none of them give any clue on how the decision was made. Apart from that I have found sample configurations, where people manage GFS partitions with gfs2 init script - https://alteeve.ca/w/2-Node_Red_Hat_KVM_Cluster_Tutorial#Defining_The_Resources or even as simply as just enabling services such as clvm and gfs2 to start automatically at boot (http://pbraun.nethence.com/doc/filesystems/gfs2.html), like: chkconfig gfs2 on If I understand the latest approach correctly, such cluster only controls whether nodes are still alive and can fence errant ones, but such cluster has no control over the status of its resources. I have some experience with Pacemaker and I'm used to that all resources are controlled by a cluster and an action can be taken when not only there are connectivity issues, but any of the resources misbehave. So, which is the right way for me to go: leave GFS partition mounted (any reasons to do so?) set force_unmount="1". Won't this break anything? Why this is not the default? use script resource <script file="/etc/init.d/gfs2" name="gfs"/> to manage GFS partition. start it at boot and don't include in cluster.conf (any reasons to do so?) This may be a sort of question that cannot be answered unambiguously, so it would be also of much value for me if you shared your experience or expressed your thoughts on the issue. How does for example /etc/cluster/cluster.conf look like when configuring gfs with Conga or ccs (they are not available to me since for now I have to use Ubuntu for the cluster)? Thanks you very much!

    Read the article

  • OTN Developer Days - Calgary, Alberta March 18 & Atlanta, GA April 1

    - by dana.singleterry
    Discover a Faster Way to Develop Ajax -Enabled Application Based on Java and SOA Standards Get Hands-on with Oracle Jdeveloper, Oracle Application Developer Framework and Oracle Fusion Middleware 11g. You are invited to attend Oracle Technology Network (OTN) Developer Day, a free, hands-on workshop that will give you insight into how to create Ajax-enabled rich Web user interfaces and Java EE-based SOA services with ease. We'll introduce you to the development platform Oracle is using for its Fusion enterprise applications, and show you how to get up to speed with it. The workshop will get you started developing with the latest versions of Oracle JDeveloper and Oracle ADF 11g, including the Ajax-enabled ADF Faces rich client components. Thursday, March 18, 2010 8:00 a.m. - 5:00 p.m. Calgary Marriott hotel 110 9th Avenue, SE Calgary, Alberta T2G 5A6 Wednesday, April 1, 2010 8:00 a.m. - 5:00 p.m. Four Seasons Hotel Atlanta 75 Fourteenth Street Atlanta, Georgia 30309 This workshop is designed for developers, project managers, and architects. Whether you are currently using Java, traditional 4GL tools like Oracle Forms, PeopleTools, and Visual Basic, or just looking for a better development platform - this session is for you. Get explanation from Oracle experts, try your hands at actual development, and get a chance to win an Apple iPod Touch and Oracle prizes. Come see how Oracle can help you deliver cutting edge UIs and standard -based applications faster with the Oracle Fusion Development software stack. At this event you will: * Get to know the Oracle Fusion development architecture and strategy from Oracle's experts. * Learn the easy way to extend your existing development skill sets to incorporate new technologies and architectures that include Service-Oriented Architecture, Java EE, and Web 2.0 * Participate in hands-on labs and experience new technologies in a familiar and productive development environment with Oracle experts guidance. Click on the Register Now Calgary, Alberta to register for the Calgary event and click on the Register Now Atlanta, GA to register for the Atlanta FREE events. Don't miss your exclusive opportunity to network with your peers and discuss today's most vital application development topics with Oracle experts.

    Read the article

  • Snow Leopard and SonicWall NetExtender VPN?

    - by Hank Gay
    I recently upgraded from Leopard to Snow Leopard, and now I'm having strange issues with a previously working NetExtender. After debugging a "can't read/execute /etc/ppp/peers" problem (since /etc/ppp didn't exist) and following the advice on the Apple support forums (I tried a clean install, and sudo chmod u+s /usr/sbin/pppd had no effect), I'm getting this error: Connected. Logging in... Login successful. Using SSL Encryption Cipher 'DHE-RSA-AES256-SHA' Using new PPP frame encoding mechanism SSL-VPN logging out... FATAL: An error was detected in processing the options given, such as two mutually exclusive options being used. (2) SSL-VPN connection is terminated. Thanks for any help.

    Read the article

  • Free Oracle Special Edition eBook - Server Virtualization for Dummies

    - by Thanos
    Oracle has released a quick and easy-to-read guide on Oracle Virtualization. Now available is "Server Virtualization for Dummies," an Oracle Special Edition eBook. Need to virtualize, but not sure where to start? Virtualization should make things simpler, not more complex. To learn more about how Oracle’s server virtualization solutions can help you eliminate complexity, reduce costs, and respond rapidly to changing needs, download Server Virtualization for Dummies, an Oracle Special Edition eBook. Simply discover how virtualization can make things simpler, from server consolidation to application deployment. This eBook guides you through a range of server virtualization topics, including Why virtualization is critical to transforming today's IT to tomorrow's cloud computing environment. How different types of virtualization are suited to different business needs How application-driven virtualization dramatically accelerates application deployment Oracle Virtualization delivers the most complete and integrated solution for building, flexible IT infrastructures—beyond just server virtualization consolidation. Learn how Oracle Virtualization's unique application-driven approach and integrated management offering helps to accelerate enterprise application deployment and simplify management of data center from disk to apps. All our Customers, prospects, and partners are welcome to follow this link to download an exclusive copy of Server Virtualization for Dummies, Oracle Special Edition today.

    Read the article

  • Freelancing - Share the source code?

    - by Tec
    I have developed a couple of form based windows application in vb.net for a client and they all work well and he paid me through a freelance site. I have handed over the executable and the setup to the client and all was well. Now the client wants the source code for the application. Is there a general practice on sharing the source code with the client? Please note - the client never mentioned he needs the source code and he is now asking for it after a week after the app was completed and he made the payment. I don't mind sharing the source code, but I am not sure if I should. This probably means the client would not hire me again and the bigger question is the source code really his property? This question may have been asked a few times, but I cannot still draw a conclusion on what is right. update To answer some of the questions: The source code was not mentioned at all. There was no exclusive contract signed except for the usual agreement of the freelance site. I am not sure if software development comes under work for hire and is it valid for users outside of the US? The reason for not sharing the source code was this was a very small project and I got paid for a mere few hours. So if I have an option then definitely I would want to keep the source code to myself as that gives a possibility of the client coming back. The application works flawlessly and the code is solid. Also, the task that the client wanted to achieve was very challenging and I would not like other programmers (competitors) to know how I achieved it. So unless I get the confirmation that the source code is purely the property of the client, I would not be willing to share it.

    Read the article

  • New Java Champion: Michael Levin

    - by Tori Wieldt
    Welcome Michael Levin to Java Champion community! Michael is a JUG leader involved with Orlando, FL OrlandoJUG, the Gainesville, FL GatorJUG, the West African JUG SeneJUG and the New Orleans, LA CajunJUG. Michael is based in the USA. He is a business owner, and his business, Cambridge Web Design, Inc., specializes in custom software and Web2.0 website development (www.cambridgeweb.ie). He recently provided JCertif Java Training in Brazzaville, Republic of Congo. He also founded Codetown, an online community for software developers, located at www.codetown.us. He also has a tech podcast called Swampcast located at www.swampcast.com. You can follow him on Twitter @mikelevin.The Java Champions are an exclusive group of passionate Java technology and community leaders who are community-nominated and selected under a project sponsored by Oracle. Java Champions get the opportunity to provide feedback, ideas, and direction that will help Oracle grow the Java Platform. This interchange may be in the form of technical discussions and/or community-building activities with Oracle's Java Development and Developer Program teams.Java Champions are:    •    leaders    •    technical luminaries    •    independent-minded and credible    •    involved with some really cool applications of Java Technology or some humanitarian or educational effort    •    able to evangelize or influence other developers Congratulations to Michael on becoming the latest Java Champion!

    Read the article

  • Borrow Harry Potter’s eBooks from Amazon Kindle Owner’s Lending Library

    - by Rekha
    From June 19, 2012, Amazon.com customers can borrow All 7 Harry Potter books from Kindle Owner’s Lending Library (KOLL). The books are available in English, French, Italian, German and Spanish. Prime Members of Amazon owning Kindle, can choose from 145,000 titles. US customers can borrow for free with no due dates and also as frequently as a month. There are no limits on the number of copies available for the customers. Anyone can read the books simultaneously by borrowing them. The bookmarks in the borrowed books are saved, for the customers to continue reading where they stopped even when they re-borrow the book. Prime members also have the opportunity to enjoy free two day shipping on millions of items and  unlimited streaming of over 18,000 movies and TV episodes. Amazon has got an exclusive license from J.K. Rowling’s Pottermore. The series cost between $7.99 and $9.99 for the individual books. Pottermore’s investment on these books are compensated by Amazon’s large payment. Via Amazon. CC Image Credit Amazon KOLL.

    Read the article

  • OPN Exchange @ OpenWorld –The Don’t Miss List!

    - by Oracle OpenWorld Blog Team
    By the OPN Communications Team Are you attending Oracle PartnerNetwork Exchange @ OpenWorld? If so, don’t miss these exciting events taking place throughout the week of the conference.Sunday, September 30·    The Global Partner Keynote with Judson Althoff and other senior executives (1:00 p.m.)           ·    OPN Exchange General Sessions that provide an overview of each OPN Exchange track including: Cloud, Engineered Systems, Industries, Technology and Applications (3:30 p.m.)·    The Social Media Rally Station, where partners can learn how to optimize their online presence (3:00 - 5:00 p.m.)·    The exclusive OPN Exchange AfterDark Reception, complete with the smooth sounds of Macy Gray (7:30 p.m.) Monday, October 1·    5K Partner Fun Run (6:00 a.m. - meet us at the W Hotel lobby, no registration necessary!)·    The Social Media Rally Station, where partners can learn how to optimize their online presence (10:00 a.m. - 6:00 p.m.) Throughout the week of the conference ·    Over 40 + OPN Exchange sessions ·    Test Fest exams ·    Networking opportunities at the OPN Lounge; lunches at the Howard Street Tent; food, drink, and talk at the Oracle OpenWorld Music Festival @ It’s a Wrap!; and much more!We look forward to seeing you there.

    Read the article

  • Torque and maui node status

    - by Lafada
    I am new for torque and maui. I was checking for node state to looking for which nodes are free and which nodes are in use. For torque one command is pbsnodes. Which gives status and other info related to node. When I was checking for maui then I found command diagnose -n which also shows status of the node. I was wondering between these 2 status. Both are giving different status for the same situation. When I do man pbsnodes I got the possible states for node "free", "offline", "down", "reserve", "job-exclusive", "job-sharing", "busy", "time-shared", or "state-unknown" But this type of different state I cant find for diagnose -n. How pbsnodes and diagnose -n get the status for node. Is there any database like xCAT use for torque or maui? Thx in advance for your valuable time.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >