Monthly Archives: January 2010

PHPHOST BLOG

Web Hosting Related Articles You May Need

Prevent a ScrollViewer’s Vertical ScrollBar to be displayed

A ScrollViewer is a container that can display content that is larger than the ScrollViewer itself. However by default the Scroll Viewer displays a Vertical Scrollbar even if the the content falls within the dimension of the ScrollViewer

<Canvas x:Name="can">
<
ScrollViewer Width="200" Height="200"
Canvas.Left="30" Canvas.Top="30">
<
TextBlock Text="Lorem Ipsum Lorem">
</
TextBlock>
</
ScrollViewer>
</
Canvas>

image

In order to prevent a vertical scrollbar to be displayed, just set the VerticalScrollBarVisibility property to Auto

<Canvas x:Name="can">
<
ScrollViewer Width="200" Height="200"
Canvas.Left="30" Canvas.Top="30"
VerticalScrollBarVisibility="Auto">
<
TextBlock Text="Lorem Ipsum Lorem">
</
TextBlock>
</
ScrollViewer>
</
Canvas>

The Vertical ScrollBar does not appear now.

image

Continue reading

Posted in Silverlight, Syndicated | Comments Off on Prevent a ScrollViewer’s Vertical ScrollBar to be displayed

Groovy and SQL*Plus

Oracle’s SQL*Plus is not as user-friendly as SQL Developer or JDeveloper for manipulating data in an Oracle database, but it is still commonly used. In fact, SQL*Plus is often preferred to the tools with fancier user interfaces for quick and dirty man… Continue reading

Posted in Groovy, Oracle, Syndicated | Comments Off on Groovy and SQL*Plus

My Personal Blog Policies

The recent posting of the The Oracle Social Media Participation Policy on Justin Kestelyn’s (Oracle Technology Network Editor in Chief) blog has caused me to reevaluate my own personal and previously unwritten policies that affect how and what I write … Continue reading

Posted in Blogging, General Development, Syndicated | Comments Off on My Personal Blog Policies

Thank You (2009 Edition)

Before January slips away from me, I want to get my annual Thank You post out! Thanks to TheDoc (our resident prolific forums guru) for reminding me.Milestones Snippets Launched The biggest addition to this site in 2009 was the snippets area. It has been a popular resource which makes me happy since that’s the reason this site […] Continue reading

Posted in Article, Syndicated | Comments Off on Thank You (2009 Edition)

Adding all TextBox values to a Hidden field using jQuery

I was recently asked on one of the ASP.NET forums how to store all the values of every text box in a hidden field using JavaScript. I immediately said use jQuery! And this is what I came up with:

<html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server">
<
title></title>
<
script src="http://code.jquery.com/jquery-latest.js"
language="javascript" type="text/javascript"></script>
<
script language="javascript" type="text/javascript">
$(function() {
$("#Button1").click(function(event) {
var data = [];
var form = $("form :input[type=text]");
$.each(form, function(e, textBox) {
data.push($.trim(textBox.value));
});
$("#HiddenAddressData").val(data.join(" "));
});
});
</script>

</
head>
<
body>
<
form>
<
input id="Address1" type="text" /><br />
<
input id="Address2" type="text" /><br />
<
input id="State" type="text" /><br />
<
input id="Zip" type="text" /><br />
<
input id="Button1" type="button" value="button" />
<
input id="HiddenAddressData" type="hidden" />
</
form>
</
body>
</
html>

What I’m doing is looping through each form element and adding it to my JavaScript array:

var data = [];
var form = $("form :input[type=text]");
$.each(form, function(e, textBox) {
data.push($.trim(textBox.value));
});

Then I join all the element of the array into a single value that is copied to the hidden field:

$("#HiddenAddressData").val(data.join(" "));

Nice and simple.

Continue reading

Posted in jQuery, Syndicated | Comments Off on Adding all TextBox values to a Hidden field using jQuery

Seriously: Where Is The Link Between Copyright Infringement And Terrorism/Organized Crime

Over the past few years, the entertainment industry has been pushing hard on the claim that copyright infringement and organized crime (or terrorism) are somehow connected. It’s a regular talking point and is often brought up in discussions about ACTA. And yet, where is this supposed link? Glynn Moody discusses what a bogus concept it is, and why a new EU report is massively discredited in simply taking the claim at face value:


I’ve noted several times an increasingly popular trope of the intellectual monopolists: since counterfeiting is often linked with organised crime, and because counterfeiting and copyright infringement are vaguely similar, it follows as surely as night follows day that copyright infringement is linked with organised crime.

But, of course, that’s not the case. In fact, those who traffic in things like counterfeit DVDs are discovering that unauthorized access to online files is actually harming the counterfeit DVD business that organized crime has used in the past. Based on the logic put forth by the entertainment industry, shouldn’t we cheer on The Pirate Bay for putting DVD counterfeiters (and thus, organized criminals and terrorists) out of business?

Moody goes on to challenge the idea that copyright infringement leads to people being put in harm’s way:


*Counterfeiting* can certainly be a threat to consumer health and safety, and needs to be combated vigorously, but the idea that copyright infringement might be is simply risible, and it’s an insult to our intelligence even to suggest it.

Indeed. This is a problem. So, let’s start calling the industry on this. Can they show any actual evidence that basic online copyright infringement is in any way linked to organized crime or terrorism?

Permalink | Comments | Email This Story


Continue reading

Posted in Syndicated | Comments Off on Seriously: Where Is The Link Between Copyright Infringement And Terrorism/Organized Crime

New Data Shows No Decrease In Crashes After Driving While Yakking Laws Were Implemented

We’ve been suspicious of whether or not “driving while yakking” laws actually do any good. There are already laws against reckless driving, and picking out specific driving distractions doesn’t seem likely to change things, since people just switch to other distractions. A study back in 2006 found that driving while yakking laws don’t make the roads any safer, and a brand new study has apparently surprised researchers in showing no impact whatsoever on crash data even as studies show that fewer people are holding phones to their ears while driving (thanks Chirag). Now, there could be plenty of reasons for this — such as that people are just switching to ear pieces which can be just as dangerous. Or it could be that common claims about driving while yakking leading to more accidents are wrong. Or it could be more complex, with other variables having an impact, but which is hidden in the data. Either way, it certainly seems worth investigating more seriously. If the goal is better road safety, then we should make sure that the laws actually lead to that result. If they don’t, then it’s important to understand why not.

Permalink | Comments | Email This Story


Continue reading

Posted in Syndicated | Comments Off on New Data Shows No Decrease In Crashes After Driving While Yakking Laws Were Implemented

Mozilla releases first mobile Firefox browser

Just two days ago Mozilla pushed out the third release candidate for its first mobile Firefox browser. On Friday, Firefox 1.0 for Nokia’s Maemo arrived.

Originally posted at The Download Blog

Continue reading

Posted in Syndicated | Comments Off on Mozilla releases first mobile Firefox browser

Econ 101: Study Shows That If Record Labels Lowered Prices On Music, They Would Sell A Lot More

Having talked with a bunch of music execs recently, as well as a few different companies that do analytics in the music space, one thing became clear: unlike most other industries, record label execs tend not to be particularly data or analytics-driven. Let’s just say they didn’t get into the recording industry because they were good at math. There are a few exceptions, obviously, but getting many industry execs to think logically and examine data isn’t particularly easy. This isn’t that surprising, given how many examples of actions by big record label execs that make little to no sense when thought about analytically.

Yet another study has come out suggesting that the industry has pricing all wrong, pointing out that the increase in sales from dropping the price of music would increase profits. And yet what has the industry been trying to do? That’s right: trying to raise the price. The study suggested that the “optimal” price for music might be closer to $0.60 per track. That still seems way too high to me when you look at how people flocked to services like Allofmp3.com, but in general I think the basic concept makes sense. You can maximize revenue by dropping prices, but it doesn’t seem like many record industry execs have realized that.

Permalink | Comments | Email This Story


Continue reading

Posted in Syndicated | Comments Off on Econ 101: Study Shows That If Record Labels Lowered Prices On Music, They Would Sell A Lot More

Chrome 5 debuts more settings options

Google updated its Chrome browser’s developer’s builds to version 5 for Windows and Mac today, the first time any version of Chrome has reached that milestone.

Originally posted at The Download Blog

Continue reading

Posted in Syndicated | Comments Off on Chrome 5 debuts more settings options