To be able to get all the emails in a conversation, in order to obtain the e-mail in order, and so display them in the same way gmail displays.
already thanks for listening.
I tried this
Iseen = box.Search(SearchQuery.NotSeen);
UniqueIdRange idRange = Iseen as UniqueIdRange;
But UniqueIdRange is private and not know how I can get it.
box.Search() will generally return a UniqueIdSet, not UniqueIdRange.
In fact, I don't think it ever returns a UniqueIdRange.
Related
I am trying to make a bot for my server on discord using Discordia, but when I try to use member:send(str), all I get is Uncaught Error: C:/luvit/deps/coro-channel.lua:62: C:/luvit/deps/discordia/libs/containers/User.lua:91: attempt to call method 'getPrivateChannel' (a nil value)
it does send the dm, but then the code breaks and the bot doesn't run anymore, how can I fix this?
member is a variable that gets the member from message
local member = message.member
I am able to recreate the issue, albeit with a different error that I suspect is due to me not having all your code to debug with.
The bot will send the DM and post a message, then crash due to error.
You have this code:
if message.content:lower() == prefix..'createdm' then
message.channel:send("<#!"..memberid.."> ".. "Sent!")
message.member:send("test") --message.member is able to inherit the send method from message.author
end
I don't know how you find memberid, so I defined it like this:
memberid = message.member:__hash()
It is called every time a message is sent, and it sends a message. This means the bot is going to call this and read its own messages. While the bot will not continue into the if statement because its message is not <prefix>createdm, it will still try to get memberid and evaluate the if statement. I do not know how bot users differ from human users in their account metadata, but I strongly suspect there is some difference and this is your issue.
I believe adding this to your code, at the beginning of your message callback (before your do anything else to evaluate a message) will fix your problem.
if message.author == client.user then
return
end
client here is whatever you assigned discordia.Client() to.
if message.content:lower() == prefix..'createdm' then
message.channel:send("<#!"..memberid.."> ".. "Sent!") -- member.id !!!
message.member:send("test") --message.member is able to inherit the send method from message.author
end
I am new to process maker.while I am exploring the process maker I got an employee on boarding process.while understanding the process I understood the dynaforms but I faced problem with trigger forms. In trigger forms they mentioned tables to get data but i didn't find the tables in my work space. Please let me know if anyone know the answer.
Thanks.
##hrUser = ##USER_LOGGED;
//Get image
$sqlSdocument = "SELECT *
FROM APP_DOCUMENT D, CONTENT C
WHERE APP_UID = '".##APPLICATION."'
AND D.APP_DOC_UID = C.CON_ID
AND C.CON_CATEGORY = 'APP_DOC_FILENAME'
ORDER BY APP_DOC_CREATE_DATE DESC";
$resSdocument = executeQuery($sqlSdocument);
$dirDocument = $resSdocument[1]['APP_DOC_UID'];
$httpServer = (isset($_SERVER['HTTPS'])) ? 'https://' : 'http://';
##linkImage =
$httpServer.$_SERVER['HTTP_HOST']."/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."
/cases/cases_ShowDocument?a=".$dirDocument;
Judging by the your code, you want to query the uploaded file but base on the commend, you want to get the image?
Well if employee onboarding is what you want, I am guessing that you uploaded the picture on the first dynaform and you want it to be shown. Well this is your luck because ProcessMaker Documentation already have that
If you want a code that let you see the image immediately after upload, you might want to signup for a enterprise trial and test their Employee Onboarding.
I'm trying to use the Google AdWords bid simulator system to try and get some insights out of the AdWords bid simulator. More specifically I'm using the AdGroupBidLandscape() functionality, but it's returning 'No Campaigns Found', but we definitely have campaigns where the Bid Simulator tool works through the AdWords web page interface, so I'm a bit confused. Here is the code I'm running, and yes I know I'm only retrieving a single field - I'm just trying to keep things as simple as possible.
from googleads import adwords
import logging
import time
CHUNK_SIZE = 16 * 1024
PAGE_SIZE = 100
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)
adwords_client = adwords.AdWordsClient.LoadFromStorage()
dataService = adwords_client.GetService('DataService', version='v201710')
offset = 0
selector = {'fields':['Bid'], #'impressions', 'promotedImpressions', 'requiredBudget', 'bidModifier', 'totalLocalImpressions', 'totalLocalClicks', 'totalLocalCost', 'totalLocalPromotedImpressions'],
'paging': {
'startIndex': str(offset),
'numberResults': str(PAGE_SIZE)
}
}
more_pages = True
while more_pages:
page = dataService.getAdGroupBidLandscape(selector)
# Display results.
if 'entries' in page:
for campaign in page['entries']:
print ('Campaign with id "%s", name "%s", and status "%s" was '
'found.' % (campaign['id'], campaign['name'],
campaign['status']))
else:
print 'No campaigns were found.'
offset += PAGE_SIZE
selector['paging']['startIndex'] = str(offset)
more_pages = offset < int(page['totalNumEntries'])
time.sleep(1)
We have several different accounts attachd to AdWords. My account is the only one that has developer API access, so I sort of wonder if the problem is that my account isn't the primary account associated with the campaigns- I just have one of the few administrator accounts. Can anyone provide some insights about this for me?
Thanks,
Brad
The solution I found to this problem was to add a predicate to the selector specifying a particular CampaignId. While that doesn't make any sense to me that it would fix it, because it should really just be filtering the data with that if I understand things correctly, it seems to have. I don't have a good explanation for that, but I thought someone else might find this useful. If I come to realize this wasn't the fix to the problem I had, I will come back and update this answer.
i'm create a dating website using symfony 1.4 (it's my first project using symfony). the problem is there server freezes if there is only 10 or less users online. i tryied optimizing my js, css, sprites using yslow i got grade A but still the problem is always there. that's why i think the way i build the application might be wrong so here is the website naijaconnexion.com i'm asking u for advices and things to do so i overcome this problem
If i wasn't clear enough just ask, if you want cpanel admin access i'll post it
i realy realy needs your help
for instance i have this code on my home page action does it seems ok or it needs to be optimized and how
$this->me = $this->getUser()->getGuardUser()->getPerson();
$this->cities = Doctrine_Core::getTable('City')->findByDql("zipcode=''");
$this->countries = Doctrine_Core::getTable('City')->findByDql("zipcode='10'");
$this->contacts = $this->me->getContacts();
$this->favorites = $this->me->getFavorites();
$this->matches = $this->me->getMatches();
$this->pager = new sfDoctrinePager('Conversation', sfConfig::get('app_home_conversations_per_page'));
$this->pager->setQuery($this->me->getConversationsQuery());
$this->pager->setPage($request->getParameter('page', 1));
$this->pager->init();
without HYDRATE_ARRAY
i can do this
if i use HYDRATE_ARRAY
will i be able to do stuff like $this->contacts[0]['username'];
help please
The problem is doctrine...
Try to fetch the needed values as array and set a limit!
How many objects are returned by the following queries:
$this->cities = Doctrine_Core::getTable('City')->findByDql("zipcode=''");
$this->countries = Doctrine_Core::getTable('City')->findByDql("zipcode='10'");
$this->contacts = $this->me->getContacts();
$this->favorites = $this->me->getFavorites();
$this->matches = $this->me->getMatches();
? Do not forget that they are object with references to other objects!
And yes, this will work $this->contacts[0]['username'];.
if you join the tables with the doctrine query, you can access related entities too - without executing additional queries.
$this->contacts = Doctrine_Core::getTable('Contact')
->createQuery('c')
->leftJoin('c.Users u')
->addWhere('...')
->execute(array(), Doctrine_Core::HYDRATE_ARRAY);
$this->contacts[0]['Users'][0]['username']
I'd like to get a list of everyone who's ever been included on any message in my inbox. Right now I can use the javax mail API to connect via IMAP and download the messages:
Folder folder = imapSslStore.getFolder("[Gmail]/All Mail");
folder.open(Folder.READ_ONLY);
Message[] messages = folder.getMessages();
for(int i = 0; i < messages.length; i++) {
// This causes the message to be lazily loaded and is slow
String[] from = messages[i].getFrom();
}
The line messages[i].getFrom() is slower than I'd like because is causes the message to be lazily loaded. Is there anything I can do to speed this up? E.g. is there some kind of bulk loading I can do instead of loading the messages one-by-one? Does this load the whole message and is there something I can do to only load the to/from/cc fields or headers instead? Would POP be any faster than IMAP?
You want to add the following before the for loop
FetchProfile fetchProfile = new FetchProfile();
fetchProfile.add(FetchProfile.Item.ENVELOPE);
folder.fetch(messages, fetchProfile);
This will prefetch the "envelope" for all the messages, which includes the from/to/subject/cc fields.
You can use fetch-method in Folder. According Javadocs:
Clients use this method to indicate that the specified items are
needed en-masse for the given message range. Implementations are
expected to retrieve these items for the given message range in a
efficient manner. Note that this method is just a hint to the
implementation to prefetch the desired items.
For fetching FROM appropriate FetchProfile is ENVELOPE. Of course it is still up to implementation and mail server does that really help.