Blog Archives

android app cannot connect to internet

To allow your custom app to connect to the internet, add the following in your AndroidManifest.xml file right before (outside) the application tag.

<uses-permission android:name="android.permission.INTERNET" />

JQuery Grid Themes

Useful links to JQuery grids utilizing (mostly) standard UI themes and/or very little code.

Google!
http://jquery-ui.googlecode.com/svn/branches/labs/grid/tests/static/grid/default.html

Datatables.Net:
http://www.datatables.net/styling/themes/smoothness

Ke-Cai:
http://www.ke-cai.net/2010/01/theme-your-table-with-jquery-ui.html

Trirand:
http://www.trirand.com/blog/jqgrid/jqgrid.html

Stackoverflow:
http://stackoverflow.com/questions/2613632/jquery-ui-themes-and-html-tables

Advertisement

JQuery and Partial Postbacks

I recently came across an issue where JQuery bindings no longer functioned after a partial postback and stumbled upon some code that was helpful in most cases.

Javascript (JQuery):

Sys.Application.add_load(startJQuery); 

startJQuery() { 
//do JQ here
}

And alternatively..

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(){});

This code will not always work however, as was the case in my particular scenario, so I resolved using an alternate method.

RegisterStartupScript is great functionality, and can be useful for loading javascript dynamically on an as-needed basis.

The example below, based on prior code selects the correct JS file to use, then loads it using the registerstartupscript function. This is all within a code block which calls an update panel

C#:


int scriptnumber = 1;
string FilePath = String.Format("~/Scripts/Script_{0}.js",scriptnumber.ToString());
System.IO.StreamReader sr = new System.IO.StreamReader(HttpContext.Current.Server.MapPath(FilePath));
            jqueryfileoutput = sr.ReadToEnd();

            upnlBodyContent.Update();

            ScriptManager.RegisterStartupScript(this, this.GetType(), "scriptname",
                "<script type=\"text/javascript\">" + jqueryfileoutput.ToString().Trim() + "</script>", false);

Net Neutrality

Tron Legacy Freedom of Information

Tron Legacy Freedom of Information

With the recent release this winter of the movie Tron: Legacy, I only saw it fitting to contrast some of the conflicting nature in the “Net Neutrality” bill that was recently passed by the FCC with the themes prevalent in Tron on the “freedom of information”.

Ironic, that a theme which the movie shares with its’ predecessor (the original Tron), decades before, would still be relevant today.

I don’t typically lean to only one side, and this recent bill, like many others has it’s pros and cons.

On the positive side, providers won’t be able to restrict access based solely on the context of content provided – such as a political and ethical debate like this one :). The premise of restriction in this case requires the content to conflict with legal standards before removal or limited access can be justified.

This differs based on the connection type (wired or wireless), but the realm of these two is likely to gradually converge.

On a negative note, the bill is contradictory. It does feasibly allow providers to restrict access to, or remove, content that is not paid for separately as a premium service. Therefore, visiting a site where you are receiving a free service (such as YouTube) may cost you more monthly since the provider can justify that your bandwidth usage is higher for this service (such as streaming video content).

This opens up the door for the provider to create and/or advertise services which compete with free ones, with the goal of profiting more at the consumer expense.

Although this profiteering aspect of the bill isn’t formally legislated, the legalities of the bill are vague enough in this case that they are open for interpretation by the providers.. In my opinion, this should have been more specific to regulate this type of monopolistic behavior.

Unfortunately, consumers cannot necessarily do anything about it. You can choose not to pay the providers at all, but if you do this you’re sacrificing other services which might be an essential part of your life. The internet in general is practically a necessity if you want to be successful in modern day America.

The solution? DIY LAN’s and WAN’s. 🙂

There are many small wireless networks now, and with not too much technical effort, these can easily be linked and bridged together. With a simple high amplified antenna (such as the cantenna for $40) you can bridge a wireless network with someone else very far away. Bridge a few of these networks together, and now you have a WAN.

The internet originally evolved from a series of WANs as well as funding by ARPA. Hopefully ACTUAL net neutrality – keeping the freedom of the internet – can be realized by this bill and others that may follow. However, if there is a dualist effect, allowing corporations to profit by other “freedoms” built into these bills, then we may find ourselves creating our own networks. Either way, I strongly believe the flow of information can be redirected, but never cut off.

References:
SaveTheInternet, http://www.savetheinternet.com/net-neutrality-101
Google, http://googlepublicpolicy.blogspot.com/search/label/Net%20Neutrality
Fox News, http://www.foxnews.com/scitech/2010/12/21/need-care-net-neutrality/
NY Times, http://www.nytimes.com/2010/12/21/business/media/21fcc.html
IMDB, http://www.imdb.com/title/tt0084827/, http://www.imdb.com/title/tt1104001/
Cantenna, http://www.cantenna.com/

Thoughts on Wikileaks

Prior to the recent major events surrounding the release of 250k classified documents by Wikileaks on Julian Assange authority, I had browsed Wikileaks and discovered rarely any information that provided anything more than “tabloid style” unverified references as proof of their authenticity.

With the release of these recent government documents, based on the international reaction, it is now clear at least some, if not all of these documents are in fact valid and not tabloids or conspiracy theories after all.

Assange has made many statements regarding his reasons behind releasing these documents, but overall, in my opinion, the manner in which these documents have been released is of malicious intent, and if “free speech” and “free information” was the goal, the information should have been made available in timed released spurts in accordance with government and/or traditional press.

Aside from the implications of the content released, this establishes a dangerous precedence in which other groups of mass whistle-blowers and spies may attempt to leak sensitive information. This is already apparent with the recent launch of a similar site – “Indo Leaks”.

The question that poses itself now is how the government should handle the situation both locally and internationally; not just with the WikiLeaks situation, but also with proposed policies on future international electronic leaks of similar nature.

Ultimately, the way Assange is handled may be the determining factor in these policies, but the procedures that dictate justice in this instance are complex and not necessarily straight forward. I’m sure many minds with legal experience greater than mine will speculate on this, but aside from humanist values to consider, there are also technological factors which should go under careful and thorough investigation to avoid accidentally implementing regulations that could impact technological growth.

As the internet fades the lines between nations there will be many difficulties to face, as a nation and as an individual. With every technology, there is potential misuse and regulation. However, we should use our behavior historically as a civilization to remember that extreme regulation on technology only limits growth.