Search Results

Search found 386 results on 16 pages for 'mary chan'.

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

  • links for 2010-04-13

    - by Bob Rhubart
    Frederic Michiar: Manage a flexible and elastic Data Center with Oracle VM Manager Frederic Michiar shares a list of Oracle VM resources. (tags: otn oracle virtualization) Mona Rakibe: BAM Data Control in multiple ADF Faces Components "When two or more ADF Faces components must display the same data, and are bound to the same Oracle BAM data control definition, we have to make sure that we wrap each ADF Faces component in an ADF task flow, and set the Data Control Scope to isolated. " Mona Rakibe shows you how. (tags: oracle otn soa bam adf) Martin Widlake: Performance Tipping Points Martin Widlake offers "a nice example of a performance tipping point. This is where Everything is OK until you reach a point where it all quickly cascades to Not OK." (tags: oracle otn database architecture performance) Steve Chan: EBS Techstack Sessions at OAUG/Collaborate 2010 Steve Chan shares a list of Collaborate 2010 sessions featuring Oracle E-Business Suite Applications Technology Group staffers. (tags: oracle otn collaborate2010 ebs) @ORACLENERD: Developing in APEX Oracle ACE Chet Justice counts the ways... (tags: otn oracle oracleace apex) @bex: Almost Time For IOUG Collaborate 2010 Oracle ACE Director Bex Huff shares details on his Collaborate 2010 presentation, "The Top 10 Things Oracle UCM Customers Need To Know About WebLogic:" (tags: oracle otn oracleace collaborate2010 weblogic ucm enterprise2.0)

    Read the article

  • ArchBeat Link-o-Rama for 2012-04-13

    - by Bob Rhubart
    TGIF! Mobile Commerce and Engagement Stats | @digbymobile www.digby.com Solution architects take note: mobile is shaping your future. OTN Architect Day - Reston, VA - May 16 www.oracle.com The live one-day event in Reston, VA brings together architects from a broad range of disciplines and domains to share insights and expertise in the use of Oracle technologies to meet the challenges today’s solution architects regularly face. Registration is free, but seating is limited. BPEL 11.1.1.6 Certified for Prebuilt E-Business Suite 12.1.3 SOA Integrations | Steven Chan blogs.oracle.com A load of links and useful information from Steven Chan. OTN: There's an App for That blogs.oracle.com Get your OTN developer community content on the go with this free app for your mobile device. Five Best Practices for Going Mobile | John Brunswick blogs.oracle.com John Brunswick offers some strategic considerations for delivering products, services, and information to mobile constituents. Why My Slime Mold is Better than Your Hadoop Cluster | Todd Hoff highscalability.com What architects can learn from naturally occurring, self-propelled goop. ADF version of "Modern" dialog windows | Martin Deh blogs.oracle.com Martin Deh describes how to use OOTB ADF components and CSS3 style elements to create iOS-style UI elements. Perfect fit: The cloud and SOA -- but don't call it that | David Linthicum www.infoworld.com "The fact of the matter," says David Linthicum, "is that the best and most effective way to move to the cloud for an enterprise whose technology platforms reflect decades of enterprise IT neglect is to use SOA as an approach and process. Just don't call it 'SOA.'" Thought for the Day "There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence." — Jeremy S. Anderson

    Read the article

  • Prolog Family tree

    - by Tania
    Hi I have a Question in prolog , I did it but its not showing answers When i ask about the brothers,sisters,uncles,aunts This is what I wrote, what's wrong ? /*uncle(X, Y) :– male(X), sibling(X, Z), parent(Z, Y).*/ /*uncle(X, Y) :– male(X), spouse(X, W), sibling(W, Z), parent(Z, Y).*/ uncle(X,Y) :- parent(Z,Y), brother(X,Z). aunt(X,Y) :- parent(Z,Y), sister(X,Z). sibling(X, Y) :- parent(Z, X), parent(Z, Y), X \= Y. sister(X, Y) :- sibling(X, Y), female(X). brother(X, Y) :- sibling(X, Y), male(X). parent(Z,Y) :- father(Z,Y). parent(Z,Y) :- mother(Z,Y). grandparent(C,D) :- parent(C,E), parent(E,D). aunt(X, Y) :– female(X), sibling(X, Z), parent(Z, Y). aunt(X, Y) :– female(X), spouse(X, W), sibling(W, Z), parent(Z, Y). male(john). male(bob). male(bill). male(ron). male(jeff). female(mary). female(sue). female(nancy). mother(mary, sue). mother(mary, bill). mother(sue, nancy). mother(sue, jeff). mother(jane, ron). father(john, sue). father(john, bill). father(bob, nancy). father(bob, jeff). father(bill, ron). sibling(bob,bill). sibling(sue,bill). sibling(nancy,jeff). sibling(nancy,ron). sibling(jell,ron). And one more thing, how do I optimize the rule of the brother so that X is not brother to itself.

    Read the article

  • How do I Handle Ties When Ranking Results in MySQL?

    - by Laxmidi
    Hi, How does one handle ties when ranking results in a mysql query? I've simplified the table names and columns in this example, but it should illustrate my problem: SET @rank=0; SELECT student_names.students, @rank := @rank +1 AS rank, scores.grades FROM student_names LEFT JOIN scores ON student_names.students = scores.students ORDER BY scores.grades DESC So imagine the the above query produces: Students Rank Grades Al 1 90 Amy 2 90 George 3 78 Bob 4 73 Mary 5 NULL William 6 NULL Even though Al and Amy have the same grade, one is ranked higher than the other. Amy got ripped-off. How can I make it so that Amy and Al have the same ranking, so that they both have a rank of 1. Also, William and Mary didn't take the test. They bagged class and were smoking in the boy's room. They should be tied for last place. The correct ranking should be: Students Rank Grades Al 1 90 Amy 1 90 George 3 78 Bob 4 73 Mary 5 NULL William 5 NULL If anyone has any advice, please let me know. Thank you! -Laxmidi

    Read the article

  • Graph-structured databases and Php

    - by stagas
    I want to use a graph database using php. Can you point out some resources on where to get started? Is there any example code / tutorial out there? Or are there any other methods of storing data that relate to each other in totally random/abstract situations? - Very abstract example of the relations needed: John relates to Mary, both relate to School, John is Tall, Mary is Short, John has Blue Eyes, Mary has Green Eyes, query I want is which people are related to 'Short people that have Green Eyes and go to School' - answer John - Another example: TrackA -> ArtistA -> ArtistB -> AlbumA -----> [ label ] -> AlbumB -----> [ A ] -> TrackA:Remix -> Genre:House -> [ Album ] -----> [ label ] TrackB -> [ C ] [ B ] Example queries: Which Genre is TrackB closer to? answer: House - because it's related to Album C, which is related to TrackA and is related to Genre:House Get all Genre:House related albums of Label A : result: AlbumA, AlbumB - because they both have TrackA which is related to Genre:House - It is possible in MySQL but it would require a fixed set of attributes/columns for each item and a complex non-flexible query, instead I need every attribute to be an item by itself and instead of 'belonging' to something, to be 'related' to something.

    Read the article

  • making arrays from tab-delimited text file column

    - by absolutenewbie
    I was wondering if anyone could help a desperate newbie with perl with the following question. I've been trying all day but with my perl book at work, I can't seem to anything relevant in google...or maybe am genuinely stupid with this. I have a file that looks something like the following: Bob April Bob April Bob March Mary August Robin December Robin April The output file I'm after is: Bob April April March Mary August Robin December April So that it lists each month in the order that it appears for each person. I tried making it into a hash but of course it wouldn't let me have duplicates so I thought I would like to have arrays for each name (in this example, Bob, Mary and Robin). I'm afraid to upload the code I've been trying to tweak because I know it'll be horribly wrong. I think I need to define(?) the array. Would this be correct? Any help would be greatly appreciated and I promise I will be studying more about perl in the meantime. Thank you for your time, patience and help. #!/usr/bin/perl -w while (<>) { chomp; if (defined $old_name) { $name=$1; $month=$2; if ($name eq $old_name) { $array{$month}++; } else { print "$old_name"; foreach (@array) { push (@array, $month); print "\t@array"; } print "\n"; @array=(); $array{$month}++; } } else { $name=$1; $month=$2; $array{month}++; } $old_name=$name; } print "$old_name"; foreach (@array) { push (@array, $month); print "\t@array"; } print "\n";

    Read the article

  • Using DisplayTag library, I want to have the currently selected row have a unique custom class using

    - by Mary
    I have been trying to figure out how to highlight the selected row in a table. In my jsp I have jsp scriplet that can get access to the id of the row the displaytag library is creating. I want to compare it to the the id of the current row selected by the user ${currentNoteId}. Right now if the row id = 849 (hardcoded) the class "currentClass" is added to just that row of the table. I need to change the 849 for the {$currentNoteId} and I don't know how to do it. I am using java, Spring MVC. The jsp: ... <% request.setAttribute("dyndecorator", new org.displaytag.decorator.TableDecorator() { public String addRowClass() { edu.ilstu.ais.advisorApps.business.Note row = (edu.ilstu.ais.advisorApps.business.Note)getCurrentRowObject(); String rowId = row.getId(); if ( rowId.equals("849") ) { return "currentClass"; } return null; } }); %> <c:set var="currentNoteId" value="${studentNotes.currentNote.id}"/> ... <display:table id="noteTable" name="${ studentNotes.studentList }" pagesize="20" requestURI="notesView.form.html" decorator="dyndecorator"> <display:column title="Select" class="yui-button-match" href="/notesView.form.html" paramId="note.id" paramProperty="id"> <input type="button" class="yui-button-match2" name="select" value="Select"/> </display:column> <display:column property="userName" title="Created By" sortable="true"/> <display:column property="createDate" title="Created On" sortable="true" format="{0,date,MM/dd/yy hh:mm:ss a}"/> <display:column property="detail" title="Detail" sortable="true"/> </display:table> ... This could also get done using javascript and that might be best, but the documentation suggested this so I thought I would try it. I cannot find an example anywhere using the addRowClass() unless the comparison is to a field already in the row (a dollar amount is used in the documentation example) or hardcoded in like the "849" id. Thanks for any help you can provide.

    Read the article

  • Histogram using gnuplot?

    - by mary
    I know how to create a histogram (just use "with boxes") in gnuplot if my .dat file already has properly binned data. Is there a way to take a list of numbers and have gnuplot provide a histogram based on ranges and bin sizes the user provides?

    Read the article

  • How to allow multiple users to manage application running on server?

    - by Mary-Chan
    I'm not sure if the title makes sense. Hard question to ask. I have an application running on a server under my network account, and it's scheduled to run daily. I can remote in with my user credentials and check on the application. What if I want more than one person to be able to remote in and check it? I can create a new account on the server, but it wouldn't have network rights and the application needs access to network folders. What would be the best approach? Thanks! :-) P.S. Feel free to edit the tags. I can't figure out what to pick.

    Read the article

  • performing authorisation/authentication between webservices

    - by mary
    Hi, i am developing webservices.In that i want to maintain state information so that all WebMethods could be access only after Login. I have tried but getting problem. I am attaching my code. Any other alternative will also be welcomed. [ WebService(Namespace = "http://amSubfah.org/")] [ WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class Login : System.Web.Services.WebService { Message msgObj = new Message(); BaseClass b = new BaseClass(); PasswordEncryptionDecryption pedObj = new PasswordEncryptionDecryption(); public AuthHeader Authentication=new AuthHeader (); public Login () { //Uncomment the following line if using designed components //InitializeComponent(); } [ SoapHeader("Authentication", Required = true)] [System.Web.Services. WebMethod(EnableSession = true)] public string checkUserLogin(string user, string pwd) { DataSet dsLogin = new DataSet(); List sqlParams = new List(); SqlParameter sqlParam1 = new SqlParameter("@UserName", SqlDbType.NVarChar); sqlParam1.Value = user; sqlParams.Add(sqlParam1); SqlParameter sqlParam2 = new SqlParameter("@Password", SqlDbType.NVarChar); string pass = pedObj.encryptPassword(pwd); sqlParam2.Value = pass; sqlParams.Add(sqlParam2); try { b.initializeDBConnection(); dsLogin = b.execSelectLoginQuery( Query.strSelectLoginData, sqlParams); } catch (SqlException sqlEx) { string str = msgObj.msgErrorMessage + sqlEx.Message + sqlEx.StackTrace; } {if ((dsLogin != null) && (dsLogin.Tables[0].Rows.Count != 0)) { Session[ "username"] = user; string sessionId = System.Guid.NewGuid().ToString(); Authentication.sessionId = sessionId; Authentication.Username = user; return msgObj.msgLoginSuccess; } else return msgObj .msgLoginFail ; } //webmethod for registration [ SoapHeader("Authentication", Required = true)] [System .Web .Services . WebMethod (EnableSession =true )] public string insertRegistrationDetails(string fName,string lName,string email,string pwd) { //string u = Session["username"].ToString(); //if (u == "") //{ // //checkUserLogin(fName,pwd ); // return "Please login first"; //} if (Authentication.Username == null || Authentication.sessionId == null) { return "Please Login first"; } List sqlParams = new List(); int insert = 0; string msg = "" ; SqlParameter sqlParam = new SqlParameter("@FName", SqlDbType.NVarChar); sqlParam.Value = fName; sqlParam.Size = 50; sqlParams.Add(sqlParam); SqlParameter sqlParam1 = new SqlParameter("@LName", SqlDbType.NVarChar); sqlParam1.Value = lName; sqlParam1.Size = 50; sqlParams.Add(sqlParam1); SqlParameter sqlParam5 = new SqlParameter("@Email", SqlDbType.NVarChar); sqlParam5.Value = email; sqlParam5.Size = 50; sqlParams.Add(sqlParam5); SqlParameter sqlParam7 = new SqlParameter("@Password", SqlDbType.NVarChar); sqlParam7.Value = pedObj .encryptPassword (pwd); sqlParam7.Size = 50; sqlParams.Add(sqlParam7); try { b.initializeDBConnection(); insert = b.execByKeyParams( Query.strInsertIntoRegistrationTable1, sqlParams); if (insert !=0) { msg = msgObj .msgRecInsertedSuccess ; } } catch (SqlException sqlEx) { string str = msgObj.msgErrorMessage + sqlEx.Message + sqlEx.StackTrace; } return msg; } public class AuthHeader : SoapHeader { public string Username; public string sessionId; } }

    Read the article

  • Problem in loading chart on the view in asp.net mvc?

    - by mary
    hello, I am working on the chart project in asp.net mvc. i used followinf code to genrate the chart on the controller. Chart chart1 = new Chart(); chart1.Height = 296; chart1.Width = 412; chart1.ImageType = ChartImageType.Png; Title title = chart1.Titles.Add("Main"); Series series1 = chart1.Series.Add("series1"); chart1.Series["series1"].Points.DataBindXY(xvalues, yvalues); chart1.Series["series1"].ChartType = SeriesChartType.Column ; ChartArea chartArea = chart1.ChartAreas.Add("Default"); chartArea.Area3DStyle.Enable3D = false ; MemoryStream ms = new MemoryStream(); chart1.SaveImage(ms); return File(ms.GetBuffer(), @"image/png"); and on the view page i am calling it as when i am running it on local pc its working fine but when i deployed it on server then chart is not displaying instated alernate text is showing. and its not working on another pc also. plz if anyone can know the reson tell me. thank you.

    Read the article

  • Problem in loading chart on the view in asp.net mvc?

    - by mary
    hello, I am working on the chart project in asp.net mvc. i used followinf code to genrate the chart on the controller. Chart chart1 = new Chart(); chart1.Height = 296; chart1.Width = 412; chart1.ImageType = ChartImageType.Png; Title title = chart1.Titles.Add("Main"); Series series1 = chart1.Series.Add("series1"); chart1.Series["series1"].Points.DataBindXY(xvalues, yvalues); chart1.Series["series1"].ChartType = SeriesChartType.Column ; ChartArea chartArea = chart1.ChartAreas.Add("Default"); chartArea.Area3DStyle.Enable3D = false ; MemoryStream ms = new MemoryStream(); chart1.SaveImage(ms); return File(ms.GetBuffer(), @"image/png"); and on the view page i am calling it as img src="/Home/SampleChart" alt="Sample Chart" when i am running it on local pc its working fine but when i deployed it on server then chart is not displaying instated alernate text is showing. and its not working on another pc also. plz if anyone can know the reson tell me. thank you.

    Read the article

  • Y-value on bar graph in gnuplot?

    - by mary
    Can I get gnuplot to display the exact y-value or height of a data point (plotted using "with boxes") over its bar? I would like the plot to be easy to read so nobody has to line up the top of a bar with the y-axis and guess what the value is.

    Read the article

  • charts loading problem

    - by mary
    hello when we create charts in asp.net mvc is it necessary to use chart control? and if yes then at the time of deployment is it necessary to install chart control? Thank You

    Read the article

  • Formatting when copying SQL data and pasting in Excel

    - by Mary-Chan
    I want to copy a sql result set and paste it in Excel. But the data I paste in to the spreadsheet doesn't want to recognize Excel formatting. So if I change a column to currency, it doesn't do anything. But...if I double click on a cell, THEN it applies the currency format. But only to that cell. How can I make it automatically recognize the Excel format? I must be something I'm missing. Hopefully somebody can help. :-)

    Read the article

  • Shell loops using non-integers?

    - by mary
    I wrote a .sh file to compile and run a few programs for a homework assignment. I have a "for" loop in the script, but it won't work unless I use only integers: #!/bin/bash for (( i=10; i<=100000; i+=100)) do ./hw3_2_2 $i done The variable $i is an input for the program hw3_2_2, and I have non-integer values I'd like to use. How could I loop through running the code with a list of decimal numbers?

    Read the article

  • combobox with for each loop

    - by Mary
    Hi I am a student do anybody know after populating the combobox with the database values. How to display the same value in the text box. When I select a name in the combobox the same name should be displayed in the text box I am using seleted item. Here is the code. I am getting the error the following error using the foreach loop foreach statement cannot operate on variables of type 'object' because 'object' does not contain a public definition for 'GetEnumerator' using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace DBExample { public partial class Form1 : Form { private OleDbConnection dbConn; // Connectionn object private OleDbCommand dbCmd; // Command object private OleDbDataReader dbReader;// Data Reader object private Member aMember; private string sConnection; // private TextBox tb1; // private TextBox tb2; private string sql; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { try { // Construct an object of the OleDbConnection // class to store the connection string // representing the type of data provider // (database) and the source (actual db) sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=c:member.mdb"; dbConn = new OleDbConnection(sConnection); dbConn.Open(); // Construct an object of the OleDbCommand // class to hold the SQL query. Tie the // OleDbCommand object to the OleDbConnection // object sql = "Select * From memberTable Order " + "By LastName , FirstName "; dbCmd = new OleDbCommand(); dbCmd.CommandText = sql; dbCmd.Connection = dbConn; // Create a dbReader object dbReader = dbCmd.ExecuteReader(); while (dbReader.Read()) { aMember = new Member (dbReader["FirstName"].ToString(), dbReader["LastName"].ToString(), dbReader["StudentId"].ToString(), dbReader["PhoneNumber"].ToString()); // tb1.Text = dbReader["FirstName"].ToString(); // tb2.Text = dbReader["LastName"].ToString(); // tb1.Text = aMember.X().ToString(); //tb2.Text = aMember.Y(aMember.ID).ToString(); this.comboBox1.Items.Add(aMember.FirstName.ToString()); // this.listBox1.Items.Add(aMember.ToString()); // MessageBox.Show(aMember.ToString()); // Console.WriteLine(aMember.ToString()); } dbReader.Close(); dbConn.Close(); } catch (System.Exception exc) { MessageBox.Show("show" + exc); } } private void DbGUI_Load(object sender, EventArgs e) { } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { this.textBox1.Text = comboBox1.SelectedItem.ToString(); textBox2.Text = string.Empty; foreach (var item in comboBox1.SelectedItem) textBox2.Text += item.ToString(); } private void textBox2_TextChanged(object sender, EventArgs e) { } private void textBox1_TextChanged(object sender, EventArgs e) { } } }

    Read the article

  • how to display bitmaps in listview?

    - by mary
    hi i want to show images downloaded in listview.images downloaded with function DownloadImage and are as bitmap.how to show in listview . name photoes with book_id in tabel book are aqual.i want each book has its own image. i can show in listview book_name and book_price just the problem with image book please help me class: package bookstore.category; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.http.NameValuePair; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Typeface; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.widget.ImageView; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.SimpleAdapter; import bookstore.pack.JSONParser; import bookstore.pack.R; import android.app.Activity; import android.app.ProgressDialog; public class Computer extends Activity { Bitmap bm = null; // progress dialog private ProgressDialog pDialog; // Creating JSON Parser object JSONParser jParser = new JSONParser(); ArrayList<HashMap<String, String>> computerBookList; private static String url_books = "http://10.0.2.2/project/computer.php"; // JSON Node names private static final String TAG_SUCCESS = "success"; private static final String TAG_BOOK = "book"; private static final String TAG_BOOK_NAME = "book_name"; private static final String TAG_BOOK_PRICE = "book_price"; private static final String TAG_BOOK_ID = "book_id"; private static final String TAG_MESSAGE = "massage"; // category JSONArray JSONArray book = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.category); Typeface font1 = Typeface.createFromAsset(getAssets(), "font/bnazanin.TTF"); // Hashmap for ListView computerBookList = new ArrayList<HashMap<String, String>>(); new LoadBook().execute(); } class LoadBook extends AsyncTask<String, String, String> { /** * Before starting background thread Show Progress Dialog * */ @Override protected void onPreExecute() { super.onPreExecute(); pDialog = new ProgressDialog(Computer.this); pDialog.setMessage("Please wait..."); pDialog.setIndeterminate(false); pDialog.setCancelable(false); pDialog.show(); } protected String doInBackground(String... args) { // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); // getting JSON string from URL JSONObject json = jParser.makeHttpRequest(url_books, "GET", params); // Check your log cat for JSON reponse Log.d("book:", json.toString()); try { // Checking for SUCCESS TAG int success = json.getInt(TAG_SUCCESS); if (success == 1) { DownloadImage("10.0.2.2/project/images/100.png"); DownloadImage("10.0.2.2/project/images/101.png"); DownloadImage("10.0.2.2/project/images/102.png"); DownloadImage("10.0.2.2/project/images/103.png"); DownloadImage("10.0.2.2/project/images/104.png"); DownloadImage("10.0.2.2/project/images/105.png"); DownloadImage("10.0.2.2/project/images/106.png"); DownloadImage("10.0.2.2/project/images/107.png"); DownloadImage("10.0.2.2/project/images/108.png"); DownloadImage("10.0.2.2/project/images/109.png"); DownloadImage("10.0.2.2/project/images/110.png"); // books found book = json.getJSONArray(TAG_BOOK); for (int i = 0; i < book.length(); i++) { JSONObject c = book.getJSONObject(i); // Storing each json item in variable String book_name = c.getString(TAG_BOOK_NAME); String book_price = c.getString(TAG_BOOK_PRICE); String book_id = c.getString(TAG_BOOK_ID); // creating new HashMap HashMap<String, String> map = new HashMap<String, String>(); // adding each child node to HashMap key => value map.put(TAG_BOOK_NAME, book_name); map.put(TAG_BOOK_PRICE, book_price); // map.put(TAG_AUTHOR_NAME, author_name); // adding HashList to ArrayList computerBookList.add(map); } return json.getString(TAG_MESSAGE); } else { System.out.println("no book found"); } } catch (JSONException e) { e.printStackTrace(); } return null; } /** * After completing background task Dismiss the progress dialog * **/ protected void onPostExecute(String file_url) { pDialog.dismiss(); // updating UI from Background Thread runOnUiThread(new Runnable() { ListView view1 = (ListView) findViewById(R.id.list_view); public void run() { ImageView iv = (ImageView) findViewById(R.id.list_image); // bm=BitmapFactory.decodeResource(getResources(), resId); //bm=BitmapFactory.decodeResource(null,R.id.list_image); // iv.setImageBitmap(bm); /* * */ /** * Updating parsed JSON data into ListView * */ ListAdapter adapter = new SimpleAdapter(Computer.this, computerBookList, R.layout.search_item, new String[] { TAG_BOOK_NAME, TAG_BOOK_PRICE }, new int[] { R.id.book_name, R.id.book_price }); view1.setAdapter(adapter); } }); } } private Bitmap DownloadImage(String URL) { Bitmap bitmap = null; InputStream in = null; try { in = OpenHttpConnection(URL); bitmap = BitmapFactory.decodeStream(in); in.close(); } catch (IOException e1) { e1.printStackTrace(); } return bitmap; } private InputStream OpenHttpConnection(String urlString) throws IOException { InputStream in = null; int response = -1; URL url = new URL(urlString); URLConnection conn = url.openConnection(); if (!(conn instanceof HttpURLConnection)) throw new IOException("Not an HTTP connection"); try { HttpURLConnection httpConn = (HttpURLConnection) conn; httpConn.setAllowUserInteraction(false); httpConn.setInstanceFollowRedirects(true); httpConn.setRequestMethod("GET"); httpConn.connect(); response = httpConn.getResponseCode(); if (response == HttpURLConnection.HTTP_OK) { in = httpConn.getInputStream(); } } catch (Exception ex) { throw new IOException("Error connecting"); } return in; } }

    Read the article

  • Getting data from JFrame AFTER the form is filled

    - by mary jane
    I'm trying to get data for my application from a form set in an external window (getDataWindow extends javax.swing.JFrame). The problem is that functions are executed before form is filled in. getDataWindow dataW=new getDataWindow(); dataW.setVisible(true); size=dataW.returnSize(); I've tried also adding additional boolean variable to getDataWindow getDataWindow dataW=new getDataWindow(); dataW.setVisible(true); while(!dataW.checkIfReady()){wait();} size=dataW.returnSize(); But it makes also the window wait (it appears but it's black inside and nothing happens). I think i should create some threads for that - I've tried to call a window making function getDataWindow in java.awt.EventQueue.invokeLater(new Runnable()) but I had to initialize dataW earlier so dataW.checkIfReady() could be called, so it is a catch 22.

    Read the article

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