Search Results

Search found 44090 results on 1764 pages for 'working conditions'.

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

  • back button is working on emulator but it is not working in device in android

    - by Rajeevgandhi
    Hi all, am new to this android development. I have index page and am displaying every links in the same page using div concept. Now i want to use the back button for my application i have developed code to handle the div and it is working in the AVD(Andriod Virtual Device 5556) but if i upload the apk into my device it is not working. Am waiting for your reply Please help me...... Thanks, Rajeevgandhi. S

    Read the article

  • ModalPopupExtender not working in IE but working in FF

    - by GK Ranjan
    I am facing a critical problem i am using ajaxmodalpopupextender in my page. It's working fine in FireFox with a great view but it's not working fine that is it displays in a side in IE and background is also not looking as is set. I tried almost all things like Using CSS Having the panel in div and setting div style="position:absolute;left:140;top:100;" Doctype of page to xhtml But there is nothing to get it all. Please help.

    Read the article

  • function working fine in IE but the same funtion is not working for mozilla 3.6

    - by anand-juventus
    function VisibleDiv(obj) { if (obj == BaseLog) { var objStyle = document.getElementById('DivCalls').style; if (objStyle.display == "block") objStyle.display = "none"; else objStyle.display = "block"; } else if (obj == ViewReports) { var objStyle = document.getElementById('DivReports').style; if (objStyle.display == "block") objStyle.display = "none"; else objStyle.display = "block"; } else if (obj ==Management) { var objStyle = document.getElementById('DivManage').style; if (objStyle.display == "block") objStyle.display = "none"; else objStyle.display = "block"; } <a href="#" id="BaseLog" class="TextHeader" onclick="VisibleDiv(this)">Base Log </a> in the above code is working in IE but not working in mozilla 3.6. I have checked that obj==BaseLog is not working in the above code. I have tried many options like event.srcelement window.event.srcelement but all in vain. when I debug the code ,I found that obj is having complete value for IE but the same obj is having all the names .ie. the name of tag,id and class for "Base Log" seperated by #. i.e a#BaseLog#TextHeader# Please suggest what shoud I do?

    Read the article

  • jQuery scrollTop not working in chrome but working in Firefox

    - by Maju
    I have used a scrollTop function in jquery for navigating to top. But strangely 'The smooth animated scroll' stopped working in safari and chrome(scrolling without smooth animation) after I made some changes. But it is working smoothly in Firefox. What could be wrong? Here is the jquery function i used, jQuery $('a#gotop').click(function() { $("html").animate({ scrollTop: 0 }, "slow"); //alert('Animation complete.'); //return false; }); HTML <a id="gotop" href="#">Go Top </a> CSS #gotop { Cursor: pointer; position: relative; float:right; right:20px; /*top:0px;*/ }

    Read the article

  • Validating data to nest if or not within try and catch

    - by Skippy
    I am validating data, in this case I want one of three ints. I am asking this question, as it is the fundamental principle I'm interested in. This is a basic example, but I am developing best practices now, so when things become more complicated later, I am better equipped to manage them. Is it preferable to have the try and catch followed by the condition: public static int getProcType() { try { procType = getIntInput("Enter procedure type -\n" + " 1 for Exploratory,\n" + " 2 for Reconstructive, \n" + "3 for Follow up: \n"); } catch (NumberFormatException ex) { System.out.println("Error! Enter a valid option!"); getProcType(); } if (procType == 1 || procType == 2 || procType == 3) { hrlyRate = hrlyRate(procType); procedure = procedure(procType); } else { System.out.println("Error! Enter a valid option!"); getProcType(); } return procType; } Or is it better to put the if within the try and catch? public static int getProcType() { try { procType = getIntInput("Enter procedure type -\n" + " 1 for Exploratory,\n" + " 2 for Reconstructive, \n" + "3 for Follow up: \n"); if (procType == 1 || procType == 2 || procType == 3) { hrlyRate = hrlyRate(procType); procedure = procedure(procType); } else { System.out.println("Error! Enter a valid option!"); getProcType(); } } catch (NumberFormatException ex) { System.out.println("Error! Enter a valid option!"); getProcType(); } return procType; } I am thinking the if within the try, may be quicker, but also may be clumsy. Which would be better, as my programming becomes more advanced?

    Read the article

  • Why do we have to use break in switch

    - by trejder
    Who decided, and basing on what concepts, that switch construction (in many languages) has to be, like it is? Why do we have to use break in each statement? Why do we have to write something like this: switch(a) { case 1: result = 'one'; break; case 2: result = 'two'; break; default: result = 'not determined'; break; } I've noticed this construction in PHP and JS, but there are probably many other languages that uses it. If switch is an alternative of if, why we can't use the same construction for switch, as for if? I.e.: switch(a) { case 1: { result = 'one'; } case 2: { result = 'two'; } default: { result = 'not determined'; } } It is said, that break prevents execution of a blocks following current one. But, does someone really run into situation, where there was any need for execution of current block and following ones? I didn't. For me, break is always there. In every block. In every code.

    Read the article

  • Should I use AND or should I use OR

    - by BDotA
    An order can be in the "status" of Completed, Corrected or some other stratus. I saw some code that is checking it like this, the purpose is to disable some stuff when the status is in Completed or Corrected status. if (model.CurrentStatus != DSRHelper.OrderStatusEnum.Complete && model.CurrentStatus != DSRHelper.OrderStatusEnum.Corrected) I can't get it why the engineer has used "AND" for this, shouldn't it be an "OR"?

    Read the article

  • The clock problem - to if or not to if?

    - by trejder
    Let's say, we have a simple digital clock. To "power" it, we use a routine executed every second. We update seconds part in it. But, what about minutes and hours part? What is better / more professional / offers better performance: Ignore all checking and update hour, minute and seconds part each time, every second. Use if + a variable for checking, if 60 (or 3600) seconds passed and update minute / hour part only at that precise moments. This leads us to a question, what is better -- unnecessary drawings (first approach) or extra ifs? I've just spotted a Javascript digital clock, one of millions similar on one of billions pages. And I noticed that all three parts (hours, minutes and seconds) are updated every second, though first changes its value only once per 3600 seconds and second once per 60 seconds. I'm not to experienced developer, so I might me wrong. But everything, what I've learnt up until now, tells me, that if are far better then executing drawing / refreshing sequences only to draw the same content.

    Read the article

  • improve if else statement for multiple condition

    - by kitokid
    My superior said the following is bad code. But he didn't mention anything how to improve it. What might be the alternative elegant way of coding below statements, without using if else? if(name.equalsIgnoreCase("AAA")){ //do something }else if(name.equalsIgnoreCase("BBB")){ //do something }else if(name.equalsIgnoreCase("CCC")){ //do something }else if(name.equalsIgnoreCase("DDD")){ //do something }else if(name.equalsIgnoreCase("EEE")){ //do something }else{ //do something } Edited: I am using Java 6.

    Read the article

  • How to layer if statements when order of logic is irrelevant?

    - by jimmyjimmy
    Basically I have a series of logic in my website that can lead to 5 total outcomes. Basically two different if tests and then a catch all else statement. For example: if cond1: if mod1: #do things elif mod2: #do things elif cond2: if mod1: #do things elif mod2 #do things else: #do things I was thinking about rewriting it like this: if cond1 and mod1: #do things elif cond1 and mod2: #do things elif cond2 and mod1: #do things elif cond2 and mod2: #do things else: #do things Is there any real difference in these two coding options/a better choice for this kind of logic testing?

    Read the article

  • How to work as a team of two

    - by Ezi
    I work in a team of 2 developers, my partner is the founder of the company, in the beginning he did everything on his own. He hired me about 3 years ago to help him get things done quicker and satisfy our customer needs. Often I get small project to do all by my own, as long as it works great (and it usually does...) he doesn't care much on what I did or how I did it. But if the customer calls him up asking why something doesn't work as expected and I'm not around to forward the call to me, he could get very angry on why he doesn't have an idea on how that program works. I don't keep anything as a secret, if he asks me on something how I did it I'm happy to explain as long as he's willing to listen (which isn't long), but I don't know why I need to say it in first place, in developing software everything is written down clearly. Most of the time I work on projects he wrote and I don't need to ask him anything (it happens maybe once a month that I ask him how something works, just because I don't have the time to look it up). I've read a lot on that great site about small teams that usually means 7-12 people. I couldn't find how 2 people work as a team; we don't have project managers, reviewers or testers. I feel that the fact he don't have time to review the code on his own is not my problem, so the question here is am I doing something rung? I need to walk over to him and give him a lecture on what I did even he doesn't ask me?

    Read the article

  • Is the use of explicit ' == true' comparison always bad? [closed]

    - by Slomojo
    Possible Duplicate: Make a big deal out of == true? I've been looking at a lot of code samples recently, and I keep noticing the use of... if( expression == true ) // do something... and... x = ( expression == true ) ? x : y; I've tended to always use... x = ( expression ) ? x : y; and... if( expression ) // do something... Where == true is implicit (and obvious?) Is this just a habit of mine, and I'm being picky about the explicit use of == true, or is it simply bad practice?

    Read the article

  • Recommended display/background brightness ratio and UI color schemes [duplicate]

    - by user1306322
    This question already has an answer here: Colour scheme for editor - guidelines or medical reccomendations 3 answers I'm a professional programmer, which means I spend a lot of time staring at various displays. Recently I've been having some problems with my eyes, so I went to talk to several doctors, which all gave me different recommendations as to how bright the background of the room should be in comparison to the display's brightness. It was very confusing, as some of them even agreed with counter-arguments of others, which made it all even less clear. So I'd like to ask the professional programmers, as people who actually have some experience with that. Some of the doctors said that looking at a monitor is like looking at a book, so the brightness ratios should be approximately the same. Others said that background should be as bright as the display itself, because then there is no brightness difference at the edges, and that's what may cause eye fatigue. From my own experience, I can say that reading a book isn't the same as writing or debugging a program, where you have to pay close attention to each symbol, and in books most words are easily recognizable without focusing too hard on them. Also, books are black on white and I myself use the default (dark text, white bg) color scheme for my IDE, but I've seen some programmers use mid-bright text on very dark background color schemes. So I'd like to ask what are the recommended display/background brightness ratios for programming? I'm not sure this site is the right one for this kind of questions, so if you know a better one, please comment.

    Read the article

  • NULL value in :conditions =>

    - by Horace Ho
    Contract.all(:conditions => ['voided == ?', 0]).size => 364 Contract.all(:conditions => ['voided != ?', 0]).size => 8 Contract.all.size => 441 the 3 numbers does not added up (364 + 8 != 441). What's the proper way write the :conditions to count the rows which the voided column value is NULL or equal to zero?

    Read the article

  • Adding a LIKE criteria to a Rails Conditions block

    - by Neil Middleton
    Consider the following code which is to be thrown at an AR find: conditions = [] conditions[:age] = params[:age] if params[:age].present? conditions[:gender] = params[:gender] if params[:gender].present? I need to add another condition which is a LIKE criteria on a 'profile' attribute. How can I do this, as obviously a LIKE is usually done via an array, not a hash key.

    Read the article

  • Conditional checks against a list

    - by AnnaSexyChick
    I was wondering how computers do this. The most logical way I can think is that they are iterating trough all elements of the list until they find one that matches the condition :) For example if you call function_exists(), PHP should iterate trough all defined functions until it meets the one that matches the name you're looking for. Is this true that this is the only way? If it is, it sounds like it's not very efficient :s

    Read the article

  • Forward e-mail to multiple addresses with conditions

    - by Valera Leontyev
    I need to forward e-mails to different mail accounts by different conditions. The aim is to create mail notification scheme for my company. I'd like to setup server on dedicated mail domain for it. Is there any software that helps to get my aim (Linux)? Examples: 1) forward all e-mail sent to [email protected] to x@x, y@y, z@z (no conditions) 2) forward e-mail sent to [email protected] where subject contains '[finance]' to a@b and b@b 3) forward e-mail sent to [email protected] where subject contains '[fault]' to s@s and s2@s. Receivers' domains are different. P.S. Now we use Gmail filters to get this functionality, but it's unstable and hard to maintain.

    Read the article

  • auto Focus (Hit Enter) Javascript function is working good in IE7 but not working in IE8

    - by James123
    Hi, I used a javascript FocusChange() in my aspx page. I have couple of controls and I need Hit enter key need to move next control based on tab index. It is working good in IE7 but not working in IE8... Please help me on this.. Thanks for your help in advance. The java script is given below. function FocusChange() { if (window.event.keyCode == 13) { var formLength = document.form1.length; // Get number of elements in the form var src = window.event.srcElement; // Gets the field having focus var currentTabIndex = src.getAttribute('tabindex'); // Gets its tabindex // scroll through all form elements and set focus in field having next tabindex for (var i = 0; i < formLength; i++) { if (document.form1.elements[i].getAttribute('tabindex') == currentTabIndex + 1) { for (var j = i; j <= formLength; j++) { if (document.form1.elements[j].disabled == false) { document.form1.elements[j].focus(); event.returnValue = false; event.cancel = true; return; } } } } } }

    Read the article

  • SVN - When you tag a working copy is it still a cheap copy?

    - by mcdon
    Using Subversion, in my working copy I make a minor modification (update a version number). I would then like to tag my working copy. Would this tag still be a cheap copy with the modification, or would SVN duplicate the files? I would hate to see my repository grow enormously in size because I'm trying to save a version number change. The reason I ask about creating a tag that contains a modification rather than committing then tagging involves my build server. The build server creates a CCNetLabel which I use to update the version numbers of my projects (AssemblyInfo.cs). When the build is successful it creates a tag. When I use ForceBuild the tag is based on the working copy which would contain the modified version number. I want the tag to contain the appropriate version number. note: It's debatable if I'm creating a branch or a tag, however SVN does not make a distinction between the two.

    Read the article

  • Same OpenID code working on 1 server not working on another

    - by Frraaz
    We implemented OpenID for Google Marketplace on this online hosting and it worked perfectly fine. But its not working on another server which DOES NOT have cPanel unlike the online hosting. Its failing authentication with this message: "Nonce already used or out of range" Does anyone have any idea what could be causing this problem?

    Read the article

  • javascript and css working on firefox but not working on IE

    - by Nirbhay saini
    Hi I have this code which working on fitrefox but not working on IE missing last charector on IE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>wrapped</title> <script type="text/javascript" language="javascript"> function set_padd(){ var tt = document.getElementById("span_padding").innerHTML; var txt = new Array(); txt = tt.split(" "); var atxt = ''; var f_txt = ''; var wrd_pr_linr = 4; var cnt = 1; for(var i = 0; i < txt.length; i++){ if(txt[i].length > 0){ txt[i] = txt[i].replace(' ',''); if(cnt < wrd_pr_linr){ if(txt[i].length > 0){ atxt += ' '+txt[i].replace(' ',''); cnt++; } }else{ f_txt += '<a class="padd_txt" >'+atxt+'</a><br />'; atxt = ''; cnt = 1; } } } document.getElementById("span_padding").innerHTML = f_txt; } </script> <style type="text/css"> .padd_txt{padding:7px;background:#009;color:#FFF;line-height:26px;font-size:14px;} body{font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:24px; line-height:1.2em;} span{background-color: #009; width:200px; color: #FFF;" class="blocktext;} </style> </head> <body onload="set_padd();"> <div style="width: 350px;"> <p> <span id="span_padding"> This is what I want to happen where one long string is wrapped and the text has this highlight color behind it. </span> </div> </body> </html> out put on firefox is This is I want to happen where one string is wrapped and the text this highlight behind it. and output on IE This is what want to happen one long string wrapped and the has this highlight missing last two word

    Read the article

  • .htaccess file, IE not working Firefox, Safari & Chrome working

    - by user361284
    Hi, I've built a site in Interspire Web Publisher and it was working fine, seems to work in Firefox, Safari and Chrome but when I fired up Internet Explorer 7 & 8 only the home page works, all links to other pages show up nothing. Do you think it could have something to do with the .htaccess file? But why would it work at one point then not another? I did a test new site (its database driven) with 3 small pages and it worked fine on Internet Explorer....very weird! my website: http://www.artandepilepsy.com

    Read the article

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