How do I replace the code -
CalendarQuery query = new CalendarQuery();
query.Uri = new Uri(String.Format("http://www.google.com/calendar/feeds/{0}/allcalendars/full", googleAccount));
CalendarFeed resultFeed = (CalendarFeed)service.Query(query);
using the Google.Apis.Calendar v3 interface?
You will need to perform a list operation on the CalendarList collection, see https://developers.google.com/google-apps/calendar/v3/reference/calendarList/list
There is a java example at the bottom in the examples section.
Related
I'm trying to use SQL IN clause kind of feature in dynamoDB. I tried using withFilterExpression but I'm not sure how to do it. I looked at similar questions as they were too old. Is there a better method to do this? This is the segment of code I have got. I have used a static List as example but it is actually dynamic.
def getQuestionItems(conceptCode : String) = {
val qIds = List("1","2","3")
val querySpec = new QuerySpec()
.withKeyConditionExpression("concept_id = :c_id")
.withFilterExpression("question_id in :qIds") // obviously wrong
.withValueMap(new ValueMap()
.withString(":c_id", conceptCode));
questionsTable.query(querySpec);
}
I need to pass qID list to fetch results similar to IN clause in SQL Query.
Please refer to this answer. Basically you need to form key list/value list dynamically
.withFilterExpression("question_id in (:qId1, :qId2, ... , :qIdN)")
.withValueMap(new ValueMap()
.withString(":qId1", ..) // just do this for each element in the list in a loop programmatically
....
.withString(":qIdN", ..)
);
Mind there is a restriction on maxItems in 'IN'
Are there any examples available of MVCGrid.net using VB.NET?
Tried a number of methods, like this...
MVCGridDefinitionTable.Add("EmployeeGrid", New MVCGridBuilder(Of Person)().WithAuthorizationType(AuthorizationType.AllowAnonymous).AddColumns(Sub(cols)
cols.Add("Id").WithValueExpression(Function(p) p.Id.ToString())
cols.Add("FirstName").WithHeaderText("First Name").WithValueExpression(Function(p) p.FirstName)
cols.Add("LastName").WithHeaderText("Last Name").WithValueExpression(Function(p) p.LastName)
End Sub).WithRetrieveDataMethod(Function(options)
Dim result = New QueryResult(Of Person)()
Using db = New SampleDatabaseEntities()
result.Items = db.People.Where(Function(p) p.Employee).ToList()
End Using
Return result
End Function))
... but something is really still adrift. Any pointers, or an example, would be much appreciated.
Thank you
Have figured out part of it
MVCGridDefinitionTable.Add(Of GridModal)("CurrentBalanceGrid", New MVCGrid.Models.MVCGridBuilder(Of GridModal)().WithAuthorizationType(MVCGrid.Models.AuthorizationType.AllowAnonymous).AddColumns(Sub(cols)
cols.Add("Id").WithValueExpression(Function(p) p.TransactionID.ToString())
cols.Add("DebitAmount").WithHeaderText("Debit").WithValueExpression(Function(p) p.DebitAmount)
cols.Add("CreditAmount").WithHeaderText("Credit").WithValueExpression(Function(p) p.CreditAmount)
Just need to wire up the data now
Given a basic Blueprints-compatible OrientGraph with Index 'name' (unique or notunique), any suggestions for how the following could be improved, if needs be?
Note: I can't find a definitive guide to load a [blueprints] vertex using index. I have a large graph and using has('name','bob') (in console) takes 2 minutes! On the other hand, an index-based search returns in milliseconds.
The best I've come up with so far:
OrientGraph graph = new OrientGraph("local:/graph1/databases/test", "admin", "admin");
List<ODocument> resultlist = graph.getRawGraph().query(new OSQLSynchQuery<ODocument>("SELECT FROM INDEX:name WHERE KEY = 'bob'"));
ODocument resultodoc = resultlist.get(0).field("rid");
String rid = resultodoc.getIdentity().toString(); // would return something like #6:1500000
Vertex v1 = graph.getVertex(rid);
System.out.println(v1.getProperty("name"));
OrientDB supports the IndexableGraph interface. To use it take a look at:
https://github.com/tinkerpop/blueprints/wiki/Graph-Indices
i need to done in programmatic and i have no idea on it. So i need to use loop to search all the columns? For example:
GridViewCommandColumn a= new GridViewCommandColumn();
a.showselectcheckbox=true;
aspxgridview1.columns.find(a);
You can retrieve the required Column via the ASPxGridView.Columns collection in the following manner:
by FieldName/Caption/Name:
GridViewCommandColumn commandColumn = (GridViewCommandColumn)ASPxGridViewInstance.Columns["#"];
by VisibleIndex:
GridViewCommandColumn commandColumn = (GridViewCommandColumn)ASPxGridViewInstance.Columns[0];
I need to know how I can parse a variable path in Flex 3 & e4X. For example, I have two XML strings where the name of one element is the only difference.
<NameOfRoot>
<NameOfChild1>
<data>1</data>
</NameOfChild1>
</NameOfRoot>
<NameOfRoot>
<NameOfChild2>
<data>2</data>
</NameOfChild2>
</NameOfRoot>
Currently I am accessing variables like this:
var data1:String = NameOfRoot.*::NameOfChild1.*::data;
var data2:String = NameOfRoot.*::NameOfChild2.*::data;
I would rather make this task more abstract so that if "NameOfChild3" is introduced I do not need to update the code. For example:
var data:String = NameOfRoot.*::{variable}.*::data;
Does anyone have insights into how this can be done?
Use the child property (LiveDocs example here):
var tagName:String = "NameOfChild1";
var data:String = NameOfRoot.child(tagName).data;
That's with no namespacing--not sure whether it's necessary in your case, but I assume you'd add some *::'s?
this also works:
var data:String = NameOfRoot..data;
but if you have more than 1 data node you'll have to sort some stuff out.
It looks like the ".*." operation will work. I wonder if this is the easiest way to handle this problem.
var data:String = NameOfRoot.*.*::data;