LaxLoafer 71 Posting Whiz in Training

I find the text file approach works fine for small sites. To keep the login credentials secure you'll want to encrypt them, as pritaeas mentioned.

If you're unfamiliar with secure hashing algorithms, you might find this a useful resource: Salted Password Hashing - Doing it Right. The article includes code for PHP and other languages.

Web servers are generally configured to serve text files, so it's probably a good idea to keep the file outside your web publishing directory.

LaxLoafer 71 Posting Whiz in Training

Oops! Blurted out the first thing that came to mind.

How about memo pads printed with your company's details / products? Cheap to produce, and with a bit of luck clients will place them right beside their telephone.

LaxLoafer 71 Posting Whiz in Training

Free beer.

LaxLoafer 71 Posting Whiz in Training

The rest of us pay for windows. So must you!!

Or use a free alternative, like Linux.

LaxLoafer 71 Posting Whiz in Training

Have a look at Blender. It's a free and open source tool for 3D modelling and rendering, using Python as a scripting language.

There's also Caligari's Truespace. Microsoft acquired Caligari a few years back and made TrueSpace freely available. Unfortunately the software no longer appears to be maintained, but you might still find a legitimate copy via a reputable download site.

Panda3D is a 3D rendering and game engine developed for Python. Another free and open source project.

Some time has elapsed since I dabbled with Python and 3D, about eight years, so my recommendations aren't up-to-date. As Python was gaining in popularity as an embedded scripting language you may find there are better and newer options. Also, if your preferred application doesn't explicitly support Python, check to see if the app exports a COM interface that can be used for scripting.

LaxLoafer 71 Posting Whiz in Training

Hi Punit

Acrobat Professional is what people normally use to edit PDF documents. There are cheaper and perhaps less clunky alternatives on the market, but their editing features can vary considerably. You'll find some applications may possess advanced image editing features, whereas others may offer better word processing, or support for Unicode and RTL languages, etc.

What kind of editing do you wish to do?

LaxLoafer 71 Posting Whiz in Training

In lines 1 and 2, try Math.random instead of Math.Random. Also your quotation marks on line 4 are unbalanced.

LaxLoafer 71 Posting Whiz in Training

http://www.gnu.org/software/wget/

wget is a free command line utility for retrieving content from web servers. It's open source, part of the GNU project. You'll find there are ports of wget available for most platforms.

LaxLoafer 71 Posting Whiz in Training

You can use FRAMES like this website, designed way back in 1997...
http://vzone.virgin.net/sizzling.jalfrezi/iniframe.htm

Unfortunately when I attempted to bookmark the frames tutorial, all I got was their frameset URL, which displays the homepage by default. This is one of the drawbacks of frames. There are ways around this particular problem, if your visitor has JavaScript enabled, which search engines usually don't. And then there's history navigation, but I won't go down that road. Besides, I've forgotten which road it was.

Anyway, the page served as useful tutorial when I was getting to grips with HTML 3.2, so here's a direct link for old times sake...
http://vzone.virgin.net/sizzling.jalfrezi/frames/fframes.htm

A simpler alternative and slightly more moden approach is to use a IFRAME tag, e.g.

<iframe src="http://www.example.com/" width="200" height="200" name="myframe"></iframe>

These also suffer the same drawbacks mentioned earlier.

Normally when you click on a link, the current page will get updated. If you want the contents of a frame to be updated there are a couple of things you need to do; give the target frame a name, and set it as the link target.

In the code snippet above I named the frame "myframe". Setting the target attribute of an anchor element to "myframe" would cause a click to update that frame, e.g.

<a href="http://example.com/" target="myframe">Visit example.com!</a>

It's possible to set a default target for all links on a page through the BASE tag in an HTML document's header.

LaxLoafer 71 Posting Whiz in Training

damage -> collateral

LaxLoafer 71 Posting Whiz in Training

Hi Sania

ABCpdf installs itself to the global assembly cache (GAC) by default. Open up the Add Reference dialog, select the browse tab and navigate to...
C:\Windows\assembly\GAC_MSIL\ABCpdf\
There you should find a subfolder, named '8.1.1.6__a7a0b3f5184f2169' or similar, inside which is the ABCpdf DLL. Add it as a reference to your project.

Which version of Visual Studio are you using?

LaxLoafer 71 Posting Whiz in Training

Did you add a reference to the component from your Visual Studio project? Right-click on your project in the solution explorer and select 'Add reference...', look for WebSupergoo.ABCpdf under the .NET tab.

It's useful to include some namespaces also, so add the following to the top of your C# code file...

using WebSupergoo.ABCpdf8;
using WebSupergoo.ABCpdf8.Objects;
using WebSupergoo.ABCpdf8.Atoms;
using WebSupergoo.ABCpdf8.Operations;

or for VB.NET...

Imports WebSupergoo.ABCpdf8
Imports WebSupergoo.ABCpdf8.Objects
Imports WebSupergoo.ABCpdf8.Atoms
Imports WebSupergoo.ABCpdf8.Operations

The 'Getting Started' section of the documentation provides some further help.

LaxLoafer 71 Posting Whiz in Training

You haz no money? :-o

Why not consider getting a secondhand system? Here's a reconditioned unit just spotted on a popular auction site, just 531 Euros...

DELL XPS 8500 DESKTOP INTEL i5-3450 3.5GHz 8G 1TB ATI 7570 WiFi USB 3.0 WARRANTY

... including delivery :-)

There are even cheaper systems available, if you know where to look.

LaxLoafer 71 Posting Whiz in Training

var lMWFrame=document.getElementById('mframe');

Try getting the element by its id 'mFrame', not 'mframe'.

LaxLoafer 71 Posting Whiz in Training

ABCpdf - it's a PDF component for ASP.NET, suitable for use in multi-threaded environments.

One way you could convert your ASPX page would be to simply pass the URL to the AddImageUrl function. Something like...

Doc theDoc = new Doc();
theDoc.AddImageUrl("http://www.example.com/somepage.aspx");
theDoc.Save(Server.MapPath("htmlimport.pdf"));
theDoc.Clear();

There's a slightly more complex multi-page example to be found in the product documentation, written in C# and VB.NET

The component makes use of the Trident and Gecko rendering engines, so the PDF generated should match what you'd expect to see in Internet Explorer or FireFox. If you want to find out immediately how ABCpdf will render your web page, try out the online demonstration - no need to install anything.

Disclosures, past and present: see profile ;-)

LaxLoafer 71 Posting Whiz in Training

All my code is written bug free - there's no extra charge.

I've been fortunate to work with some exceptionally great programmers. The code they write is generally concise and very difficult to find fault with. However they hardly ever write comments. Empty lines are stripped out to allow more room on screen for code. It seems they have an innate ability to scan and digest code as one might read a newspaper. Comments would only slow them down.

Personally though, I find breaking up code with whitespace can aid understanding, drawing attention to important sections. Isn't it easier to navigate sourcecode when you can clearly see where one function ends and another begins?

LaxLoafer 71 Posting Whiz in Training

The 'cache-control' HTTP header is used to instruct web clients on resource caching.

You could try setting this with a meta tag in the header your HTML page, like....

<meta http-equiv="cache-control" content="no-cache" />

... or possibly set the header for a resource from within your web server's config.

LaxLoafer 71 Posting Whiz in Training

Face in palm time - someone misread the raw server logs...

To view logs I often import them into a spreadsheet, as a means to quickly sort and filter records. Anyway, somewhere along the way the URLs and query strings must have been sorted separately, so they no longer match up correctly.

Google Analytics still reports unexpected landing pages for the newsletter, but suspect that's another issue.

Jorge, thanks for your contribution.

LaxLoafer 71 Posting Whiz in Training

It's possible but seems unlikely to me. Sometimes visitors will attempt to guess a URL, but rarely have I seen them include a query string, at least not with seemingly consistent and valid parameters.

We've picked up around 40 instances of these unexpected URLs. I should also mention the issue doesn't appear to be browser or OS specific.

LaxLoafer 71 Posting Whiz in Training

QWERTY - it's too deeply ingrained in my brain to change after using it for so many years.

LaxLoafer 71 Posting Whiz in Training

GAME OVER

LaxLoafer 71 Posting Whiz in Training

I recently dispatched a newsletter via email. Each link in the newsletter pointed to a page on our website, and each link contained a query string that identified which newsletter a subscriber was responding to.

The query string uses Google Analytics tracking code, so the links looked something like this...

<a href="http://www.example.com/somepage.htm?utm_source=mailinglist&utm_medium=email&utm_content=may-2012" />click here!</a>

The method has worked correctly for previous mailshots, but on this occasion something rather unexpected happened. Google Analytics captured visits to the pages that were not referenced in the newsletter, in addition to the ones that were. The raw server logs also show HTTP GET requests for other unintended pages on the site, with the query string appended.

How can this be?

The web server is IIS7 running on Windows 2008. I recently added a customized HTTP handler to serve a web version of the newsletter, which basically links in external stylesheets, JavaScript, and removes the said query string from the now internal links.

Any ideas?

LaxLoafer 71 Posting Whiz in Training

Seriously, I'm afraid the fading effect is making me feel nauseous.

It could be the diagonal hatching that's causing this - nothing to do with a dislike of intrusive advertisements. Patterns or strobe effects can sometimes cause unexpected problems for people, something you may need to be aware of here.

Update: I've since checked 'Disable ads' on the edit profile page to avoid the fading effect.

LaxLoafer 71 Posting Whiz in Training

wind -> clockwork

LaxLoafer 71 Posting Whiz in Training

Hi cscgal

The permalinks seem to be disappearing from Google search results. Out of curiosity, did you get to the bottom of this? What was the solution?

LaxLoafer 71 Posting Whiz in Training

Hi Puffball

When I visited your site earlier in the week there were 230 thumbnails to download. That's rather a lot, especially for someone visiting your page for the first time, with an empty browser cache.

As has already been suggested, dividing the content up into pages and downloading it dynamically might help. This is what Wallbase appear to be doing. But I think there is more you need to consider.

Each of those thumbnails is generating an HTTP request, and I suspect it's these that are killing your site's performance. One difference I noticed between Wallbase's site and yours, is they display larger but fewer thumbnails per page. Although the screen area is identical, and so the amount of image data transmitted would be similar, they're actually having to processing fewer HTTP requests.

In addition to displaying few thumbnails per page, you could try merging thumbnails into a single image. You could then use an image map or some other method for capturing a user's click. It would be interesting to know how this performs, and fairly simple to test :-)

BTW, you have two external CSS files linked. Why not merge them into one? Also, there's a great chance a new visitor will have already cached a copy of jQuery from another source, i.e. http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js So, why force new visitors to download your duplicate copy?

One final thought on HTTP request optimization...

Each request for a thumbnail image on your domain is sending a full HTTP …

LaxLoafer 71 Posting Whiz in Training

Hi Tumbleweedracef

Have you tried running IE in safe mode?

This'll ensure all add-ons are prevented from loading. If the problem disappears in safe mode then it would suggest an add-on issue; in which case you could try disabling the add-ons in turn until the culprit is found.

To start IE in safe mode press Windows Key + R, type 'iexplore -extoff', then press enter.

Have a go at visiting the sites while in safe mode and let us know what you see.

Another possibility, albeit a longshot, it might be worth checking to see if a sticking keyboard or mouse button is the cause.

LaxLoafer 71 Posting Whiz in Training

In some instances, yes.

Clicking on a hypertext link sends a GET request. The following link and form send similar requests...

<a href="/somescript.php?id=123>Go get it!</a>

<form name="form1" method="GET" action="/somescript.php" >
<input name="id" type="text" value="123" />
<input type="submit" />
</form>

Hypertext links don't send POST requests, although there are ways to trigger a POST request with the help of JavaScript and AJAX. You probably wouldn't want to go down that road if you needed to ensure the behavior of the link remains consistent. What might happen if someone visits your site with JavaScript disabled in their client?

LaxLoafer 71 Posting Whiz in Training

Permissions.

Website visitors shouldn't have access to view resources in the root directory of drive C. It's a really really bad idea :-o

To store your images outside the project / web root folder, you could try creating a subfolder somewhere, say C:\myimages\, and assign it security permissions to match those of your web root.

You may also find Server.MapPath() function useful for mapping to the physical directory.

LaxLoafer 71 Posting Whiz in Training

Providing alternative content for non-Flash enabled browsers is good idea, as JM has suggested.

Here are a couple of scenarios that might cause problems...

  • Apple recently killed off support for Flash on their mobile devices. How likely is it someone will want to visit your site using an iPhone?

  • Most search engines have trouble "seeing" Flash content, or are partially sighted at best. Unsure what's best practice here, but you can expect to find ways of helping search engines understand Flash content, if indexing is important to you.

LaxLoafer 71 Posting Whiz in Training

To disable the submit button in JavaScript try something like...

document.getElementById("mySubmit").disabled = true;

...where 'mySubmit' is an ID assigned to your input element...

<input id="mySubmit" type="submit" value="Submit" />

Further info here... http://www.w3schools.com/jsref/prop_submit_disabled.asp

LaxLoafer 71 Posting Whiz in Training

Download it from Microsoft's website and it should be fine.

How safe will it be...

No more dangerous than running Windows XP.

LaxLoafer 71 Posting Whiz in Training

I wanna use that for best results for my search engine.

Do you mean, like Bing? http://googleblog.blogspot.com/2011/02/microsofts-bing-uses-google-search.html :-)

Seriously though, search aggregators are nothing new. DuckDuckGo and others have been scraping / improving search rankings for some considerable time and apparently able to do this.

But for a definitive answer, I'd suggest checking Google's Terms and Conditions.

LaxLoafer 71 Posting Whiz in Training

They're called Sitelinks...

Google decides which of your URLs are eligible, and when they show.

It's not possible to specify links should appear, AFAIK. However, if you wish to prevent certain links from appearing, Google Webmaster Tools will enable you to this.

LaxLoafer 71 Posting Whiz in Training

One thought...

The canonical attribute should be used to specify a preferred version of a page with identical content. See: About rel="canonical", heading "Must the content on a set of pages be similar to the content on the canonical version?"
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394

Could it be that Google is not recognizing the permalink and full article as identical content?

I found a permalink and its full article both in Google's cache. You can see this with the following query:
site:www.daniweb.com/web-development/php/code/387843/php-thumbnailer OR site:http://www.daniweb.com/posts/jump/1671625

Viewing the cached pages (with styles disabled), the HTML body content looks almost identical.

A wild guess...

Is it possible something in the HTML header is causing a problem, the meta description perhaps?

LaxLoafer 71 Posting Whiz in Training

Maharjun,

What you're talking about sounds like free space consolidation. Whole files can be moved adjacent to each other, thus maximizing the contiguous free space. The advantage of this is realized when a file is written to disk, i.e. the file will be laid down in a contiguous block of clusters.

A cluster is the smallest unit of memory that can be allocated from a partition, typically 4096 bytes for a Windows NTFS partition. Files larger than the minimum allocation unit must be stored across multiple clusters. When a file cannot be stored in a contiguous block of clusters, it becomes fragmented. But I'm sure you knew that already :-)

Defragmenting a file can improve read performance. Windows defrag is adequate for this task.

Folders cannot be defragmented. However, the file(s) that contain folder information can.

Exactly what advantages third-party defragmentation tools offer above Windows defrag is unclear to me. I personally have never needed to use them. If you wish to optimize read performance, there are other things you can try.

LaxLoafer 71 Posting Whiz in Training

Hi Feblioz

It's not immediately obvious what's wrong.

However, there are quite a few errors in you code that perhaps you need to correct first...

  • Your 'a' tags are not properly closed
  • Left and Right are not valid elements for HTML
  • The stylesheet might not be applied in quite the way you expect, e.g. consider "#threeCols left, #threeCols centre {", instead of "threeCols left, center {".

Did you create the code in notepad? You may find it easier to work in a dedicated HTML editor with support for HTML and CSS validation.

LaxLoafer 71 Posting Whiz in Training

ContactaCall,

The script you were provided configures a proxy though which you can connect to the Internet while at the bank. It's of no use to you at home. It's surprising you weren't provided with a script to disable the configuration.

In order to disable the proxy, it should be sufficient to merely set the ProxyEnable key to zero. You can achieve this by using the 'regedit' utility, navigating to 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings'. Double click ProxyEnable and change the value to 0.

Important: Serious problems can arise if the registry is edited incorrectly. If you have any concerns about what you are doing, back up the registry first or create a system restore point. See Microsoft's site for details: Backup up the registry

The following script will also disable the proxy. Just copy the contents into a plain text file and save, change the file extension to '.reg', then double-click to run.

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable"=dword:00000000
LaxLoafer 71 Posting Whiz in Training

... when i tried to change the permissions i get "access is denied"

If you're unable to change permissions as an administrator, you possibly need to take ownership of the folder first.

Folder properties > Security tab > Advanced > Owner tab > Edit...

LaxLoafer 71 Posting Whiz in Training

Too lazy to be an evil genius.

LaxLoafer 71 Posting Whiz in Training

Generally speaking, in order to create a user account with administrative privileges, you'll need to work from an account with administrative privilages. Otherwise there'd be no security if any account could create an administrative account.

Could you not ask the person who set the root password to create an administrative account for you? Have you tried the default root password?

LaxLoafer 71 Posting Whiz in Training

XML has it's uses, even as a simple database.

One advantage is that an XML file is generally easier to fix than a corrupt database.

The format is also platform independent, so sould you later decide to switch from Apache to IIS, or Windows to Linux, you can use the exact same file.

From a security perspective, XML is a plain text format. Anyone with read access will be able to view the file contents. If you don't wish to make the file publicly visible, apply security permissions. Best to avoid placing it in your public HTML folder ;-)

LaxLoafer 71 Posting Whiz in Training

Tis a long time since I've coded any Python, so you may find the help of others more useful. But to get you started in the right direction, you'll likely need to...

Use sys.argv to obtain the command line parameters, as documented here:
http://docs.python.org/library/sys.html?highlight=sys.argv#sys.argv

Read in the file, see section "7.2 Reading and Writing Files":
http://docs.python.org/tutorial/inputoutput.html#reading-and-writing-files

Loop through each character, see "4.2. for Statements":
http://docs.python.org/tutorial/controlflow.html#for-statements

Use a dictionary object to store the frequency of characters, see "5.8. Mapping Types - dict":
http://docs.python.org/library/stdtypes.html#mapping-types-dict

The rest you should be able to figure out, assuming you're already familiar with "hello world" ;-)

There's some reading to do here of the documentation, but not too much. Programming is often like that. Hope this gets you started.

TrustyTony commented: correct kind of advice +12
LaxLoafer 71 Posting Whiz in Training

jcarbillon, Google Analytics isn't a useful security tool. The data is anonymised, so you can't easily identify individual users. And it depends on javascript, and tracking code being installed. So, detecting suspicious behavior is not generally possible.

missc, You may be interested in the Open Web Application Project (OWASP). This is a useful resource. It details various security risks and how to mitigate them.

To become proficient at securing sites can take time and effort. There's a lot of knowledge you'll need to acquire. The best place to start is OWASP's top ten, which highlights the most common and dangerous threats, the ones you should focus on first.

LaxLoafer 71 Posting Whiz in Training

aFg3,

The hostname used by the ASP.NET web development server is 'localhost' by default, not 'www.localhost.com'. So, try specifying the URL as...

http://localhost:xxxx/

... and replace 'xxxx' with the port number that was assigned when you started the web dev server.

The port information is normally displayed when a web project is run in MS dev (hit F5). If you missed it, locate the web dev server's icon in the task tray and right-click on it. Alternatively, you can find it by right-clicking on the website icon in the solutions explorer in Visual Studio, and select the Properties Window.

Is the web dev server running? Open up task manager and look for WebDev.WebServer20.EXE or similar under the Processes tab. If it's not, you might need to check your project start up settings.

LaxLoafer 71 Posting Whiz in Training

Firstly, apologies for my lack of knowledge about Android. It sounds like an excellent OS, but I just can't bring myself to dispose of a working 2G phone. It's like a faithful old pet that you know is on it's last legs.

Anyway, applying a theme that turns one browser into another doesn't sound quite right to me...

Certainly, both Chrome and Android share the same HTML rendering engine, WebKit. Android also makes use of Chrome's excellent JavaScript engine. And why not - it seems to be the fastest one around at the moment. But does that really make the two browsers the same? I suspect there may be more to it than that.

It might be interesting to know what the memory footprint of each browser is, rather than saying this browser or that is a memory hog. I'd do this myself, but I'd have to uninstall all my plug-ins, for which I'm too lazy!

LaxLoafer 71 Posting Whiz in Training

cwarn23,

Thanks for your link. Is it an app or just a theme?

Anyway, will this app help me install 24 GB into a 32-bit system, so I can surf the net with Internet Explorer?

I wonder if there's been a misunderstanding somewhere? ;)

LaxLoafer 71 Posting Whiz in Training

And you can always buy more memory...

While it's true RAM is cheap as chips, installing 24 GB isn't an option for everyone. What about netbook users, or desktop users with 32-bit systems? :icon_rolleyes:

FireFox seems to work fine on my Intel Atom N450 powered netbook, with 1 GB or memory. Anyone tried Chrome or Opera on a netbook?

LaxLoafer 71 Posting Whiz in Training

A list of processors and the sockets they use can be found here on wikipedia...
http://en.wikipedia.org/wiki/CPU_socket

LaxLoafer 71 Posting Whiz in Training

... Are there any compatiblity issues that I need to be concerned with?

The CPU sockets used by Pentium IIs are very different. I'm afraid they're not compatible at all.

If you're keen to sacrifice another processor, take a look on eBay or similar. You should find there are Pentium E2160s to be had for 20 USD or less;-)

Other CPUs that use socket LGA775 may also work, but you'll want to check they're supported by your motherboard. Can your motherboard's front side bus (FSB) and clock frequencies match the requirements of the CPU?