How to use method messages.searchGlobal Telethon? - api

I'm pretty new to Telethon and I'm try to use messages.searchGlobal to search keywords globally. And I'm not sure how to use it, like what to import, what is flags parameter? Or what it does and give me in the return?
I've read this https://core.telegram.org/method/messages.searchGlobal all over again and still don't know, please help me!

Related

Can't figure out browserify-shim

Using Browserify, it appears I need this thing called "shim"? All I want to do, is make a global variable "_" for lodash so that each reference to _ in the bundle is defined.
Surely someone else has done this for something like jQuery?
I've tried virtually every possible config permutation with browser-shim, browser-global-shim, and nothing seems to work. Can someone please post their config that they used to make this type of thing work?
I just ended up doing this in my entry point file...
window._ = require('lodash');
That worked. Whenever someone with some knowledge comes along, please help.

Quick way to add Stopwatch.start and Stopwatch.end to all functions vb.net

Just trying to look at a quick way to find the timings for each individual function in my application. Would like to optimize code and see if some function is taking longer than others but was wondering if there was some quick way i could add the Stopwatch.start and Stopwatch.end to the beginning and ending of each function. Could someone assist me in what to google? I can see how I want it to work but have no clue on how to start.
Not looking for answers, just guidance :)
Thanks!
You can use ReSharper (or something similar) to create a macro for your functions that would include the stopwatch code.
You could use a select-case block in your class. Use an enum to call the functions by name. The select block can then run the correct function according to the enum value. It'll be rather long but you only need the stopwatch calls around the select block and they will get called for each function.

Function System.bytescopy

I have been searching for this function and haven't found any reference to what it does, so I would like to know if anyone of you could tell me what it receives and the functionality.
The function Im copying is this: System.bytescopy(buffer, cutsize*8, buffer, 0, (bufend-cutsize)*8); but I dont know what it does and what it receives.
I have to copy this function (from haxe) to actionscript code cause I'm fixing a code that may help me to develop what I need. Please help!
Thanks!
System.bytescopy isn't Haxe's native function. Maybe you are referring to this.

API for Dictionary and Translator

Again. I've been searching for the best API for my Application. Dictionary and Translator. Can someone Recommend One. Please. i need it. I downloaded "microsoft-translator-jar" and I'm having an error in my line of code.
'com.memetix.mst.translate.Translate.execute(text, Language.ENGLISH, Language.ITALIAN);'
The error is at the (execute). the method execute(String,Language,Language)in the type Translate is not applicable for the arguments (String, Language, Language).
i've tried all the execute methods but No luck. Can someone help me how to solve it or refer a new API. Thanks.
You may be lost json-simple-1.x.jar.
Please go website http://code.google.com/p/json-simple/ to download that package.
I think your problem may be resolved.
Good-luck!

Jade - way to add dynamic includes

I'd like to do something like the following within a jade template.
include page-content/#{view.template}
As this won't work I have ended up with.
-if(view.path==="/")
include ../page_content/home
-else if(view.path==="/login/")
include ../page_content/login
-else if(view.path==="/join/")
include ../page_content/join
-else if(view.path==="/user/")
include ../page_content/user
ad nauseum
I asked TJ whether it was possible, he replied
unfortunately no, they're compile-time includes, which is somewhat necessary for a few technical reasons that I wont get into but we may eventually need to add a dynamic alternative
I'm wondering if anyone has come up with any alternatives, for example using view helpers.
I'm stuck with a big config file to generate the views - and the if-else statements in the template , I know are going to come back and haunt me. :)
If this is possible using another engine, like ejs or mustache, I'd love to know.
Any ideas much appreciated.
Feels like way too much logic in the view to me. Seems like the best way to do this would be through a dynamicHelper or possibly a mixin