ionic firebase get specific items from table - firebase-realtime-database

i want to get some specific items from firebase database
this is my firebase database
{
"Militaire" : {
"arabe" : "المتحف العسكري الوطني",
"img" : "/Images/Musée-militaire.jpg",
"name" : "Musée militaire national (Tunisie)",
"tel" : "+21670 604 018"
},
"bardo" : {
"arabe" : "المتحف الوطني بباردو
"img" : "/Images/Le_musee_national_du_Bardo_78987.jpg",
"name" : "Musée national du Bardo (Tunisie)",
"tel" : "+21671513650"
},
"mareth" : {
"arabe" : "المتحف العسكري لخط مـارث",
"img" : "/Images/Musée-militaire.jpg",
"name" : "Musée Militaire de la Ligne Mareth",
"tel" : "+216 75 306 433"
}
}
i have the "name" from string variable and i want to display the arabic name from it.

Related

How to use ASTMatcher on a project

I have written a ASTMatcher to find all global variables in a project. Now I can find all the global variables in a single file (.cpp or .h), but I have no idea how to use my ASTMatcher on a project. It cannot find variables in the included files instructed by cmakelists. How can I solve it ? Using scan-build or adding command line arguments in my ASTMatcher ? (I'm sorry about my English...)
/**********************************************************************/
I used my ASTMatcher to check its own source file, and it can find all the global variables I defined in it.Showed like this:
{
"GlobalVar":[
{
"name" : "MyToolCategory",
"type" : "int",
"loc" : "D:\\LLVM\\llvm\\tools\\clang\\tools\\extra\\match-global-variable\\MatchGlobalVariable.cpp:22:33"
},
{
"name" : "MoreHelp",
"type" : "int",
"loc" : "D:\\LLVM\\llvm\\tools\\clang\\tools\\extra\\match-global-variable\\MatchGlobalVariable.cpp:30:22"
},
{
"name" : "GlobalVarMatcher",
"type" : "int",
"loc" : "D:\\LLVM\\llvm\\tools\\clang\\tools\\extra\\match-global-variable\\MatchGlobalVariable.cpp:51:20"
},
{
"name" : "GlobalVar",
"type" : "int",
"loc" : "D:\\LLVM\\llvm\\tools\\clang\\tools\\extra\\match-global-variable\\MatchGlobalVariable.cpp:55:12"
}
]
}
But errors occurs
picture:
I wrote my ASTMatcher referencing http://bcain-llvm.readthedocs.io/projects/clang/en/latest/LibASTMatchersTutorial/

Passbook pkpass file not working on the simulator

I followed the article here to create my first Passbook pass.
{
"formatVersion" : 1,
"passTypeIdentifier" : "pass.com.mypassbook.coupon",
"serialNumber" : "E5982H-I2",
"teamIdentifier" : "ASDFGM5E66",
"barcode" : {
"message" : "123456789",
"format" : "PKBarcodeFormatPDF417",
"messageEncoding" : "iso-8859-1"
},
"locations" : [
{
"longitude" : -122.3748889,
"latitude" : 37.6189722
},
{
"longitude" : -122.03118,
"latitude" : 37.33182
}
],
"organizationName" : "Paw Planet",
"description" : "Coupon for a free lollipop at Example Candy Store",
"logoText" : "Example Candy Store",
"foregroundColor" : "rgb(255, 255, 255)",
"backgroundColor" : "rgb(206, 140, 53)",
"coupon" : {
"primaryFields" : [
{
"key" : "offer",
"label" : "On July 29",
"value" : "Free lollipop"
}
]
}
}
In the end I created the pkpass file but when I drag and drop the file on the simulator I get the following:
Any ideas? I checked the system logs in the console app and it does not display any messages.
When I email the pkpass as an attachment to myself this is what I see.
There is something wrong with the way you've signed your pass. When I open the pass on my iPhone, I get this in the logs:
Invalid data error reading pass pass.com.azamsharp.blindscoupon/123456. The passTypeIdentifier or teamIdentifier provided may not match your certificate, or the certificate trust chain could not be verified.
Double check your certificate and values match. You must also remember to include the WWDC certificate when signing the manifest.

Rails to load app reviews from iTunes store

I build a simple website that is a portfolio for iphone apps, the site is built in ruby on rails 4, I need to have certain apps reviews and ratings being loaded from itunes store, as in I have a URL that connetcs to an iphone app page in itunes store, I want to make sure my website always displays the latest ratings on that app.
I don't know how do accomplish that.
Have you look into https://github.com/dewski/itunes
Example Response
{
"artist_id" : 954266,
"artist_name" : "Green Day",
"artist_view_url" : "http://itunes.apple.com/us/artist/green-day/id954266?uo=4",
"artwork_url100" : "http://a1.phobos.apple.com/us/r1000/049/Features/1e/17/05/dj.rpihtiig.100x100-75.jpg",
"artwork_url30" : "http://a1.phobos.apple.com/us/r1000/049/Features/1e/17/05/dj.rpihtiig.30x30-50.jpg",
"artwork_url60" : "http://a1.phobos.apple.com/us/r1000/049/Features/1e/17/05/dj.rpihtiig.60x60-50.jpg",
"collection_censored_name" : "Dookie",
"collection_explicitness" : "explicit",
"collection_id" : 5132583,
"collection_name" : "Dookie",
"collection_price" : 9.99,
"collection_view_url" : "http://itunes.apple.com/us/album/she/id5132583?i=5132563&uo=4",
"content_advisory_rating" : null,
"country" : "USA",
"currency" : "USD",
"disc_count" : 1,
"disc_number" : 1,
"kind" : "song",
"preview_url" : "http://a1.phobos.apple.com/us/r1000/027/Music/0e/86/7a/mzm.wchstext.aac.p.m4a",
"primary_genre_name" : "Alternative",
"release_date" : "2003-04-22 07:00:00 Etc/GMT",
"track_censored_name" : "She",
"track_count" : 15,
"track_explicitness" : "notExplicit",
"track_id" : 5132563,
"track_name" : "She",
"track_number" : 8,
"track_price" : 1.29,
"track_time_millis" : 134293,
"track_view_url" : "http://itunes.apple.com/us/album/she/id5132583?i=5132563&uo=4",
"wrapper_type" : "track"
}

Is there a way to to see what dates/times tickets changed Status via the JIRA API?

I am trying to run queries against the JIRA API and get results in which I can see the dates and times that each issue went through a status change.
E.g.: Run a query to grab all issues with a certain assignee and see, along with the rest of the information, timestamps for when each issue changed from "Open" to "Resolved".
Is this possible?
EDIT: I have tried expanding the changelog, but while that tells me what status changes a ticket went through (e.g., that the particular ticket transitioned from "Open" to "Resolved" and then from "Resolved" to "Closed"), it doesn't tell me WHEN these transitions occurred.
Turns out that each of the transition objects showing the status changes have a "created" field that contains the time and date the transition occurred, which I feel is a bit of a misnomer, but there it is. An example object inside the "histories" array in the expanded changelog object:
{ "author" : { "active" : true,
"avatarUrls" : { "16x16" : "https://company.jira.com/secure/useravatar?size=xsmall&avatarId=10072",
"24x24" : "https://company.jira.com/secure/useravatar?size=small&avatarId=10072",
"32x32" : "https://company.jira.com/secure/useravatar?size=medium&avatarId=10072",
"48x48" : "https://company.jira.com/secure/useravatar?avatarId=10072"
},
"displayName" : "First Last",
"emailAddress" : "first.last#company.com",
"name" : "first.last",
"self" : "https://company.jira.com/rest/api/2/user?username=first.last"
},
"created" : "2013-04-17T16:21:13.540-0400",
"id" : "24451",
"items" : [ { "field" : "status",
"fieldtype" : "jira",
"from" : "5",
"fromString" : "Resolved",
"to" : "6",
"toString" : "Closed"
},
{ "field" : "assignee",
"fieldtype" : "jira",
"from" : "old.assignee",
"fromString" : "Old Assignee",
"to" : "first.last",
"toString" : "First Last"
}
]
}

can neo4j find the shortest n paths by Traversals with index?

I read the wiki api from http://docs.neo4j.org/chunked/snapshot/rest-api-traverse.html
and check my code, i can find the shortest n paths by Traversals ,and can find nodes or relationships with index. but my projects has 300M nodes ,when i find shortest n paths by Traversals ,like retionship data property Name contain 'hi' ,if i use neo4j's fiter method,it is really slow,i want use index(i created it!),code like:
{
"order" : "breadth_first",
"return_filter" : {
"body" : "position.endNode().getProperty('name').toLowerCase().contains('t')",
"language" : "javascript"
},
"prune_evaluator" : {
"body" : "position.length() > 10",
"language" : "javascript"
},
"uniqueness" : "node_global",
"relationships" : [ {
"direction" : "all",
"type" : "knows"
}, {
"direction" : "all",
"type" : "loves"
} ],
"max_depth" : 3
}
i want :
{
"order" : "breadth_first",
"return_filter" : {
"body" : "position.endNode().name:*hi*",
"language" : "javascript"
},
"prune_evaluator" : {
"body" : "position.length() > 10",
"language" : "javascript"
},
"uniqueness" : "node_global",
"relationships" : [ {
"direction" : "all",
"type" : "knows"
}, {
"direction" : "all",
"type" : "loves"
} ],
"max_depth" : 3
}
can someone help me ?
Is it slow the first time or are consecutive requests equally slow? Properties are loaded per node/relationship the first time any property is requested for that node/relationship and maybe you're seeing that performance hit.
I think that using an index would help for nodes that haven't been loaded yet, but not otherwise. Doing this in rest could be tricky in that you'd have to do index lookup before hand and pass that list into the evaluator. But that doesn't scale. Instead could write an extension for this?

Resources