Pages

Showing posts with label is. Show all posts
Showing posts with label is. Show all posts

Tuesday, March 10, 2015

For shipping jewelry Apps Script is golden

Editor’s Note: Guest author Jason Gordon is a co-founder of Beth Macri Designs — Arun Nagarajan

Beth Macri Designs creates jewelry from the point of view of a structural engineer. The forms are designed using generative 3D software systems and materialized using 3D printing technologies. Our company understands that to make beautiful fine jewelry, 3D printing is only the first step; traditional jewelry craft is then employed for final production. After our first product, The Hidden Message Necklace, was recently featured on The View as part of its Valentines Day Gift Guide, we had a lot of orders to ship out. As soon as the mail leaves the building, though, the process is literally out of our hands: something unexpected was bound to happen to at least one or two packages. Several package-tracking services exist, but getting the names and tracking numbers into them was a cut-and-paste operation.

I knew that all of the tracking numbers were being delivered by email and I had already set up a Gmail filter to archive them and apply a label. With a little help from Google Apps Script, I knew I could automatically parse those emails and add them to my account on PackageTrackr (which syncs to their newer service, Fara).

The script supports reading emails from multiple shipping providers and is set up so one could easily add more. Every 30 minutes on a time-driven trigger, using the Gmail service, the script runs and looks through unread emails from the shipping provider label, then parses the name and tracking number out of each one. The provider, tracking number, and recipient are stored in a JavaScript array.


function getUSPSConversations(){
return GmailApp.search("in:usps is:unread subject:(Click-N-Ship)");
}

function matchUSPSHTML(data){
var out = [];
var track_num = data.match(
/TrackConfirmActionWinput.actionWtLabels=(d+)/g);
var to = data.match(/Shipped.to.*[
]*.*>([a-zA-Zs-_]*)<br>/g);
for(i in track_num){
var o = new Object();
var track = track_num[i].match(/(d+)/g);
var person = to[i].match(/>([a-zA-Zs-_]+)<br>/);
var myPerson = person[1].replace(/(
|
| )/gm,"")
o["number"]=track[0];
o["carrier"]="USPS";
o["person"]=myPerson;
out.push(o);
}
return out;
}

You can parse all of your different shipping providers in one run of the script. After all of the shipment emails are read, it composes an email to PackageTrackr to give it all of the tracking numbers it just harvested.


var user = Session.getActiveUser().getEmail();
if(data.length > 0){
for(d in data){
body += this["formatForPackageTrackr"](data[d]["number"],
data[d]["carrier"], data[d]["person"]);
}

GmailApp.sendEmail("track@packagetrackr.com", "Add Packages",
body, {bcc: user});
}

function formatForPackageTrackr(tracking_num, service, person){
return "#:" + tracking_num + " " + service + " " + person + "
";
}

Down the line, other shipping providers could be added such as UPS and Fedex. Additionally, more tracking services could be added instead of just PackageTrackr.


Jason Gordon   profile

Jason Gordon is a co-founder at jewelry startup Beth Macri Designs. He is responsible for software development, logistics and e-commerce. While working at Beth Macri Designs, Jason gets to find creative ways to put his software development skills to work to improve logistics and user experience.

Read more »

Tuesday, February 10, 2015

C program to check whether a number is prime or not


#include<stdio.h>
#include<conio.h>

void main()
{
int n,i,flag=1;
clrscr(); //to clear the screen
printf("Enter any number:");
scanf("%d",&n);
for(i=2;i<n/2;++i)
if(n%i==0)
{
flag=0;
break;
}
if(flag==1)
printf("
The given number is prime");

else
printf("
The given number is not prime");

getch(); //to stop the screen
}
Read more »

Friday, January 23, 2015

How to fix VT x is not available

Hai guys now im going to teach how to fix VT-x is not available. When you are installing any x64 bit guest operating system on vmware workstation or virtual box which is installed in x32 bit host operating system it alerts the following errors.

Error message in VMware Workstation 

Error message in Virtual Box

I faced these problems while installing xenserver on VMware workstation and i also get ‘VT-x is not available’ while starting the VM. So I decided to get rid of these errors. I have done only one change in BIOS settings that’s it my all problems are solved.

Read the below points carefully to fix your errors. To have a clear idea i’m explaining some basic terminology.


Virtualization : Virtualization is nothing but installing and running the multiple operating systems in a single physical system simultaneously is called as virtualization. 


Server Virtualization : Simply we can say installing and running the multiple servers in a single physical system simultaneously  is known as server virtualization.


Examples of Virtualization Softwares :


1) Xenserver.
2) Vmware esx or Vmware esxi
3) Hyper-V.
4) VirtualBox.
5) Vmware Workstation.
6) Virtual PC.
      Before starting the installation we have to keep some points in mind

Note 1 : Those who want to install 64bit guest operating system in 32bit host operating system, your pc or laptop should have VT means virtualization technology. Most of the latest intel (VT-x) and amd (AMD-V) processors contains virtualization support. First check it in google whether your processor has VT or not.

Note 2 : Microsoft providing open source hardware assisted virtualization detection tool. Copy the url
http://www.microsoft.com/en-us/download/details.aspx?id=592  paste it in address bar. Download and install it. Run the software and check whether your PC supports virtualization or not.

Note 3 : If your system contains virtualization technology go to bios settings and enable it.

Note 4 : Your virtual machine RAM should not exceed the actual RAM size check it once.

Guest os : Guest os means which is installing on virtual box. Guest os is also called VM (Virtual Machine).


Host os : Host os means our main or base operating system.


Procedure to enable VT in BIOS:


First go to BIOS and check whether VT-x or Virtualization disabled/enabled.

Start PC or Laptop, at startup you should press DEL or F2 (or something depending upon your company) to get the BIOS settings. There you will find an option to enable VT-technology (or something depends upon PC or laptop company). 

If you have any doubt please leave a comment
Read more »

Check Your Antivirus Is Working Or Not



Check Your Antivirus Is Working Or Not


Your Antivirus is Working Or Not?


Asalam o Alaikum Friends!!!



Dosto aaj main ap Logo k leye aik Boht achi Tip lain kar aya hou jis ki Madad se ap jan sake ge k Ap ka Antivirus Work kerha hai k nahi??


To Dosto is k leye kerna ye hoga k Niche dye gaye CODE ko Notepad main Write kar k Check Virus.exe k Name se Save kerna kesi b folder main, Ager wo file Save hote he Delete hojaye toh ap ka Antivirus Work kerha hain, or ager wo file Delete na hou toh ap ka Antivirus work nahi kerha ha.


I hope ap ko ye Tip passand aye hogi, ager ap ko ye Tip passand aye hai to Comments kerna mat Bohlye ga :)




♥ Code ♥
X5O!P%@AP[4PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*



Read more »