Showing headlines posted by shantzg001

« Previous ( 1 2 3 ... 4 ) Next »

Android Dialog Errors & Solutions: Bad Token Exception

  • Shantanu’s Technophilic Musings (Posted by shantzg001 on Jul 9, 2010 5:43 AM EDT)
  • Story Type: Tutorial
If you are creating a custom Dialog for Android, and following the Android Developers’ Creating Dialogs tutorial, then most likely you would have faced a Force Close with an exception showing up in logcat. I did too. Although I figured it out quickly, it might not be easy to find out for many, so posting the solution for reference

Android vs iPhone: Comparison of Security Models

  • Shantanu’s Technophilic Musings (Posted by shantzg001 on Jun 28, 2010 2:50 PM EDT)
  • Story Type: Reviews
Android and iPhone OS (iOS) have been at loggerheads for quite some time now and recently there has been a lot of talk about which is more secure or which has more malware. This is a take on which has a better security model to protect its users. It will give a point by point detailed account of which platform does what "kind" of security better.

How To Debug Android Widgets

  • tech.shantanugoel.com (Posted by shantzg001 on Jun 14, 2010 5:11 PM EDT)
  • Story Type: Tutorial
For most new android app developers (like me), it is a bit puzzling how to debug the android widgets or how to put a breakpoint in an android widget code. It seems a bit tricky because there is no activity to be launched, so eclipse just syncs your widget’s apk and installs it and that’s it. So, is it possible or not to debug widget code? and if yes, then is it very difficult? Fortunately, it is possible and very easy to do but just slightly less intuitive.

Android Froyo And Nexus One: Everything We Know

This is an effort mainly concentrated towards listing the features/fixes that we have seen in Froyo that weren’t announced in Google I/O, announced things that work with nexus one, things that don’t and possible fixes/workarounds known, what the announced features actually feel like in real use etc. Will keep updating this post as I get more info, get more fixes, etc.

Weird Usage Of “select” in perl

  • Safer Code; By Shantanu (Posted by shantzg001 on Feb 17, 2010 2:36 AM EDT)
  • Story Type: Tutorial
Many times while going through some perl code, you must have come across snippets like “select((select(fh), $|=1)[0])” and wondered what this means, even though you might know that: * $|=1 is used for setting autoflush (i.e. unbuffered data output) and that * select is used to set the default output to a given file handle instead of STDOUT

Real Time Data Plotting with GnuPlot

  • Shantanu’s Technophilic Musings; By Shantanu Goel (Posted by shantzg001 on Feb 3, 2010 5:18 PM EDT)
  • Story Type: Tutorial
I wrote this script a few days ago to plot real-time / streaming data with gnuplot. The motivation was that I needed to test a piece of code for a touchscreen driver that I had written at work. The issue was that the UI wasn’t quite ready yet, so I wanted to test just the driver to be working fine. Now, the very first thought for the software to use that came to me was “gnuplot” but I found that it can’t really do this in an easy way. A colleague suggested me to use “replot” command with gnuplot. I whipped out my perl hat and a few hours later, voila!!

Booting and networking problems in Kubuntu Karmic 9.10

  • Shantanu's Technophilic Musings (Posted by shantzg001 on Dec 8, 2009 8:04 AM EDT)
  • Groups: Linux, Ubuntu
I thought of trying out Kubuntu (KDE based) this time as I had heard that its doing a lot of interesting things (Akonadi/Nepomuk etc) and that with 4.3.1 it is stable as well. The installation went fine, all over within less than half an hour and then the problems started. Here are the 2 main issues that I faced along with their solutions, in the hope that if someone else runs into same issues does not have to waste time (and hair) on it.

Why You Should Not Upgrade to Ubuntu Jaunty

Right now you are in a soup if you have a slightly older ATi Card and it seems to me that this is going to remain this way unless someone figures out how to backport x.org 1.5 onto Jaunty, which is going to be a hell of a task

Good Shutdown Script For Linux Based Router Asus WL-500W

  • Shantanu’s Technophilic Musings; By Shantanu Goel (Posted by shantzg001 on Mar 22, 2009 9:58 PM EDT)
  • Story Type: Tutorial; Groups: Linux
If you have an Asus WL-500W, the DIYers’ favourite wireless router, and have installed the Oleg custom firmware on it, then you would have set up a shutdown script for it. This is especially important if you have a USB hard disk attached to it. There are many such scripts available in Oleg’s firmware that you can tweak. The one that we are going to talk about today is named “pre-shutdown” and it is exceuted just before the router is about to shutdown and we'll see an example that will allow us to shut it down gracefully.

Using Enum Pattern in Java < 1.5

  • safercode.com; By Amit Goel (Posted by shantzg001 on Mar 22, 2009 5:12 PM EDT)
  • Story Type: Tutorial
Now to begin with, let’s first understand how to evaluate the performance of java code and protect the java code from tainted objects. We’ve already talked about Tainted Object Propagation in my previous post in context with databases. now, it is in context with application code. I’ll explain this with an example of enum pattern.

Secure Programming: Tainted Object Propagation

  • safercode.com; By Amit Goel (Posted by shantzg001 on Mar 11, 2009 2:59 PM EDT)
  • Story Type: Tutorial
Tainted Object Propagation is the term defined for using incorrect or invalid inputs to get more than required information from the system and in some cases, taking control of the system. Although this technique is much widely used to misuse web applications and database oriented applications, but this holds true for any API publisher who exposes his API’s to third party application writers.

Secure Access To Your DSL Modem’s Telnet through ssh

  • Shantanu’s Technophilic Musings; By Shantanu Goel (Posted by shantzg001 on Mar 11, 2009 9:00 AM EDT)
  • Story Type: Tutorial
One thing common among all these modems is that they do not provide secure access like Secure Shell (ssh) as all they provide is ftp/telnet/http etc which are all clear text protocols. Hence, it is a huge security risk to expose these interfaces to the internet and then access them from outside.

Unsafe Functions In C And Their Safer Replacements: Strings Part II

  • safercode.com; By Shantanu Goel (Posted by shantzg001 on Mar 3, 2009 6:09 AM EDT)
  • Story Type: Tutorial
Last time, we advised you to use ditch the unsafe functions like strcpy and strcat, and use their safer replacements (strlcpy, strlcat) instead. However, there is a small problem with this that you might discover that your compiler (especially gcc) does not have these functions in their implementation of the c library (libc).

Generic Function Pointers In C And Void *

  • safercode.com; By Shantanu Goel (Posted by shantzg001 on Feb 22, 2009 9:04 PM EDT)
  • Story Type: Tutorial
Many times people ask me about what keyword type they should use to declare a generic function pointer in C, or worse still, they don’t ask and steam ahead using “void *”. Well, C does not have a generic function pointer type but it does have a generic function pointer. We’ll see why void * cannot be used to denote generic function pointers and so how we can declare them

Project Shantz XWinWrap Updated to version 0.3

  • Shantanu’s Technophilic Musings; By Shantanu Goel (Posted by shantzg001 on Feb 18, 2009 11:21 PM EDT)
  • Story Type: Announcements; Groups: Linux
Here is another update for the fans of XWinWrap, the tiny program that allows you to run animated wallpapers on your system. You could use screensavers, movies and what not as your desktop background.

Validating Untrusted String Inputs

  • safercode.com; By Amit Goel (Posted by shantzg001 on Feb 18, 2009 3:52 PM EDT)
  • Story Type: Tutorial
If you have written a program to take in multiple lines of strings as an input from the user, you need to make sure that the input is not tainted. It is clean and as per your expectations.

Alternatives for Unsafe Strings Functions in C

  • safercode.com; By Shantanu Goel (Posted by shantzg001 on Feb 15, 2009 6:37 AM EDT)
  • Story Type: Tutorial
A string is a fundamental part of programs all around us. Data exchange in many forms happens in strings (e.g. user input, command line arguments, web forms, text protocols and what not.) But most programs written in C are plagued by security issues because of their usage of unsafe functions.

[Ubuntu TIP] Solved: Totem Cannot Detect UPnP Media Server

  • Shantanu’s Technophilic Musings; By Shantanu Goel (Posted by shantzg001 on Feb 8, 2009 5:41 PM EDT)
  • Groups: Linux, Ubuntu
A UPnP media server can serve your media files (video / audio / pictures) over the network to any compatible player. In linux, few players can play media off these servers natively, but many require a plugin / library called “coherence”. This works, BUT you will see that many times Totem will stop detecting the server suddenly.

Optimizing Switch-Case Statements In C For Speed

  • Safer Code; By Shantanu Goel (Posted by shantzg001 on Feb 1, 2009 7:19 AM EDT)
  • Story Type: Tutorial
The biggest bottlenecks in making efficient code today are jumps or branches. You must have always heard of people telling you to use switch-case blocks instead of cascading if-else’es. They were right, but partially.

How to find the shell you are using

  • Shantanu’s Technophilic Musings; By Shantanu Goel (Posted by shantzg001 on Feb 1, 2009 4:28 AM EDT)
  • Story Type: Tutorial; Groups: Linux
Many times you might not be sure about which shell you are currently using. Especially if you are not on your system and logging into someone else’s, or maybe ssh’ing into a remote server. Worry not, because here are few simple commands that you can use to find out which shell you are using currently.

« Previous ( 1 2 3 ... 4 ) Next »