Search Results

Search found 146 results on 6 pages for 'naveen garg'.

Page 6/6 | < Previous Page | 2 3 4 5 6 

  • Does the compiler optimize the function parameters passed by value?

    - by Naveen
    Lets say I have a function where the parameter is passed by value instead of const-reference. Further, lets assume that only the value is used inside the function i.e. the function doesn't try to modify it. In that case will the compiler will be able to figure out that it can pass the value by const-reference (for performance reasons) and generate the code accordingly? Is there any compiler which does that?

    Read the article

  • log file not generated while accessing a jar having log4j support.

    - by naveen garimella
    I have a x.jar which is being used by some client y.jar. Both x.jar and y.jar are at the same package level. i have put the log4j.xml at the same package level. But the log file is never generated. Can i know why? I have tried few other options as well but no luck till now. i have added log4j-1.2.16.jar to ClassPath: variable in manifest files of both x.jar and y.jar. Put log4j.xml at the class level of y.jar which actually calls the x.jar classes. package structure is as follows: x.jar --manifest.mf has a entry ClassPath:log4j-1.2.16.jar y.jar --manifest.mf has a entry ClassPath:log4j-1.2.16.jar log4j-1.2.16.jar log4j.xml --has a RollingFileAppender. Can any one suggest whether i am missing anything?

    Read the article

  • Is new int[10]() valid c++?

    - by Naveen
    While trying to answer this question I found that the code int* p = new int[10](); compiles fine with VC9 compiler and initializes the integers to 0. So my questions are: First of all is this valid C++ or is it a microsoft extension? Is it guaranteed to initialize all the elements of the array? Also, is there any difference if I do new int; or new int();? Does the latter guarantee to initialize the variable?

    Read the article

  • download iphone sample code from apple

    - by Naveen
    the iphone sdk documentation has links to sample code, but you have to download them individually from the web. Is there a bundle you can download all at once from apple ? For example, reading the first iphone tutorial at switchonthecode, the first new word I came across was UIApplication. There are 5 samples on the web...

    Read the article

  • Date difference in SQL Server 2005

    - by naveen
    Hi, I have two dates of the form Start Date: 2007-03-24, End Date: 2009-06-26 Now I need to find the difference between these two in the below form: 2 years, 3 months and 2 days Can someone please … in SQL Server 2005

    Read the article

  • grails services :: multiple projects

    - by naveen
    PROBLEM : I have multiple grails projects (lets say appA, appB and appC) : services to be precise I want to run them in a single grails-app.. probably a war deployment, how can i do this? REQUIREMENTS : I want this to be a single app since i am deploying it on cloud and i don't have enough memory to hold all these service instances individually. The reason for multiple grails project is scalability. So that if later on i want to run 10 instance of appA, 3 instance of appB, and 1 instance of aapC; i should be able to do that. EDIT : Can i use something like 0mq, will that be helpful in keeping the services separated from each other. How will i package my service? And reading the docs of 0mq seems that it can work with both inprocess and external process. Will async grails requests on HTTP work with 0mq in process/ external mq calls. Haven't used 0mq, but from the initial doc it seems to work. Need some experience calls in this scenario. Are there any other alternatives or mq alternatives?

    Read the article

  • Java-Counting occurrence of word from huge textfile

    - by Naveen
    I have a text file of size 115MB. It consists of about 20 million words. I have to use the file as a word collection, and use it to search the occurrence of each user-given words from the collection. I am using this process as a small part in my project. I need a method for finding out the number of occurrence of given words in a faster and correct manner since i may use it in iterations. I am in need of suggestion about any API that i can make use or some other way that performs the task in a quicker manner. Any recommendations are appreciated.

    Read the article

  • ArchBeat Link-o-Rama Top 10 for October 7-13, 2012

    - by Bob Rhubart
    The Top 10 items shared via the OTN ArchBeat Facebook page for the week of October 7-13, 2012. OOW12: Oracle Business Process Management/Oracle ADF Integration Best Practices | Andrejus Baranovskis The Oracle OpenWorld presentations keep coming! Oracle ACE Director Andrejus Baranovskis shares the slides from "Oracle Business Process Management/Oracle ADF Integration Best Practices," co-presented with Danilo Schmiedel from Opitz Consulting. Oracle's Analytics, Engineered Systems, and Big Data Strategy | Mark Rittman Part 1 of 3 in Oracle ACE Director Mark Rittman's series on Oracle Exalytics, Oracle R Enterprise and Endeca. Adaptive ADF/WebCenter template for the iPad | Maiko Rocha Oracle Fusion Middleware A-Team member Maiko Rocha responds to a a customer request for information about how to create an adaptive iPad template for their WebCenter Portal application, "a specific template to streamline their workflow on the iPad." Following the Thread in OSB | Antony Reynolds Antony Reynolds recently led an Oracle Service Bus POC in which his team needed to get high throughput from an OSB pipeline. "Imagine our surprise when, on stressing the system, we saw it lock up, with large numbers of blocked threads." He shares the details of the problem and the solution in this extensive technical post. WebCenter Sites Gadget Development Concepts Quickstart | John Brunswick What are Gadgets? "At their most basic level they can be thought of as lightweight portlets that run largely on the client side of an architecture," says John Brunswick. "Gadgets provide a cross-platform container to run reusable UI modules that generally expose dynamic information to an end user, allowing for some level of end user customization." Oracle Fusion Middleware Security: OAM and OIM 11g Academies Looking for technical how-to content covering Oracle Access Manager and Oracle Identity Manager? The people behind the Oracle Middleware Security blog have indexed relevant blog posts into what they call Academies. "These indexes contain the articles we've written that we believe provide long lasting guidance on OAM and OIM. Posts covered in these series include articles on key aspects of OAM and OIM 11g, best practice architectural guidance, integrations, and customizations." Fusion Applications Technical Tips | Naveen Nahata "Setting memory parameters for Admin and Managed servers of various domains in Fusion Applications can be, let us say, a little daunting," says Oracle Fusion Middleware A-Team member Naveen Nahata. "While all this may look complicated and intimidating, it is actually relatively simple once you understand how it all works." Updated Agenda for OTN Architect Day Los Angeles (Oct 25) In less than two weeks Oracle Architect Day rolls into Los Angeles, with a full slate of sessions devoted to cloud computing, engineered systems, and SOA. Follow the link for the updated event agenda. ORCLville: OOW 2012 - A Not So Brief Recap Oracle ACE Director Floyd Teter, an Applications & Apps Technology specialists, shares his personal, frank, and and extensive recap or Oracle OpenWorld 2012. SOA Suite create partition in Enterprise Manager | Peter Paul van de Beek "In Oracle SOA Suite 10g, or more specific BPEL 10g, one could group functionality in domains," says Peter Paul van de Beek. "This feature has been away in the early versions of SOA Suite 11g. They have returned in more recent version and can be used for all SCA composites (instead of BPEL only). Nowadays these 10g domains are called partitions." Thought for the Day "I strive for an architecture from which nothing can be taken away." — Helmut Jahn Source: BrainyQuote.com

    Read the article

  • Java EE@Java Day Taipei 2014

    - by reza_rahman
    Java Day Taipei 2014 was held at the Taipei International Convention Center on August 1st. Organized by Oracle University, it is one of the largest Java developer events in Taiwan. This was another successful year for Java Day Taipei with a fully sold out venue. In addition to Oracle speakers like me, Steve Chin and Naveen Asrani, the event also featured a bevy of local speakers including Taipei Java community leaders. Topics included Java SE, Java EE, JavaFX and Big Data. I delivered a keynote on Java EE 7/Java EE 8 as well as a talks on aligning the JavaScript ecosystem with Java EE 7 and using NoSQL solutions in Java EE applications. More details on the sessions and Java Days Taipei, including the slide decks and code, posted on my personal blog.

    Read the article

  • Why is casting Derived** to Base*const* forbidden ?

    - by smerlin
    After reading this question, i saw the answer by Naveen containing a link to this page, which basically says, that casting from Derived** to Base** is forbidden since could change a pointer to an pointer to a Derived1 object point to a pointer to a Derived2 object (like: *derived1PtrPtr=derived2Ptr). OK, i understand this is evil ... But when casting Derived** to Base*const* this is not even possible, so whats the reason that this is not allowed anyway ?

    Read the article

  • SQL SERVER – Winners – Contest Win Joes 2 Pros Combo (USD 198)

    - by pinaldave
    Earlier this week we had contest ran over the blog where we are giving away USD 198 worth books of Joes 2 Pros. We had over 500+ responses during the five days of the contest. After removing duplicate and incorrect responses we had a total of 416 valid responses combined total 5 days. We got maximum correct answer on day 2 and minimum correct answer on day 5. Well, enough of the statistics. Let us go over the winners’ names. The winners have been selected randomly by one of the book editors of Joes 2 Pros. SQL Server Joes 2 Pros Learning Kit 5 Books Day 1 Winner USA: Philip Dacosta India: Sandeep Mittal Day 2 Winner USA: Michael Evans India: Satyanarayana Raju Pakalapati Day 3 Winner USA: Ratna Pulapaka India: Sandip Pani Day 4 Winner USA: Ramlal Raghavan India: Dattatrey Sindol Day 5 Winner USA: David Hall India: Mohit Garg I congratulate all the winners for their participation. All of you will receive emails from us. You will have to reply the email with your physical address. Once you receive an email please reply within 3 days so we can ship the 5 book kits to you immediately. Bonus Winners Additionally, I had announced that every day I will select a winner from the readers who have left comments with their favorite blog post. Here are the winners with their favorite blog post. Day 1: Prasanna kumar.D [Favorite Post] Day 2: Ganesh narim [Favorite Post] Day 3: Sreelekha [Favorite Post] Day 4: P.Anish Shenoy [Favorite Post] Day 5: Rikhil [Favorite Post] All the bonus winners will receive my print book SQL Wait Stats if your shipping address is in India or Pluralsight Subscription if you are outside India. If you are not winner of the contest but still want to learn SQL Server you can get the book from here. Amazon | 1 | 2 | 3 | 4 | 5 | Flipkart | Indiaplaza Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Joes 2 Pros, PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • OBJC_CLASS_$_MTSCRA", referenced from

    - by user1078841
    I was trying to make a sample code run download by the link http://www.magtek.com/support/software/downloads/sw/99510108.zip This is a card reader api ,here is a sample code.When I run this code I got the error: ld: warning: ignoring file /Users/gaurav.garg/Downloads/99510108/SampleCode/Lib/libMTSCRA.a, missing required architecture i386 in file Undefined symbols for architecture i386: "_OBJC_CLASS_$_MTSCRA", referenced from: objc-class-ref in MagTekDemoAppDelegate.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) The class MTSCRA is only a header file,And the solution that I have cheked That we have to add the .m file in compiled source path of build build phase of target...but unfortunately I don't have the MTSCRA.m file.MTscra.h have the AudioToolBox and externalAccesory framework.

    Read the article

  • MOSS Sharepoint - Holiday Approval /tracking

    - by nav
    Hi, Has anyone implemented a holiday workflow approval / tracking list in MOSS Sharepoint 2007? Can anyone suggests other solutions? The solution below works fine but I am specifically looking for a way to lookup manager of the user who created the holiday request list item in the workflow. I have followed this link http://www.u2u.info/Blogs/Kevin/Lists/Posts/Post.aspx?ID=39 which shows you how to create a custom workflow approval. Below are the steps outlined by the link. User add new holiday item to list Workflow kicks off Wf has the manager hardcoded (need a way to look this up, maybe from AD??) and creates a Task for them to review the request. If desired, this can include an email notification of the task Manager reviews, adds comments and approves/denies request User is notified of completed request Many Thanks, Naveen

    Read the article

  • Holiday Approval /tracking

    - by nav
    Hi, Has anyone implemented a holiday workflow approval / tracking list in MOSS Sharepoint 2007? Can anyone suggests other solutions? The solution below works fine but I am specifically looking for a way to lookup manager of the user who created the holiday request list item in the workflow. I have followed this link http://www.u2u.info/Blogs/Kevin/Lists/Posts/Post.aspx?ID=39 which shows you how to create a custom workflow approval. Below are the steps outlined by the link. User add new holiday item to list Workflow kicks off Wf has the manager hardcoded (need a way to look this up, maybe from AD??) and creates a Task for them to review the request. If desired, this can include an email notification of the task Manager reviews, adds comments and approves/denies request User is notified of completed request Many Thanks, Naveen

    Read the article

  • Windows 7 Automatically Connecting To Unsecured Wireless Networks On Startup

    - by Xtend
    Most of the questions on this topic related to folks connecting to somebody else's wireless network when their own was available and could remedy the situation by going to their connections and unchecking the "connect automatically" box. See this: " Avoid automatically connecting to wireless network on windows 7 " as an example. In my situation, I've noticed that Win 7 will automatically connect to any unsecured wifi network - even if I have never connected to it in the past. If I am traveling and boot Win 7, it will start and connect to what appears to be the best signaled unsecured network without prompting me for confirmation (note: in the above link, "Naveen" seems to have same problem). Obviously, that is a security concern to me. Further, when I open "Network and Sharing" and "Manage wireless networks" the network is not displayed (probably because I labelled it a public network). Again, these are new, never connected with before, wireless networks. I always promptly disconnect from them but don't want to have to be on constant guard for an auto connection to a malicious network. This began about a month ago, as I recall, Win 7 did not behave like this in the past, I didn't monkey with wifi settings, and don't use a 3rd party connection manager. I did have to download some internet security certificates for army website access but I don't think that should mess with network settings. Any ideas how I can tell Win7 cease automatically connecting to networks or, at least, to prompt me for a confirmation before connecting?

    Read the article

  • how to keep same header on starting of next page in pdf

    - by Santosh Singh
    Here is My Code. private void getActionItems(Document document, Chapter chapter, Section section, Paragraph pas) { List drbRefList = null; try { _actionService = new ActionItemImpl(); _aiBean = new ActionItemData(); if (_aiBean != null) { _actionList = new ArrayList(); LOG.info("business passed here is" + _business); _actionList = _actionService.getActionItemsForPDF(_userSSOID, _business, _reviewID, _connection); } LOG.info(" after calling getActionItemsForPDF"); LOG.info("_actionList" + _actionList); Table tablesh1 = new Table(1, 1); float[] widthsh1 = new float[1]; widthsh1[0] = ReviewConstants.MAGIC_DOTTWELVE; tablesh1.setTableFitsPage(true); tablesh1.setPadding(2); tablesh1.setSpacing(0); tablesh1.setWidth(ReviewConstants.MAGIC_ONEZEROZERO); tablesh1.setWidths(widthsh1); tablesh1.setBorderColor(Color.WHITE); Cell hcell = new Cell(new Paragraph(ReviewConstants.S_ACTIONHEADING, new Font(Font.HELVETICA, fontSize, Font.BOLD, Color.BLUE))); hcell.setHeader(true); tablesh1.addCell(hcell); section.add(tablesh1); Table actionTable = null; String businessUnit = reviewData.getBusinessUnit(); float[] widthac = null; //Updated for Nuclear Energy Engineering Business Unit Requirement by Naveen if(!"Nuclear Energy Engineering".equalsIgnoreCase(businessUnit)){ actionTable = new Table(ReviewConstants.NINE,ReviewConstants.THREE); widthac = new float[ReviewConstants.NINE]; widthac[0] = ReviewConstants.MAGIC_DOTONE; widthac[1] = ReviewConstants.MAGIC_DOTONEZERO; widthac[2] = ReviewConstants.MAGIC_DOTTWOZERO; widthac[ReviewConstants.THREE] = ReviewConstants.MAGIC_DOTTWOZERO; widthac[ReviewConstants.FOUR] = ReviewConstants.MAGIC_DOTONEZERO; widthac[ReviewConstants.FIVE] = ReviewConstants.MAGIC_DOTONEZERO; widthac[ReviewConstants.SIX] = ReviewConstants.MAGIC_DOTONEZERO; widthac[ReviewConstants.SEVEN] = ReviewConstants.MAGIC_DOTONEZERO; widthac[ReviewConstants.EIGHT] = ReviewConstants.MAGIC_DOTONEZERO; }else{ actionTable = new Table(ReviewConstants.SIX,ReviewConstants.THREE); widthac = new float[ReviewConstants.SIX]; widthac[0] = ReviewConstants.MAGIC_DOTONE; widthac[1] = ReviewConstants.MAGIC_THREEZERO; widthac[2] = ReviewConstants.MAGIC_THREEZERO; widthac[ReviewConstants.THREE] = ReviewConstants.MAGIC_THREEZERO; widthac[ReviewConstants.FOUR] = ReviewConstants.MAGIC_DOTONEZERO; widthac[ReviewConstants.FIVE] = ReviewConstants.MAGIC_DOTONEZERO; } actionTable.setTableFitsPage(true); actionTable.setPadding(2); actionTable.setSpacing(0); actionTable.setWidth(ReviewConstants.MAGIC_ONEZEROZERO); actionTable.setWidths(widthac); actionTable.setBorderWidth(1); Cell accell = new Cell(new Paragraph(ReviewConstants.S_ACTIONID, new Font(Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); if(!"Nuclear Energy Engineering".equalsIgnoreCase(businessUnit)){ accell = new Cell(new Paragraph(ReviewConstants.PDF_RT, new Font(Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); } accell = new Cell(new Paragraph(ReviewConstants.S_REQA, new Font(Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); accell = new Cell(new Paragraph(ReviewConstants.S_CLOSURE, new Font(Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); accell = new Cell(new Paragraph(ReviewConstants.S_DISPOSITION, new Font(Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); //added by santosh on 18 june actionTable.endHeaders(); document.add(actionTable); if(!"Nuclear Energy Engineering".equalsIgnoreCase(businessUnit)){ accell = new Cell(new Paragraph(ReviewConstants.S_DRB_REFERENCE, new Font( Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); accell = new Cell(new Paragraph(ReviewConstants.S_DEADLINE, new Font( Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); } accell = new Cell(new Paragraph(ReviewConstants.S_OWNER, new Font( Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); accell = new Cell(new Paragraph(ReviewConstants.S_STATE, new Font( Font.HELVETICA, fontSize, Font.BOLD))); accell.setHeader(true); actionTable.addCell(accell); int acSize = 0; if (_actionList != null) { acSize = _actionList.size(); } for (int i = 0; i < acSize; i++) { _aiBean = (ActionItemData) _actionList.get(i); Cell adCell = new Cell(new Paragraph(_aiBean.getActionID(), new Font( Font.HELVETICA, ReviewConstants.MAGIC_EIGHT))); adCell.setHeader(false); actionTable.addCell(adCell); if(!"Nuclear Energy Engineering".equalsIgnoreCase(businessUnit)){ if (_aiBean.getActionItemType().equals("0")) { adCell = new Cell(new Paragraph("Normal", new Font(Font.HELVETICA, fontSize))); } else { adCell = new Cell(new Paragraph("Critical", new Font(Font.HELVETICA, fontSize))); } adCell.setHeader(false); actionTable.addCell(adCell); } adCell = new Cell(new Paragraph(_aiBean.getRequiredAction(), new Font(Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); adCell = new Cell(new Paragraph(_aiBean.getClosureCriteria(), new Font(Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); String drbLink = ReviewConstants.EMPTY; drbRefList = new ArrayList(); if (!DRUtils.isEmpty(_aiBean.getState()) && ((_aiBean.getState() .equalsIgnoreCase(ReviewConstants.DRAFT_BEGUN_STATE)) || (_aiBean.getState() .equalsIgnoreCase(ReviewConstants.SCOPE_PROPOSED)) || (_aiBean .getState() .equalsIgnoreCase(ReviewConstants.RES_PROPOSED)))) { drbLink = ReviewConstants.EMPTY; _aiBean.setDisposition(ReviewConstants.EMPTY); } else { drbRefList = _actionService.getDrbRefForPDF(_aiBean.getActionSeqID(), _connection); int drbRefCnt = 0; if (drbRefList != null) { drbRefCnt = drbRefList.size(); int j = 0; for (j = 0; j < drbRefCnt; j++) { LOG.info("drbRefList.get(j)" + drbRefList.get(j).toString()); if (j < (drbRefCnt - 1)) { drbLink += drbRefList.get(j).toString() + ReviewConstants.COMMA_SPACE; } else { drbLink += drbRefList.get(j).toString(); } } } } LOG.info("drbLink" + drbLink); adCell = new Cell(new Paragraph(_aiBean.getDisposition(), new Font(Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); //Updated for Nuclear Energy Engineering Business Unit Requirement by Naveen if(!"Nuclear Energy Engineering".equalsIgnoreCase(businessUnit)){ adCell = new Cell(new Paragraph(drbLink, new Font( Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); adCell = new Cell(new Paragraph(_aiBean.getDeadline(), new Font(Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); } adCell = new Cell(new Paragraph(_aiBean.getActionItemOwnerName(), new Font(Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); adCell = new Cell(new Paragraph(_aiBean.getState(), new Font(Font.HELVETICA, fontSize))); adCell.setHeader(false); actionTable.addCell(adCell); //added by santosh actionTable.endHeaders(); document.add(actionTable); // added by santosh end } /*Phrase headerPhrase = new Phrase(); Table headTab = (Table)actionTable.getElement(0, 5); headerPhrase.add(headTab); HeaderFooter printHeader = new HeaderFooter(headerPhrase,false); System.out.println("addHeader"); document.setHeader(printHeader); actionTable.setLastHeaderRow(1); actionTable.endHeaders(); document.add(actionTable);*/ // added by santosh actionTable.endHeaders(); document.add(actionTable); // added by santosh end section.add(actionTable); } catch (Exception e) { LOG.error("General Exception occured", e); } }

    Read the article

  • SQL SERVER – Solution – Puzzle – SELECT * vs SELECT COUNT(*)

    - by pinaldave
    Earlier I have published Puzzle Why SELECT * throws an error but SELECT COUNT(*) does not. This question have received many interesting comments. Let us go over few of the answers, which are valid. Before I start the same, let me acknowledge Rob Farley who has not only answered correctly very first but also started interesting conversation in the same thread. The usual question will be what is the right answer. I would like to point to official Microsoft Connect Items which discusses the same. RGarvao https://connect.microsoft.com/SQLServer/feedback/details/671475/select-test-where-exists-select tiberiu utan http://connect.microsoft.com/SQLServer/feedback/details/338532/count-returns-a-value-1 Rob Farley count(*) is about counting rows, not a particular column. It doesn’t even look to see what columns are available, it’ll just count the rows, which in the case of a missing FROM clause, is 1. “select *” is designed to return columns, and therefore barfs if there are none available. Even more odd is this one: select ‘blah’ where exists (select *) You might be surprised at the results… Koushik The engine performs a “Constant scan” for Count(*) where as in the case of “SELECT *” the engine is trying to perform either Index/Cluster/Table scans. amikolaj When you query ‘select * from sometable’, SQL replaces * with the current schema of that table. With out a source for the schema, SQL throws an error. so when you query ‘select count(*)’, you are counting the one row. * is just a constant to SQL here. Check out the execution plan. Like the description states – ‘Scan an internal table of constants.’ You could do ‘select COUNT(‘my name is adam and this is my answer’)’ and get the same answer. Netra Acharya SELECT * Here, * represents all columns from a table. So it always looks for a table (As we know, there should be FROM clause before specifying table name). So, it throws an error whenever this condition is not satisfied. SELECT COUNT(*) Here, COUNT is a Function. So it is not mandetory to provide a table. Check it out this: DECLARE @cnt INT SET @cnt = COUNT(*) SELECT @cnt SET @cnt = COUNT(‘x’) SELECT @cnt Naveen Select 1 / Select ‘*’ will return 1/* as expected. Select Count(1)/Count(*) will return the count of result set of select statement. Count(1)/Count(*) will have one 1/* for each row in the result set of select statement. Select 1 or Select ‘*’ result set will contain only 1 result. so count is 1. Where as “Select *” is a sysntax which expects the table or equauivalent to table (table functions, etc..). It is like compilation error for that query. Ramesh Hi Friends, Count is an aggregate function and it expects the rows (list of records) for a specified single column or whole rows for *. So, when we use ‘select *’ it definitely give and error because ‘*’ is meant to have all the fields but there is not any table and without table it can only raise an error. So, in the case of ‘Select Count(*)’, there will be an error as a record in the count function so you will get the result as ’1'. Try using : Select COUNT(‘RAMESH’) and think there is an error ‘Must specify table to select from.’ in place of ‘RAMESH’ Pinal : If i am wrong then please clarify this. Sachin Nandanwar Any aggregate function expects a constant or a column name as an expression. DO NOT be confused with * in an aggregate function.The aggregate function does not treat it as a column name or a set of column names but a constant value, as * is a key word in SQL. You can replace any value instead of * for the COUNT function.Ex Select COUNT(5) will result as 1. The error resulting from select * is obvious it expects an object where it can extract the result set. I sincerely thank you all for wonderful conversation, I personally enjoyed it and I am sure all of you have the same feeling. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: CodeProject, Pinal Dave, PostADay, Readers Contribution, Readers Question, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology

    Read the article

  • JavaDay Taipei 2014 Trip Report

    - by reza_rahman
    JavaDay Taipei 2014 was held at the Taipei International Convention Center on August 1st. Organized by Oracle University, it is one of the largest Java developer events in Taiwan. This was another successful year for JavaDay Taipei with a fully sold out venue packed with youthful, energetic developers (this was my second time at the event and I have already been invited to speak again next year!). In addition to Oracle speakers like me, Steve Chin and Naveen Asrani, the event also featured a bevy of local speakers including Taipei Java community leaders. Topics included Java SE, Java EE, JavaFX, cloud and Big Data. It was my pleasure and privilege to present one of the opening keynotes for the event. I presented my session on Java EE titled "JavaEE.Next(): Java EE 7, 8, and Beyond". I covered the changes in Java EE 7 as well as what's coming in Java EE 8. I demoed the Cargo Tracker Java EE BluePrints. I also briefly talked about Adopt-a-JSR for Java EE 8. The slides for the keynote are below (click here to download and view the actual PDF): It appears your Web browser is not configured to display PDF files. No worries, just click here to download the PDF file. In the afternoon I did my JavaScript + Java EE 7 talk titled "Using JavaScript/HTML5 Rich Clients with Java EE 7". This talk is basically about aligning EE 7 with the emerging JavaScript ecosystem (specifically AngularJS). The talk was completely packed. The slide deck for the talk is here: JavaScript/HTML5 Rich Clients Using Java EE 7 from Reza Rahman The demo application code is posted on GitHub. The code should be a helpful resource if this development model is something that interests you. Do let me know if you need help with it but the instructions should be fairly self-explanatory. I am delivering this material at JavaOne 2014 as a two-hour tutorial. This should give me a little more bandwidth to dig a little deeper, especially on the JavaScript end. I finished off Java Day Taipei with my talk titled "Using NoSQL with ~JPA, EclipseLink and Java EE" (this was the last session of the conference). The talk covers an interesting gap that there is surprisingly little material on out there. The talk has three parts -- a birds-eye view of the NoSQL landscape, how to use NoSQL via a JPA centric facade using EclipseLink NoSQL, Hibernate OGM, DataNucleus, Kundera, Easy-Cassandra, etc and how to use NoSQL native APIs in Java EE via CDI. The slides for the talk are here: Using NoSQL with ~JPA, EclipseLink and Java EE from Reza Rahman The JPA based demo is available here, while the CDI based demo is available here. Both demos use MongoDB as the data store. Do let me know if you need help getting the demos up and running. After the event the Oracle University folks hosted a reception in the evening which was very well attended by organizers, speakers and local Java community leaders. I am extremely saddened by the fact that this otherwise excellent trip was scarred by terrible tragedy. After the conference I joined a few folks for a hike on the Maokong Mountain on Saturday. The group included friends in the Taiwanese Java community including Ian and Robbie Cheng. Without warning, fatal tragedy struck on a remote part of the trail. Despite best efforts by us, the excellent Taiwanese Emergency Rescue Team and World class Taiwanese physicians we were unable to save our friend Robbie Cheng's life. Robbie was just thirty-four years old and is survived by his younger brother, mother and father. Being the father of a young child myself, I can only imagine the deep sorrow that this senseless loss unleashes. Robbie was a key member of the Taiwanese Java community and a Java Evangelist at Sun at one point. Ironically the only picture I was able to take of the trail was mere moments before tragedy. I thought I should place him in that picture in profoundly respectful memoriam: Perhaps there is some solace in the fact that there is something inherently honorable in living a bright life, dying young and meeting one's end on a beautiful remote mountain trail few venture to behold let alone attempt to ascend in a long and tired lifetime. Perhaps I'd even say it's a fate I would not entirely regret facing if it were my own. With that thought in mind it seems appropriate to me to quote some lyrics from the song "Runes to My Memory" by legendary Swedish heavy metal band Amon Amarth idealizing a fallen Viking warrior cut down in his prime: "Here I lie on wet sand I will not make it home I clench my sword in my hand Say farewell to those I love When I am dead Lay me in a mound Place my weapons by my side For the journey to Hall up high When I am dead Lay me in a mound Raise a stone for all to see Runes carved to my memory" I submit my deepest condolences to Robbie's family and hope my next trip to Taiwan ends in a less somber note.

    Read the article

  • Standard Oracle Fusion Middleware Installation fails on SOA ManagedServer start due to classpath pro

    - by Neuquino
    Hi, Trying to install Oracle Fusion Middleware 11gR2 on windows (same thing happens on Linux). I have followed the guidelines provided in the http://download.oracle.com/docs/cd/E12839_01/install.1111/e14318/toc.htm Installing the weblogic (11g) Oracle 11g databse installation Running the RCU utility to create schema Installed and copied relevant files for Java Bridge Configure the Fusion Middleware But i found that the SOA server is not getting up in the enterprise manager its showing as down. When i checked the logs iam getting the following error: oracle.jrf.wls.JRFStartup java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:18:48 PM CEST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "SOAStartupClass", java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'SocketAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'MQSeriesAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'OracleAppsAdapter' due to error weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException.weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:238) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.privateGetPublicMethods(Class.java:2547) at java.lang.Class.getMethods(Class.java:1410) at weblogic.connector.external.impl.RAComplianceChecker.checkOverrides(RAComplianceChecker.java:972) Truncated. see log file for complete stacktrace Can any one please tell me if i have missed any steps? thanks and regards, Naveen

    Read the article

  • Standard Oracle Fusion Middleware Installation fails on SOA ManagedServer start

    - by Neuquino
    Hi, Trying to install Oracle Fusion Middleware 11gR2 on windows (same thing happens on Linux). I have followed the guidelines provided in the http://download.oracle.com/docs/cd/E12839_01/install.1111/e14318/toc.htm Installing the weblogic (11g) Oracle 11g databse installation Running the RCU utility to create schema Installed and copied relevant files for Java Bridge Configure the Fusion Middleware But i found that the SOA server is not getting up in the enterprise manager its showing as down. When i checked the logs iam getting the following error: oracle.jrf.wls.JRFStartup java.lang.ClassNotFoundException: oracle.jrf.wls.JRFStartup at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:18:48 PM CEST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "SOAStartupClass", java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:253) at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54) at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:205) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'SocketAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.socket.SocketConnectionFactory' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'MQSeriesAdapter' due to error weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory.weblogic.application.ModuleException: The ra.xml <connectionfactory-impl-class> class 'oracle.tip.adapter.mq.ConnectionFactoryImpl' could not be loaded from the resource adapter archive/application because of the following error: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/OracleConnectionFactory at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:228) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace <Jul 7, 2009 4:19:27 PM CEST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'OracleAppsAdapter' due to error weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException.weblogic.application.ModuleException: java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at weblogic.connector.deploy.ConnectorModule.prepare(ConnectorModule.java:238) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) Truncated. see log file for complete stacktrace java.lang.NoClassDefFoundError: oracle/tip/adapter/api/exception/PCResourceException at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.privateGetPublicMethods(Class.java:2547) at java.lang.Class.getMethods(Class.java:1410) at weblogic.connector.external.impl.RAComplianceChecker.checkOverrides(RAComplianceChecker.java:972) Truncated. see log file for complete stacktrace Can any one please tell me if i have missed any steps? thanks and regards, Naveen

    Read the article

  • Parse a text file into multiple text file

    - by Vijay Kumar Singh
    I want to get multiple file by parsing a input file Through Java. The Input file contains many fasta format of thousands of protein sequence and I want to generate raw format(i.e., without any comma semicolon and without any extra symbol like "", "[", "]" etc) of each protein sequence. A fasta sequence starts form "" symbol followed by description of protein and then sequence of protein. For example ? lcl|NC_000001.10_cdsid_XP_003403591.1 [gene=LOC100652771] [protein=hypothetical protein LOC100652771] [protein_id=XP_003403591.1] [location=join(12190..12227,12595..12721,13403..13639)] MSESINFSHNLGQLLSPPRCVVMPGMPFPSIRSPELQKTTADLDHTLVSVPSVAESLHHPEITFLTAFCL PSFTRSRPLPDRQLHHCLALCPSFALPAGDGVCHGPGLQGSCYKGETQESVESRVLPGPRHRH Like above formate the input file contains 1000s of protein sequence. I have to generate thousands of raw file containing only individual protein sequence without any special symbol or gaps. I have developed the code for it in Java but out put is : Cannot open a file followed by cannot find file. Please help me to solve my problem. Regards Vijay Kumar Garg Varanasi Bharat (India) The code is /*Java code to convert FASTA format to a raw format*/ import java.io.*; import java.util.*; import java.util.regex.*; import java.io.FileInputStream; // java package for using regular expression public class Arrayren { public static void main(String args[]) throws IOException { String a[]=new String[1000]; String b[][] =new String[1000][1000]; /*open the id file*/ try { File f = new File ("input.txt"); //opening the text document containing genbank ids FileInputStream fis = new FileInputStream("input.txt"); //Reading the file contents through inputstream BufferedInputStream bis = new BufferedInputStream(fis); // Writing the contents to a buffered stream DataInputStream dis = new DataInputStream(bis); //Method for reading Java Standard data types String inputline; String line; String separator = System.getProperty("line.separator"); // reads a line till next line operator is found int i=0; while ((inputline=dis.readLine()) != null) { i++; a[i]=inputline; a[i]=a[i].replaceAll(separator,""); //replaces unwanted patterns like /n with space a[i]=a[i].trim(); // trims out if any space is available a[i]=a[i]+".txt"; //takes the file name into an array try // to handle run time error /*take the sequence in to an array*/ { BufferedReader in = new BufferedReader (new FileReader(a[i])); String inline = null; int j=0; while((inline=in.readLine()) != null) { j++; b[i][j]=inline; Pattern q=Pattern.compile(">"); //Compiling the regular expression Matcher n=q.matcher(inline); //creates the matcher for the above pattern if(n.find()) { /*appending the comment line*/ b[i][j]=b[i][j].replaceAll(">gi",""); //identify the pattern and replace it with a space b[i][j]=b[i][j].replaceAll("[a-zA-Z]",""); b[i][j]=b[i][j].replaceAll("|",""); b[i][j]=b[i][j].replaceAll("\\d{1,15}",""); b[i][j]=b[i][j].replaceAll(".",""); b[i][j]=b[i][j].replaceAll("_",""); b[i][j]=b[i][j].replaceAll("\\(",""); b[i][j]=b[i][j].replaceAll("\\)",""); } /*printing the sequence in to a text file*/ b[i][j]=b[i][j].replaceAll(separator,""); b[i][j]=b[i][j].trim(); // trims out if any space is available File create = new File(inputline+"R.txt"); try { if(!create.exists()) { create.createNewFile(); // creates a new file } else { System.out.println("file already exists"); } } catch(IOException e) // to catch the exception and print the error if cannot open a file { System.err.println("cannot create a file"); } BufferedWriter outt = new BufferedWriter(new FileWriter(inputline+"R.txt", true)); outt.write(b[i][j]); // printing the contents to a text file outt.close(); // closing the text file System.out.println(b[i][j]); } } catch(Exception e) { System.out.println("cannot open a file"); } } } catch(Exception ex) // catch the exception and prints the error if cannot find file { System.out.println("cannot find file "); } } } If you provide me correct it will be much easier to understand.

    Read the article

< Previous Page | 2 3 4 5 6