Monday, October 28, 2013

QT C++ GUI Tutorial 16- Delete data from Database with pushbutton












---------------------------------------------------------
How to Delete data using QT C++ GUI SQlite
Delete the data in a database QT C++ GUI SQlite
remove data in mysql database Visual QT C++ GUI SQlite
erase a MySQL database field data with QT C++ GUI SQlite
select,edit,delete,update data in datagridview control QT C++ GUI SQlite
How To delete a SQL Server Database by Using
How to use a ComboBox control to edit data QT C++ GUI
How to delete Data QT C++ GUI SQlite
Update and Delete data in database  QT C++ GUI mysql
Tutorial how to how can I QT C++ GUI sql server

How to take high quality chroma key in Adobe After Effects CS5 ? (Part 2-Creating a chroma key)

How to take high quality chroma key in Adobe After Effects CS5 ?
Chroma key is a technique that allows you to composite two images or layers together by removing a specific color from one layer to reveal the layer behind it.Most often you use chroma keying to separate  a blue or a green screen from a video and replace it with a different background.Chroma keying is often used on television in weather reporting and films where virtual backgrounds are used.
It is important to set up a blue or a green screen with even lighting and the avoidance of shadow,because it is best to have as narrow a color range as possible for chroma keying.The first step in creating a chroma key is to create a garbage matte.This tutorial will teach you to create a chroma key itself.

Steps To Create A Chroma Key

There are several methods to create a chroma key in after effects.The keylight plugin pre-installed in after effects will help you get the job done faster than any other.But we are going to learn a more advanced technique using the color range option.
  1. Click on the green screen footage layer in the Timeline panel with the chroma key composition still active.
    Select the green screen layer
  2. Select Effect > Keying > Color Range from the menu bar.
    Color Range Effects Panel
  3. Select the first eye dropper tool  in the effects control panel next to the black and white thumbnail preview.
  4. Click the green background in the Composition panel.This begins keying out the background.
    Take the color out using the dropper tool
  5. Select the second Eyedropper tool with a plus sign next to it in the Effect controls panel.This tool is used to add colors to the color range that the effect removes.
  6. Click the area in the composition that is still green.
    Take out extra green colors
  7. Set the Fuzziness to 50 in the effect control panel to remove some of the green fringes around it.
    Set the Fuzziness to 50
The green screen is completely removed from the frame except the slight bluish border around the subject.You need to refine this matte to remove the border that you will learn in the next section.
Note: In a situation you over select a color you can exclude the color from the color range using the eyedropper with the minus sign.

Video Tutorial


Sunday, October 27, 2013

QT C++ GUI Tutorial 15- Edit / Update a data from Database with pushbutton



















--------------------------------------------------------
How to update/edit data using QT C++ GUI SQlite
Update the data in a database QT C++ GUI SQlite
edit data in mysql database Visual QT C++ GUI SQlite
Update a MySQL database field data with QT C++ GUI SQlite
select,edit,delete,update data in datagridview control QT C++ GUI SQlite
How To Update a SQL Server Database by Using
How to use a ComboBox control to edit data QT C++ GUI
How to Edit Data QT C++ GUI SQlite
Update and Delete data in database  QT C++ GUI mysql
Tutorial how to how can I QT C++ GUI sql server

QT C++ GUI Tutorial 14- How to Save data in database
















----------------------------------------------
How to save data in the database
How to save Application data
how to save database
input validation before saving data into the database in QT C++ GUI  SQlite
Embedded database with saving feature on QT C++ GUI SQlite
QT C++ GUI Content text image save to database QT C++ GUI SQlite
Save and Retrieve images in QT C++ GUI From Database SQlite
Using SQLite with .Net - C#
c# - How to Start with SQlite and QT C++ GUI?
c# - How to work with SQLite in QT C++ GUI
c# - What's the best way to save data locally in a QT C++ GUI
Add, Edit, Delete data in QT C++ GUI
how to generate Seriel number automatic in QT C++ GUI
QT C++ GUI Loading and Saving Image to SQL Database
Save and Retrieve images in SQL Server using QT C++ GUI

Saturday, October 26, 2013

QT C++ GUI Tutorial 13- Creating connection open and close function with...










---------------------------------------------------------------------
c++ - How would I open a new window from a button in the main
How to show another window from mainwindow in QT Login
How to move to another window in Qt by a pushbutton Login
How to open a new window in Qt Login
Open new window when button on main-window is clicked

Thread: Open new window on menu action.
[SOLVED] QMainWindow open a new QMainWindow
Thread: Open a window inside another window Login
Thread: right way to open a new window Login
Open a window inside another window Login

Friday, October 25, 2013

C# Tutorial 93: How to list Files and Folders in the selected directory ...






















----------------------------------------------------------------
Populate files into a listbox from a folder in C# windows
C# Open files from listbox file listing
how to add folder to a listbox in .net
Listing directory files in a listbox and open them

Directory Of Folder Names In Listbox - C#
Get Files Into List Box - VB.NET
Add To Listbox Using OpenFileDialog - C#
Recursively Adding Files To A ListBox - C#
Browsing files with DriveListBox, DirListBox and FileListBox
Filling listbox with files in a directory
C# Live updating listbox and duplicates
Need List box to read and display files in C Sharp
 Extracting Path from OpenFileDialog path/filename
 How to use Open File Dialog to Select a Folder
 how to get only file names from the directory
Get path only of a file name? - C#
 How to use Open File Dialog to Select a Folder
Extract file name from full path

Thursday, October 24, 2013

How to use html5 Geo location code with Google maps

How to use html5 Geo location code with Google maps


<!DOCTYPE html>
<html>
<head>
<title>IP Demo</title>

</head>
<body>
<section id="wrapper">
Click the allow button to let the browser find your location.
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<article>
</article>
<script>
function success(position) {
var mapcanvas = document.createElement('div');
mapcanvas.id = 'mapcontainer';
mapcanvas.style.height = '400px';
mapcanvas.style.width = '600px';
document.querySelector('article').appendChild(mapcanvas);
var coords = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
var options = {
zoom: 15,
center: coords,
mapTypeControl: false,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("mapcontainer"), options);
var marker = new google.maps.Marker({
position: coords,
map: map,
title:"You are here!"
});
}
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(success);
} else {
error('Geo Location is not supported');
}
</script>
</section>
</body>
</html>



output below:


IP Demo
Click the allow button to let the browser find your location.

HTML5 JavaScript code to find the current location in map

<!DOCTYPE html>
<html>
<head>
<title>Geolocation Demo</title>
<script>
var x=document.getElementById("demo");
function getLocation()
{
if (navigator.geolocation)
{
navigator.geolocation.getCurrentPosition(showPosition,showError);
}
else{x.innerHTML="Geolocation is not supported by this browser.";}
}

function showPosition(position)
{
var latlon=position.coords.latitude+","+position.coords.longitude;

var img_url="http://maps.googleapis.com/maps/api/staticmap?center="
+latlon+"&zoom=14&size=400x300&sensor=false";
document.getElementById("mapholder").innerHTML="<img src='"+img_url+"'>";
}

function showError(error)
{
switch(error.code)
{
case error.PERMISSION_DENIED:
x.innerHTML="User denied the request for Geolocation."
break;
case error.POSITION_UNAVAILABLE:
x.innerHTML="Location information is unavailable."
break;
case error.TIMEOUT:
x.innerHTML="The request to get user location timed out."
break;
case error.UNKNOWN_ERROR:
x.innerHTML="An unknown error occurred."
break;
}
}
</script>
</head>
<body>
<p id="demo"><font size="7" face="Georgia, Arial" color="maroon">Find Your Current Location In Map</font></p>
<script language="JavaScript">
getLocation();
</script>

<div id="mapholder"></div>

</body>
</html>



output below:


----------------------------------------
Using HTML5 Geolocation to show current location with Google
How To Use HTML5 GeoLocation API With Google Maps
HTML5 Geolocation API Tutorial Latitude/Longitude API
How to find nearby hospitals using google map api and javascript
javascript - Easiest way to get city name using geolocation?
Build a Location-Based Mobile App With HTML5 and Javascript
Geolocation Demo
Find Your Current Location In Map

Write a C# Program to convert Binary to Decimal


Write a C# Program to convert Binary to Decimal


using System;
using System.Collections.Generic;
using System.Text;

namespace Program
{
class Program
{
static void Main(string[] args)
{
int num, binary_val, decimal_val = 0, base_val = 1, rem;
Console.Write("Enter a Binary Number(1s and 0s) : ");
num = int.Parse(Console.ReadLine()); /* maximum five digits */
binary_val = num;
while (num > 0)
{
rem = num % 10;
decimal_val = decimal_val + rem * base_val;
num = num / 10 ;
base_val = base_val * 2;
}
Console.Write("The Binary Number is : "+binary_val);
Console.Write("\nIts Decimal Equivalent is : "+decimal_val);
Console.ReadLine();
}
}
}




-----------------------------------------------
C# Program to Perform Binary to Decimal 
Converting from Binary and Decimal in C# C sharp
binary to decimal
Binary To Decimal Conversion In C#
PROGRAM FOR BINARY TO Decimal CONVERSION C#

How to convert decimal to Binary, Octal, Hex conversion in C#

How to convert decimal to Binary, Octal, Hex conversion in C#



Random rand = new Random();
int value = rand.Next(0, 1001);
String binaryRepresentation = Convert.ToString(value, 2);
String octalRepresentation = Convert.ToString(value, 8);
String base10Representation = Convert.ToString(value);
String hexRepresentation = Convert.ToString(value, 16);
// Any other bases and you are on your own.

// Go the other way.
int binary = Convert.ToInt32(binaryRepresentation, 2);
int octal = Convert.ToInt32(octalRepresentation, 8);
int base10 = Convert.ToInt32(base10Representation);
int hex = int.Parse(hexRepresentation, System.Globalization.NumberStyles.HexNumber); 
// alternative
Console.WriteLine("Binary: " + binaryRepresentation + " = " + binary.ToString());
Console.WriteLine("Octal: " + octalRepresentation + " = " + octal.ToString());
Console.WriteLine("Base10: " + base10Representation + " = " + base10.ToString());
Console.WriteLine("Hex: " + hexRepresentation + " = " + hex.ToString());














--------------------------------------------

Decimal To Octal C# Searches related to program to Convert Decimal to binary c#
convert decimal binary java
convert decimal binary visual basic
convert integer binary c#
convert decimal hexadecimal c#
c# convert decimal ascii
int to binary c#
Convert Decimal To Octal In C#
Converting Decimal To Octal C sharp
c# - Decimal to binary conversion in c #
Write a Program to convert Decimal to Binary in C#.NET
How convert decimal to binary
Converting decimal number into Octal number
C#: Decimal to Binary Conversion
Convert Decimal Number to Octal Number
How to convert numbers between hexadecimal and decimal in C#
Convert Type Decimal to Hex
C Sharp Code
Searches related to program to convert decimal to hexadecimal in c#
c# convert hex string to decimal
convert integer hexadecimal c#
convert decimal hexadecimal java
convert decimal binary c#
c# convert decimal ascii
c# to hex

Wednesday, October 23, 2013

Beginners LabVIEW Tutorial 3: Using Loops in LabVIEW





















---------------------------------------------------------------
Passing Data Between Loop Iterations in NI LabVIEW
LabVIEW - Timed Loops
 Basic LabVIEW
Loops and Conditional Statements
Pass value between while loops
For Loop Conditional Terminal
Loop timing - LabVIEW General
Parallel Loops in LabVIEW
LabVIEW example loops
Your First LabVIEW Program
Basic LabVIEW
Building and Loading your First LabVIEW Program
A Quick Tutorial on LabVIEW
Getting Started with LabVIEW for the FIRST time

Sunday, October 20, 2013

Beginners LabVIEW Tutorial 2: Creating First LabVIEW Program












----------------------------------------
Your First LabVIEW Program
Basic LabVIEW
Building and Loading your First LabVIEW Program
A Quick Tutorial on LabVIEW
Getting Started with LabVIEW for the FIRST time

Beginners LabVIEW Tutorial 1: Getting Started with LabVIEW



















-----------------------------------------------
Getting Started with NI LabVIEW
Basic LabVIEW - Tutorials
An Introduction to LabVIEW
Searches related to labview tutorial
labview 2010 tutorial
labview tutorial pdf
labview download
labview tutorial video
labview 2009 tutorial
labview 8.5 tutorial
labview training
labview 2012 tutorial

Friday, October 18, 2013

C# Tutorial 92: How to Download a File from Internet using C#

























-------------------------------------------------------------------
C Sharp Download File Using C#
How to Download a File - C Sharp C#
How To Download an Internet File with C#
Downloading a file from a PHP page in C#
C# Webclient Stream download file
C# download file from the web
Searches related to How to Download a File - C Sharp C#
c sharp download file from web
c sharp download file from url
c sharp download file from ftp
c# uploading file
c# email file
java downloading file
java file transfer
visual basic file transfer    
How to download a file in C#
Creating a Web Scraper

Thursday, October 17, 2013

C# Tutorial 91: How to get Source Code from a Website with C#























-----------------------------------------------------
Get HTML code from a website C#
c# - How to get source code after simulate web page button click
Get HTML code from a website C#
C# code to read html source code of a web page
How to get webpage source code using C#
Download source code of a website in C#
How to get Website Source Code with C#
Get Web Page Contents in Code with C#
Searches related to How to get Website Source Code with C#
c# get web page source
how to find source code of a web page
how to view html code in browser
c# download html

Tuesday, October 15, 2013

SQLite Tutorial 3 : Working with important SqLite Queries (SELECT, INSER...












---------------------------------------------------------
SQLITE - Simple Select Queries - SQLite Databases and Syntax
Query Planning - SQLite
SQLite query selecting number from list
SQLite Query LanguageSearches related to sqlite query
sqlite query examples
android sqlite query
sqlite select
sql query
sqlite tutorial
sqlite3 query
sqlite date query
mysql query
The SQLite Query Optimizer Overview
SQLite Query Language: Date And Time Functions
SQLite Update query is not working
Using SQLite 3
sqlite query not working
sql or sqlite query and getting result in a list
Searches related to sqlite query list
sql query select list
mysql query list
sql commands list
sql join list
sql update list
sql query code
write queries

SQLite Tutorial 2 : Download and Install Free SqLite GUI Manager for Win...















-----------------------------------------------------------------
Searches related to free sqlite manager
free sqlite manager download    Mozilla Firefox
free sqlite manager mac Searches related to firefox sqlite manager
firefox sqlite manager tutorial
firefox sqlite manager foreign key
sqlite manager add-on for firefox
chrome sqlite manager
sqlite manager download
sqlite manager ubuntu
sqlite manager fix this problem
sqlite manager theme
freeware sqlite manager
sqlite database manager
best sqlite manager
open source sqlite manager
sqlite management app
sqlite management tools
best free Sqlite management tool?
Best Free SqLite GUI Manager for Windows
- Which SQLite administration console do you recommend
Searches related to open source sqlite manager
sqlite manager windows
free sqlite manager
sqlite admin windows
best free sqlite

SQLite Tutorial 1 : Getting started with SQLite and Installation (+playl...












-----------------------------------------------------------
A Simple Step-by-Step SQLite Tutorial
How to use SQLite in Windows
SQLite tutorial
How do I install sqlite3  on Windows?
Searches related to sqlite tutorial windows
sqlite3 tutorial
sqlite database tutorial
sqlite sql tutorial
sqlite3 update example
sqlite create a database
sqlite update statement example
create db in sqlite3
sqlite3 attach database example

Monday, October 14, 2013

How to take high quality chroma key in Adobe After Effects CS5 ? (Part 1-Creating a garbage matte)

Create a garbage matte
When using a green or a blue screen,the only area that matters is the area around the subject.However,while filming a video you intentionally or unintentionally include extra elements in the video frame.The first step in the chroma keying process is to create a garbage matte,which is a mask that you draw to remove the unnecessary areas of the video frame and to isolate the subject and the area immediately around it.The garbage matte has to completely enclose the subject.If the subject is moving it is important to animate the vertices of the mask to accommodate the moving subject in the video frame.
Perform the following steps to create a garbage matte:
  1. Drag the files into a new composition in the project panel.In our case we have created a new composition called chroma keying and placed two footage items in the timeline panel.
    Two footages in the composition chroma keying
     
  2. Select the layer containing the green/blue screen background in the timeline panel.
  3. Move the playhead to the desired time mark on the timeline,where the subject takes maximum area on the screen.
  4. Select the tool that you want to use to create the garbage mask.in our case we have selected rectangle tool.
    Rectangle tool in adobe after effects cs5
  5. Select rectangle tool and click and drag the mouse pointer around the subject to create the garbage mask.
    Garbage matte hides the unnecessary part of the video frame
  6. Select File ->Save from the Menu bar to save the project.
You can use the pen tool to create the garbage mask in case you want to mask out complex areas.It is always preferred to create a large garbage mask to not cut out any of the subject's movement.Alternatively,you can create  a smaller mask that matches the contours of the figure of subject and then animate the position of the vertices on the path using the Mask Path property.
   In the next part you will learn how to create a chroma key like a pro.

Saturday, October 12, 2013

C# Tutorial 90: How to Display Google Maps in C# Windows Form
















----------------------------------------------------------
Show Your Data on Google Map using C#
How to add google maps in a C# Program
c# - how to display address in google map
Display Google Map in Windows Form - C# / C Sharp
display google maps in c# application
C# And Google Maps - C#
Integrating Google Maps with C#
Embed Google Maps in C#
how to show locations in a Google map
Google Maps in C# Web Application

Thursday, October 10, 2013

Strange Problem With Older Google Forms

I've had two people complaining about this this week.

If you have a Google Form in a spreadsheet that was made a while ago, you are still given the old form editing interface.

There doesn't seem to be a way to bring a Google Form up-to-date, which is a big pain if your form is very long and complex since the only way to do so is to just start all over again.


Wednesday, October 9, 2013

Recommended Method To Open Password Protected Zip File Without Password

Recommended Method To Open Password Protected Zip File Without Password
It has now been common that at least 10 of every 100 files that you download from the internet is password locked.This is locked either because it is scam or the owner doesn't actually want to share it with you.There is no way to realize whether it is fake or not other than just opening the password protected file.Getting the passwords to unlock these are quite difficult because most of them are locked down in surveys.I have already told you how to open password protected zip file without password in my previous posts.I have seen a great positive response to my how to open password protected rar file without password posts.Therefore I will share a similar trick to unlock zip files without password in this post.
Please note that this post is only for educational purpose and does not promote hacking/cracking.

Things You Will Need

  • A good PC (It's better if you have a good one)
  • Ultimate Zip Cracker Software
  • Decryption key :   tHaNK!yOu!

Steps To Open Password Protected Zip File Without Password

  1. Copy decryption key and visit this link.
  2. Install it following the steps in the read me file.
  3. Start the program after successful installation.
  4. Set the path of the zip file.
  5. Choose the search method as password wizard (recommended for most cases).
  6. Click start and choose the appropriate options in the password recovery wizard (we recommend you to skip unnecessary methods like date search for faster search).
    Ultimate Zip cracker
    Always check the appropriate options in the recovery wizard.
  7. Copy the password from the pop up and unlock your zip file.
    unlock password protected zip file
    Pop up with the password

If that doesn't work...

If you are unable to retrieve the password for the locked zip file after following the above steps then we recommend you to choose the search method as dictionary attack and then for brute force attack.Brute force attack can take so long depending upon password length.Choose the settings appropriately.

Video Tutorial
To learn more about each recovery methods and to learn where to use them,make sure to watch the video right below.


If you still have trouble or if you find it difficult to choose a search method then tell us in the comments.We will try to find a solution for you.If you find any mistakes in this post tell us in the comments.

Using Google Docs To Make Google Spreadsheets Easier to Read

A lot of our staff are using Google Forms to gather lots of data into spreadsheets, from Grant Application forms to self assessment questionnaires and more.

Spreadsheets are of course great places to store lots of data, but when that data is mainly textual, it is ridiculously hard to read and edit in a spreadsheet.

Our solution has been to generate a Google Doc of the data in a row of data. Sometimes this happens automatically and is emailed to the relevant people and sometimes we add a little interface to be able to say "Make a Google Doc with this row" to the spreadsheet.

The challenge is making it easy to set up.

Our Solution


We've used this a few times. First we create our Google Form and add some data. The spreadsheet now has a list of column headers across the top.

Now, we make a template Google Doc. In Tools > Script Editor we add some code that allows us to insert the spreadsheet header names as funny tags, like this, {Username}. You could of course do this by hand, but when your forms get very complex, or your headers are very long, it's easy to make mistakes.

This code adds a "Show Tags" menu to document, which, in a sidebar shows a list of the spreadsheets header names which can be inserted into the document.


function onOpen() {
  var menu = DocumentApp.getUi().createMenu('Tags')
  menu.addItem("Show tags..." ,"show_tags" )
  menu.addToUi();
}

function get_ss_headers(){
  var ss = SpreadsheetApp.openById('YOUR_SPREADSHEET_ID')
  var sheet = ss.getSheets()[0] // Get the first one
  var range = sheet.getRange(1, 1, 1, sheet.getLastColumn() )
  var values = range.getValues()[0]
  return values
}

function show_tags(){
  var headers = get_ss_headers( )
  var app = UiApp.createApplication().setTitle("Insert Tags")
  var panel = app.createVerticalPanel();
  var list_box  = app.createListBox(true).setId('list_box').setName('list_box').setWidth(240)
  list_box.setVisibleItemCount(10 )

  for ( h in headers){
    var header = headers[h]
    list_box.addItem(header).setValue(Number(h), header)
   
  }
  panel.add( list_box)

  var handler = app.createServerHandler('insert_tag').addCallbackElement(list_box)
  var button = app.createButton('Insert!' ).setId('button').addClickHandler(handler)
  panel.add( button)
  app.add(panel)
  DocumentApp.getUi().showSidebar(app)

}

function insert_tag(e){
   var app = UiApp.getActiveApplication()
   var list_box = e.parameter.list_box
   var tag = "{" + list_box + "}"
   var doc = DocumentApp.getActiveDocument();
   var cursor  = doc.getCursor()
   cursor.insertText(tag)


}

Copy and paste this code into your document, changing the spreadsheet ID, then run onOpen(). It will ask for authorisation, then the menu will appear, like this.





Once you've added all your fields, you need to first, create a Google Folder and note the ID of it ( you can see it in the URL ) and then add some code to the spreadsheet to render a spreadsheet row into a Google Doc. ( Caveat: This does assume that your header names are unique - with one particularly complex form with multiple pages and stages, we titled questions as a.name, a.institution and b.name, b.institution and so on. )

Go to your spreadsheet and add this code via Tools > Script Editor...


function create_google_doc() {

  var ss = SpreadsheetApp.openById('YOUR_SPREADHEET_ID')
  // Logger.log( ss.getName())
  var sheet = ss.getSheetByName("Form Responses")
  var row = SpreadsheetApp.getActiveRange().getRow()

  //get headers
  var headers = sheet.getRange(1,1,1,sheet.getLastColumn()).getValues()[0]
  var range = sheet.getRange(row, 1, 1, sheet.getLastColumn())
  var values = range.getValues()[0]

  //Build a dict
  var tags = {}
  for (h in headers){
    var header = headers[h]
    tags[header] = values[h]
  }
   
  try{
    //Get some hard-wired values ( CHANGE THIS FOR YOUR NEEDS )We need some data to name the file
    var student_name = values[2] + " " + values[1]
    var student_email = values[4]
   
    //Make a Google Doc
    var new_doc_title =  student_name + " - Registration Form" // CHANGE THIS TOO.
    var template_id = 'YOUR_GOOGLE_DOC_TEMPLATE_ID' // The ID of your template file
    var template_doc = DocsList.getFileById(template_id)
    var new_doc_id = template_doc.makeCopy(new_doc_title).getId()
   
   // Move new document
    var destination_folder = DocsList.getFolderById('YOUR_FOLDER_ID')
    var doc = DocsList.getFileById(new_doc_id)  //Move to destination folder
    doc.addToFolder(destination_folder)
   
   
    var new_doc = DocumentApp.openById( new_doc_id )
    //Render the values into the doc
    var s = ''
    for ( var t in tags) {
     
      var tag = "{" + t + "}"
      var value = tags[t]
      s+=  tag + " " + value + "\r" // Just for debugging
      new_doc.replaceText(tag, value )
    }
    Logger.log(s)
    //Replace any unreplaced tags for tidiness
    new_doc.replaceText("\{.*?\}", "" )
   
    //Share it to the student, optional
    //new_doc.addViewer(student_email)
 
    //Add URL to the Spreadsheet
    var url = new_doc.getUrl()
    var range = sheet.getRange(row, sheet.getLastColumn()+1 ).setValue(url)
    Browser.msgBox("Document created for '" + student_name + "'  in folder 'Wherever'")
    return new_doc
   
  }catch(e){
    Logger.log( e)
  }

}

function onOpen() {
  var ss = SpreadsheetApp.getActiveSpreadsheet()
  var menuEntries = [ {name: "Create Google Doc", functionName: "create_google_doc"}                                      ]
  ss.addMenu("Admin", menuEntries)
}

function url_escape(s){
  var s = encodeURIComponent(s)
  return s
}


Lastly make sure that anyone generating a Google Doc has access to the Template Document, otherwise the code won't work ( they only need View access ).

And there you have it, we use these sorts of scripts for all sorts of occasions where reading form submissions in the spreadsheet isn't appropriate. We've even added code that adds to bottom of the document, a prepopulated URL that examiners can click to complete a form for marking that document, with the student's name and other details already filled in.











Linking a Google Doc To a Form For Assessment

In the previous blog post, I showed how we get data from a Form and render it into a Google Document.

In this post, I want to show how the Document, as it is created can have a link appended to it to another Google Form that will be used for marking that document. We have used this where people are submitting application forms and lecturers are grading those applications.



First, create your new evaluation form, deciding what field will be autopopulated with data from the application form, for example, student name and institution etc. Also add the form items you want to use for marking, which might include drop down menus or multiple choice or paragraph text areas.

 and then select then choose the menu Responses > Get pre-filled URL. Once you have filled in this form you will be able to add some code to your Google Spreadsheet like this... and work out which value you need to map onto the bit that says... entry.1021949580 ...obviously all of these will need changing for your values and email.



function make_prefilled_url ( values ){
  var title = values['Title'][0]
  var firstname = values['First Names'][0]
  var surname = values['Surname'][0] 
  var institution = values['Institution'][0]
  var department = values['Department/School'][0]  
  var mode = values['Mode of Study'][0]
  var university_id = values['University ID Number'][0]
  var condition = values['Has an offer of a place of study already been received'][0]
  var project_title = values['Project Title'][0]
  var project_summary = values['Project Summary'][0]
  var url = 'https://LINK_TO_YOUR_EVALUATION_FORM/viewform?'
  
  url+= "entry.1981746791="+ url_escape (title )
  url+= "&entry.522456082="+ url_escape( firstname)
  url+= "&entry.1635227300="+ url_escape( surname )
  url+= "&entry.1575537957="+ url_escape (institution )
  url+= "&entry.1021949580="+ url_escape( department   )
  url+= "&entry.1125873153="+ mode 
  url+= "&entry.1336223027="+ url_escape( university_id )
  url+= "&entry.582559888="+ condition 
  url+= "&entry.303787572="+ url_escape( project_title )
  //url+= "&entry.1796510964="+ url_escape( project_summary )
  
  return url 
}

function url_escape(s){
  var s = encodeURIComponent(s)
  return s 
}

Once you've worked out how to create a pre-filled URL, you can then go back to the code that generates the Google Doc ( the application form ) and make sure that each document has a link to the evaluation form.

This shows you how to add a link to a Google Doc.


function onFormSubmit(e){ 
  // Get values
  var values = e.namedValues 


<<< Your other code here to generate your Google Doc >>



   //Append an pre-populated form URL to the new document 
    var eval_url = make_prefilled_url(values)    
    var link_text = "To evaluate this application, click here"
    var par = new_doc.getBody().appendParagraph(link_text)
    par.editAsText().setLinkUrl(0, link_text.length -1 , eval_url)



It's difficult to give you copy-and-pastable code to do this because it's a bit messy, but workable enough and once you understand the concepts, it allows you to easily chain forms and processes together, making a much smoother experience for everyone involved.

Sunday, October 6, 2013

How To Speed Up Your Blogger Blog Load Time?

Speed Up Your Blogger Blog Load Time?
No one like waiting even for a very short time.Slow webpages tend to have higher bounce rates.I have recently blogged the way you can understand what causes your site to load slower using the Google's PageSpeed Insights.But how can you use these suggestions to improve webpage load time.There is no single tool to improve your webpage load time rapidly but there are several tools which can be used together to achieve this.Let's get on to these tools and tips without further explanation.

Before starting with these tips check your webpage speed score here.

Tips And Tools To Speed Up Webpage Load Time

Note:The tools and tips may not be in order of importance.

1 ) Avoid Too Many Javascripts OR Add Them Before Closing Body Tag

Avoid Too Many Javascripts
Some extra features are good for your blog but more of them can kill your blog.Too many java scripts in your blog can cause your site to load too slower.Therefore find time to remove unnecessary javascripts.If you want to have them all,then it is better to host the javascripts externally and paste it at the end of body tag ( before < /body> ).This will allow the site to load first and then the javascripts so that the user can read the content while the javascript is loading.

2 ) Compress The Codes

Text don't eat up space but compressing large chunks of text can help you save at least a few kilo bytes.You can use online code compressors such as htmlcompressor or javascriptcompressor to compress your codes.What it does is remove the spaces in between the codes in order to save bytes.
How to compress blogger template? Copy the entire template code from the Edit HTML option and paste it in the htmlcompressor and click compress.Now replace the entire blogger template with the compressed code from HTML compressor.
A compressed code will not be properly formatted so that you won't be able to work on it.There are several websites that allow to beautify or format html codes.One such is Online Code Beautifier.You can use this tool to properly format the compressed HTML to work on it.

3 ) Limit The Number Of Posts On Homepage

Too many posts in the homepage can lead to delay in loading homepage.It is therefore recommended to limit the number of posts on the homepage.You can do that by going to the layout tab and then click edit on Blog Posts.Enter the number of posts on your homepage and hit save.
Note:Blogger has a size limit of 1 mb on the homepage.If you are experiencing issues on all gadgets/posts not being loaded it is likely that you exceed the limit so far.
Limit The Number Of Posts On Homepage

4 ) Add Line Breaks Even If You Are Using Auto Readmore

Line breaks are a great feature that allows you to break the post into small paragraphs.This will allow post to to displayed partially on the blogger homepage with a read more link.You might not be knowing that anything after the line break is not loaded in the homepage or anywhere you use a read more link.This will drastically improve the page load time of your homepage if you display only post summary on homepage.
Add Line Breaks Even If You Are Using Auto Readmore
Why to add line breaks for templates with auto readmore? Most of the new blogger templates has auto read more function.What it does is that it displays only a limited number of characters in the homepage without the need for adding a line break.This will help you to get  uniform sized post summaries on your homepage.But auto readmore function loads the entire post and then displays its post summary which means increasing the homepage size.Therefore you will experience site not properly loaded issues.Therefore always add a line break after your first paragraph even in your auto read more template.

5 ) Compress Images

Images take some time to load.Therefore it is important to add images after compressing.You can use image optimizer,jpeg-optimizer,smush.it or compress now.If you are adding images using the add url method it is important to make sure that you add the image from popular websites.This will make sure that the images are hosted on fast servers which can improve the image loading time.
Compress Images

6 ) Reduce The Number Of Gadgets

Reduce The Number Of Gadgets
Most of the blogs contain so many gadgets.Many of these are useless.Therefore it is important to make sure that your blog has only has useful gadgets.Remember your visitors need content not gadgets.Therefore removing the worthless gadgets from your blog  can help you speed up your blog load time.


7 ) Try Removing Background Images

Background images makes your blog look good.You can see that I have added a background image to my blog header.But this can result in slow loading time.Background images used in blogs are usually very small sized image.The image is then fitted onto the screen using repeat functions.Removing background images can surely help you speed up load time.Background images are added using CSS code like 
#Widget-id{background:url ('image url') repeat center center fixed;}

8 ) Avoid Too Many Ads

Monetizing your blog to generate revenue from ads is not a bad idea but adding too many ads from different networks is definitely a bad idea.I have recently added an ad from mad ads media at the top header.But since after it I saw drastic slow speeds in load time.Therefore I removed those ads to deliver speed to my users.
Avoid Too Many Ads

9 ) Avoid Too Many External Style Sheets Or Javascripts

If you have large piles of codes in your template then it is better to host your large stylesheets and javascripts externally.If you have already hosted it externally make check out how you did that.Even if you are having too much codes you should make sure that you add all the codes into a single external source rather than too many external stylesheets ans javascripts.Also make sure that you compressed your style sheets and javascripts before hosting like I mentioned earlier.
Avoid Too Many External Style Sheets Or Javascripts

10 ) Use Fast Loading Templates

Clean coded templates and fast loading templates will also help you speed up webpage load time.I have already shared some amazing blogger templates for free very recently.You can find fast loading templates there.
Fast loading free blogger template

Now check your blog speed score again using google pagespeed insights.Compare your before and after score of your blog and leave it in the comments.if you have any points that you would like to see in this post please tell us in the comments.If you find any mistakes in this post please tell us in the comments so we can improve it.

Blog Archive

 

© 2013 Klick Dev. All rights resevered.

Back To Top