Forum Posts
- 0 Answers Java(SWT) - Control key + M on the keyboard triggers double-click functionality on Tree Items in SWT
I have a double-click functionality for the tree viewers wherein the tree items expand\collapse when I double-click on them, but when I press CTRL+M on the keyboard even then the tree items expand\collapse, My code for double-clicking tree items is as follows:
- prithvirulzzz May 15, 2014
private class DoubleClickListener implements IDoubleClickListener
{
@Override
public void doubleClick(final DoubleClickEvent event)
{
final IStructuredSelection selection = (IStructuredSelection)event.getSelection();
if (selection == null || selection.isEmpty())
return;
final Object sel = selection.getFirstElement();
final ITreeContentProvider provider = (ITreeContentProvider)treeViewer.getContentProvider();
if (!provider.hasChildren(sel))
return;
if (treeViewer.getExpandedState(sel))
treeViewer.collapseToLevel(sel, AbstractTreeViewer.ALL_LEVELS);
else
treeViewer.expandToLevel(sel, 1);
}
}
I can supress CTRL+M through adding key listener but my question is as follows :
This behavior (CTRL+m expanding tree items) only happens When I use the IDoubleClickListener interface and override the method doubleClick(), but the same behavior (CTRL+m expanding tree items) does not happen when I use : addMouseListener(new MouseListener()) and override the method : mouseDoubleClick(). Is the behavior (CTRL+m) expanding tree items related to IDoubleClickListener interface(If so what is the reason) or is this problem generic? I feel it should not be related to IDoubleClickListener, Can someone please tell me why is there a difference in using these two logic?| Flag | PURGE - 2 Answers Amazon Interview - 2 hour programming exercise via email
I am currently interviewing with Amazon for a SDE role.
- jackreacher May 14, 2014
I have cleared the first phone screen (technical questions around algorithms, data structures etc plus a short coding question on collabedit).
Next, I have been told, I have a programming exercise to do. I will be sent a programming exercise via email at a chosen time. I have 2 hours to code up my solution and send it back via email. I have also been told, it is almost impossible to complete it in 2 hours, so I should consider a small write-up as part of my solution explaining what I would have done next if I had more time. My previous interviewer also told me that this would be more of a practical coding exercise than an algorithmic exercise.
Has anyone experienced this before? I would be grateful if someone could provide more info on what sort of questions I should expect in this exercise? Some examples would be very helpful.
Many thanks!| Flag | PURGE - 5 Answers Need advice on programming languages to use for interview.
Hi,
- ACE CA May 08, 2014
I have been working as an iOS developer since last couple of years and haven't been doing much with Java and C++. I worked on some projects in school 2 years back using c++ and so its still refresh in my mind. However its been 8 years now since I touched Java.
I tried writing code in objective c for some of the company interviews and I felt like the interviewer were not much happy with it. They told me that they don't know objective c and hence along with my code logic I had to explain them little bit about the language as well.
Does it matter which language you code in as long as it's an OO language? Does the company have language preferences or should C++ work for most of the interviews?
My plan is to brush up my C++ knowledge and start practising the coding problems using C++. I wish to learn Java to learn developing Android apps, but I think it would be nice to get sharp in atleast 1 language first along with clearing out mu data structure basics.| Flag | PURGE - 2 Answers What is the optimal strategy for this 2 player game?
Let some finite array of integers is given initially.There is a number k which is initially 0.In a move,a player will select a number from the array arr[i] and change k to gcd(k,arr[i]).Also,the number from array chosen will be removed from that array. A player who makes k=1 at any step loses. A player who cannot move also loses. 2 players are playing the game optimally.When will the player who moves first wins the game?
- momocho12345 May 06, 2014| Flag | PURGE - 3 Answers Big O for Binary Search
Was asked this question at Expedia.
- sinsanvi May 05, 2014| Flag | PURGE - 10 Answers int *p=(int *) 1000
Hi,
- jainnikhil28 May 04, 2014
I am a bit confused with the statement
int *p=(int *) 1000
what is the meaning of this statement?
i think it means that p points to an address 1000.
but how to put some value on this address?
printing the address pointed by p is giving segmentation fault.
i,e., cout<<*p is segmentation fault.
why?| Flag | PURGE - 4 Answers Need advice GroupOn vs Amazon
Hi
- stalkthetiger May 01, 2014
I am seeking advice on this
I have offer from GroupOn for SDE 4, and an offer from Amazon for SDE 3. Any advice on which company would be a better choice, offers are comparable, with GroupOn low on sign on bonus (thats not my concern though)
Thanks| Flag | PURGE - 1 Answer asking solution for the problems
Q1: Write a MATLAB function le that takes a matrix A as an input and returns it's diagonal part D, lower triangular part L and upper triangular part U.
- jinglan.seiran April 25, 2014
Q2:Write a MATLAB function maxmin that returns the maximum and minimum value for an input array
x as well as the indices that correspond to the maximum/minimum.| Flag | PURGE - 2 Answers Study Group for Technical Interview Prep
Anyone interested in forming a study group for preparing for technical interviews in Los Angeles.
- natesilver969 April 20, 2014
I was thinking of setting it up as a boot camp style immersive environment where we tackle one interview prep book per month along with brushing up on basic cs stills.
Let me know if anyone is interested. Thanks !| Flag | PURGE - 1 Answer Enterprise Java Development
Good evening everyone,
- mJr April 18, 2014
I hope this message finds you well.
Right now I'm in the middle of a diploma for java enterprise and web development, and I was wondering about my chances to land a job at Google, Facebook, etc., as I think that they will be more interested in algorithmic, problem-solving-based skills other than enterprise frameworks and tools.
Thanks. :)| Flag | PURGE - 48 Answers Microsoft Online Technical Screen
Hi,
- andy.java.9 April 12, 2014
Ddoes anyone know what to expect in Microsoft 'online technical screen'? This is not the phone screen with real person but online technical screen which needs to be completed in one sitting of 45 minutes.
Thanks,
Andy| Flag | PURGE - 1 Answer How to get referral
Hi Friends,
- snigda.2000 April 12, 2014
Most of the companies will not select your resume for interview if you do not have referrals and a degree from top school etc. How to get Interview scheduled? and how to get referrals from employees working in top companies if you do not know anyone in that company?
Thank you,
Snigda| Flag | PURGE