Tuesday, September 17, 2013

Useful SQL Queries – Workflow Processes exposed.

Useful SQL Queries – Workflow Processes exposed.

SELECT t5.name,
t3.name,
t3.proc_name,
t2.name,
t1.name,
t1.val,
t1.name,
t1.buscomp_fld_name,
t1.buscomp_name,
t1.input_flg,
t1.proc_prop_name,
t1.output_arg,
t1.val_type_cd
FROM siebel.s_wfr_stp_arg t1
INNER JOIN siebel.s_wfr_stp t2
ON t1.step_id = t2.row_id
INNER JOIN siebel.s_wfr_proc t3
ON t2.process_id = t3.row_id LEFT
OUTER JOIN siebel.s_project t4
ON t3.project_id = t4.row_id LEFT
OUTER JOIN siebel.s_repository t5
ON t1.repository_id = t5.row_id
 WHERE t5.row_id IN('1-55W2-1')
AND t3.proc_name LIKE '%GEAE Material Lead Form%'
--Update the Workflow Process Name
AND t3.status_cd = 'COMPLETED'
--Workflow Status
AND t2.name like '%Convert2Text%'
--Step Name
and t1.name like 'U%Path%'
--Argument Name
and t1.val like '%err%'
--Argument Value
ORDER BY t1.name;
Explanation of the variable used are as following
  • t5.row_id: Row Id of the Repository in which the workflow process resides
  • t3.proc_name: Name of Workflow Process
  • t3.status_cd: Status of the Workflow Process
  • t2.name: Name of the Step in Workflow Process
  • t1.name: Name of the I/O Argument in Step
  • t1.val: Value given in the I/O Argument

Examples of where clause
Details of workflow process name “Sample Workflow”
WHERE t5.row_id IN(’1-55W2-1′)
AND t3.proc_name LIKE ‘Sample Workflow’
Details of workflow process name “Sample Workflow” and status as Completed.
WHERE t5.row_id IN(’1-55W2-1′)
AND t3.proc_name LIKE ‘Sample Workflows’ 
–Update the Workflow Process Name
AND t3.status_cd = ‘COMPLETED’
–Workflow Status
Details of All the workflows with completed status and having a step name Unix
WHERE t5.row_id IN(’1-55W2-1′)
AND t3.status_cd = ‘COMPLETED’
AND t2.name like ‘Unix’
Hope this helps. If you have any questions don’t hesitate to drop comments. I will be more than happy to answer them.

Sunday, September 8, 2013

Get country name using IP address in php

Get country name using IP address in php

Get country name using IP address in php
Get country name using IP address in php

Geo IP Lookup API

The Geo IP Lookup API provides a variety of lookup methods. Below we will outline the different ways to get data from the Geo IP Lookup tool along with code samples of each:

HTML

The simplest way to get data from the API. There are 4 types of HTML output: countrycodecountrylocale, and full.
countrycode
Specify the ipaddress variable and the output variable of countrycode and retrieve the country code for any IP address
http://geoiplookup.net/geoapi.php?output=countrycode&ipaddress=96.254.141.142 will return the following:
Country: US
country
Specify the ipaddress variable and the output variable of country and retrieve the country name for any IP address
http://geoiplookup.net/geoapi.php?output=country&ipaddress=96.254.141.142 will return the following:
Country: United States
locale
Specify the ipaddress variable and the output variable of locale and retrieve the city, region, and country for any IP address
http://geoiplookup.net/geoapi.php?output=locale&ipaddress=96.254.141.142 will return the following:
Country: United States (US)
City: Tampa, Region: FL
full
Specify the ipaddress variable and the output variable of full and retrieve the city, region, country, and latitude and longitude for any IP address
http://geoiplookup.net/geoapi.php?output=full&ipaddress=96.254.141.142 will return the following:
Country: United States (US)
City: Tampa, Region: FL
Latitude: 27.9178 Longitude: -82.3799

JSON

Specify the ipaddress variable and the output variable of json and retrieve a full JSON encoded result set.
http://geoiplookup.net/geoapi.php?output=json&ipaddress=96.254.141.142 will return the following:
{“countryName”:”United States”,”countryCode”:”US”,”cityName”:”Tampa”, “regionName”:”FL”,”areaCode”:”813″,”latitude”:27.9178,”longitude”:-82.3799,”ip”:”96.254.141.142″}

XML

Specify the ipaddress variable and the output variable of xml and receive a full result set in XML format.
http://geoiplookup.net/geoapi.php?output=xml&ipaddress=96.254.141.142

With all API requests, leaving out the ipaddress variable will return a result set using the calling host’s IP address.

Source : http://www.geoiplookup.net/api.php

Sunday, July 7, 2013

Zombie Face Photoshop Tutorial


In this tutorial we’re going to give our face a zombie look in just a few steps. You’ll be as scary as this:

Step 1

Open this photo of a girl. You can use your own if you like.

Step 2

Open another photo. I use a photo of an operation. Anything that looks disgusting works. Remember we’re trying to scare people with a real zombie looks! You can download this picture here.

Step 3

Please don’t throw up on the screen. In a few minutes it will be over. Well, what we need to do here is just select a part of this disgusting image. Grab the Lasso tool and make a selection.
Then go to Select > Modify > Feather
And set 20 for the feather radius:
Copy (Ctrl + C) the selection.

Step 4

Paste (Ctrl + V) the selection into the image of the girl and scale it down a little. You may have to rotate it as well.

Step 5

Go to Image > Adjustments > Color Balance or hit Ctrl + B. Use: -19; 16; 1 for the values. Check the image to see where to put them.
Hit OK.

Step 6

Go to Image > Adjustments > Brightness and contrast. Use these settings: Brightness: -32; Contrast: -13.

Step 7

We need to cover most of the face with these disgusting parts. So go back to the “operation” image and select another part. Paste it on the girl face, scale it down, rotate it and repeat steps 5 and 6 to match the color.
If you see that the edges of the pieces you’ve pasted are a little sharp just grab the Eraser tool. Use a soft brush and set the opacity to about 40% and start erasing the edges. This way it’ll look that they are really coming from the real skin.
When the face is covered you’ll have a lot of layers with tiny parts of Zombiness.
You see. We’ve covered part of the chin, below the eye, the forehead and a part of the nose.

Step 8

Now go back to your original layer and select the eyes.
Copy the selection and paste it in a new layer.
Go to Image > Adjustments > Color Balance or hit Ctrl + B. Use 0; 0 and -83 as you can see on the image below:
Set this layer to screen mode.

Step 9

Now we need to merge all the layers involved so we can adjust the complete image. For this we need to select the original layer, hold down SHIFT and click on the top layer. Now you have all layers selected, right? Press Ctrl + Alt + E. Now we get all the layers in one new layer and we still keep the other layers (just in case you need to make any changes)

Step 10

Duplicate this merge layer. Go to Layer > Duplicate Layer or just hit CTRL + J. With this duplicated layer selected go to Image > Adjustments > Hue/Saturationand set the following values:
Hue: 81; Saturation: 15; Lightness: -1
You should get something like this:
Hit Ok. Set this layer to Linear Light mode and the Opacity to 77%

Step 11

Now you see why we need to keep the old layers too. Duplicate the “eyes” layers and place it on top of the layers.
You see it’ll keep the screen mode.
Now go to Image > Adjustments > Curves and use these settings:
Try to copy the curve on this image as good as possible.
Now hit Ok and you’re done!

Result

This is the final result:

Hope you’ve enjoyed this.
See ya!

Typographic Portrait like Grammy’s Posters

Typographic Portrait like Grammy’s Posters

In this tutorial, we’re going to make a typographic poster (like Grammy’s Typographic Posters) from a simple portrait using Photoshop techniques. Final Image Preview The described effects look nice on portraits with good contrast and light background, but you can easy adjust the contrast and make the background lighter using possibilities of Photoshop. (to make [...]
In this tutorial, we’re going to make a typographic poster (like Grammy’s Typographic Posters) from a simple portrait using Photoshop techniques.

Final Image Preview

Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
The described effects look nice on portraits with good contrast and light background, but you can easy adjust the contrast and make the background lighter using possibilities of Photoshop. (to make this tutorial I have used Female Stock thanks to Katanaz-Stock).

Step 1.

In Adobe Photoshop, open our portrait
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
and adjust the contrast Image>Adjustments>Brightness/Contrast
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 2.

From the Select menu, choose Color Range.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
From the Select drop-down menu in the Color Range dialog, choose Shadows and click OK.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Press Ctrl+J (MAC: Command+J ) to copy the selected shadows pixels in a new layer. Back to theBackground layer in the Layers palette.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 3.

Use Color Range again, but now choose Midtones from the Select drop-down menu and click OK.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Press Ctrl+J (MAC: Command+J ) to copy the selected midtones pixels in a new layer.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 4.

Click on the shadow layer and apply Edit>Fill (Shift+Backspace (Mac: Shift+Delete)). Use Blackcolor, with Preserve Transparency selected, and click OK.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Then, activate the midtones layer and use the Fill again with 50% Gray color. You should have a portrait made from black and gray color.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 5.

Click on the shadow layer and press Ctrl+E (MAC: Command+E) to Merge Down it with the midtones layer.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 6.

Create a new document File>New (Ctrl+N (MAC: Command+N)). Set the Foreground color to black by pressing D. Use the Type tool (T) to type different words in various fonts and sizes.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Right click to select Rasterize Type for each word
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
and from the Edit menu, choose Define Brush Preset. Give a name for each brush in the Brush Namedialog and click OK.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 7.

Click the Create a New Layer at the bottom of the Layers palette. Set the Foreground color to black by pressing D.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Choose Brush Tool (B) and select one of your created brushes from the Brush Picker in the Options Bar.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
In the Brushes panel(F5), click on the Brush Tip Shape. Adjust the Spacing between each word,Diameter and Angle of the brush. Paint on the new layer and feel free to experiment with the Spacing,Diameter and Angle of the brush.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Repeat with your other custom brushes.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 8.

Create a new layer, Press Ctrl+Backspace (MAC: Command+Delete) to fill it with white color
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
and and drag it under the layer painted with brushes
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 9.

Hide all the layers except the black&gray portrait layer, and then click on that layer to make it active.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Press Ctrl+A (MAC: Command+A) to Select All content of the layer and then press Ctrl+C (MAC:Command+C) to Copy.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 10.

Activate the layer painted with brushes, click on the Add Layer Mask at the bottom of the Layers paletteto add a layer mask.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Hold Alt (MAC: Option) and click on the layer mask thumbnail.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Press Ctrl+V (MAC: Command+V) to paste the content of the black&gray portrait layer in the mask.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Press Ctrl+D (MAC: Command+D) to Deselect. Press Ctrl+I (MAC: Command+I) to Invert the mask.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 11.

Activate the layer painted with brushes (not the mask) by clicking on the layer thumbnail. The text will appear inside the white&gray areas
of the mask.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Create a new layer and add more text brushes outside the mask.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 12.

Add a Gradient Overlay style to the layer painted with brushes by clicking on the Add a Layer Styleicon (fx) at
the bottom of the Layers palette and select Gradient Overlay.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Click on the Gradient, and select the Blue, Red, Yellow gradient in the Gradient Editor dialog box and click OK.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4

Step 13.

Repeat the same operation for layer with text brushes outside the mask but use Violet, Orange gradient in the Gradient Editor.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
That’s it! Our Typographic Portrait like Grammy’s Posters is complete.
Make a Typographic Portrait like Grammy's Posters in Adobe Photoshop CS4
No related posts.