How to take a screenshot of entire web page using VC++ 2010? - winapi

Is there a way to take a screenshot of entire webpage using VC++ Win32 application.

You will have to communicate directly to the rendering engine. There are several projects that already do this on the web, using WebKit. Just google for "webkit page snapshot" and you will see several hits, including CutyCapt, WebKit2png, etc.
I did not try any of those, but sample screenshots they show on their project pages look like what you are asking for.

Related

How to check if web page built matches with Figma Design?

Figma design is given and asked to build the page as per that design.
How will I be ensured that the page design is as per Figma?
Or in other words, How to see the differences in page and Figma design with a highlighting or error( example design not matching etc.) being shown on the page, if anything doesn't matches with Figma design?
You are trying to automate comparing your Figma design VS the fully implemented webpage or web app screen.
As of the moment, there is no one-click automated way to do this.
A fallback is to simply do manual ocular QA inspection of pages. This works, because it's most likely that your Figma layer structure doesn't directly correlate to the HTML tags of the webpages, most especially if your webpages are generated by frameworks like React or Angular.
[Plz check the image https://i.stack.imgur.com/ICLnn.png. you can see inspect section on the right side of the figma. it shows the properties of the selected item.]

Microsoft Web Matrix

Pretty easy question I hope: does anyone know of a tool that will effectively scrape sites built with Microsoft Matrix? I could write the code in python, but it will take me way longer than I think I want to dedicate to the task, namely because of the really bad and ugly HTML generated by Matrix.
I have tried Web Harvey, Helium Scraper, and I tried the Web Scraper plugin for Chrome. WebHarvey choked on the HTML and couldn't load subsequent pages. Helium Scraper was able to move from one details page to another (the Next links were followed) but content from within the details pages was not lifted out. The Chrome plugin web scraper was not able to navigate links, with the popup window displaying an error page. My gut is telling me that this has to do with uniquely ASP.net things, but I could be wrong.
Any pointers or suggestions appreciated.
You know there are two completely different versions of Microsoft Web Matrix right? There's the one from 2003; i have no idea what its html looks like. There's the one from 2011 to current which uses razor cshtml source files to produce its html. In the 2011+ one, you write the html by hand; there's no drag and drop, and so it's unlikely you'll get consistent html from site to site.

sharepoint webparts, Swap image on click

I'm working on sharepoint project, i have like 1000 image i want to upload, i need webpart or something to do swap images on click, is there any web part that do this?
what the best method to use on my situation.
Are you a SharePoint developer? If not, I'd strongly suggest not even trying to do this. Modifying SharePoint beyond out-of-the-box options requires some extensive asp.net and SharePoint-centric developer skills. Even then, it's not a joy to work with.
In the past, for modifying UI interactions, I found the saner approach is to manipulate the DOM post-render. Load up jQuery and then upon page render, do your thing.

Embed Powerpoint viewer on a web page (PHP)

I am building a PHP application where the user upload Powerpoint files. I want the other users to view it online instead of downloading. (Using a third party apps like google docs might be a little cumbersome for the users) Is it possible to write a powerpoint viewer code in PHP?
You could automate the process of using google docs with php.
Google provides a ppt viewer that can be embed into webpages using the following code
<iframe src="http://docs.google.com/gview?url=http://www.domainname.come/presentation.ppt&embedded=true" style="width:550px; height:450px;" frameborder="0"></iframe>
Now im assuming php handles the uploads your users make, thus it would be easy to find the url to the specific ppt file. You could store this url either in a variable or a database, fetch it when needed and place it in the code above.
I hope I have been able to explain the logic im trying to apply, do let me know if you need more specifications.
I suspect it would be much easier to reduce the powerpoint slides to .PNG files, and build a simple PHP script to cycle through the images.
You want to re-write Powerpoint in PHP? I'm gonna say... very difficult at best. There are, however, tools out there that make your life easier. Also, there's a "Save as web page" option in Powerpoint, so maybe you could have your uploaders save the powerpoint as a web page, and upload that output, which I would imagine would be pretty easy for you to subsequently put up on the web.
Alternatively, if you're feeling more ambitious, you could read up on the Google docs APIs, and possibly create a portal to upload to Google docs for the contributors, and view Google docs for your visitors. Your PHP frontend could leverage the power of Google docs, but eliminate the cumbersomeness (I'm kind of surprised that's a real word).
"Is it possible to write a powerpoint viewer code in PHP?"
Yes. Unfortunately, if you are asking this question, you probably won't be able to do it yourself.
If you want to try it anyways, here's a good place to start:
http://msdn.microsoft.com/en-us/library/cc313106(office.12).aspx
Or you can look for a library that does that. They are probably out there, just Google it.
EDIT: Found one here:
http://phppowerpoint.codeplex.com/
Powerpoint files can be embedded on a webpage using the API provided by Microsoft.
<iframe src="https://view.officeapps.live.com/op/embed.aspx?src=https://yourdomainname.com/your_powerpoint_file.pptx" width="100%" height="565px" frameborder="0"> </iframe>

Firefox add-ons

What Firefox add-ons do you use that are useful for programmers?
I guess it's silly to mention Firebug -- doubt any of us could live without it. Other than that I use the following (only listing dev-related):
Console2: next-generation error console
DOM inspector: as the title might indicate, allows you to browse the DOM
Edit Cookies: change cookies on the fly
Execute JS: ad-hoc Javascript execution
IE Tab: render a page in IE
Inspect This: brings the selected object into the DOM inspector
JSView: display linked javascript and CSS
LORI (Life of Request Info): shows how long it takes to render a page
Measure IT: a popup ruler.
URL Params: shows GET and POST variables
Web Developer: a myriad of tools for the web developer
Here are mine (developer centric):
FireBug - a myriad of productivity enhancing tools, includes javascript debugger, DOM inspector, allows you to edit the CSS/HTML on the fly which is highly valuable for troubleshooing layout and display problems.
Web Developer - again another great developer productivity tool. I mostly use it for quickly validating pages, disabling javascript (yes I disable javascript sometimes, don't you?), viewing cookies, etc.
Tamper Data - lets you tamper with http headers, form values, cookies, etc. prior to posting back to a page, or getting a page. Incredibly valuable for poking and prodding your pages, and seeing how your web app responds when used with slightly malicious intent.
JavaScript Debugger - has a few more features than javascript debugger provided by firebug. Although I must admit, I sparingly use this one since firebug has largely won me over.
Live HTTP Headers - invaluable for troubleshooting, use it frequently. Lets you spy on all HTTP headers communicated back and forth between client and server. It has helped me track down nefarious problems, especially when debugging issues when deploying your web app between environments.
Header Spy - nice addon for the geeky types, shows you the web server and platform a web site runs on in the status bar.
MeasureIt - I don't use this all too frequently, but I've still found it valuable from time to time.
ColorZilla - again, not something I use all that frequently, but when I need it, I need it. Valuable when you want to know a color and you don't want to dig through a CSS file, or open up a graphics editing app to get a color embedded in some image.
Add N Edit Cookies - this has been a great debugging tool in web farms where the load balancer writes a cookie, and uses the cookie value to keep your session "sticky". It allowed me to switch at will between servers to track down problems on specific machine. Also a good tool if you want to try to mess with a site that uses cookies to track your login status/account, and you want to see how your code responds to malformed or hacked info.
Yellowpipe Lynx Viewer Tool - yeah I know what your thinking, lynx, who needs it, its so 1994. But if you are developing a site that needs to take web accessibility into account (meaning accessible to users with visual impairments who use screen readers), or if you need to get a sense of how a web spider/indexer "sees" your site, this tool is invaluable. Granted, you could always just go out and grab Lynx for yourselfhere's the windows xp port that I use.
I've got a handful of other addons that I've used from time to time that I'll just quickly mention: FireFTP (one I installed wasn't stable and I've not tried a newer release), Html Validator (also found this one unstable, least back when I installed like a year ago), IE Tab (I usually just have both IE and FireFox open concurrently, but that is just me, I know many others that find this addon useful).
I'd also recommend the Web Developer extension by Chris Pederick.
As far as web development, especially for javascript, I find Firebug to be invaluable. Web developer toolbar is also very useful.
The ones I have are...
Y-SLow
Live Headers
Firebug
Dom Inspector
One that wasn't mentioned yet is this HTML Validator extension that I found very useful.
#Flávio Amieiro
MeasureIt is an unnecessary extension to have if you install the Web Developer Toolbar. Web Developer Toolbar includes a ruler as one of its features. Under the "Miscellaneous" category for Web Developer click the option "Display Ruler" to use a ruler identical to the MeasureIt one.
That will allow you reduce the number of extensions needed by at least one.
Firefox addons:
FireBug:helps web developers and designers test and inspect front-end code. It provides us with many useful features such as a console panel for logging information, a DOM inspector, detailed information about page elements, and much, much more.
Web Developer-gives you the power disable CSS, edit CSS on the fly, measure certain areas of a page and much more.
ColorZilla
Just click on the icon, hover over the area you'd like to know the hex color for, and click.
Window Resizer
to make sure the layout is displayed properly in the standard resolutions of today.
Total Validator
validating websites much easier by checking HTML, links, CSS and doing a lot more.
Web Developer for web development. Scribefire if you're a blogger-progammer
For web developing I use the Web Developer Toolbar, CSS Viewer and MeasureIt.
But I'm really not one of those who has a thousand of extensions to do everything. I like to keep things simple.
EDIT: Thanks to Dan's answer I don't need MeasureIt anymore. Can't believe I've never seen that! I guess I'll just have to pay more atention to this WebDeveloper toolbar.
Adding to everyones lists, Tamper Data is quite useful, lets you intercept requests and change the data in them.
It can be used to bypass javascript validation and check whether the server side is doing its thing.
I use Web Developer, it's a real time saver.
+1 for LORI ("life-of-request-info"). It's a very convenient alternative for rough measurements of the load time of a particular web page -- the kind of thing that you might otherwise use an external stopwatch for.
New Tab Homepage. Combined with a "speed dial"-type homepage (a personal, fast-loading page of links that you use frequently), helps you get where you're going faster when you open a new browser tab.
LastTab. Changes the behavior of Ctrl+Tab to let you navigate back and forth between your most-recently-used tabs with repeated presses of Ctrl+Tab, the same way that Alt+Tab works in Windows. Also provides a nice view of all open tabs while Ctrl is still being held down for easy navigation. (The resultant behavior is very similar to the Ctrl+Tab behavior in recent releases of Visual Studio.)
FireFTP is good for grabbing/uploading any necessary files.
I find Hackbar to be quite useful. Very useful if you want to edit the querystring part of the url, to test for vulnerabilities, or just general other types of testing where you might end up with complicated query string values.
I was learning DOM inspector, but I've switched to Firebug.
Some of which has been missed above are here
Load Time Analyzer – View detailed graphs of the loading time of web pages in firefox. The graphs display events like page requests, image loading times etc.
Poster – A must have tool for web developers enabling them to interact with web services and other web resources.
Aardvark – A cool extension for web developers and designers, allows them to view CSS attributes, id, class by highlighting page element individually.
Fiddler is a really great debugging proxy. Think of it as a more powerful version of the "Net" panel in Firebug or the Live HTTP headers.
It used to be an IE-only extension, now it also has hooks into Firefox.
Groundspeed, is useful for testing server side code. It was created for input validation tests during pentest, but can be useful for any test that require manipulating input (similar to TamperData).
It lets you control the form elements in the page, you can change their type and other attributes (size, lenght, javascript event handlers, etc). So for example you can change a hidden field or a select to a textbox and then enter any value to test the server response and stuff like that.

Resources