Parsing several Internet pages simultaneously [duplicate] - perl

This question already has answers here:
Perl, how to fetch data from urls in parallel?
(4 answers)
Closed 8 years ago.
There is a list of (unrelated) Internet pages I'd like to load simultaneously.
I wouldn't mind parsing the information itself page after page, but I thought to myself, that if my browser can load two and more pages simultaneously, why shouldn't Perl do that?
I'm afraid I couldn't find anything like that on the Internet, so I am asking you.
Thank you in advance.

Parallel::ForkManager is your friend. Tell it how many you want to do simultaneously and loop through your list.

Related

Facebook Custom Audiences approximate_count value is too low [duplicate]

This question already has answers here:
Is there any way to get a list of users for a custom audience?
(2 answers)
Closed 8 years ago.
I finished uploading users into audiences and everything went smoothly, no error received. I checked the audiences and approximate_count shows only a small fraction of the number of uploaded users.
How is it possible? How is this number calculated?
Thanks for the help!
From what I know and from the documentation isn't really possible at the moment.
Which logic stands behind is obscure to me and, frankly, uncomprehensible that one can only obtain an "aproximate" number of users in an audience.
You should apply you own logic and data keeping beyond that.

Technology behind the Facebook Search [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
If you just start typing a person name in the Facebook search box(displayed in blue upper bar on your profile) then suddenly within a fraction of a second search results appear and they comes much more faster if that person already exist in your profile.
so i just want to know that what is behind this search.i mean to say that which software tool and algorithm they are using for it.
i know that no one other than Facebook can explain exactly about it thats why i am just asking to give me an idea about that.
i am sure that they are using something which is open source.
The response is an autocomplete Ajax form, but this is not really the question. The key question here is how fast can you search in a text field. Facebook splits this into 2 parts. First they search in the list of your friend which is a cached and relatively rarely changed file containing 100 to a 1000 entries. This is quite fast. The other thing is to search for a name in ALL Facebook, which means I guess 1 billion names. This is a little more tricky, but I guess they have them splitted and indexed by letters or letters combinations. For example:
// search query Alice Cooper
A ... they give you a list of A like names Alina, Ana, Alice...
Al .... they limit it to Alicia, Alice, Alina ...
// and so on
Probably after a 3 letters they are starting to do a search, but not in the 1 billion rows, but in a limited subset of your 3rd level friends and probably increasing it each time.
Probably your query is never compared with the whole table, and there are definitely cached levels or recalculated queries for most of the common names.
This is in terms of technique. In terms of technology take a look at Solandra, a search engine build on top of Cassandra which Facebook is using, though I cannot confirm that this is what they are using, but just to give you a research direction.
I assume the underlying technology is AJAX, with some caching mechanism that increases performance for profiles in your friends list.

where can I get FIX DATA (FIX as in FIX PROTOCOL) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Can somebody suggest a place (websites) where to find 'real' FIX messages.
By real I mean not examples but 'real' so that if I put them into an engine it won't complain that tag 10 is incorrect or that I am missing some mandatory tags.
I am specifically after execution reports.
Ideally I'd love to find a large sequence of fix messages representing few days of activities.
I appreciate this can be sensitive data but surely tag 1,tag 207,tag 55 can all be obfuscated.
Many Thanks
Try FIX parser and click on the "sample data" button. It will generate a set of valid fix messages (including execution reports). Obviously you can also use it as a FIX parser to help you make sense of your data. Note that this text is separated by the actual FIX delimiter (SOH character). This means that visually all the text will look like a jumble of characters.
The problem with FIX is it'a a real catch-all protocol. It allows a lot of flexibility.
If you look, for example, at the spec for the Execution Report message in FIX 4.4 (BTW: always better to specify a version number with FIX), you'll notice that most of the tags you mentioned are not required by the protocol. Of the three you mentioned, only tag 55 is required on that message type. That means that whether tag 1 or 207 are there or not is up to the implementation in question.
So, unfortunately, there are no canonical samples. You should ask for sample messages from the party with whom you're trying to communicate.
You can get some sample data from validfix.
fix-analyzer.html has many examples of different fix messages
fix-log-analyzer.html has just one big example of a real log from some sort of fix engine.
(fixed broken link)
There are some examples of the TradeCaptureReport message you're talking about on my Online FIX Decoder page (shameless plug) which will not only show you the contents of the encoded message, but will decode it neatly into a table for you, assigning labels to the otherwise cryptic integers.
These particular examples were made publicly available by the LSE.
If you're doing trade reporting, the exact format you have to send will depend upon the vendor you're using. It's best to contact them directly and ask for samples as what is valid for one vendor is likely different from another.
There are some on the FIX protocol website if you have access (I don't know if they are available without logging on) or you can generate them yourself using the examples provided by quickfix.
Go to the CME-DataMine website where you can find Market Depth FIX files with all market data messages required to recreate the order book. ( CME DataMine )
I had the same need and ended up having to build something to automatically reformat FIX messages from one session to another. It turned out to be quite useful in our own testing, so I ended up hosting a server for it. Shameless plug here, but FIXSIM.com might be of use.

Wordpress Blog iPhone App Reader [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a wordpress blog that's sort of a quote of the day type of a deal and I am looking to make a simple iPhone app that automatically downloads the blog content (think RSS—kind of). I want my readers to be able to save their favorite posts and I need to be able to show access to all archives (about 440 posts to date). I also need it to send a push notification when a new post is detected. Anyway, I have been looking at RSS feeds, but it looks like I can only show the last ten.
As far as iPhone programming experience, I'm by no means a noobie. However, I have mostly worked on game projects and I don't have very much experience with the internet side of programming (downloading, parsing, etc.).
Any ideas would be appreciated. I just need to be pointed in the right direction.
Here's what I would do, though I'm sure there are many solutions:
Get access to your WP blog as JSON instead of RSS (XML). In general, I've found the JSON libs to be much easier to work with than the XML libs in iOS. Here's the first plugin I came across, and it looks like it's an "API" instead of just a conversion of the feed. Hopefully this will give you more support for querying things like archives or specific posts or date ranges, etc.: http://wordpress.org/extend/plugins/json-api/
Decide if you want to load ALL content from each wp post, or just the titles. This kinda depends on how big each post is, how you're displaying them, etc. It might be quicker to just fetch + parse all the Post Titles and then make a subsequent query for a selected post's content.
Load the data with NSMutableURLRequest and NSURLConnection, etc. Use the json-framework to parse this data, once you get it into your app (I found it through the Stanford iOS dev lectures). Quite easily converts a json string into a NSDictionary: https://github.com/stig/json-framework/
As for loading all archives, ideally you can continually query for older posts with your wp json plugin, and maybe store the loaded post's timestamps on the device so that you don't need to fetch data more than once.
As for saving all this (including favorites), I'd look into using CoreData. http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html
Push notifications are another beast entirely! I suppose the best approach would be to store push tokens of all your 'subscribers' somewhere on your server, then write some kind of php script that triggered your APNS service on an interval, checked for new posts, and sent out notifications accordingly.
Best of luck!
TouchJSON has native XML parsing support for Wordpress Blog RSS format. Try it out. You should be up and running in about an hour.
You can get TouchJSON from here
https://github.com/TouchCode/TouchJSON

How to access Signal strength in iPhone for Jailbreak [duplicate]

This question already has answers here:
Closed 11 years ago.
I am working on an iPhone project related "Create call log with Signal Strength". So we must get required RXQual, RXlevel, FER, C/I values. This app will support for jailbreak.
But I am unable to get any information to access these exact values. I can't go ahead without these values & unable to deliver the project to Clients.
Please suggest & guide me, How can I access these values. Its very urgent.
Can you suggest me the private API's for getting access the signal strength values?
I see you've included the tag "jailbreak", so I imagine that the use of only public apis is a non-issue for you. But for future people coming to this question, there is no way at all to get these values through public (i.e. app-store-legal) methods.