problems

Oauth2 LinkedIn problems

Hello,

Recently I have been implementing signing in to a website using third party services like Facebook, Twitter, Google plus and LinkedIn and fetching user information from those websites.

Developing for Drupal using some contributed modules that do most of the hard work, I faced some problems with LinkedIn so I am going to mention them and some other notices.

Basically I wanted first to sign in with the user account (get a token) then grab some info about the user using this token.

Adding new COM Interface version

Just for my self and other people like me who forget interestingly fast, and do not wish to get E_NOINTERFACE from C++ QueryInterface method after they add new COM interface version for maintaining backward compatibility for the COM object. 4 places to add the new version info.. 1-In the idl file used for the description of the interface, Add the new interface and make sure you put a new UUID for it, make sure it inherits the old interface

 

[ 
object, 
uuid(69BBF687-D8AE-4f7c-8E61-96DD47FA12C8), 
dual, helpstring("OldInterface Interface"), 
pointer_default(unique)
] 
interface IOldInterface : IDispatch 
{ 
//Some old functions 
}; 
[ 
object, 
uuid(9BFB8CD2-C090-4e37-A9AB-AE001B9EB4DC), //new UUID 
dual, 
helpstring("INewInterface Interface"), 
pointer_default(unique) 
] 
interface INewInterface : IOldInterface 
{ 
//Some new functions 
}; 

 

Troubleshooting in ACM-ICPC Contest

i've participated in many contests as organizer, specifically in the technical stuff which is mainly two portions

  • The IDE which is mainly "eclipse"
  • The contest communication tool which can't be except "pc2"

and in the last contest i've participated in it's technical preparations i faced a number of troubles

lets take them one by one

1.Teams don't connect to the Server which is a Linux Machine

  • Solution : before you open the server edit the "pc2server" file and edit this line
  • java -Djava.security.policy=policy.ini $PC2CN $*
  • to be
  • java -Djava.rmi.server.hostname="10.106.0.35" -Djava.security.policy=policy.ini $PC2CN $*
  • of course change the ip according to your server ip

and make this edit in all the executables you will run {team, board, judge.....}

A JAVA Function !!! [Problem NOT of the week]

As my two friend Alaa & Foaud are writing [Problem of the week] 

i am also writing Problem NOT of the week :D

bcoz i wont write a problem weekly in addition to i dont know the solution of my problems :)

almost... . .

during my internship time i spent in Mentor Graphics Cairo

i needed to implement a function and when i started coding i found that it was impossible to do it that way

may be there is a way that function can be implemented but i dont know how due to my small experience with JAVA Here is the problem definition:

Programming Language used : of course u know its JAVA what r u looking at :P