Search Results

Search found 7799 results on 312 pages for 'changing'.

Page 47/312 | < Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >

  • android : Dynamically changing the content of tab

    - by Jomia
    I want to change the content of a tab? when tha tab is created i set the content of the tab by setContent() method. But if I click again, I want to change the content that means change to another activity. I used setOnTabChangedListener() method, but I am not sure about how to set the content to another intent? Resources res = getResources(); TabHost tabHost=getTabHost(); tabHost.addTab(tabHost.newTabSpec("tab1").setIndicator("HOME").setContent(new Intent(getBaseContext(),homeGroup.class))); tabHost.addTab(tabHost.newTabSpec("tab2").setIndicator("ABOUT US").setContent(new Intent(getBaseContext(),aboutusGroup.class))); tabHost.setCurrentTab(0); tabHost.setOnTabChangedListener(new OnTabChangeListener() { @Override public void onTabChanged(String tabId) { //here i want to set the content of each tab to another intent // for 'tab1', change to home.class // for 'tab2', change to aboutus.class //how to set these? } }); Please help me.. Thank you..

    Read the article

  • login not working when changing from mysql to mysqli

    - by user1438647
    I have a code below where it logs a teacher in by matching it's username and password in the database, if correct, then log in, if incorrect, then display a message. <?php session_start(); $username="xxx"; $password="xxx"; $database="mobile_app"; $link = mysqli_connect('localhost',$username,$password); mysqli_select_db($link, $database) or die( "Unable to select database"); foreach (array('teacherusername','teacherpassword') as $varname) { $$varname = (isset($_POST[$varname])) ? $_POST[$varname] : ''; } ?> <form action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" id="teachLoginForm"> <p>Username</p><p><input type="text" name="teacherusername" /></p> <!-- Enter Teacher Username--> <p>Password</p><p><input type="password" name="teacherpassword" /></p> <!-- Enter Teacher Password--> <p><input id="loginSubmit" type="submit" value="Login" name="submit" /></p> </form> <?php if (isset($_POST['submit'])) { $query = " SELECT * FROM Teacher t WHERE (t.TeacherUsername = '".mysqli_real_escape_string($teacherusername)."') AND (t.TeacherPassword = '".mysqli_real_escape_string($teacherpassword)."') "; $result = mysqli_query($link, $query); $num = mysqli_num_rows($result); $loged = false; while($row = mysqli_fetch_array($result)) { if ($_POST['teacherusername'] == ($row['TeacherUsername']) && $_POST['teacherpassword'] == ($row['TeacherPassword'])) { $loged = true; } $_SESSION['teacherforename'] = $row['TeacherForename']; $_SESSION['teachersurname'] = $row['TeacherSurname']; $_SESSION['teacherusername'] = $row['TeacherUsername']; } if ($loged == true){ header( 'Location: menu.php' ) ; }else{ echo "The Username or Password that you Entered is not Valid. Try Entering it Again."; } mysqli_close($link); } ?> Now the problem is that even if the teacher has entered in the correct username and password, it still doesn't let the teacher log in. When the code above was the old mysql() code, it worked fine as teacher was able to login when username and password match, but when trying to change the code into mysqli then it causes login to not work even though username and password match. What am I doing wrong?

    Read the article

  • Changing CCK content-types details results in numerous DB calls for the menu system

    - by Paul Strugger
    Every time I make a change in the details of a content-type it takes too long. I though it had to do with the fact that I had too many content-types and fields (~500), but when I load the devel module to see the queries that take that long I see: Executed 32212 queries in 12267.57 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted. Page execution time was 55763.32 ms When I see the details I notice that the vast majority of db calls come from the menu system, e.g.: _menu_route menu_local_tasks admin_menu_link_save Why is that? Can I avoid some of these? It doesn't seem logical!

    Read the article

  • Changing XML Namespace with Scala

    - by toddk
    I am using scala to load a XML file from file via the scala.xml.XML.loadFile() method. The documents I'm working with have namespaces already defined and I wish to change the namespace to something else using scala. For example, a document has a xmlns of "http://foo.com/a" with a prefix of "a" - I would like to change the namespace and prefix for the document to "http://foo.com/b" and "b" respectively. Seems easy and I feel like I'm missing something obvious here. I do not have a problem getting the namespace from the return Elem from the referenced loadFile() method.

    Read the article

  • rbenv not changing ruby version

    - by user1443338
    So i installed rbenv according to the github directions. I am running OSX but i have tried this on a Ubuntu 12.04 VM and got the same results. The following is what i get in my terminal when i try to change ruby versions: rbenv versions * 1.9.3-p0 (set by /Users/user/.rbenv/version) 1.9.3-p125 rbenv global 1.9.3-p0 rbenv rehash ruby -v ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0] which ruby /usr/bin/ruby Anyone have any ideas as to why rbenv isnt actually switching the ruby version like it thinks it is? Aslo there is no .rbenv file in the local directory that would be causing the ruby version to default to 1.8.7 rbenv local rbenv: no local version configured for this directory

    Read the article

  • changing body class based on user's local time

    - by John
    I'm trying to add a body class of 'day' if it's 6am-5pm and 'night' if "else" based on the user's local time. I tried the following but it didn't work. Any ideas? In the head: <script> function setTimesStyles() { var currentTime = new Date().getHours(); if(currentTime > 5 && currentTime < 17) { document.body.className = 'day'; } else { document.body.className = 'night'; } } </script> In the body: <body onload="setTimeStyles();"> Also, is there a more elegant way to achieve what I need?

    Read the article

  • Dynamically changing layout

    - by LTMOD
    I have a 2 x 2 grid of buttons. Each row of 2 is wrapped in a horizontal linear layout. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="100dip"> <Button android:layout_weight=".5" android:id="@+id/btn1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:padding="5dip" android:layout_margin="2dip"> </Button> <Button android:layout_weight=".5" android:id="@+id/btn2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="5dip" android:layout_margin="2dip"> </Button> At times I want to show all 4 buttons, and other times, I show the top 2 only, and sometimes, I need to show 2 on top, and one on the bottom. I would like to center the bottom one, but can't seem to accomplish this. In my code, I call btn4.setVisibility(8); //8 = GONE, which makes my 4th button disappear, but then btn3 ends up filling the entire layout. What I would like it to do instead is center itself within the layout at its correct width / height. I'm a bit new to this, so any help is greatly appreciated. Thanks in advance!

    Read the article

  • Changing Form Size in VS 2008

    - by Dcurvez
    good morning all :) was wondering if anyone can tell me how come I cant get my windows form size to go to 1280x 768 in vs 2008? My resolution that I am working on is 1024x768..but the computer that I am going to be running this program on is a wide screen..1280x768. I try to change it in properties but it keeps defaulting back to 1036x760.

    Read the article

  • Changing a Widget's name based on a string read in from an XML form in Qt.

    - by Nick
    I'm writing a code for a voting machine that will allow user to read in custom XML ballots and then vote on them, however in the current build I have in QtCreator, I don't see an easy way to edit buttons in my GUI directly. In the code snippet below, I assign an element to pull out the names and type of ballot being read in, but I need to append a label on the GUI as well as change buttons to the names of candidates read in. Any ideas on how to do this? while(!n.isNull()){ QDomNode x = n.firstChildElement(); QDomElement e = n.toElement(); QMessageBox::information(0, tr( "Loading Element" ), tr( "Our element is %1" ).arg(e.tagName()) ); QDomElement p = x.firstChildElement();//p finds Races QMessageBox::information(0,tr("Foo"),tr("p = %1").arg(p.text()));//finds Race and Ballot types n = n.nextSibling(); } }

    Read the article

  • mootools changing an elements inline css

    - by sea_1987
    I have some HTML that looks like this, <div id="mb_contents" style="visibility: visible; opacity: 1; width: 600px; height: 450px;"> I am trying to turn the visibilty to hidden using this js/mootools, $('mb_overlay').set('styles', { 'visibilty': 'hidden', }); However nothing seems to be working, am I missing something?

    Read the article

  • JQuery: addClass() not changing background on selector

    - by centr0
    im having a little trouble getting the background image to swap out on click() $('.highlight-boxes li a[class!=selected-box]').click(function() { $('.highlight-content').hide(); $('.highlight-boxes li a').removeClass(); $(this).addClass('box-selected'); // problem here var selected = $(this).attr('href').substr(1); $('#' + selected).stop(true,true).fadeIn(); return false; }); console.log() in firebug returns the correct element being clicked but $(this).addClass('box-selected') does not change the background of the currently clicked element. any ideas? TIA

    Read the article

  • Changing the height of an existing, visible TextView

    - by Jim Blackler
    Hi I'd like to programatically increase the height allocated to a TextView, and have the activity layout redrawn accordingly (the text view has a maximum height until the user clicks it, then it takes up all height required, wrap_content). setHeight() isn't working, even coupled with invalidate() or postInvalidate(). I am able to change the contents of the TextBox with setText() but it isn't altering the existing specified height. Android 1.5 under the 1.6 SDK.

    Read the article

  • visual studio asp.net mvc, changing target framework

    - by mike
    Hello there Im have just changed the target framework for an asp.net mvc project from target framework 4 t 3.5, I keep getting this error when I try to debug, or go to any controller action 'HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. ' Any ideas why I keep getting this error? as soon as I revert back to .net 4.0, everything is fine ps could be an issue with routing as the global.asax Application_Start() is not not hit hence route entries are not registered Thanks

    Read the article

  • JavaScript not changing display type or color in IE

    - by user445359
    I am trying to switch a series of blocks between "none" and "block" based on the OnMouseOver property and to change the title of the selected list to yellow at the same time. The JavaScript code I have for this is: function switchCat(cat) { var uls = document.getElementsByClassName('lower-ul'); var titles = document.getElementsByClassName('lower-cat-title'); for (var i=0;i<uls.length;i++) { uls[i].style.display = 'none'; titles[i].style.color = 'white'; } if (cat != -1) { var wanted = document.getElementById('lower-cat-'+cat); var wantedTitle = document.getElementById('lower-cat-title-'+cat); wanted.style.display = 'block'; wantedTitle.style.color = 'yellow'; } } It works with Chrome, Opera, and Firefox, however, it does not work with IE. When I test it in IE I get the error "Object doesn't support this property or method." Does anyone know what I am doing wrong?

    Read the article

  • Changing populated DataTable column data types

    - by TonE
    Hi, I have a System.Data.DataTable which is populated by reading a CSV file which sets the datatype of each column to string. I want to append the contents of the DataTable to an existing database table - currently this is done using SqlBulkCopy with the DataTable as the source. However, the column data types of the DataTable need to be changed to match the schema of the target database table, handling null values. I am not very familiar with ADO.NET so have been search for a clean way of doing this? Thanks.

    Read the article

  • (PHP) - Changing two substrings inside a string

    - by Imp4ct
    This is my BIG string BEGIN:VEVENT UID:xxxxxx DTSTAMP:xxxxxx STATUS:CONFIRMED CLASS:PUBLIC URL:xxxxxx SUMMARY:YYYYYYY DESCRIPTION:xxxxxx; YYYYYYY; DTSTART:xxxxxx DTEND:xxxxxx GEO:xxxxxx LOCATION:xxxxxx END:VEVENT I need to change position of the two "YYYYYYY" in SUMMARY/DESCRIPTION I have to replace them without being specific since it is implemented in a much larger function. (This string is already sliced out of a 3700 line - Calendar) pls help! :)

    Read the article

< Previous Page | 43 44 45 46 47 48 49 50 51 52 53 54  | Next Page >