Calling all those who want to give something valuable back to the society by using their skills for a noble cause !! don't wait for the change..be the change !! Come forward and take the step now !!
Google Developer Group, New Delhi (formerly known as GTUG New Delhi) is organizing a hackathon with the goal of bringing together developers, designers, start-ups & NGOs to apply their imagination and thoughts to the social good sector and build product ideas for social innovation.
All you need to do is bring out those creative ideas which were always popping in your mind. This is the time to showcase the real power of your idea and imagination that can have positive impact on the Society and Mankind !
Come up with your ideas if you think:
Your idea is going to change the way information is accessed??
Do you really think your idea can bring about change the way we learn , educate people in this world ??
Do you feel your idea can ensure safety of women in this world??
Do you think you can bring change in the way healthcare operates in this entire world...Is your idea really going to save a life when really needed??
Does your idea have the power to save lives when there is a disaster?
or any other idea which you think can be useful to mankind
Force.com has released its REST API as a lightweight channel to access data on the platform(cloud). The basic framework remains the same for REST based services. Request and response can flow in XML or JSON format. The beauty of RESTful service is that its very lightweight and easy to use as compared to SOAP based services.
We will quickly jump over to code that explains how to create a RESTful service on Force.com using Apex.
Diving deep into code:
We need a class with keyword "@RestResource" to signify the class responsible for handling HTTP requests and act as REST based web service. Make sure the class has global access specifier.
The urlMapping property allows us to set path where the service will be available. This is process of setting up the endpoint for service. Example: https://.salesforce.com/services/apexrest/showAccounts
Include @HttpGet keyword before method name for denoting a method to respond on a HTTP GET request; include @HttpPost keyword before method name for denoting a method to respond on a HTTP POST;
include @HttpDelete keyword before method name for denoting a method to respond on a HTTP DELETE. Similarly for HTTP PUT and PATCH methods
Make sure that methods responsible for handling HTTP requests have global access specifier and static keyword with them.
The awesome feature is that you can set return type as primitive type, standard objects or custom objects within your salesforce.com development environment. In this example the list of accounts will be returned to client invoking the service.
In order to pass parameters to service, you can use RestRequest object in a method. example:
The limitation here is that within a RESTful apex class you can have only one method with @HttpGet keyword.i.e. one method can respond to HTTP GET requests in this class or URL path. same applies for @HttpPost, @HttpDelete, @HttpPut, @HttpPatch
Live Action:
In order to consume this service we need a client that can make HTTP calls to the respective endpoint where service is listening for requests. You can write your client using cURL, java, c, c++,etc
The main step to consume this service is to go through OAuth 2.0 authorization flow to access the resources protected by Force.com platform.
For ease I will use Advanced REST client for Chrome to demo this:
Set Endpoint:
I will make a HTTP POST request to endpoint:https://cs5.salesforce.com/services/oauth2/token*When trying this make sure you replace cs5 with appropriate salesforce.com instance
Set body : grant_type=password&client_id=your_clientid_here&client_secret=your_client_secret_here&username=your_username&password=your_password_here*Append your security token if your IP, from where you are invoking the serviceis not in IP whitelist.
Yet another blog post from ardent Google fan about its new product "Google Drive" !
Google has finally revealed its cloud based file storage and file sharing utility application "Google Drive" to user group.
Companies like Amazon, Dropbox have already marked their position in this business use case. Neverthless the curiosity of "what new & innovative approach" Google has incorporated in this product will keep us excited.
Amazon has marked the presence in this phase in March,2011.Though the features provided in Amazon CloudDrive are very good and user friendly but the lack of developer support puts it in back seat when it comes to grabbing developer's attention and interest. Amazon cloud drive is tightly coupled with Amazon cloud player, a cloud based media player which can play most media formats. Amazon cloud player was not available for users in specific countries like India. Its strange why they did not gave access to cloud player to indian user group.
When it comes to dropbox, it is awesome application that I use to keep all my files that I need everywhere like @work, @home, @travelling,etc. I personally believe that the publicity and utility of any application is influenced by the availability of API for developers to explore, extend it by developing other apps that links to it.
Google knows it very well to provide developer API/SDK for each of its product :). For Google Drive also, they have provided API that will allow users to create, edit, delete and other such operations to be performed on files on their drive. The fact that Google has also eyed on mobile app for Drive has placed Google one step ahead as compared to its competitor.
Google has made an attempt to combine Google Wave and Google Docs. Features like real time editing, real time collaboration,etc which were part of Wave have
been incorporated in Google Drive.
so my equation for Google Drive :
Google Drive=File storage + FileSharing + Real time collaboration + Developer API/SDK
Eager to check my Google Drive ;)
* All views mentioned in above post are my personal.
Last weekend was something different from stereotyped weekend pattern. I participated in Google CodeJam 2012. I took part last year but did not manage to get through subsequent rounds leading to finals.
This time I was bit lazzy even after knowing the schedule of the contest. I woke up at around noon( 6 hrs past the beginning of contest-started at 4am IST) and landed on codejam page. I went through set of questions and got an idea on complexity of problems. Last time I wrote all code in C programming language. But this time I used C and Visual Basic for solving the problems. The advantage you get in using high level language is availability of data structures like list, hashtables, etc. I must say the set of questions presented this year was mix of easy and complex problems. This time they have also changed the pattern. The first question "A" carried 15pts and only required for small input.
Lets discuss about problems, their complexity and approach I used to solve them:
This problem was easy among the set. you actually need to translate the given input into other format. Googlerese is the language generated by replacing english alphabet by different alphabet . They provided the mapping in question.
Solution: I went through problem statement and sample input in question to capture the mapping pattern. I made use of two hashtables. one hashtable used for simple english to Googlerese mapping and other used for inverse mapping. i.e Googlerese to english. I used static initialization of hastables with pair for mapping based on sample input.
Key points to be noted while solving this: 1. Make sure mapping for all alphabets is present in map or any other data structure you are using.
download my output for Speaking in Tongues -small input from here.
Problem B. Dancing With the Googlers (read problem)
This problem deals with permutation and combination. So if you are comfortable with P&C then it will be easy for you to solve. The main crux of the problem was to bring out all the possible set of triplet for each score for Googlers and find the ones with minimum value of some threshold value. This threshold value is varying for each case.
sample provided :
Here the tricky part was of surprising triplet. a triplet is said to be surprising if all 3 judges gives scores such that scores differ exactly by 2. example( 6,7,8), (2,4,4) are surprising triplet.
Solution: I used algo to bring out all triplets keeping in mind the threshold value(p).
I initially done it this way:
say if we have input as 3 1 5 15 13 11. where 3 is number of Googlers for which score is given, 1 is number of surprising triplet, 5 is the threshold value(p). and rest of numbers are scores for Googlers separated with spaces. so here we need to find out how many triplets will have atleast one value> threshold value(p).
I initially write code that assumes surprising triplet value( here 1) not equal to 0 then the current score I am working on is surprising triplet, so first score 15 is surprising. But this may not give the best possible set( our aim is to maximize number of googlers with one judge's score>threshold value(p)). So you need to consider case when 15 is surprising, case when 13 is surprising and case when 11 is surprising. then pick the best result maximizing number of googlers with one judge's score>threshold value(p).
Key points to be noted while solving this:
1. Sum of judge's response should be equal to given score for case. 2. Make sure to consider best possible set for each case.
download my output for Dancing With the Googlers -small input from here.
This problem seems easy but the main aim why Google brought this question on developer's plate is to check efficiency of the code as it involved number ranges in order of 1 to 2000000.
The problem was to find set of distinct numbers (n,m) such that if one or more digits were replaced from back of n and place in front of n will result in m.
example:(12345, 34512) is a recycled pair since you can obtain 34512 by moving 345 from the end of 12345 to the front.
sample provided:
Solution: I enjoy writing parsers thus I picked up approach to solve this using strings. Starting from smallest value in the range I moved each single character from back of number to front of number and checked whether resulting number is in the given range.
So far we are moving only single digit at a time, the resulting number will be different if we move more that 1 character at a time. that's it! If you got this then you can easily solve this! so if you have a 4 digit number then you need to consider cases when moving only single digit, moving 2 digits, moving 3 digits at a time.
Key points to be noted while solving this:
1. n and m must have the same number of digits in order to be a recycled pair.
2. Neither n nor m can have leading zeros. example: number 0021 is not valid.
3. Make sure you include range check in your code to handle dataset range given in problem.
download my output for Recycled Numbers -small input from here
download my output for Recycled Numbers -large input from here
Problem D. Hall of Mirrors (read problem) This problem was bit tough and unfortunately I did not get time to solve and submit this. I will try to solve this and share my experience on this.
I hope this post helps you understand the kind of questions presented in codejam.
This blog post deals with common error thrown BY Force.com: is not supported.
You can raise a case from Salesforce.com partner portal for enabling Dynamic visualforce component in your organization under "Feature Activation" item for case. Salesforce.com team will ask for OrgID for doing so. So it would be quick if you could provide your OrgID while raising the request asking like "I want to enable dynamic visualforce component in my org with orgID:". They will enable within 1 working day( based on my experience).
If you have already enabled the dynamic visualforce components feature in your Salesforce.com organization and still getting this error, then the problem lies with version number of Visualforce page.
I came across such situation where even after enabling this feature I used to get such message. On analysis I found that the root cause was VF page version number:
You get such error in this case: If you are navigating from a VF page whose version number 18 to a VF page whose version number is 24. Since version 18 doesn't support dynamic visualforce components, so when Force.com runtime engine is navigating user from a page (v18 ) to page (v24) it somehow doesn' t take into account the version number of target page i.e. 24 and assumes version of target page as 18 and thus throws such error.
I hope this post will help you to resolve this issue.
Introducing to you all, a new exciting geo-location social networking application targeted for all Web2.0 users. Stay connected with your friends all the time wherever you go !
I am writing this blogspost to share the procedure to flash your Nokia 3110c mobile handset. Last week I was synchronizing my contacts with Gmail using Nokia suite. It asked me to upgrade my firmware, I clicked ok and suddenly after upgrade my Nokia 3110c started showing abnormal behaviour. When I switched on a white screen flashed 3 times and phone gets switched off. This is due to the fact the upgrade wasn't successful and your nokia 3110c files are corrupted.
I followed few steps and got my phone back just free of cost. If you go to Nokia store they might take huge amount for this.. So here are the steps:
1. Download Nokia Pheonix setup.
2. Download RM-237 files from http://www.mediafire.com/?gdjv2ej1m9328so. Nokia 3110c product type is RM-237 hence downloading firmware files.
3. extract these files and create a folder with name "RM-237" under "C:\Program Files\Nokia\Phoenix\Products\" and paste extracted files in RM-237 directory.
4. Start pheonix. Make sure "NO CONNECTIONS" is selected in connections dropdown.
5. Goto "File> Open Product". Select RM-237 from product type.
6. Goto "Flashing>Firmware Update". Select RM-237 from Product type in dialog that opens on hitting browse button next to product code.
7.Click "Dead phone USB flashing" and connect your phone to your PC with USB cable.
8. Click "Refurbish" and wait for pheonix to flash your phone. Please be patient since it takes 10-15 mins.- don't interrupt in this step.
You will see such logs in output section:
Flashing started Creating product data items list Product data items list created Backup not required Flashing phone Initializing Scanning image files... Waiting for USB device... Loading secondary boot code: 14528 bytes Secondary boot loaded Loading update server code: 253888 bytes Update server loaded Asic CMT: Verifying communication to device... Asic CMT: Verifying communication to device... Scanning image files... Creating 128k file from rm237__07.30.image_c_tr... Asic CMT: Start programming 22403 KB... Asic CMT: Erasing rm237__07.30.mcusw Asic CMT: Erasing area 1... Asic CMT: Erasing area 2... Asic CMT: Erasing area 3... Asic CMT: Erasing area 4... Asic CMT: Erasing area 5... Asic CMT: Erasing area 6... Asic CMT: Erasing area 7... Asic CMT: Erasing area 8... Asic CMT: Erasing area 9... Asic CMT: Erasing rm237__07.30.ppm_c Asic CMT: Erasing area 1... Asic CMT: Erasing rm237__07.30.image_c_tr_128 Asic CMT: Erasing area 1... Asic CMT: Programming rm237__07.30.mcusw Asic CMT: Programming 0% Asic CMT: Programming 2% Asic CMT: Programming 4% Asic CMT: Programming 6% Asic CMT: Programming 8% Asic CMT: Programming 10% Asic CMT: Programming 12% Asic CMT: Programming 14% Asic CMT: Programming 16% Asic CMT: Programming 18% Asic CMT: Programming 20% Asic CMT: Programming 22% Asic CMT: Programming 24% Asic CMT: Programming 26% Asic CMT: Programming 28% Asic CMT: Programming 30% Asic CMT: Programming 32% Asic CMT: Programming 34% Asic CMT: Programming 36% Asic CMT: Programming 38% Asic CMT: Programming 40% Asic CMT: Programming 42% Asic CMT: Programming 44% Asic CMT: Programming 46% Asic CMT: Programming 48% Asic CMT: Programming 50% Asic CMT: Programming 52% Asic CMT: Programming 54% Asic CMT: Programming 56% Asic CMT: Programming 58% Asic CMT: Programming 60% Asic CMT: Programming 62% Asic CMT: Programming 64% Asic CMT: Programming rm237__07.30.ppm_c Asic CMT: Programming 66% Asic CMT: Programming 68% Asic CMT: Programming 70% Asic CMT: Programming 72% Asic CMT: Programming 74% Asic CMT: Programming 76% Asic CMT: Programming 78% Asic CMT: Programming 80% Asic CMT: Programming 82% Asic CMT: Programming rm237__07.30.image_c_tr_128 Asic CMT: Programming 84% Asic CMT: Programming 86% Asic CMT: Programming 88% Asic CMT: Programming 90% Asic CMT: Programming 92% Asic CMT: Programming 94% Asic CMT: Programming 96% Asic CMT: Programming 98% Asic CMT: Verifying communication to device... Phone flashing completed. Waiting for phone to boot up Bootup successful Verifying communication to product (before flash finalizing) Communication verified Product code changed Doing factorysets Factorysets complete Loading default data to phone Loading default data to phone Getting Data Package Reading product state Starting backup/restore sub-procedure: data item pre-delay data item pre-delay data item pre-delay Sub-procedure completed: Succeeded., result code: 0 Starting to backup/restore data item: Certificates, version: 1.0 Data Item backup/restore completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item post-delay data item post-delay data item post-delay Sub-procedure completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item pre-delay data item pre-delay data item pre-delay Sub-procedure completed: Succeeded., result code: 0 Starting to backup/restore data item: EmergencyNumbers, version: 1.0 Data Item backup/restore completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item post-delay data item post-delay data item post-delay Sub-procedure completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item pre-delay data item pre-delay data item pre-delay Sub-procedure completed: Succeeded., result code: 0 Starting to backup/restore data item: ISSVariantActivator, version: 1.0 Data Item backup/restore completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item post-delay data item post-delay data item post-delay Sub-procedure completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item pre-delay data item pre-delay data item pre-delay Sub-procedure completed: Succeeded., result code: 0 Starting to backup/restore data item: ProductProfile, version: 1.0 Data Item backup/restore completed: Succeeded., result code: 0 Starting backup/restore sub-procedure: data item post-delay data item post-delay data item post-delay Sub-procedure completed: Succeeded., result code: 0 Backup/restore result: 0 out of 4 items were not backed up Default data loading complete Stopping all operations, returning phone to default mode All operations completed Firmware updating succeeded.
Once its done it will show "Flashing successful" dialog and starts your Nokia 3110c handset automatically.
You are now ready to use your Nokia 3110c as new :D