For CheerpJ script: Using both <cheerjp-applet> and <applet> on same page - applet

I began a very helpful discussion with Alessandro Pignotti (#alexp-sssup) on
https://gitter.im/leaningtech/cheerpj?at=5f189bf76279c91f420801af
about how to get Java applet byte-code to work with CherrpJ in present-day browsers.
Hopefully the two examples referenced there in this post can serve as a guide to others who might also be struggling with getting the basics of java applet conversion with CheerpJ going.
As I mentioned there I would, I am now putting this follow-up question in stackoverflow:
I was hoping to get this page to work in which I am trying to run the same byte-code with both the <cheerjp-applet> and <applet> tags on the same page. However the page never loads properly. The best I can achieve is (with page loading seeming to hang) to force some hung script to stop, which then often ends up bringing the CheerjP button up, but I have yet to the get button in the original applet to show on the same page (in a java-enabled browser-setup where the legacy applet does work properly from this page). Sometimes the browser completely hangs before even the Cheerpj script gets to work.
So my question is: Is what I am attempting even possible, and if so what could be wrong with this first attempt of mine?
P.S.: The stackoverflow tag [cheerpj] does not exist, so the suggestion on Gitter to use it fails for me: I don't have a reputation of 1500 :( !!! Since a pretty thorough web search has revealed very little in-depth technical discussion about CheerpJ besides what's in the Gitter CheerpJ room I reference at the start of this post, I am not sure how far the attempt to move discussion in to stackoverflow is going to go.

What you are trying to achieve is not supported by CheerpJ. When CheerpJ starts it will automatically replace any <applet>, <object> or <embed> tag containing Java applets and execute them internally. The special prefixed tags, such as <cheerpj-applet> are designed to avoid accidental execution by the native plugin if installed.
We don't plan to support this use case in the future since for the vast majority of users the native Java plugin does not work anymore anyway.
You may consider using two <iframe> tags to get the behavior you want using 2 independent pages.

Related

Offline Technet Library (Powershell) Reference

Is there any way to obtain, or has someone already obtained and compiled documentation from MS Technet Library for offline use?
I know of the Visual Studio Help Downloader at codeplex https://vshd.codeplex.com/ and I am looking for something similar for the Technet Library.
The Library itself has an option to select articles for export however, it is very limited in number of pages to add per click. This means you have to drill down on every subject and add it to your selection. Not very usable, besides the examples state you should be able to download as pdf or html, but I only get the html option, which is annoyingly impractical.
Ideally I would like to have the complete offline documentation for a single top-level subject (e.g. "Scripting with Windows PowerShell" at https://technet.microsoft.com/en-us/library/bb978526.aspx). If possible, including an index/TOC.
I know of the built-in Get-Help, the books available etc. but the Technet Library has more detailed information available which I'm after. Any known method of downloading this in bulk would be greatly appreciated.
All my google search results seem to either point to the built in export funcion, or people reminiscing about the old offline Technet subscription.
Ok, its not great. But its better than the above... I know this is old. But I was looking for this. This is the best I found. So Ill leave my breadcrumbs for the next fool to stumble down this road. If someone else finds better, hopefully theyll continue to pass it on.
On Github, you can download the entire Doc repo as a zip. Read it with microsoft code and a markdown extension.
Ideally, Id like to see this as a CHM (rather than a PDF).
https://github.com/PowerShell/PowerShell-Docs
I was surprised to find that this is well documented, and actually is a thing:
Taking TechNet Offline
When you start the process, it'll give you some instructions, and once you click "Start," you'll be shown the hierarchy of the entirety of that root page you linked on the left. Note the instructions in orange at the top.
I didn't go much further then this, but let us know if this worked in full, and as you expected it to. Nice feature there! I learned something myself today.
I have had mixed success with HTTrack You can give it a site a page and it will go through all links and resources recursively, saving them locally.
It requires some tuning and playing around with to get right, There might even be a newer better equivalent these days.

ExpressionEngine 1.6.8 Contact Form

I've been asked to make some changes to a site that was built with Expression Engine 1.6.8. Even though I'm not familiar with this CMS, I can find my way around to make the updates, except I'm not sure about adding a contact form. I'm guessing that ultimately I'll have to upgrade this version to the newest (2.7, I believe?) in order to get the tags found on this page to work: http://ellislab.com/expressionengine/user-guide/modules/email/contact_form.html?
My only hesitation in making the upgrade is my unfamiliarity with EE, and the fact that someone else is probably creating a brand new website for the one I'm working on, and very likely without EE (so I'm learning something that I may not need again).
Any suggestions for a quick fix, or should I just bite the bullet, upgrade, and use what I've found?
Take a look at the EE 1.x docs.
At a glance it appears that syntax has changed little bit. Maybe that's why your EE2 tags were not working in EE1.
I would definitely try to use the tags as shown in the EE1 docs if this site is that old. Making a jump from 1.6.8 to 2.7 can become treacherous due to variables such as how the templates were coded, which add-ons were used, if those add-ons are even available any longer, what functionality was deprecated or absorbed, etc...
I only say ditch the efforts because you mentioned having another site in progress. If you would like to work through the updates/upgrades, follow the docs here and here and learn it. It is definitely worth the learn. Once you tap into EE, it's hard to roll back.
I ended up writing my own html code within the template and processed it with a php script to send the form input to an email address, just as I normally would on a website. Not being familiar with ExpressionEngine, I don't think I understood why I was continually being referenced to use a module in order to do this, but I suppose for anyone who is not a coder but is experienced with EE, that would be the way to go. From what I understand, the email module is not free and does not come with the core version, which is what I had to work with, but comes with the licensed version, which made this all the more confusing.

why is Catalyst::Helper::View::TTSite deprecated?

I've just started getting into Catalyst, and I've been finding it really helpful. One of my favorite things about it was TTSite in that it got me going fast and gave me something to develop with without just black text (and it required no work from me to setup). However, I've been reading in a lot of places that it's buggy, or even deprecated as mentioned here on the actual Catalyst tutorial. However I've found it nothing but helpful and have had no issues, so basically I'm wondering is there reason for me to be worried and not use it? And if so, does anyone know of a similar alternative that kind of gives you a base template set up to work within? Thanks a lot!
I don't think TTSite is officially deprecated in terms of support .. it is still included in the Catalyst::View::TT distribution as of 0.39 (released 10-April 2012). I suspect it is more a case of some developers disliking the base templates that are provided and TTSite no longer being recommended as part of the default Catalyst tutorial.
TTSite provides a very simple base that has some quirks. For example, the context object is called Catalyst instead of c, and the use of TT's WRAPPER command can get in the way of AJAX and non-html views.
More background reading:
Discussion on the Catalyst-Dev mailing list regarding changing the Catalyst tutorial from TTSite to straight TT
Catalyst wiki: disabling TT wrapper for AJAX requests
A blog post on TTSite including changing Catalyst context reference to c
A modern base theme would probably start with something like Bootstrap or one of the 960 Grid HTML/CSS frameworks. I'm not aware of an actively maintained Catalyst::View helper that would be a better replacement for TTSite, but also don't find it too onerous to drop in the latest version of Bootstrap :)

i want my popup window to appear in center

i had created my popup window which is appearing on a click of link but it is coming at the top corner of window and want it to appear it in at center and also want to resize it. i had created it in scala and calling it with html file.so everybody please give your suggetions as fast as possible.
This question is just so wrong, web pages aren't written in Scala; they're written in HTML, JavaScript and CSS.
Please, please stop taking some very fundamental questions about basic web design / jQuery concepts and tagging them as Scala. You do not have a Scala problem.
My advice to you is to forget Scala, at least for now. Concentrate on just writing static web pages using JavaScript/jQuery. Once you have a level of understanding there, start looking at Scala, but not for web pages, just get a feel for the language by writing command-line tools.
Then, and only then, you can start learning the Lift framework, and tie it all together.
Alternatively, you could always try Ruby on Rails, it's supposed to be easier to learn than Lift.
Also, you really should post samples of any code you're struggling with, it makes it far easier for others to spot the problem if they can see the code.

Which OAuth library do you find works best for Objective-C/iPhone?

I have been looking to switch to OAuth for my Twitter integration code and now that there is a deadline in less than 7 weeks (see countdown link) it is even more important to make the jump to OAuth. I have been doing Basic Authentication which is extremely easy. Unfortunately OAuth does not appear to be something that I would whip together in a couple of hours.
http://www.countdowntooauth.com/
So I am looking to use a library. I have put together the following list.
MPOAuth
MGTwitterEngine
OAuthConsumer
I see that MPOAuth has some great features with a good deal of testing code in place but there is one big problem. It does not work. The sample iPhone project that is supposed to authenticate with Twitter causes an error which others have identified and logged as a bug.
http://code.google.com/p/mpoauthconnection/issues/detail?id=29
The last code change was March 11 and this bug was filed on March 30. It has been over a month and this critical bug has not been fixed yet. So I have moved on to MGTwitterEngine.
I pulled down the source code and loaded it up in Xcode. Immediately I find that there are a few dependencies and the README file does not have a clear list of steps to fetch those dependencies and integrate them with the project so that it builds successfully. I see this as a sign that the project is not mature enough for prime time. I see also that the project references 2 libraries for JSON when one should be enough. One is TouchJSON which has worked well for me so I am again discouraged from relying on this project for my applications.
I did find that MGTwitterEngine makes use of OAuthConsumer which is one of many OAuth projects hosted by an OAuth project on Google Code.
http://code.google.com/p/oauth/
http://code.google.com/p/oauthconsumer/wiki/UsingOAuthConsumer
It looks like OAuthConsumer is a good choice at first glance. It is hosted with other OAuth libraries and has some nice documentation with it. I pulled down the code and it builds without errors but it does have many warnings. And when I run the new Build and Analyze feature in Xcode 3.2 I see 50 analyzer results. Many are marked as potential memory leaks which would likely lead to instability in any app which uses this library.
It seems there is no clear winner and I have to go with something before the big Twitter OAuth deadline.
Any suggestions?
I've used bengottlieb's Twitter-OAuth without issues.
Build+Analyse finds only one issue (in SA_OAuthTwitterController.m) and that's just a variable that has a value stored during initialization that is never read. I've not seen any leaks in my use of it. It was simple to implement and so far (two apps in the store using it, a third in development) no problems at all.
A new single-file solution is TDOAuth: http://github.com/tweetdeck/TDOAuth.
It's well-tested in that it is used in the TweetDeck iOS clients.
I recently had to implement "post to Twitter".
What I found was that none of the various projects would work out-of-the-box. They're all close, but not quite there.
Eventually I settled on OAuthConsumer, Stig Brautaset's SBJSon, with some ideas more than code borrowed from Ben Gottlieb's Twitter-OAuth-iPhone for pin processing.
I probably would have looked at MGTwitterEngine, but I didn't need to hit that much of the API - just status updates.
I seem to recall having to hack OAuthConsumer to set a few parameters correctly - that was the biggest stumbling block.
Try this Framework out for size: https://github.com/materik/meauth-ios, works well for BitBucket's API and am in progress of testing it with more sites. Please give feedback and contribute.