How to get the time online from actionscript? - actionscript

I need to be able to find the current time from an online source rather than the system to make sure the time is correct. I need to do this in actionscript, preferably 2 rather than 3 though if you have any solution at all post it. Thanks ahead of time for the help.

Here's a possible reference: http://board.flashkit.com/board/showthread.php?t=663535
The easiest is solution is probably as above, to create a server-side script to return the time and then fetch that in your ActionScript.

Another option is to create an NTP client in ActionScript. Unfortunately it's been a while since I've done any ActionScript, but here's a straightforward example in Python if anyone wants to do a port: http://maxinbjohn.blog.com/2366141/

Related

Is there a way to make this url work for all pages?

I was doing web scraper but then I got blocked for too much commands and someone said I should retriev the json itself with this url and try play with it :https://steamcommunity.com/market/search/render/?query=&start=1490&count=10&search_descriptions=0&sort_column=price&sort_dir=desc&appid=730&norender=1
and I changed it to this :https://steamcommunity.com/market/search/render/?query=&start=0&count=100&search_descriptions=0&appid=730&norender=1 but when I try to do more than 100 it doesn't give me more outputs is there a way to fix this? Btw Iam new to programing and stuff, so I dont know much.
Short answer: no.
These query parameters are most likely limited by Valve itself. Also, WebScraping / Crawling has the huge disadvantage that many or even most providers are actually blocking requests after a determined amount of requests / after a distinct use pattern whatsoever.
The only way to counteract this is to use an official API. By now, there's no such thing though.

Using ValueProvider<Long> with FixedWindows and Duration

Moving toward Apache Beam 2.x, I want to use templates as much as possible, and ValueProvider accordingly.
In my logic, I am using a FixedWindow, but the duration is flexible, so I rather get it from a ValueProvider.
The problem is that FixedWindows.of() only get Duration, and I failed to find a simple way to grab a ValueProvider and make a duration out of it.
Please advise,
Shushu
Unfortunately this question has a simple answer: this is currently not supported. Feel free to file a JIRA - it seems like a reasonable request.
Ran into this exact issue today but with SlidingWindows, we just wrote our own windowing function with a new param that was a ValueProvider instead (similar to https://github.com/apache/beam/pull/3358/files) and this seems to work.

Programming screen recorder - output issues

I want record screen (by capturing 15 screenshots per second). This part I know how to do. But I don't know how to write this to some popular video format. Best option which I found is write frames to separated PNG files and use commandline Mencoder which can convert them to many output formats. But maybe someone have another idea?
Requirements:
Must be multi-platform solutions (I'm using Free Pascal / Lazarus). Windows, Linux, MacOS
Exists some librarys for that?
Could be complex commandline application which record screen for me too, but I must have possibility to edit frames before converting whole raw data to popular video format
All materials which could give me some idea are appreciated. API, librarys, anything even in other languages than FPC (I would try rewrite it or find some equivalent)
I considered also writting frames to video RAW format and then use Mencoder (he can handle it) or other solution, but can't find any API/doc for video RAW data
Regards
Argalatyr mentioned ffmpeg already.
There are two ways that you can get that to work:
By spawning an new process. All you have to do is prepare the right input (could be a series of jpeg images for example), and the right commandline parameters. After that you just call ffmpeg.exe and wait for it to finish.
ffmpeg makes use of some dll's that do the actual work. You can use those dll's directly from within your Delphi application. It's a bit more work, because it's more low-level, but in the end it'll give you a finer control over what happens, and what you show the user while you're processing.
Here are some solutions to check out:
FFVCL Commercial. Actually looks quite good, but I was too greedy to spend money on this.
Open Source Delphi headers for FFMpeg. I've tried it, but I never managed to get it to work.
I ended up pulling the DLL wrappers from an open source karaoke program (UltraStar Deluxe). I had to remove some dependencies, but in the end it worked like a charm. The relevant (pascal) code can be found here:
http://ultrastardx.svn.sourceforge.net/viewvc/ultrastardx/trunk/src/lib/ffmpeg-0.10/
There was some earlier discussion with a Delphi component here. It's a very simple component that sometimes generates some weird movies. Maybe a start.

Tutorial about TMemIni

I have used TIniFile for saving application data. Now I want to try TMemIniFile.
Where can I found good tutorials about them?
If you know how to use TIniFile, then there's nothing much more to learn about TMemIniFile. Use it in exactly the same way.
The only difference you need to be aware of is that any modifications you make are cached in the memory and not written to the file immediately. When you are ready to write them to the file just call UpdateFile.
That really is all there is to know!

Web Capacity Analysis Tool (WCAT) Tutorial

I'm finding it very difficult to find any decent tutorials on how to get up and running with WCAT quickly. Does anyone have a link to a decent tutorial on it that they found useful when trying to get to grips with WCAT?
For me the best thing that I used to get going with WCAT was to get their "sample" running, which tied to a base IIS installation with a single file.
Once I got that done, i found that the help documentation was very easy to understand, it is just the initial setup that was tricky.
Otherwise, this blog posting is pretty straightforward as well.
Just another option that helped me getting into this:
Using the WCAT Fiddler Extension.
This extension automatically generates all the necessary files and also calls them for you.
If you want to understand what's going behind the scenes, a good starting point for me was to use Process Explorer to see which files the Fiddler extension generates and how it calls them.
Somehow the WCAT Fiddler Extension was not working on my side and does not support POST so I decided to create my own. I shared the source code on github just incase your interested.
Here's the link: https://github.com/francischie/FiddlerWCAT
I've also found this article which combines LogParser 2.2 with WCAT. You may find that interesting too.

Resources