Search Results

Search found 62 results on 3 pages for 'chandra'.

Page 3/3 | < Previous Page | 1 2 3 

  • search for a string , and add if it matches

    - by Sharat Chandra
    I have a file that has 2 columns as given below.... 101 6 102 23 103 45 109 36 101 42 108 21 102 24 109 67 and so on...... I want to write a script that adds the values from 2nd column if their corresponding first column matches for example add all 2nd column values if it's 1st column is 101 add all 2nd column values if it's 1st colummn is 102 add all 2nd column values if it's 1st colummn is 103 and so on ... i wrote my script like this , but i'm not getting the correct result awk '{print $1}' data.txt > col1.txt while read line do awk ' if [$1 == $line] sum+=$2; END {print "Sum for time stamp", $line"=", sum}; sum=0' data.txt done < col1.txt

    Read the article

  • how to specify which child class this object belong to after retrieving from a hashmap?

    - by chandra wibowo
    hi everyone, i have a parent class called Course, and two child class PostgradCourse and UndergradCourse. i have a hashmap HashMap courses; i store all the postgradCourse and undergradCourse objects in the hashmap. i want to retrieve an undergradCourse object from the hashmap using the key. Course course = courses.get(courseCode); then i want to call a method in the UndergradCourse class, setUnits() method course.setUnits(); but the compiler say cannot find symbol- method setUnit() im pretty sure the problem is the compiler is looking for a method setUnit() in the Course class instead of UndergradCourse class i did this but its not working UndergradCourse course = courses.get(courseCode); results in incompatible type so how can i retrieve undergradCourse object from the hashmap as an undergradCourse object instead of course object? so then i can call a method inside the child class thanks in advance

    Read the article

  • Project to learn J2EE technologies.

    - by Chandra
    Attended a 2 week j2EE course and learnt the concepts. Want to try in a simple project and wanted ideas on what that could be? PetStore or Small Business App are so boring... Anything interesting that can be done to learn the breadth but at the same time it not being a full fledged project?

    Read the article

  • SQL SERVER – Solution – Puzzle – Challenge – Error While Converting Money to Decimal

    - by pinaldave
    Earlier I had posted quick puzzle and I had received wonderful response to the same. Today we will go over the solution. The puzzle was posted here: SQL SERVER – Puzzle – Challenge – Error While Converting Money to Decimal Run following code in SSMS: DECLARE @mymoney MONEY; SET @mymoney = 12345.67; SELECT CAST(@mymoney AS DECIMAL(5,2)) MoneyInt; GO Above code will give following error: Msg 8115, Level 16, State 8, Line 3 Arithmetic overflow error converting money to data type numeric. Why and what is the solution? Solution is as following: DECLARE @mymoney MONEY; SET @mymoney = 12345.67; SELECT CAST(@mymoney AS DECIMAL(7,2)) MoneyInt; GO There were more than 20 valid answers. Here is the reason. Decimal data type is defined as Decimal (Precision, Scale), in other words Decimal (Total digits, Digits after decimal point).. Precision includes Scale. So Decimal (5,2) actually means, we can have 3 digits before decimal and 2 digits after decimal. To accommodate 12345.67 one need higher precision. The correct answer would be DECIMAL (7,2) as it can hold all the seven digits. Here are the list of the experts who have got correct answer and I encourage all of you to read the same over hear. Fbncs Piyush Srivastava Dheeraj Abhishek Anil Gurjar Keval Patel Rajan Patel Himanshu Patel Anurodh Srivastava aasim abdullah Paulo R. Pereira Chintak Chhapia Scott Humphrey Alok Chandra Shahi Imran Mohammed SHIVSHANKER The very first answer was provided by Fbncs and Dheeraj had very interesting comment. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Pinal Dave, Readers Contribution, Readers Question, SQL, SQL Authority, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • SQLAuthority News – Presented Soft Skill Session on Presentation Skills at SQL Bangalore on May 3, 2014

    - by Pinal Dave
    I have presented on various database technologies for almost 10 years now. SQL, Database and NoSQL have been part of my life. Earlier this month, I had the opportunity to present on the topic Performing an Effective Presentation. I must say it was blast to prepare as well as present this session. This event was part of the SQL Bangalore community. If you are in Bangalore, you must be part of this group. SQL Bangalore is a wonderful community and we always have a great response when we present on technology. It is SQL User Group and we discuss everything SQL there. This month we had SQL Server 2014 theme and we had a community launch of SQL Server. We have the best of the best speakers presenting on SQL Server 2014 technology. The event had amazing speakers and each of them did justice to the subject. You can read about this over here. In this session I told a story from my life. I talked about who inspired me and how I learned to speak in public. I told stories about two legends  who have inspired me. There is no video recording of this session. If you want to get resources from this session, please sign up my newsletter at http://bit.ly/sqllearn. Well, I had a great time at this event. We had over 250 people showed up at this event and had a grand  time together. I personally enjoyed a session of Amit Benerjee, Balmukund Lakhani and Vinod Kumar. Ken and Surabh also entertained the audience. Overall, this was a grand event and if you were in Bangalore and did not make it to this event. You did miss out on a few things. Here are a few photos of this event. SQL Bangalore UG Nupur, Chandra, Shaivi, Balmukund, Amit, Vinod [captions This] SQL Bangalore UG Audience Pinal Dave presenting at SQL UG in Bangalore Here are few of the slides from this presentation: Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority Author Visit, SQLAuthority News, T SQL

    Read the article

< Previous Page | 1 2 3