Search Results

Search found 366 results on 15 pages for 'ans anish'.

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

  • listbox isSelected databinding in DataTemplate

    - by Kinmarui
    I try to simply databind IsSelected property with IsSelected field in my class. But after I change the value in code its doesn't change the property, neither does clicking on ListBoxItem change the field value. XAML: <FlipView ItemsSource="{Binding Source={StaticResource itemsViewSource}}" ... > <FlipView.ItemTemplate> <DataTemplate> <UserControl Loaded="StartLayoutUpdates" Unloaded="StopLayoutUpdates"> <!-- other controls --> <ListBox Grid.Row="1" Grid.ColumnSpan="3" SelectionMode="Multiple" VerticalAlignment="Center" ItemsSource="{Binding Answers}"> <ListBox.Resources> <local:LogicToText x:Key="logToText" /> </ListBox.Resources> <!-- bind IsSelected only in one way from code to content --> <ItemsControl.ItemTemplate> <DataTemplate> <ListBoxItem IsSelected="{Binding IsSelected, Mode=TwoWay, Converter={StaticResource logToText}}" Content="{Binding IsSelected, Mode=TwoWay, Converter={StaticResource logToText}}"> </ListBoxItem> </DataTemplate> </ItemsControl.ItemTemplate> <!-- not working at all <ListBox.Resources> <Style TargetType="ListBoxItem"> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/> <Setter Property="Content" Value="{Binding IsSelected, Mode=TwoWay}"/> </Style> </ListBox.Resources>--> </ListBox> </UserControl> </DataTemplate> </FlipView.ItemTemplate> </FlipView> Code: Answers private ObservableCollection<PrawoJazdyDataAnswer> _answers = new ObservableCollection<PrawoJazdyDataAnswer>(); public ObservableCollection<PrawoJazdyDataAnswer> Answers { get { return this._answers; } } Single item(Answer) public class PrawoJazdyDataAnswer : NPCHelper// PrawoJazdy.Common.BindableBase { public PrawoJazdyDataAnswer(String ans, bool ansb) { this._ans = ans; this._isSelected = ansb; } public override string ToString() { return _isSelected.ToString(); } //Only For debug purposes normally return _ans; private string _ans; public string Ans { get { return this._ans; } //set { this.SetProperty(ref this._ans, value); } } private bool _isSelected; public bool IsSelected { get { return this._isSelected; } set { _isSelected = value; FirePropertyChanged("IsSelected"); //this.SetProperty(ref this._isSelected, value); } } } FirePropertyChanged public class NPCHelper : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public void FirePropertyChanged(string prop) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(prop)); } } Converter(which sometimes seems to be needed and others not..., I tried ~10 approaches from different tutorials/examples) public class LogicToText : IValueConverter { /// <summary> /// /// </summary> public object Convert(object value, Type targetType, object parameter, string language) { //if (value == null || (bool)value == false) // return "False"; return value.ToString(); } /// <summary> /// /// </summary> public object ConvertBack(object value, Type targetType, object parameter, string language) { return value.ToString().Contains("True") ? true : false; } Thanks in advance, and sorry for my English(still learning). @edit Thanks for quick reply. For test purposes i created a button and text block: It's in other controls part (above list box, but in FlipView) <Button Click="spr" >Sprawdz</Button> <TextBlock Text="{Binding Answers[0].IsSelected, Mode=TwoWay}" > </TextBlock> Click method private void spr(object sender, RoutedEventArgs e) { var ans = ((PrawoJazdyDataQuestion)this.flipView.SelectedItem).Answers; foreach (var item in ans) item.IsSelected = item.IsSelected ? false : true; } As I wrote when i'm changing data from code side its change text, but not appearance of ListBoxItem, and if i just select it on ListBox its doesn't change the date i textblock neither in ListBox itself.

    Read the article

  • how to send value to the from action page from database

    - by Mayank swami
    I am creating a faq panel for there can be multiple answers for question and i want to take the answer id .because i am storing comment by answer id the problem is that how to sent the $answer_id to the comment_submit_process.php and how to recognize the answer ? $selected_ques= mysql_prep($_GET['ques']); $query = "SELECT * FROM formanswer where question_id = {$selected_ques}"; $ans= mysql_query($query); if($ans){ while($answer = mysql_fetch_array($ans)) //here is the form <form id="add-comment" action="comment_submit_process.php" > <textarea class="comment-submit-textarea" cols="78" name="comment" style="height: 64px;"></textarea> <input type="submit" name="submitbutton" value="Add Comment" class="comment-submit-button" > <br> <?php $ans_id= $answer['id']; echo $ans_id; ?> <input type="hidden" name="ques" value="<?php echo $_GET['$ans_id'] ?>" /> <span class="counter ">enter at least 15 characters</span> <span class="form-error"></span> </form> <?php }} ?>

    Read the article

  • passing argument 1 of 'atoi' makes pointer from integer without a cast....can any body help me..

    - by somasekhar
    #include<stdio.h> #include<string.h> #include<stdlib.h> int main(){ int n; int a,b,ans[10000]; char *c,*d,*e; int i = 0; c = (char*)(malloc(20 * sizeof(char))); d = (char*)(malloc(20 * sizeof(char))); scanf("%d",&n); while(i < n){ scanf("%d",&a); scanf("%d",&b); itoa(a,c,10); itoa(b,d,10); a = atoi(strrev(c)) + atoi(strrev(d)); itoa(a,c,10); e = c; while(*e == '0')e++; ans[i] = atoi(strrev(e)); i++; } i = 0; while(i < n){ printf("%d\n",ans[i]); i++; } }

    Read the article

  • Converting Single dimensional vector or array to two dimension in Matlab

    - by pac
    Well I do not know if I used the exact term. I tried to find an answer on the net. Here is what i need: I have a vector a = 1 4 7 2 5 8 3 6 9 If I do a(4) the value is 4. So it is reading first column top to buttom then continuing to next .... I don't know why. However, What I need is to call it using two indices. As row and column: a(3,2)= 4 or even better if i can call it in the following way: a{3}(2)=4 What is this process really called (want to learn) and how to perform in matlab. I thought of a loop. Is there a built in function Thanks a lot Check this: a = 18 18 16 18 18 18 16 0 0 0 16 16 18 0 18 16 0 18 18 16 18 0 18 18 0 16 0 0 0 18 18 0 18 18 16 0 16 0 18 18 >> a(4) ans = 18 >> a(5) ans = 18 >> a(10) ans = 18 I tried reshape. it is reshaping not converting into 2 indeces

    Read the article

  • Finding the Largest and Smallest Integers In A Set- Basic

    - by Ka112324
    I'm kind of on the right track, however my output is not quite right. The program asks for the number of integers you have and then it asks for those numbers. For an example is says please enter the number of integers, you can put 3. And then you enter 3 numbers. I can't use arrays because I am a beginner student and we have not learned those yet. Using count is the only way that allows me to input integers. What do I need to add to my program? Again I am a general computer science student so I can't use anything advanced. I used include iostream, namespace int main and all that you just cant see it int data; int num; int count=0; int max=0; do { cout<<"Enter the number of intergers"<<endl; cin>>num; while (count<num) { cout<<"Please enter a number"<<endl; cin>>data; count++; if (data<min) { min=data; } if (data>max) { max=data; } } cout<<"Smallest integer:"<<min<<endl; cout<<"Largest integer:"<<max<<endl; cout<<"Would you like to continue?"<<endl; cin>>ans; } while ((ans=='y')||(ans=='Y')); return 0; }

    Read the article

  • form checkboxes different names each into multiple rows database [closed]

    - by Darlene
    Hi i've been at this for hours and need help. Thanks in advice. i have the following tables: tblprequestion quesid| ques tblanswers answerid|quesid | ans |date This is my form: prequestion form <?php $con = mysql_connect("localhost","root","") or die ("Could not connect to DB Server"); $db_selected = mysql_select_db("nbtsdb", $con) or die("Could not locate the DB"); $query3= mysql_query("SELECT * FROM tblprequestions", $con) or die("Cannot Access prequestions description from Server"); echo"<legend> Pre question :</legend>"; echo"<p></p>"; while($row = mysql_fetch_array($query3)) { echo"<p>"; echo"<input type='checkbox' name='question".$row['quesid']."[]' value='yes' />"; echo"<label>".$row['ques']."</label>&nbsp;&nbsp;&nbsp;"; echo"</p>"; } echo"<p></p>"; ?> i would like to know how to get the values from the form for each question (total of 17) to submit into the database. for example tblprequestion quesid| ques 1 Had a cold or fever in the last week? 2 Had minor outpaient surgery? tblanswers answerid|username |quesid | ans |date 1 lisa 1 yes 10/10/12 2 lisa 2 no 10/10/12

    Read the article

  • Returning Value of Radio Button Jquery [migrated]

    - by Jerry Walker
    I am trying to figure out why, when I run this code, I am getting undefined for my correct answers. $(document).ready (function () { // var answers = [["Fee","Fi","Fo"], ["La","Dee","Da"]], questions = ["Fee-ing?", "La-ing?"], corAns = ["Fee", "La"]; var counter = 0; var $facts = $('#main_ .facts_div'), $question = $facts.find('.question'), $ul = $facts.find('ul'), $btn = $('.myBtn'); $btn.on('click', function() { if (counter < questions.length) { $question.text(questions[counter]); var ansstring = $.map(answers[counter], function(value) { return '<li><input type="radio" name="ans" value="0"/>' + value + '</li>'}).join(''); $ul.html(ansstring); var currentAnswers = $('input[name="ans"]:checked').map(function() { return this.val(); }).get(); var correct = 0; if (currentAnswers[counter]==corAns[counter]) { correct++; } } else { $facts.text('You are done with the quiz ' + correct); $(this).hide(); } counter++; }); // }); It is quite long and I'm sorry about that, but I don't really know how tostrip it down. I also realize this isn't the most elegant way to do this, but I just want to know why I can't seem to get my radio values. I will add the markup as well if anyone wants.

    Read the article

  • linked list problem (with insert)

    - by JohnWong
    The problem appears with the insert function that I wrote. 3 conditions must work, I tested b/w 1 and 2, b/w 2 and 3 and as last element, they worked. But b/w 3 and 4, it did not work. It only display up to the new added record, and did not show the fourth element. Efficiency is not my concern here (not yet). Please guide me through this debug process. Thank you very much. #include<iostream> #include<string> using namespace std; struct List // we create a structure called List { string name; string tele; List *nextAddr; }; void populate(List *); void display(List *); void insert(List *); int main() { const int MAXINPUT = 3; char ans; List * data, * current, * point; // create two pointers data = new List; current = data; for (int i = 0; i < (MAXINPUT - 1); i++) { populate(current); current->nextAddr = new List; current = current->nextAddr; } // last record we want to do it sepeartely populate(current); current->nextAddr = NULL; cout << "The current list consists of the following data records: " << endl; display(data); // now ask whether user wants to insert new record or not cout << "Do you want to add a new record (Y/N)?"; cin >> ans; if (ans == 'Y' || ans == 'y') { /* To insert b/w first and second, use point as parameter between second and third uses point->nextAddr between third and fourth uses point->nextAddr->nextAddr and insert as last element, uses current instead */ point = data; insert(()); display(data); } return 0; } void populate(List *data) { cout << "Enter a name: "; cin >> data->name; cout << "Enter a phone number: "; cin >> data->tele; return; } void display(List *content) { while (content != NULL) { cout << content->name << " " << content->tele; content = content->nextAddr; cout << endl; // we skip to next line } return; } void insert(List *last) { List * temp = last->nextAddr; //save the next address to temp last->nextAddr = new List; // now modify the address pointed to new allocation last = last->nextAddr; populate(last); last->nextAddr = temp; // now link all three together, eg 1-NEW-2 return; }

    Read the article

  • Azure Storage Explorer

    - by kaleidoscope
    Azure Storage Explorer –  an another way to Deploy the services on Cloud Azure Storage Explorer is a useful GUI tool for inspecting and altering the data in your Azure cloud storage projects including the logs of your cloud-hosted applications. All three types of cloud storage can be viewed: blobs, queues, and tables. You can also create or delete blob/queue/table containers and items. Text blobs can be edited and all data types can be imported/exported between the cloud and local files. Table records can be imported/exported between the cloud and spreadsheet CSV files. Why Azure Storage Explorer Azure Storage Explorer is a licensed CodePlex project provided by Neudesic – a Microsoft partner.  It is a simple UI that requires you to input your blob storage name, access key and endpoints in the Storage Settings dialog. For more details please refer to the link: http://azurestorageexplorer.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35189   Anish, S

    Read the article

  • Migrating Databases from SQL Server 2008 to SqlAzure

    - by kaleidoscope
    Connect SQL Azure through SSMS. (It will get connected, only if you have port 1433 open.) Create required databases on SQL Azure. Create and execute schema scripts for databases.(Make sure you have written scripts which are 100% compatible with SQL Azure. Tool called SQL Azure migration tool by CodePlex helps with doing this.) Create and execute insert scripts for databases. (One can use SSMS for generating insert scripts.) For further details refer to the Windows Azure Platform Kit Nov 2009.   Anish

    Read the article

  • ASP.NET MVC 2 Released!

    - by kaleidoscope
    ASP.NET MVC 2 Released! ASP.NET MVC 2 Features ASP.NET MVC 2 adds a bunch of new capabilities and features. Some of the new features and capabilities include: § New Strongly Typed HTML Helpers § Enhanced Model Validation support across both server and client § Auto-Scaffold UI Helpers with Template Customization § Support for splitting up large applications into ‘Areas’ § Asynchronous Controllers support that enables long running tasks in parallel § Support for rendering sub-sections of a page/site using Html.RenderAction § Lots of new helper functions, utilities, and API enhancements § Improved Visual Studio tooling support More details can be found at http://www.azurejournal.com/2010/03/aspnet-MVC-2-released/ http://www.asp.net/mvc/   Anish, S

    Read the article

  • Windows Azure XDrive

    - by kaleidoscope
    This allows your Windows Azure compute applications running in our cloud to use the existing NTFS APIs to store their data in a durable drive. The drive is backed by a Windows Azure Page Blob formatted as a single NTFS volume VHD.   The Page Blob can be mounted as a drive within the Windows Azure cloud, where all non-buffered/flushed NTFS writes are made durable to the drive (Page Blob).   If the application using the drive crashes, the data is kept persistent via the Page Blob, and can be remounted when the application instance is restarted or remounted elsewhere for a different application instance to use.   Since the drive is an NTFS formatted Page Blob, you can also use the standard blob interfaces to uploaded and download your NTFS VHDs to the cloud. More details can be found at: http://microsoftpdc.com/Sessions/SVC14 Anish, S

    Read the article

  • problem with revalidating a jframe.

    - by John Quesie
    I have this code which should take the radio button input do a little math and display a popup. which it does fine. but then it is supposed to re validate and ask the next question. when i get to the second question, the answer always comes out as the isSelected(true) value no matter which radio button you click on. SO to be clear the first time through it works fin but when the second question comes up, it just takes the default radio button every time. public class EventHandler implements ActionListener { private Main gui; public EventHandler(Main gui){ this.gui = gui; } public void actionPerformed(ActionEvent e){ String answer = ""; double val = 1; //get current answer set String [] anArr = gui.getAnswers(gui.currentStage, gui.currentQuestion); if(e.getSource() == gui.exit){ System.exit(0); } if(e.getSource() == gui.submit){ if(gui.a1.isSelected()){ answer = anArr[0]; val = gui.getScore(1); } if(gui.a2.isSelected()){ answer = anArr[1]; val = gui.getScore(2); } if(gui.a3.isSelected()){ answer = anArr[2]; val = gui.getScore(3); } if(gui.a4.isSelected()){ answer = anArr[3];; val = gui.getScore(4); } JOptionPane.showMessageDialog(null, popupMessage(answer, val), "Your Answer", 1); //compute answer here //figure out what next question is to send gui.moveOn(); gui.setQA(gui.currentStage, gui.currentQuestion); //resets gui gui.goWest(); gui.q.revalidate(); } } public String popupMessage(String ans, double val){ //displays popup after an answer has been choosen gui.computeScore(val); String text = " You Answered " + ans + " Your score is now " + gui.yourScore ; return text; } } public class Main extends JFrame { public JLabel question; public JButton exit; public JButton submit; public JRadioButton a1; public JRadioButton a2; public JRadioButton a3; public JRadioButton a4; public ButtonGroup bg; public double yourScore = 1; public int currentQuestion = 1; public String currentStage = "startup"; JPanel q; public Main(){ setTitle("Ehtics Builder"); setLocation(400,400); setLayout(new BorderLayout(5,5)); setQA("startup", 1); goNorth(); goEast(); goWest(); goSouth(); goCenter(); pack(); setVisible(true); setDefaultCloseOperation(EXIT_ON_CLOSE); } public void goNorth(){ } public void goWest(){ q = new JPanel(); q.setLayout(new GridLayout(0,1)); q.add(question); bg.add(a1); bg.add(a2); bg.add(a3); bg.add(a4); a1.setSelected(true); q.add(a1); q.add(a2); q.add(a3); q.add(a4); add(q, BorderLayout.WEST); System.out.println(); } public void goEast(){ } public void goSouth(){ JPanel p = new JPanel(); p.setLayout(new FlowLayout(FlowLayout.CENTER)); exit = new JButton("Exit"); submit = new JButton("Submit"); p.add(exit); p.add(submit); add(p, BorderLayout.SOUTH); EventHandler myEventHandler = new EventHandler(this); exit.addActionListener(myEventHandler); submit.addActionListener(myEventHandler); } public void goCenter(){ } public static void main(String[] args) { Main open = new Main(); } public String getQuestion(String type, int num){ //reads the questions from a file String question = ""; String filename = ""; String [] ques; num = num - 1; if(type.equals("startup")){ filename = "startup.txt"; }else if(type.equals("small")){ filename = "small.txt"; }else if(type.equals("mid")){ filename = "mid.txt"; }else if(type.equals("large")){ filename = "large.txt"; }else{ question = "error"; return question; } ques = readFile(filename); for(int i = 0;i < ques.length;i++){ if(i == num){ question = ques[i]; } } return question; } public String [] getAnswers(String type, int num){ //reads the answers from a file String filename = ""; String temp = ""; String [] group; String [] ans; num = num - 1; if(type.equals("startup")){ filename = "startupA.txt"; }else if(type.equals("small")){ filename = "smallA.txt"; }else if(type.equals("mid")){ filename = "midA.txt"; }else if(type.equals("large")){ filename = "largeA.txt"; }else{ System.out.println("Error"); } group = readFile(filename); for(int i = 0;i < group.length;i++){ if(i == num){ temp = group[i]; } } ans = temp.split("-"); return ans; } public String [] getValues(String type, int num){ //reads the answers from a file String filename = ""; String temp = ""; String [] group; String [] vals; num = num - 1; if(type.equals("startup")){ filename = "startupV.txt"; }else if(type.equals("small")){ filename = "smallV.txt"; }else if(type.equals("mid")){ filename = "midV.txt"; }else if(type.equals("large")){ filename = "largeV.txt"; }else{ System.out.println("Error"); } group = readFile(filename); for(int i = 0;i < group.length;i++){ if(i == num){ temp = group[i]; } } vals = temp.split("-"); return vals; } public String [] readFile(String filename){ //reads the contentes of a file, for getQuestions and getAnswers String text = ""; int i = -1; FileReader in = null; File f = new File(filename); try{ in = new FileReader(f); }catch(FileNotFoundException e){ System.out.println("file does not exist"); } try{ while((i = in.read()) != -1) text += ((char)i); }catch(IOException e){ System.out.println("Error reading file"); } try{ in.close(); }catch(IOException e){ System.out.println("Error reading file"); } String [] questions = text.split(":"); return questions; } public void computeScore(double val){ //calculates you score times the value of your answer yourScore = val * yourScore; } public double getScore(int aNum){ //gets the score of an answer, stage and q number is already set in the class aNum = aNum - 1; double val = 0; double [] valArr = new double[4]; for(int i = 0;i < getValues(currentStage, currentQuestion).length;i++){ val = Double.parseDouble(getValues(currentStage, currentQuestion)[i]); valArr[i] = val; } if(aNum == 0){ val = valArr[0]; } if(aNum == 1){ val = valArr[1]; } if(aNum == 2){ val = valArr[2]; } if(aNum == 3){ val = valArr[3]; } // use current stage and questiion and trhe aNum to get the value for that answer return val; } public void nextQuestion(int num){ //sets next question to use currentQuestion = num; } public void nextStage(String sta){ // sets next stage to use currentStage = sta; } public void moveOn(){ // uses the score and current question and stage to determine wher to go next and what stage to use next nextQuestion(2); nextStage("startup"); } public void setQA(String level, int num){ String [] arr = getAnswers(level, num); question = new JLabel(getQuestion(level, num)); bg = new ButtonGroup(); a1 = new JRadioButton(arr[0]); a2 = new JRadioButton(arr[1]); a3 = new JRadioButton(arr[2]); a4 = new JRadioButton(arr[3]); } }

    Read the article

  • Forth: free video tutorials?

    - by Peter Mortensen
    Can you recommend any free Forth video tutorials (except for following) ? The only one I know of is Samuel A. Falvo's excellent "Over The Shoulder Episode 1: Text Preprocessing in Forth". MPEG. 102 MB. There are also videos from the annual Forth Day, but I don't consider those to be tutorials. (Unfortunately Forth is, like R, C, C++, Java, C#, D, COM, .NET, F# and Frontier, an unspecific search term. Search tip for Forth: qualify it with "ans" - as in ANS Forth, the ANSI Forth Standard.) Accumulated based on answers and other information: Introductions to Forth Forth. By Ben Stiglitz. At RubyConf 2008 Orlando Florida, U.S.A. 13 min 35 secs. 32 MB. MP4. Advanced Over The Shoulder Episode 1: Text Preprocessing in Forth. By Samuel A. Falvo. 1 h 06 min 25 secs. 102 MB. MPEG.

    Read the article

  • how to remove duplicates but keep the same order?

    - by Ben Fossen
    I have a cell array in Matlab y = { 'd' 'f' 'a' 'g' 'g' 'a' 'w' 'h'} I use unique(y) to get rid of the duplicates but it rearranges the strings in alphabetica order >> unique(y) ans = 'a' 'd' 'f' 'g' 'h' 'w' Like this I want to remove the duplicates but keep the same order. I know I could write a function do do this but was wondering if there was a simpler way using unique to remove duplicates while keeping the same order just with the duplicates removed. I want it to return this >> unique(y) ans = 'd' 'f' 'a' 'g' 'w' 'h'

    Read the article

  • Help with iphone dev - beyond bounds error

    - by dusk
    I'm just learning iphone development, so please forgive me for what is probably a beginner error. I've searched around and haven't found anything specific to my problem, so hopefully it is an easy fix. The book has examples of building a table from data hard coded via an array. Unfortunately it never really tells you how to get data from a URL, so I've had to look that up and that is where my problems show up. When I debug in xcode, it seems like the count is correct, so I don't understand why it is going out of bounds? This is the error message: 2010-05-03 12:50:42.705 Simple Table[3310:20b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (1) beyond bounds (0)' My URL returns the following string: first,second,third,fourth And here is the iphone code with the book's working example commented out #import "Simple_TableViewController.h" @implementation Simple_TableViewController @synthesize listData; - (void)viewDidLoad { /* //working code from book NSArray *array = [[NSArray alloc] initWithObjects:@"Sleepy", @"Sneezy", @"Bashful", @"Bashful", @"Happy", @"Doc", @"Grumpy", @"Thorin", @"Dorin", @"Norin", @"Ori", @"Balin", @"Dwalin", @"Fili", @"Kili", @"Oin", @"Gloin", @"Bifur", @"Bofur", @"Bombur", nil]; self.listData = array; [array release]; */ //code from interwebz that crashes NSString *urlstr = [[NSString alloc] initWithFormat:@"http://www.mysite.com/folder/iphone-test.php"]; NSURL *url = [[NSURL alloc] initWithString:urlstr]; NSString *ans = [NSString stringWithContentsOfURL:url]; NSArray *listItems = [ans componentsSeparatedByString:@","]; self.listData = listItems; [urlstr release]; [url release]; [ans release]; [listItems release]; [super viewDidLoad]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; self.listData = nil; [super viewDidUnload]; } - (void)dealloc { [listData release]; [super dealloc]; } #pragma mark - #pragma mark Table View Data Source Methods - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [self.listData count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *SimpleTableIdentifier = @"SimpleTableIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SimpleTableIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SimpleTableIdentifier] autorelease]; } NSUInteger row = [indexPath row]; cell.textLabel.text = [listData objectAtIndex:row]; return cell; } @end

    Read the article

  • radio button value in php

    - by Crash893
    Im trying to make a simple survey in php I have a set of radio buttons on a page called sja.php that sends its to sjamail.php page the problem is that when i go to get $answer = $_POST['ans']; I can't seen to do anything like echo "$answer"; but if i were to throw some logic at it like if ($answer == "ans1") { echo 'Correct'; } else { echo 'Incorrect'; } IT will display correct or incorrect so why is it i can't access the value of the radio button ans?

    Read the article

  • How to convert dates to numbers in Matlab

    - by user1297712
    I have some variables like these: a(1)=00:26:00 a(2)=744:32:00 a(3)=8040:33:00 I want to convert them to numbers, so I use the datenum command. The biggest number should be 8040:33:00, but look what happens. datenum(a([1 2 3])) ans = 1.0e+005 * 7.3487 7.3485 7.3486 But if I don´t calculate a(1): datenum(a([2 3],51)) ans = 1.0e+005 * 7.3490 7.3520 That´s the results that I want to get. I think that the problem is that a(2) and a(3) have more than 24hours but I haven´t found any way to solve this problem. Thanks.

    Read the article

  • multitreading scheduling related java

    - by vichi
    class A implements Runnable{ B b=new B(); public void run(){ while(true){ System.out.println("H1"+Thread.currentThread().getName()); } } } public class Test { public static void main(String[] str){ A a1 =new A(); // A a2 =new A(); // Thread t1 =new Thread(a1, "Vichi"); Thread t2 =new Thread(a1,"Vishu"); t1.start(); t2.start(); } } what will be the ans: 1) only one of them will get the chance to execute 2) both will get chance in arbitrary manner please suggest possible ans with explations

    Read the article

  • update query not working in array

    - by Suresh PHP Begginer
    here my code: i want to update the field by array. i just fetch the data's from table then i want to update the the field for same table // select query to get the value for($j=0;$j<count($capacity);$j++) { $capaci=$capacity[$j]; // select query to get the value $sql2=mysql_query("SELECT recieved-allocate*plate_quantity as ans from total_values where capacity='$capaci'"); while($fetch=mysql_fetch_array($sql2)) { $recieves=$fetch['ans']; $sql3="update total_values set recieved='$recieves' where capacity='$capaci' and month='$mon'"; mysql_query($sql3); } }

    Read the article

  • XML : Cours et exercices, d'Alexandre Brillant, critique par Benwit

    Benwit vous propose une critique pour le livre XML : Cours et exercices d'Alexandre Brillant [IMG]http://images-eu.amazon.com/images/P/2212126913.08.LZZZZZZZ.jpg[/IMG] Citation: Avec 12 ans d'expérience dans le développement, l'architecture et la gestion de projets informatiques variés (télévision numérique, modélisation applicative, intranets...), Alexandre Brillant utilise ...

    Read the article

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