I have below mentioned dataset
g.addV('testvertex').property(id, 'user1').property(set, 'states','TX').property(set,'states','CA').property(set,'states','AL').property(set,'states','AK')
how do I find the count of states 'user1' has lived in?
if 'user1' ever lived in 'IA' and 'KS' ?
how do i drop 'TX' from states set ?
how do I find the count of states 'user1' has lived in?
g.V().values('states').count()
if 'user1' ever lived in 'IA' and 'KS' ?
g.V().has(id,'user1').has('states', within('IA','KS'))
how do i drop 'TX' from states set ?
g.V().has(id,'user1').
properties('states').hasValue('TX').drop()
Related
Hello i need a advise / idea how i can solve the following problem:
I have two OUs, a primary and secondary OU, the primary OU would be filled up by a synchronisation process and in the secondary OU are entrys stored from user input via a website for temporary overwrites with a valid through timestamp.
In the client software its not possible to implement filter rules, so this must be implemented in openldap, that a search for a DN only give one result, when there is a entry in the secondary OU and the actually date is lower as the stored timestamp respond with the values from that entry. When there is no entry with that DN in the secondary OU but in the primary OU then respond the values from that entry.
Client Request for DN=ID1234
Check if DN=ID1234 in OU=secondary exists and validate current date with the validThrough Timestamp
If yes, response the values from DN=ID1234,OU=secondary
If not, check if DN=ID1234,OU=primary exists
If yes, response with this values
If not, response with nothing found
Here is a example:
DN=ID1234,OU=primary,dc=example,dc=local
> attributeX = "Blue"
DN=ID1234,OU=secondary,dc=example,dc=local
> attributeX = "Red"
> validThrough = 05.01.2023 (Human readable)
So a response before the 05.01.23 delivers "Red" and after that date i get "Blue"
My idea was something like a third merged OU where is every time the actuall entry.
I probed to achive that with the merge backend but actually i am stuck regarding i had no idea to get a current timestamp like NOW() in sql to create a filter like that
(&(dn=<DN>)(|(!(validThroughTimestamp<=<current timestamp>))(!(validThroughTimestamp=*))))
Did anyone can advise me how to solve that, is there any overlay or has a complete other idea to reach that?
I am new to extracting data with ODBC Tally ERP 9.0. I researched and got some help with Exracting Day Books / Transaction Data from Tally using ODBC
Although this solution helps in some way it doesn't fully solves the problem. I want to get data in this format
Date
Party's Ledger Name
Voucher No
Amount
This data should be filtered on only Outstanding Invoices (Invoices which are not paid by Sundry Debtors). The data should also include invoices of previous years (if the bill is outstanding it should be included irrespective of how many years in the past we have to go).
The above solution do addresses the issue getting those 4 columns. However, it does not solve the issue mentioned in the above paragraph. Meaning I getting all the invoices pad or unpaid for the current year and I am getting the data for only the current year.Any help in this is appreciated.
Thanks in advance...
You need to create a collection as below to get receivable bills of company.
[Collection: CMPRecevables]
Type : Bills
Is ODBC Table : YEs
Filter : IsReceivable
Fetch : Name, BillDate, Parent, ClosingBalance
connect this table using odbc and use below query
select $Name, $BillDate, $Parent, $ClosingBalance from CMPRecevables
Currently we use GTM to house all of our partners conversion pixels that fire on our success page. We're trying to create a 'Data Layer' variable that we can add to our partners conversion pixels that will then send a 'Unique Conversion ID' back to the respective partner each time the conversion pixel fires. This will allow us to cross check our conversion data against our partners.
How can we accomplish this?
Can anyone help me. Thanks in advance.
You can do dataLayer.push(object) and it will trigger an event called Message and it will put in the dataLayer what you want.
Scenario: I have a Users node which stores their location (city & country). I want to find all users that reside in a particular city. Then per city, I want to filter on roomType and finally sort Users by their score.
Problem: City & Country are string fields, so it will be VERY resource intensive string_comparison query to iterate over all the Users to first match the country & then the city.
What can I do to make this search faster?
One possible approach: Convert the City + Country "location_pair" into a numeric value (say int_val_location_pair). Then do a integer comparison on int_val_location_pair. This will be much faster than doing two string comparisons on country & city. Of course, I will have to store mapping as a separate node.
There aren't that many cities in the world (approx 4,000,000) so I can easily use a 32 bytes integer to represent all cities in the world. Plus realistically, I will get Users from at max 10,000 different cities signed up.
schema can be something like this:
$Users:
name:
city:
country:
$int_val_location_pair:
score:
roomType:
$int_val_location_pair:
city:
country:
Question: Is this a good approach??
If yes, I have next concern: At time of registration, when the user fills in country & city, I want to create a new value for int_val_location_pair automatically only IF the location_pair (city & country) does not exist in database.
In this case how to make sure there is no duplication of int_val_location_pair? Say 10 people are registering all at same time for same location (which does not exists in db). They all query the database & get confirmation that location_pair doesnt exist & so end up creating a new value for int_val_location_pair causing duplicates. How should I avoid this scenario?
Thanks in advance.
Why don't you keep a list of users ids for each location in a tree?
usersByLocation
$country
$city
uid1: true
uid2: true
With that you can simply look up the UIDs for the users in a specific city with:
ref.child("United States").child("San Francisco").on("child_added"...
I have some nodes with a widget vote up/down. I can't understand how can i get integer votes value for various actions without sql requery. For example to hide nodes with rating < 10.
No matter what module you use,(Rate, Fivestar or anything else), all the data stored in Voting API module.
Using Rules module and VotingAPI Rules integration module you can check values of votes and take arbitrary(but possible) actions.
You may need to add new triggered rule on even "user votes on content" and check if the vote's value is < 10.
Voting API keeps data as a percentage so < 10 means < 10%. Vote count, value of each vote and percentage available as data.