Search Results

Search found 46 results on 2 pages for 'mani batra'.

Page 1/2 | 1 2  | Next Page >

  • Innovating with Customer Needs Management

    - by Anurag Batra
    We're pleased to announce the addition of Agile Customer Needs Management (CNM) to the portfolio of PLM offerings by Oracle. CNM allows manufacturing companies to capture the voice of the customer and market, and arm their product designers with the information that they need to better meet customer requirements. It's an Enterprise 2.0 product that focuses on the quick information capture, ease of organizing information and association of that information with the product record - some of the key aspects of early stage innovation. Read on to learn more about this revolutionary new product that redefines how information is used to drive innovation.

    Read the article

  • Building a chat-like functionality in iOS

    - by Mani BAtra
    I was planning to implement a functionality wherein a user can send data to a friend of his, similar to sending messages in WhatsApp. This is how I broke down the problem : The user registers for the app. This equates to user info being stored on a dedicated server. With the phone number as the key identifier. The user selects the friend to send a message to and pushes the data. The receiver polls the server regularly and acknowledges that the data has been received. I did a little bit of research and am thinking of implementing this using the XMPP Framework for iOS. Any pointers as to is this the correct implementation or some advice in general?

    Read the article

  • Dynamic if statement evaluation problem with string comparison

    - by Mani
    I tried the example given in this thread to create if statement dynamically using BeanShell. But it is not working fine. Instead of using "age" variable as integer, i have used string in the below example. I am getting "fail" as answer instead of "success". Can anyone help me? /* To change this template, choose Tools | Templates and open the template in the editor. */ import java.lang.reflect.*; import bsh.Interpreter; public class Main { public static String d; public static void main(String args[]) { try { String age = "30"; String cond = "age==30"; Interpreter i = new Interpreter(); i.set("age", age); System.out.println(" sss" + i.get("age")); if((Boolean)i.eval(cond)) { System.out.println("success"); } else { System.out.println("fail"); } } catch (Throwable e) { System.err.println(e); } } } Thanks, Mani

    Read the article

  • Dymanic if statement evaluation problem with string comparison

    - by Mani
    I tried the example given in http://forums.sun.com/thread.jspa?threadID=780576&tstart=67605 to create if statement dynamically. But it is not working fine. Instead of using "age" variable as integer, i have used string in the below example. I am getting "fail" as answer instead of "success". Can anyone help me? / To change this template, choose Tools | Templates and open the template in the editor. / import java.lang.reflect.*; import bsh.Interpreter; public class Main { public static String d; public static void main(String args[]) { try { String age = "30"; String cond = "age==30"; Interpreter i = new Interpreter(); i.set("age", age); System.out.println(" sss" + i.get("age")); if((Boolean)i.eval(cond)) { System.out.println("success"); } else { System.out.println("fail"); } } catch (Throwable e) { System.err.println(e); } } } Thanks, Mani

    Read the article

  • Podcast Show Notes: The Role of the Cloud Architect

    - by Bob Rhubart
    Ron Batra James Baty If you want to understand what a cloud architect does, what better way than to talk to people in that role? In this program that’s exactly what we’ll do. Joining me for this conversation are cloud architects Ron Batra and Dr. James Baty. Ron is an Oracle ACE Director and product director for cloud computing at AT&T , and Jim is Vice President of Oracle’s Global Enterprise Architecture Program . This interview was recorded on June 12, 2012. The Conversation Listen to Part 1: How cloud computing is driving the supply-chaining of IT and the democratization of the activity of architecture. Listen to Part 2 (July 12): A discussion of DevOps, cloud computing, and the increasing velocity of IT. Listen to Part 3 (July 19): Why architects need to up their game to thrive and succeed in a cloud-driven world. Coming Soon A conversation about the International SOA, Cloud & Service Technology Symposium with a panel that features Thomas Erl and several Oracle community members who will be presenting at that event.

    Read the article

  • Restrict Overriding memory_limit in php.ini

    - by Rohit Batra
    We have a issue that just came to our notice, some of our developers used ini_set('memory_limit', -1) to over-ride the php.ini memory_limit settings in their code files. Due to which sometimes our Memory/CPU usage is way far more than usual and we even have experienced server hanging/crashing many times. Is there any way to restrict these changes for certain params like memory_limit, upload_max_filesize & post_max_size? Users should not be able to edit them after a certain limit set? Sorry if i asked a dumb question, tried searching but there was no reference to this only found answers asking for increasing these parameters.

    Read the article

  • Predictive vs Least Connection Load Balancing Techniques

    - by Mani
    I have a windows based desktop application that communicates via TCP to the application servers. (windows 2003). No sticky sessions between client calls. We have exactly 2 servers to load balance and we are thinking to use a F5 hardware NLB. The application is a heavy load types, doing not much bussiness logic in the services but retrieving quite a big amount of data at most of the times. May be on an average 5000 to 10000 records at all times. Used mainly for storing and retirieving data and no special processing of data or calculations running on the server side. I am favouring 'predictive' considering my services take a while at times to return data and hence tracking the feedback would yield some better routing as in predictive. I am not sure if the given data is sufficient enough to suggest some ideas but considering these, what would be some suggestions\things to consider\best between Predictive and Least Connections ? Thanks.

    Read the article

  • apache & load balancing?

    - by Mani
    In apache, mod_proxy_balancer support loan balancing in the easiest way. My question is: Please refer the https://blogs.oracle.com/oswald/entry/easy_http_load_balancing_with When the result the request is processed by workers (load balancing nodes), it comes to load balancing server and then go to client or directly from workers it goes ? plz answer me. Example: Method 1: Web Client -- Load Balancer - Worker - Load Balancer - Web Client OR Method 2: Web Client -- Load Balancer - Worker - Web Client What is happening in apache load balancer ?

    Read the article

  • Two people using the same computer at the same time remotely!

    - by Mani
    We have two computer in office and two people. My computer is much more faster than another computer. Is it possible my colleague connect to my computer remotely and work by my computer? Using "Remote Desktop" in Windows only one user can log into computer. So when he connect remotely, my user logged off. Is there a tool which can help in this case? I already knew VNC (RealVNC) But it's not helping because when a user connect to my computer, he see exactly my desktop, not his own user desktop.

    Read the article

  • Show Notes: Getting Past the Cloud Hype

    - by Bob Rhubart
    This week’s ArchBeat podcast features an unvarnished bit of conversation culled from a recent virtual meet-up. These meet-ups are informal conversations among architects, many of who have participated in previous ArchBeat programs. There’s no prearranged topic, so the participants talk about whatever is on their minds. The most recent meet-up included Oracle ACE Director Ran Batra, director of cloud computing product development with AT&T, and Daniel Templeton, principal product manager for Oracle Grid Engine, and the man behind Dan T’s GridBlog. The conversation took place at the end of the year – and the end of the decade – a time when most tech publications feature their predictions for the coming year.  I wanted a different spin on that theme, so I asked Ron and Dan to talk about the technologies about which they weren’t all that optimistic.   I found that ten-minute chunk of conversation particularly interesting, so that’s what you’re going to hear this week. Listen Get Social If you have questions or comment for Ron and/or Daniel you can connect via the following: Ron Batra Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Daniel Templeton Blog | Twitter | LinkedIn Coming Up Oracle ACE Director Debra Lilley talks about her role in the UKOUG’s development group and that group’s collaboration with Oracle on Oracle Fusion Applications. Dr Frank Munz, author of Middleware and Cloud Computing: Oracle Fusion Middleware on Amazon Web Services and Rackspace Cloud. Stay tuned: http://feeds2.feedburner.com/OtnArch2ArchRSS   del.icio.us Tags: oracle,oracle technology network,archbeat,cloud computing,software architect,podcast Technorati Tags: oracle,oracle technology network,archbeat,cloud computing,software architect,podcast

    Read the article

  • links for 2010-12-17

    - by Bob Rhubart
    Overview of Oracle Enterprise Manager Management Packs How does Oracle Enterprise Manager Grid Control do so much across so many different systems? Porus Homi Havewala has the answers.  (tags: oracle otn grid soa entarch) How to overcome cloud computing hurdles - Computerworld What does it take to go from 'we should move to the cloud' to a successful cloud computing strategy? This excerpt from Silver Clouds, Dark Linings offers advice on crossing cloud chasms and developing a successful roadmap. (tags: ping.fm) Security in OBIEE 11g, Part 2 Guest blogger Pravin Janardanam continues the discussion about OBIEE 11g Authorization and other Security aspects. (tags: oracle otn security businessintelligence obiee) Oracle Fusion Middleware Security: A Quick Note about Oracle Access Manager 11g and WebLogic "OAM 11g integrates with WebLogic using the very same components used to integrate OAM 10.1.4.3. Under most circumstances, that means using the OAM Identity Asserter...which asserts the OAM_REMOTE_USER header as the user principal in the JAAS subject." - Brian Eidelman (tags: WebLogic oracle) Comparison Between Cluster Multicast Messaging and Unicast Messaging Mode Weblogic wonders!!! "When servers are in a cluster, these member servers communicate with each other by sending heartbeats and indicating that they are alive. For this communication between the servers, either unicast or multicast messaging is used." -- Divya Duryea (tags: weblogic oracle) Ron Batra: Cloud Computing Series: IV: Database.com, ExaData on Demand and connecting the dots Oracle ACE Direct Ron Batra offers his assessment of recent rumblings in the Cloud. (tags: oracle otn oracleace cloud database)

    Read the article

  • Why touching "d_name" makes calls to readdir() fail?

    - by Sarah Mani
    Hi, I'm trying to write a little helper for Windows which eventually will accept a file extension as an argument and return the number of files of that kind in the current directory. To do so, I'm reading the file entries in the directories and after getting the extension I'd like to convert it to lowercase to compare it with the yet-to-add specified argument. When converting the extension to lowercase I found that touching even a duplicate string of the d_name variable will cause a strange behaviour, like no more calls to readdir are called. Here is the code I'm using right now (the commented code is preliminary) and outputs for a given directory: #include <ctype.h> #include <dirent.h> #include <stdio.h> #include <string.h> char * strrch(char *string, size_t elements, char character) { char *reverse = string + elements; while (--reverse != string) if (*reverse == character) return reverse; return NULL; } void test(char *string) { // Even being a duplicate will make it fail: char *str = strdup(string); printf("Strings: %s %s\n", string, str); *str = 'a'; printf("Strings: %s %s\n", string, str); //unsigned short int i = 0; //for (; str[i] != '\0', str++; i++) // str[i] = tolower((unsigned char) str[i]); //puts(str); } int main(int argc, char **argv) { DIR *directory; struct dirent *element; if (directory = opendir(".")) { while (element = readdir(directory)) test(strrch(element->d_name, element->d_namlen, '.')); closedir(directory); puts(NULL); } else puts("Couldn't open the directory.\n"); } Output without modifying the duplicate (modification and the second printf call commented): Strings: (null) (null) Strings: . . Strings: .exe .exe Strings: .pdf .pdf Strings: .c .c Strings: .ini .ini Strings: .pdf .pdf Strings: .pdf .pdf Strings: .pdf .pdf Strings: .flac .flac Strings: .FLAC .FLAC Strings: .lnk .lnk Strings: .URL .URL Output of the same directory (with the code above, with the 2 printfs): Strings: (null) (null) Is there anything wrong? Is it a compiler issue? I'm using GCC 4.4.3 in Windows (MinGW) right now. Thank you very much for your help. By the way, is there any other way to work with files and directories in a Windows environment not using the POSIX functions?

    Read the article

  • problem with jtabbedpane in java..

    - by mani
    hai, is it possible to loading of tabs in jtabedpane dyanamically in java.. that means i have frame that consinting of one tabbedpane.. in that i have 10 tabs and in each tab consting of another tabbedpane and in that each tabbedpane has 4 tabs and each tab consisting buttons and textfields...... when i login into my project the next frame takes more time to visible.... this is happens why because i have more tabbedpanes in my frame so that it takes the lot's of time to visible.. my question is.. is it possible to load tabs content dynamically when i click the tab in tabbedpane..... or is it possible to load tabbedpanes fastly......????????

    Read the article

  • Experts help needed on libcurl programming in sending HTTP HEAD Request.

    - by Mani
    Hi all, I need clarifications on using libcurl for the following: I need to send an http HEAD request shown as below :: HEAD /mshare/3/30002:12:primary/stream_xNKNVH.mpeg HTTP/1.1 Host: 192.168.70.1:8080 Accept: */* User-Agent: Kreatel_IP-STB getcontentFeatures.dlna.org: 1 The code I wrote (shown below) , sends the HEAD Request in slightly different way: curl_global_init(CURL_GLOBAL_ALL); CURL* ctx = NULL; const char *url = "http://192.168.70.1:8080/mshare/3/30002:12:primary/stream_xNKNVH.mpeg" ; char *returnString; struct curl_slist *headers = NULL; ctx = curl_easy_init(); headers = curl_slist_append(headers,"Accept: /"); headers = curl_slist_append(headers,"User-Agent: Kreatel_IP-STB");\ headers = curl_slist_append(headers,"getcontentFeatures.dlna.org: 1"); headers = curl_slist_append(headers,"Pragma:"); headers = curl_slist_append(headers,"Proxy-Connection:"); curl_easy_setopt(ctx,CURLOPT_HTTPHEADER , headers ); curl_easy_setopt(ctx,CURLOPT_NOBODY ,1 ); curl_easy_setopt(ctx,CURLOPT_VERBOSE, 1); curl_easy_setopt(ctx,CURLOPT_URL,url ); curl_easy_setopt(ctx,CURLOPT_NOPROGRESS ,1 ); curl_easy_perform(ctx); curl_easy_cleanup(ctx); curl_global_cleanup(); The code shown above sends the HEAD Request in slightly different form (shown below) HEAD http://192.168.70.1:8080/mshare/3/30002:12:primary/stream_xNKNVH.mpeg HTTP/1.1 Host: 192.168.70.1:8080 Proxy-Connection: Keep-Alive Accept: */* User-Agent: Kreatel_IP-STB getcontentFeatures.dlna.org: 1 Can any one , share the appropriate code ?

    Read the article

  • help needed on libcurl programming in sending HTTP HEAD Request.

    - by Mani
    Hi all, I need clarifications on using libcurl for the following: I need to send an http HEAD request shown as below :: HEAD /mshare/3/30002:12:primary/stream_xNKNVH.mpeg HTTP/1.1 Host: 192.168.70.1:8080 Accept: */* User-Agent: Kreatel_IP-STB getcontentFeatures.dlna.org: 1 The code I wrote (shown below) , sends the HEAD Request in slightly different way: curl_global_init(CURL_GLOBAL_ALL); CURL* ctx = NULL; const char *url = "http://192.168.70.1:8080/mshare/3/30002:12:primary/stream_xNKNVH.mpeg" ; char *returnString; struct curl_slist *headers = NULL; ctx = curl_easy_init(); headers = curl_slist_append(headers,"Accept: */*"); headers = curl_slist_append(headers,"User-Agent: Kreatel_IP-STB");\ headers = curl_slist_append(headers,"getcontentFeatures.dlna.org: 1"); headers = curl_slist_append(headers,"Pragma:"); headers = curl_slist_append(headers,"Proxy-Connection:"); curl_easy_setopt(ctx,CURLOPT_HTTPHEADER , headers ); curl_easy_setopt(ctx,CURLOPT_NOBODY ,1 ); curl_easy_setopt(ctx,CURLOPT_VERBOSE, 1); curl_easy_setopt(ctx,CURLOPT_URL,url ); curl_easy_setopt(ctx,CURLOPT_NOPROGRESS ,1 ); curl_easy_perform(ctx); curl_easy_cleanup(ctx); curl_global_cleanup(); The code shown above sends the HEAD Request in slightly different form (shown below) HEAD http://192.168.70.1:8080/mshare/3/30002:12:primary/stream_xNKNVH.mpeg HTTP/1.1 Host: 192.168.70.1:8080 Proxy-Connection: Keep-Alive Accept: */* User-Agent: Kreatel_IP-STB getcontentFeatures.dlna.org: 1 Can any one , share the appropriate code ?

    Read the article

  • Running a Java process in Windows even after the user is logged out

    - by Mani
    I have a batch file that starts a Java process in a Windows 2003 server. As per the security policy, the users of that machine are logged off forcefully, if the user is inactive for a certain period of time. The problem is that when the user is logged out, the process also dies. I scheduled a new task (Control Panel - Scheduled Tasks) and selected the option of 'When my computer starts' and gave the user account details there. But it doesn't seem to have any effect, the user is still logged out and the process dies. Is a reboot necessary to make this change effective? And after the reboot, will I achieve what I'm expecting (keeping the process alive)? Alternatively, will running this process as a Windows Service solve the problem? If so, can you please let me know how I can make a Java program or a batch file to run as a Windows Service? I would prefer not to use any other third party tools or libraries. Thanks

    Read the article

  • Try to fill the GAE datastore but the code consumes to much cpu time. How to optimize this?

    - by Neverland
    I try to get the list of images in Amazon EC2 inside the Google datastore. I want to realize this with a cron job inside the GAE. class AmazonEC2uswest(db.Model): ami = db.StringProperty(required=True) mani = db.StringProperty() typ = db.StringProperty() arch = db.StringProperty() state = db.StringProperty() owner = db.StringProperty() class CronAMIsAmazonUS_WEST(webapp.RequestHandler): def get(self): aws_access_key_id_admin = "<secret>" aws_secret_access_key_admin = "<secret>" conn_us_west = boto.ec2.connect_to_region('us-west-1', aws_access_key_id=aws_access_key_id_admin, aws_secret_access_key=aws_secret_access_key_admin, is_secure = False) liste_images_us_west = conn_us_west.get_all_images() laenge_liste_images_us_west = len(liste_images_us_west) for i in range(laenge_liste_images_us_west): datastore_uswest_AMIs = AmazonEC2uswest(ami=liste_images_us_west[i].id, mani=str(liste_images_us_west[i].location), typ=liste_images_us_west[i].type, arch=liste_images_us_west[i].architecture, state=liste_images_us_west[i].state, owner=liste_images_us_west[i].ownerId) datastore_uswest_AMIs.put() The problem: Getting the list with get_all_images() lasts only a few seconds. But writing the data to the Google datastore needs way too much CPU time. My IBM T42p (P4M with 2GHz) needs for that piece of code approx. 1 Minute! Is it possible to optimize my code in a way that it needs fewer CPU time?

    Read the article

  • links for 2011-03-08

    - by Bob Rhubart
    The Empowered Business "Someone needs to be the enterprise parent that asks the question, “do you really need that?” It may be a shiny new thing, but does it make a difference in the ability to accomplish the strategy and goals?" - Enterprise Architect Todd Biske (tags: enterprisearchitecture) Knowledge Workers in the British Raj "While we’ve used technology to change business, business has also evolved to the point that it’s changing how we think about and use technology." - Peter Evans Greenwood (tags: enterprisearchitecture enterprise2.0) Arun Gupta, Miles to go ...: OTN Developer Day Boston 2011 - Slides & Trip Report Arun Gupta shares slides from his Developer Day presentations. (tags: oracle otn java) Use WLST to Delete All JMS Messages From a Destination (James Bayer's Blog) James Bayer responds to a question. (tags: oracle otn weblogic jms) Triangle Circle Square: Apex in the Amazon Cloud Scott Wesley shares several links to resources covering Oracle Apex on an Amazon EC2 instance. (tags: oracle apex ec2 amazon cloud) William Vambenepe: Reading IBM's proposed standard for Cloud Architecture The always entertaining William Vambenepe gives IBM's proposed Cloud standards the full Ebert. (tags: oracle cloud ibm standards) Government Information Group Cloud Computing Research Study "The twin pressures of reduced budgets and the need for greater efficiency have led the federal government to strongly promote cloud computing as a solution whenever possible." (tags: cloudcomputing cloud) The Ron Batra Blog: Technology Whispers: Top 10 Reasons to go ExaData "Continuing my exploration of ExaData, I thought I'd take a minute to consolidate my thoughts into key reasons for which Oracle ExaData could be a good fit for your needs." - Oracle ACE Director Ron Batra (tags: oracle oracleace exadata) Oracle WebCenter: Composite Applications & Mash-Ups (Oracle Enterprise 2.0 Blog) "The new Business Mash-up editor allows business users to take any Oracle Application or 3rd party application and wire the backend data sources or APIs to a rich set of visualizations and reuse them in mashups." (tags: oracle webcenter enterprise2.0) Antonio Romero: Great Discussion of ETL and ELT Tooling in TDWI Linkedin Group Antonio says: "There’s a great discussion of ETL and ELT tooling going on in the official TDWI Linkedin group, under the heading 'How Sustainable is SQL for ETL?' It delves into a wide range of topics." (tags: oracle linkedin etl elt) YouTube - Bunny Inc. - Episode 1. Mr. CIO meets Mr. Executive Manager Yes, it's a commercial. But it's well done and it's funny. (tags: e20 enterprise2.0 webcenter) Markus Eisele: Both Weblogic and Glassfish are strategic products for Oracle Oracle ACE Director Markus Eisele shares selected quotes pulled from the recent TechCast Live interview with Oracle's Anil Gaur and Adam Leftik (tags: oracle java weblogic glassfish) How to become an Oracle SOA expert? (SOA Partner Community Blog) Jurgan Kress shares info and links for those interested in capitalizing on SOA. (tags: oracle soa)

    Read the article

  • links for 2011-02-09

    - by Bob Rhubart
    Tech Cast Live - Java and Oracle, One Year Later - February 15th 10AM PST (Oracle Technology Network Blog (aka TechBlog)) (tags: ping.fm) The impact of IT decisions on organizational culture - O'Reilly Radar "While I believe we recognize the limiting qualities of IT decisions, I'd suggest we've insufficiently studied the degree to which those decisions in aggregate can have a large influence on organizational culture." - Jonathan Reichental, Ph.D. (tags: ITgovernance organizationalculture enterprisearchitecture) Women "computers" of World War II - Boing Boing "Before it came to mean laptops, PCs, or even room-sized machines, "computer" was what you called a person who did mathematical calculations for a living. That job was vitally important during World War II. And, like many vital jobs on the homefront, it was turned over to women..." (tags: computers history worldwar2) InfoQ: Book Excerpt and Interview: 100 SOA Questions Asked and Answered A new "100 SOA Questions Asked and Answered " book by Kerrie Holley and Ali Arsanjani provides a deep insight into SOA covering a wide spectrum of topics from SOA basics to its business and organizational impact, to SOA methods and architecture to SOA future. InfoQ spoke with Kerrie Holley and Ali Arsanjani about their book. (tags: ping.fm) @myfear: GlassFish City - Another view onto your favorite application server Oracle ACE Director Markus Eisele runs GlassFish through CodeCity. (tags: oracle otn oracleace glassfish codecity) The Ron Batra Blog: Technology Whispers: Upcoming Presentations Oracle ACE Director Ron Batra shares details on upcoming presentations at OAUG events in the US and Dubai. (tags: oaug c11 oracle otn oracleace) Free ADF Training Event in the UK (Grant Ronald's Blog) Gobsmack survivor Grant Ronald with the details on an Oracle ADF training session he'll conduct on 11 May 2011 at the UK Oracle office in Reading. (tags: oracle otn adf) Java Spotlight Episode 16 - Richar Bair - The Java Spotlight Podcast The latest Java Spotlight podcast features an interview with Java Client Architect Richar Bair. (tags: oracle java podcast) Stewart Bryson: OBIEE 11g Migrations "[Rittman Mead's] Mark and Venkat have covered OBIEE migration methodologies in the past (see here, here and here), but I decided to throw my hat in the ring on the subject, as I had to develop a methodology for a client recently and wanted to share my experiences." - Stewart Bryson (tags: oracle otn obiee businessintelligence) Dr. Chris Harding: The golden thread of interoperability | Open Group Blog "There are so many things going on at every Conference by The Open Group that it is impossible to keep track of all of them, and this week’s Conference in San Diego, California, is no exception. The main themes are Cybersecurity, Enterprise Architecture, SOA and Cloud Computing." - Dr. Chris Harding (tags: entarch soa interoperability cloud) Marc Kelderman: OSB: Creating an Asynchronous / Fire-Forget WebService Call Creating a fire-and-forget call via OSB is simple, according to solution architect Marc Kelderman. "The trick is to send NO response back to the caller, only an HTTP response code, 200 or any other." (tags: oracle otn servicebus)

    Read the article

  • G?rer les bases de contenu SharePoint - G?rer la croissance du volume des donn?es

    Dans le cadre de la gestion quotidienne de ferme SharePoint, il existe une partie qu'il faut surveiller avec attention. En effet, l'utilisation des Team Sites se fait bien souvent de mani?re plut?t virale et vous pouvez rapidement vous retrouver avec des centaines (voir des milliers) de collections de sites. La question de la r?partition de ces collections dans les bases de contenu est tr?s importante.

    Read the article

  • how to execute two thread simultaneously in java swing?

    - by jcrshankar
    My aim is to select all the files named with MANI.txt which is present in their respective folders and then load path of the MANI.txt files different location in table. After I load the path in the table,I used to select needed path and modifiying those. To load the MANI.txt files taking more time,because it may present more than 30 times in my workspace or etc. until load the files I want to give alarm to the user with help of ProgessBar.Once the list size has been populated I need to disable ProgressBar. Could anyone please help me out on this? import java.awt.*; import javax.swing.*; import javax.swing.table.*; import java.awt.event.*; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; public class JTableHeaderCheckBox extends JFrame implements ActionListener { Object colNames[] = {"", "Path"}; Object[][] data = {}; DefaultTableModel dtm; JTable table; JButton but; java.util.List list; public void buildGUI() { dtm = new DefaultTableModel(data,colNames); table = new JTable(dtm); table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); int vColIndex = 0; TableColumn col = table.getColumnModel().getColumn(vColIndex); int width = 10; col.setPreferredWidth(width); int vColIndex1 = 1; TableColumn col1 = table.getColumnModel().getColumn(vColIndex1); int width1 = 500; col1.setPreferredWidth(width1); JFileChooser chooser = new JFileChooser(); //chooser.setCurrentDirectory(new java.io.File(".")); chooser.setDialogTitle("Choose workSpace Path"); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setAcceptAllFileFilterUsed(false); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION){ System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory()); System.out.println("getSelectedFile() : " + chooser.getSelectedFile().getAbsolutePath()); } String path= chooser.getSelectedFile().getAbsolutePath(); File folder = new File(path); Here I need progress bar GatheringFiles ob = new GatheringFiles(); list=ob.returnlist(folder); for(int x = 0; x < list.size(); x++) { dtm.addRow(new Object[]{new Boolean(false),list.get(x).toString()}); } JPanel pan = new JPanel(); JScrollPane sp = new JScrollPane(table); TableColumn tc = table.getColumnModel().getColumn(0); tc.setCellEditor(table.getDefaultEditor(Boolean.class)); tc.setCellRenderer(table.getDefaultRenderer(Boolean.class)); tc.setHeaderRenderer(new CheckBoxHeader(new MyItemListener())); but = new JButton("REMOVE"); JFrame f = new JFrame(); pan.add(sp); but.move(650, 50); but.addActionListener(this); pan.add(but); f.add(pan); f.setSize(700, 100); f.pack(); f.setLocationRelativeTo(null); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); } class MyItemListener implements ItemListener { public void itemStateChanged(ItemEvent e) { Object source = e.getSource(); if (source instanceof AbstractButton == false) return; boolean checked = e.getStateChange() == ItemEvent.SELECTED; for(int x = 0, y = table.getRowCount(); x < y; x++) { table.setValueAt(new Boolean(checked),x,0); } } } public static void main (String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run(){ new JTableHeaderCheckBox().buildGUI(); } }); } public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub if(e.getSource()==but) { System.err.println("table.getRowCount()"+table.getRowCount()); for(int x = 0, y = table.getRowCount(); x < y; x++) { if("true".equals(table.getValueAt(x, 0).toString())) { System.err.println(table.getValueAt(x, 0)); System.err.println(list.get(x).toString()); delete(list.get(x).toString()); } } } } public void delete(String a) { String delete = "C:"; System.err.println(a); try { File inFile = new File(a); if (!inFile.isFile()) { System.out.println("Parameter is not an existing file"); return; } //Construct the new file that will later be renamed to the original filename. File tempFile = new File(inFile.getAbsolutePath() + ".tmp"); BufferedReader br = new BufferedReader(new FileReader(inFile)); PrintWriter pw = new PrintWriter(new FileWriter(tempFile)); String line = null; //Read from the original file and write to the new //unless content matches data to be removed. while ((line = br.readLine()) != null) { System.err.println(line); line = line.replace(delete, " "); pw.println(line); pw.flush(); } pw.close(); br.close(); //Delete the original file if (!inFile.delete()) { System.out.println("Could not delete file"); return; } //Rename the new file to the filename the original file had. if (!tempFile.renameTo(inFile)) System.out.println("Could not rename file"); } catch (FileNotFoundException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } } } class CheckBoxHeader extends JCheckBox implements TableCellRenderer, MouseListener { protected CheckBoxHeader rendererComponent; protected int column; protected boolean mousePressed = false; public CheckBoxHeader(ItemListener itemListener) { rendererComponent = this; rendererComponent.addItemListener(itemListener); } public Component getTableCellRendererComponent( JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (table != null) { JTableHeader header = table.getTableHeader(); if (header != null) { rendererComponent.setForeground(header.getForeground()); rendererComponent.setBackground(header.getBackground()); rendererComponent.setFont(header.getFont()); header.addMouseListener(rendererComponent); } } setColumn(column); rendererComponent.setText("Check All"); setBorder(UIManager.getBorder("TableHeader.cellBorder")); return rendererComponent; } protected void setColumn(int column) { this.column = column; } public int getColumn() { return column; } protected void handleClickEvent(MouseEvent e) { if (mousePressed) { mousePressed=false; JTableHeader header = (JTableHeader)(e.getSource()); JTable tableView = header.getTable(); TableColumnModel columnModel = tableView.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(e.getX()); int column = tableView.convertColumnIndexToModel(viewColumn); if (viewColumn == this.column && e.getClickCount() == 1 && column != -1) { doClick(); } } } public void mouseClicked(MouseEvent e) { handleClickEvent(e); ((JTableHeader)e.getSource()).repaint(); } public void mousePressed(MouseEvent e) { mousePressed = true; } public void mouseReleased(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } } ****************** import java.io.File; import java.util.*; public class GatheringFiles { public static List returnlist(File folder) { List<File> list = new ArrayList<File>(); List<File> list1 = new ArrayList<File>(); getFiles(folder, list); return list; } private static void getFiles(File folder, List<File> list) { folder.setReadOnly(); File[] files = folder.listFiles(); for(int j = 0; j < files.length; j++) { if( "MANI.txt".equals(files[j].getName())) { list.add(files[j]); } if(files[j].isDirectory()) getFiles(files[j], list); } } }

    Read the article

  • Set List View Size Android

    - by Sandeep
    Hello , I am using List View in my project where i have used a xml file which is used to create the list item.Then i have used it programmatically in my class which is extended by ListActivity. But the problem is i have to add a button in the bottom of screen which is not related to list view but List view covers all the screen. So,is there any way to add button in bottom with list view in android. My Code is :- import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; public class Options extends ListActivity { String[] items; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_RIGHT_ICON); items = getResources().getStringArray(R.array.chantOption_array); setListAdapter(new IconicAdapter()); ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setBackgroundResource(R.drawable.ichant_logo); setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON, R.drawable.icon_t); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // When clicked, show a toast with the TextView text Toast.makeText(getApplicationContext(), items[position], Toast.LENGTH_SHORT).show(); if ("Gayatri Mantra".equals(items[position].toString())) { int[] timeintervals = { 23900, 24000 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.gayatri, R.raw.gayatri, R.drawable.icon_gayatri, "Gayatri Mantra", timeintervals); } if ("Om Mani Padme Hum".equals(items[position].toString())) { int[] timeintervals = { 5500, 8200, 11100, 13900, 34100, 36700, 39500, 42300, 59300, 62000, 64800, 67600, 124600 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.ommanipadmehum, R.raw.om_mani, R.drawable.icon_padme, "Om Mani Padme Hum", timeintervals); } if ("Sai Ram".equals(items[position].toString())) { // Audio time interval for bead+total time duration of audio int[] timeintervals = { 4800, 7500, 10400, 12600, 15800, 18600, 21600, 24400, 25000 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.sairam, R.raw.sairam, R.drawable.icon_sairam, "Sai Ram", timeintervals); } if ("Aum".equals(items[position].toString())) { // Audio time interval for bead+total time duration of audio int[] timeintervals = { 12850, 13000 }; // startChantActivity(TotalMala_loop,Total_Bead_Loop,BacgroundImage,Icon,Title,BeadsTotalTimeIntervals+totalTimeDurationOfAudio) startChantActivity(2, 108, R.drawable.aum, R.raw.aum, R.drawable.ico_aum, "Aum", timeintervals); } } }); } class IconicAdapter extends ArrayAdapter { IconicAdapter() { super(Options.this, R.layout.list_item, items); } public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = getLayoutInflater(); View row = inflater.inflate(R.layout.list_item, parent, false); TextView label = (TextView) row.findViewById(R.id.label); label.setText(" "+items[position]); ImageView icon = (ImageView) row.findViewById(R.id.icon); if (items[position].equals("Gayatri Mantra")) { icon.setImageResource(R.drawable.icon_gayatri); } if (items[position].equals("Om Mani Padme Hum")) { icon.setImageResource(R.drawable.icon_padme); } if (items[position].equals("Sai Ram")) { icon.setImageResource(R.drawable.icon_sairam); } if (items[position].equals("Aum")) { icon.setImageResource(R.drawable.ico_aum); } return (row); } } protected void startChantActivity(int mala_loop, int beads_loop, int background, int media, int titleIcon, String title, int[] timeintervals) { Bundle bundle = new Bundle(); bundle.putInt("mala_loop", mala_loop); bundle.putInt("beads_loop", beads_loop); bundle.putInt("background", background); bundle.putInt("media", media); bundle.putInt("titleIcon", titleIcon); bundle.putString("title", title); bundle.putIntArray("intervals", timeintervals); Intent intent = new Intent(this, ChantBliss.class); intent.putExtras(bundle); startActivityForResult(intent, this.getSelectedItemPosition()); } } And Corresponding xml file is: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:paddingLeft="2px" android:paddingRight="2px" android:paddingTop="2px" android:layout_height="wrap_content" /> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="22sp" android:textColor="#ff000000" /> </LinearLayout> Thanks in Advance: Sandeep

    Read the article

  • Oracle saves with Oracle Database 11g and Advanced Compression

    - by jenny.gelhausen
    Oracle Corporation runs a centralized eBusiness Suite system on Oracle Database 11g for all its employees around the globe. This clustered Global Single Instance (GSI) has scaled seamlessly with many acquisitions over the years, doubling the number of employees since 2001 and supporting around 100,000 employees today, 24 hours a day, 7 days a week around the world. In this podcast, you'll hear from Raji Mani, IT Director for Oracle's PDIT Group, on how Oracle Database 11g and Advanced Compression is helping to save big on storage costs. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-13185312-1"); pageTracker._trackPageview(); } catch(err) {}

    Read the article

  • 'module' object has no attribute 'PY2'

    - by ManikandanV
    I am using ubuntu 14.04, was trying to install python-memcache. I have got an error like Downloading/unpacking python-memcached Downloading python-memcached-1.53.tar.gz Cleaning up... Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1229, in prepare_files req_to_install.run_egg_info() File "/usr/lib/python2.7/dist-packages/pip/req.py", line 292, in run_egg_info logger.notify('Running setup.py (path:%s) egg_info for package %s' % (self.setup_py, self.name)) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 284, in setup_py if six.PY2 and isinstance(setup_py, six.text_type): AttributeError: 'module' object has no attribute 'PY2' Storing debug log for failure in /home/mani/.pip/pip.log I am getting the same error when installing Django-celery, pymongo etc

    Read the article

1 2  | Next Page >