« first day (1611 days earlier)      last day (1628 days later) » 

1:58 PM
Afternoon!
 
EditMonitor started.
[ EditMonitor ] Approved with 2 rejection votes: 1761115
 
partially correct, partially incorrect
No, actually it uses C++ highlighting on a C question. So the edit isn't necessary.
edited
 
2:50 PM
@ProgramFOX Also Stack Snippets are useless for anything except HTML, CSS and JS, now.
 
indeed
 
 
2 hours later…
Anonymous
4:27 PM
The best way to do this would be to initialize the array with default values, then overriding those specified by user.
 
Anonymous
^ could i improve that by grammar ?
 
it looks good to me
 
Anonymous
do you prefer is or would be ?
 
would be looks good here
But anyway, if there's still some mistake, another person can always edit your post to fix it.
 
@Joiner then overriding those specified by user. This sounds strange.
 
Anonymous
4:33 PM
how would you improve it ?
 
Perhaps "then override the values as specified by the user"?
 
Anonymous
@ProgramFOX my goal is to write the best answer soon, to make it better than others
^ bad grammar
 
@Joiner ProgramFOX was quicker.
 
Anonymous
but now, we repeat values twice
 
@Joiner The original meaning of the part I quoted was that you override the values the user specified. Not the default ones.
 
Anonymous
4:37 PM
context:
 
Anonymous
0
A: Checking if String Array is filled or empty

JoinerSo you want to change indices entered by user only. The best way to do this would be to initialize the array with default values, then overriding those specified by user. String[] rule = "270-90-315-45-90".split("-"); // Now override indexes specified by the user

 
@Joiner I guess this is OK: The best way to do this would be to initialize the array with default values, then overriding those by the ones specified by the user. But I’m not a native English speaker.
 
That sounds good.
 
Anonymous
maybe with instead of by ?
 
@Joiner Yeah, with is correct. My mistake.
 
Anonymous
4:44 PM
finally: The best way to do this would be to initialize the array with default values, and then override those specified by the user.
 
That's very similar to your initial sentence, and does not fix this.
 
[ EditMonitor ] Approved with 2 rejection votes: 1761252
[ EditMonitor ] Approved with 2 rejection votes: 1761270
 
@FOX9000 First edit is not really necessary, but doesn't hurt.
 
Anonymous
see the edit
 
@FOX9000 Second edit is really bad.
@Joiner Not sure... I think it changes the meaning a bit, because initially you were talking about values, now about indices.
 
Anonymous
4:54 PM
@ProgramFOX do that bot run on stackexchange servers, or do you run it by your own ?
 
@Joiner I run it by my own.
Feb 22 at 16:23, by ProgramFOX
Bot is now open-source: https://github.com/ProgramFOX/SO-EditMonitor
 
Anonymous
using your pc ?
 
yep
 
Anonymous
:O
 
Anonymous
isn't it expensive (ram, cpu...) ?
 
4:56 PM
No, it only checks for edits every 3 minutes. And I don't think network requests are that expensive.
 
Anonymous
do the account need developer privileges to be able to do this ?
 
No, it only has an API key. And even that is not necessary, but it gives you more API quota.
 
Anonymous
are those api coded with java ?
 
The SE core is coded in C#, so I guess the API is coded in C# too.
 
Anonymous
i've read you use python
 
Anonymous
5:01 PM
:O so we can use it from any language
 
Yes, you can. You have to send requests to the right pages. api.stackexchange.com
See here for the docs: api.stackexchange.com/docs
 
Anonymous
interesting...
 
My bot does not only use the API because it doesn't expose all info. It also has to scrape data from the review pages.
 
Anonymous
then your bot is active when you're online only
 
indeed
 
Anonymous
5:06 PM
can u tell me how many hours you're online per-day ?
 
On a school day, usually ~2-3 hours. On a weekend day, longer.
 
Anonymous
i'll try to make it using vb.net
 
Anonymous
5:20 PM
@ProgramFOX am i supposed to visit, for instance, the api.stackexchange.com/comments url in order to get a json response ? is that simple ?
 
@Joiner You also have to add a ?site=... parameter, like ?site=stackoverflow
 
Anonymous
:O :O :O i thought it was harder, harder, harder :D :D :D
 
Anonymous
weeeeeeeeeeeeeeeeeeeeell
 
Note that you have only 300 API requests/day. If you want more, register an API key.
 
Anonymous
to make an action performed by an account, can i simply put its password as a parameter, like ?password= ?
 
5:24 PM
I think you'll have to use OAuth authentication if you want to do that.
 
Anonymous
looks harder... is there any official doc ?
 
Anonymous
thanks, first i'll try something simple using a WebBrowser instance
 
Anonymous
5:39 PM
@ProgramFOX
 
Anonymous
    Dim connessione As New WebClient
    Dim valore As String = connessione.DownloadString("https://api.stackexchange.com/badges?site=stackoverflow")
    Console.WriteLine(valore)
    Console.ReadLine()
 
Anonymous
i hear "bip bip bip" while getting a strange string
 
hmm...
let me take a look
 
Try this:
Dim connessione As New WebClient
connessione.Headers.Add("Accept-Encoding", "utf-8")
Dim valore As String = connessione.DownloadString("https://api.stackexchange.com/badges?site=stackoverflow")
Console.WriteLine(valore)
Console.ReadLine()
@Joiner ^
 
Anonymous
5:46 PM
same
 
What output do you get?
 
Anonymous
using the updated code:
 
Anonymous
▼ ♦ ­-[s>0►.ÿJ╬g»B↨►ø­MûÞ÷NÇ#♂Å!1È♣'ëä¿w♣ö♦H¢Y:~Ôá ߬♫«å%*?©Úhóû%Ú©bo¶îéh¢MT
«Ê¶Ñ*R☼ª)¶Úvµ<6"˲UÔ¨ú♫∟»ÆÖÏ♠,Ã}e◄m↑c«èPö-oo;i?ÒwöÞ4×ûðUÛSôö-?-¨ƒkº²uð►ÿ>¸ëÛYy]¡
?♦å,DDyo¢'¼T¨Z↔z\©ÕaDõ¦á¸8Oe▲¬T→ã+Æ@UÃ"µiÆPg Y«~S"╬ r4RNTçì®´ûF↔o&TS↔╬ÆDo^p°è
k∟PzÆ,♫ñdh~OèÒϦ^▼kì(ëWƒþå× #7?
▲ì♀☻M&^>↑UwÇ◄ÒI@æoÇoËÄñaâ"Àª2µS"0]?Dds²"┼C.ÑT'è♠¶I?x┼5↕%◄" ¶'A↓zÆ>%îsÒN'}↕?
☺S↓ãÁæÄ~ÄÇÛ>☺©u¶(U=┼:K8¬T¦2~$|¸$EÙêþþE'¤▼#◄Ù♠d&³`'ðM%‼S""dÿ∟ÖïPoÚowªýà¬♂îs¶♂:7~É
↕zS♠÷?♂üÜäÍ=z↕}Ð?þ?F^↑¿gÞ<ÐÀãg@^¹►‼ç↕⌂¨ysÏTØY?¼?'ba¤Dâ7Í>╬hg³hgK¢↔o¾¹▼YÐ%J♠∟cf<
 
Anonymous
also, ui gets blocked while playing the bip sound
 
@Joiner Probably dump of the SSL communication?
It’s binary…
 
Anonymous
5:49 PM
should i search for "how to convert binary to string vb.net" ?
 
Anonymous
note that i know nothing about web programming
 
@Joiner No, you should search whether WebClient supports TLS.
@Joiner Maybe starting with web programming in VB is not the best idea…
 
Anonymous
lol why
 
Anonymous
with my browser, i get a right json response
 
@Joiner It’s not used for web programming much. I guess you’ll have fewer sources than in, say, PHP. Not that I am recommending PHP.
 
Anonymous
5:53 PM
going to use a WebBrowser instance instead, more more expensive...
 
@Joiner Why a WebBrowser? That's meant for visual browsing, not network scraping.
 
Anonymous
because i cannot make a webclient working
 
I'm currently writing a piece of code with HttpWebRequest
perhaps that works
 
Anonymous
can you give me any suggestions ?
 
Anonymous
ok
 
Anonymous
5:55 PM
yes, i used the webclient class because it was shorter
 
@Joiner The data was compressed. That's why you got the weird chars.
This code works for me:
    Dim req As HttpWebRequest = HttpWebRequest.CreateHttp("https://api.stackexchange.com/badges?site=stackoverflow")
    req.AutomaticDecompression = DecompressionMethods.Deflate Or DecompressionMethods.GZip
    Dim val As String = ""
    Using resp As HttpWebResponse = req.GetResponse()
        Using sr As StreamReader = New StreamReader(resp.GetResponseStream())
            val = sr.ReadToEnd()
        End Using
    End Using
    Console.WriteLine(val)
 
Anonymous
thank you, see you later
 
It uses a HttpWebRequest and automatically decompresses it.
Cya!
 
6:50 PM
[ EditMonitor ] Approved with 2 rejection votes: 1761361
 
Should i ask here about a declined "unclear flag" on a post that was later locked? Or make a post in Meta?
 
7:18 PM
@user5061 You can try to ask here, and if we don't know, you can ask on Meta :)
 
[ EditMonitor ] Approved with 2 rejection votes: 1761383
 
minor (a typo fix), but correct
 
7:38 PM
@ProgramFOX Too late:P Should i link the question here? And if it is easily resolved, delete it from MSO?
 
You can link it here, sure.
 
[ EditMonitor ] Approved with 2 rejection votes: 1761386
 
0
Q: Declined unclear-flag, later post locked as offtopic

user 5061This was the initial post. Flagged it as "unclear what you are asking". Flag was simply declined, and 20 minutes later post was locked as off topic. Is this a mistakenly declined flag, or did i do something wrong? I had the impression that "unclear", "broad", "suggest tutorial etc", "debug my...

 
Ah, I see.
Actually, that's not "locked", it's "put on hold". And after a question has been put on hold after a specific amount of days, it will become "closed". Locking also exists, but it's something that only moderators can do.
 
Oh, my bad, thought it was the same.
 
7:41 PM
no problem :)
 
I have got to go now, shutting down EditMonitor.
See you later!
 
Bb friend :)
 

« first day (1611 days earlier)      last day (1628 days later) »