Tuesday, 10 September 2013

get current workflow name within custom activity

get current workflow name within custom activity

Hello I'm creating a custom workflow action for sharepoint 2010 using c#
but I would like to re-use the same action but adjust the code slightly
depending on which workflow it is fired from. Is there a way to get the
workflow name? Or any other unique identifier?
Thanks

Monday, 9 September 2013

How to combine individual parts of address within a place dictionary for geocoding?

How to combine individual parts of address within a place dictionary for
geocoding?

At the moment, I have a place dictionary that contains values for all the
different parts of a typical address, that I then pass through a geocoder.
It looks like this:
[self.placeDictionary setValue:@"166 Bovet Rd" forKey:@"Street"];
[self.placeDictionary setValue:@"San Mateo" forKey:@"City"];
[self.placeDictionary setValue:@"CA" forKey:@"State"];
[self.placeDictionary setValue:@"94402" forKey:@"ZIP"];
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
[geocoder geocodeAddressDictionary:self.placeDictionary
completionHandler:^(NSArray *placemarks, NSError *error) {
if([placemarks count]) {
CLPlacemark *placemark = [placemarks objectAtIndex:0];
CLLocation *location = placemark.location;
CLLocationCoordinate2D coordinate = location.coordinate;
PFGeoPoint* userLocation = [PFGeoPoint
geoPointWithLatitude:coordinate.latitude
longitude:coordinate.longitude];
NSLog(@"%f,%f", userLocation.latitude, userLocation.longitude);
} else {
NSLog(@"location error");
return;
}
}];
Instead of having a separate dictionary entry for each individual part of
the address, could I merge them into one string to pass through the
geocoder? Something of this effect:
[self.placeDictionary setValue:@"166 Bovet Rd San Mateo CA 94402"
forKey:@"Address"];
The reason I want to do this is I have a search bar in which a user is
supposed to enter a location into for geocoding, and I can't divide it and
extract each individual part of the address, so is there a way that I can
pass the entire address like so, for geocoding?

Model with transparency

Model with transparency

I have a model with transparent quads for a beard. I can not tell what
triangles belong to the beard because their color comes from the texture
passed to the fragment shader. I have tried to presort the triangles back
to front during export of the model, but this does not help. So I
implemented MSAA and Alpha to Coverage, but this did not help either. My
last attempt was to draw the model, with a depth mask off and skipping any
transparent data, so the color buffer would have non-clear color values to
blend with. Then I would draw the model a second time with depth testing
on and drawing the alpha pieces.
Nothing I have tried so far has worked. What other techniques can I try to
get the beard of the model to properly draw? I am looking for a way to
handle this that doesn't use a bunch of extensions. I'd prefer techniques
that can be handled with plain old OpenGL 4.
Here is an image of what I am dealing with.

VBA-Query Loop - Unable to convert to Form reference

VBA-Query Loop - Unable to convert to Form reference

All,
I've tried searching through the site and now, I am unable to find an
answer to this question. If someone could point me to the right direction-
I'd appreciate it.
I have a form with 10 combo-boxes. Once user selects a value in CB1- CB2
becomes visible and active.
I am trying to run a dynamic query- where the selection of the combo-box
is used to select a column from my table called "dbo_animals"
To elaborate: CB1 contains the following values -
elephant, giraffe, bufffalo, tiger, lion
Once the user selects elephant in CB1, CB2 becomes active and I select
tiger next. So the query becomes like. The process can go on and the user
can select up to 10 animals
**SELECT elephant, tiger FROM dbo_animals**
Problem:
I am able to create the query with string manipulation- Unfortunately due
to the way the loop through controls is set up- The query is unable to
convert the text into a reference
If I hard code it as tempquery = [Form]![Animal Finder]![CB1]
MsgBox(tempquery) it looks like
Elephant
This is how I want. But, since i am looping through CB controls, I have it
set up as
tempquery = "[Form]![Animal Finder]![CB" & i & "]"
and this shows up as
[Form]![Animal Finder]![CB1]
thereby giving me an error saying that the reference is not valid. Which
makes sense, since it is unable to evaluate the text as a reference.
How can I fix this? Or how do I correct the text into a reference?

Setting ToolTip for DataGridView automatically created columns

Setting ToolTip for DataGridView automatically created columns

I would like to programatically set tooltips to automatically generated
columns in a DataGridView. I was trying to use AutoGeneratingColumn event
(http://msdn.microsoft.com/en-us/library/cc903950%28VS.95%29.aspx), but
that in fact can only access DataGridColumn, not DataGridViewColumn, and
the former doesn't have ToolTipText property.
Or if I could bind the ToolTips to a source that would also be great. The
goal is to have the ability to manipulate/set tooltips in the same place
where I set the columns for the underlying DataTable.

Login with facebook error, codeigniter invalid url

Login with facebook error, codeigniter invalid url

I am working on a project. I want the user login with facebook. But after
the facebook authentication, I get this error:
Given URL is not allowed by the Application configuration.: One or more of
the given URLs is not allowed by the App's settings. It must match the
Website URL or Canvas URL, or the domain must be a subdomain of one of the
App's domains.
I searched on Google for a long time and everytime I get this answer that
there may be a problem in my facebook application domain name.
I changed my fb application again and again but everytime I get the same
error.
Some settings of my facebook application are:
App Domains: superhitdomains.com
Site URL: http://superhitdomains.com
My view page is :
Login with facebook
and my controller is:
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Social extends CI_Controller {
public function __construct(){
parent::__construct();
parse_str( $_SERVER['QUERY_STRING'], $_REQUEST );
$CI = & get_instance();
$CI->config->load("facebook",TRUE);
$config = $CI->config->item('facebook');
$this->load->library('Facebook', $config);
}
public function fb_request(){
$userId = $this->facebook->getUser();
if($userId == 0){
$data = array(
'redirect_uri'=> base_url().'social/handle_user_fb_login',
'scope'=>'email'
);
redirect($this->facebook->getLoginUrl($data));
//print_r($data); exit;
}
else {
// Get user's data and print it
$user = $this->facebook->api('/me');
print_r($user);
}
}
public function handle_user_fb_login(){
$userId = $this->facebook->getUser();
if($userId !=0){
$user = $this->facebook->api('/me');
print_r($user);
}
else {
echo 'could not connected with facebook';
}
}
}
Can anyone help me what is wrong with my code?
Thanks

Sunday, 8 September 2013

Android Turn Based Game Multiplayer Suggesstion

Android Turn Based Game Multiplayer Suggesstion

i am new in android.
i am making a very simple android turn based game its UI will be like
this. UI Image
Game Concept:
it is a two player game.
Each user place his turn to make the winning sequence.
I want to make this game multiplayer.i want very simple and easy solution.
because it just need only button position to send to other user.
So far i searched there are lot of solutions
Stackmob, Parse, Kinvey, AppEngine
Similar Question but they all look very difficult to me i am confused
please please help me give the suggestion what will be the simplest
solution to accomplish this task??