Secure MYSQL tables from inappropriate access

I have a consumer application (C#) and am so lost on security that I need suggestions even on what to google and start learning with regards to this problem. Basically I have a application that multiple users access a database. The database is struct

How to trackToken facebook in many activities

Let us say we have 2 activities A and B. A is mainactivity which logins to facebook and also tracks the access token using AccessTokenTracker class. According to documentation, system should stop tracking token in onDestroy() method of activity A. Pr

Testing the Android app on a real phone

I am running into countless problems with the emulators of different versions. Sometimes it loads, othertimes it hangs, I've tried reinstalling the SDK and platforms etc. Even though I've a reasonably a high-end machine, when I manage to get it worki

Unable to run Android project in Eclipse despite errors

When I try to run my Android project(which was working fine yesterday) I get the "Your project contains errors, please fix them before running your application" dialog. But my project has no errors. I've had this problem before, and the solution

Call the properties / methods on the Piped object

I am trying to understand how to pipe | an object and call the properties or methods on that. Ex: $a = Get-Item Registry::HKLM\SOFTWARE\WOW6432Node\Microsoft\Test\abc\ $a.GetSomething() //calls the method (Get-Item Registry::HKLM\SOFTWARE\WOW6432Node

Update php serialize table value in database

So we have historic logs in a database that contain old user data. We don't want to delete the logs but rather just *** out some of the data that is in there. Its stored in MySQL in a field as an array that has been serialized. a:1:{s:4:"Test";s

Multiple forms submitted with a single view - Django

I have two ModelForms submitting from a single view. One model is a ForeignKey of another. At this point, the form will add to the DB, but not as expected. Instead of adding a Course and a Section (with course field populated with the newly-created C

How to send a string with multiple lines from the command line

I have a noob question, but i can't figure it out. I want to send from command line a string with multiple lines separated by '\n' public class Test { public static void main(String args[]){ System.out.println(args[0]); } } And I run with java -jar t

Awk from a file

How do I use awk in a bash file? I know how to do this on the command line with awk `{...}` But how do I do place this in a bash file. This is what I'm doing right now awk Begin { ... } { ... } END { ... } What am I missing from the syntax?Just add i

Classify a single instance in Weka

I trained and created a J48 model using WEKA gui. I saved the model file to my computer and now I would like to use it to classify a single instance in my Java code. I would like to get a prediction for the attribute "cluster". What I do is the

Temporary file trying to save to a non-existent location

I am having issues with the below module. Well, my colleagues are and I don't know how to resolve. When I run the sub myself, it works fine, but some of my colleagues are getting an error. It looks as though it's trying to save the temp file to a fol

Sound of Suckerfish Menu problem IE6

My menu dropdowns are 'hiding' behind content that appear below the dropdowns. The menu is working fine in Firefox, Opera, Safari, IE8, but not in IE6. An example of this is on this page - , if you h

How to load a html template in $ range?

I'm trying to populate an ion-content container. I want to load HTML into the $scope depending on which tab the user clicks: <ion-tabs tabs-type="tabs-icon-only"> <ion-tab ...> <ion-tab title="Create" icon-on="ion-a

Displaying continuity lines in Emacs in a text terminal

I'm using Debian sid with X installed. Emacs launched as a GUI shows the small bent arrows on the right margin indicating continuation lines. When I launch Emacs with -nw in text terminal mode, the \ character does not appear in the right margin to i

Java synchronization across objects

I'm trying to make sure I understand the performance implications of synchronized in java. I have a couple of simple classes: public class ClassOne { private ClassTwo classTwo = new ClassTwo(); public synchronized void setClassTwo(int val1, int val2)

The $ .post callback function does not work

i have a form which i want to process through ajax the code goes somrthing like this $(function() { var ck_username = /^[A-Za-z0-9_]{3,20}$/; var ck_email = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6} (?:\.[a-z]{2})?)$/i var ck_