Saturday, 31 August 2013

CSS header with div to left which fills screen

CSS header with div to left which fills screen

Ok so I am trying to make a header div that is centered on the based that
the site
content div is 980px; width
But what I want is that if the screen is bigger on the left there is a Div
that is linked to the header that take the background color of the header
and pulls it to the left side of the users screen while keeping the header
in the center of the page.
my code
html,body{
margin:0;
padding:0;
}
#content,.content{
margin:0 auto;
width: 980 !important;
}
#header-nav{
width:100% !important;
height:60px !important;
padding:0;
margin:20px 0;
}
.nav-left{
height: 55px;
position: absolute;
top: 30px;
z-index: 6;
margin: 0;
padding: 0;
right: 60%;
width: 5000px;
background: #cb0f32;
border: none;
-webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
filter: none;
}
.content{
position:absolute;
top:30px;
left:25%;
z-index: 7;
margin:0 auto;
width:980px !important;
background:#000;
}
HTML Code
<body>
<div id="header-nav">
<div class="nav-left">
</div>
<div id="content" class="content">
<div id="nav-bar">
<p>My Site Title</p>
</div>
</div>
</div>
I know this should be easy but I can't get it to work could anyone please
point me in the right direction
demo of code http://russellharrower.com/home?preview=1

Read from word document line by line

Read from word document line by line


I'm trying to read a word document using C#. I am able to get all text but
I want to be able to read line by line and s*tore in a list and bind to a
gridview*. Currently my code returns a list of one item only with all text
(not line by line as desired). I'm using the Microsoft.Office.Interop.Word
library to read the file. Below is my code till now:
Application word = new Application();
Document doc = new Document();
object fileName = path;
// Define an object to pass to the API for missing parameters
object missing = System.Type.Missing;
doc = word.Documents.Open(ref fileName,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing);
String read = string.Empty;
List<string> data = new List<string>();
foreach (Range tmpRange in doc.StoryRanges)
{
//read += tmpRange.Text + "<br>";
data.Add(tmpRange.Text);
}
((_Document)doc).Close();
((_Application)word).Quit();
GridView1.DataSource = data;
GridView1.DataBind();
Any help would be highly appreciated. Thanks.

Getting Screen Positions of D3 Nodes After Transform

Getting Screen Positions of D3 Nodes After Transform

I'm trying to get the screen position of a node after the layout has been
transformed by d3.behavior.zoom() but I'm not having much luck. How might
I go about getting a node's actual position in the window after
translating and scaling the layout?
mouseOver = function(node) {
screenX = magic(node.x); // Need a magic function to transform node
screenY = magic(node.y); // positions into screen coordinates.
};
Any guidance would be appreciated.

summary table with total whilst controlling for value on one variable?

summary table with total whilst controlling for value on one variable?

I've used function summary(data[data$var1==5,]) to get a summary of
observations while the variable of interest equals 5 (or whatever).
However, I also need a total for a particular var2 as well, and I'm unsure
how to go about coding that in here whilst keeping the variable that I
want controlled at 5 (or whatever).
I'm quite happy writing a second line looking for the total of var2 whilst
controlling var1. Any help would be appreciated, thanks.

how to display elements of json array returned from php within a loop in ajax(jquery)

how to display elements of json array returned from php within a loop in
ajax(jquery)

Below ajax code is receiving a json array from php. Rest details i have
written as comments:
$.ajax({
type: "POST",
url: "dbtryout2_2.php",
data:datastr,
cache: false,
//dataType: 'json',
success: function(arrayphp)
{
//"arrayphp" is receiving the json array from
php.
//below code is working where iam displaying
the array directly
//This code displays the array in raw format.
$(".searchby .searchlist").append(arrayphp);
}
});
But when iam trying to display the elements of the array seperately using
below code ,then it is not working:
$.ajax({
type: "POST",
url: "dbtryout2_2.php",
data:datastr,
dataType: "json",
cache: false,
contentType: "application/json",
success: function(arrayphp)
{
//nothing is getting displayed with this code
$.each(arrayphp,function(i,v){
alert(i+"--"+v);
});
}
});
WOULD ANYBODY FIGURE OUT WAT THE PROBLEM IS WITH MY CODE?

Libgdx Make Lights Ignore Bodies

Libgdx Make Lights Ignore Bodies

I have a libgdx game in the works with Box2d and Box2d Lights.
My questions is how do I get Bodys / Bodydefs to ignore the light source
from a Box2d Light and not cast shadows?
Thanks.

Parsing a Zipped JSON file in PHP without Extracting

Parsing a Zipped JSON file in PHP without Extracting

With help from the guys on Stackoverflow I can now Parse JSON code from a
file and save a 'Value' into a database
However the real file I intend to read from is actually a massive 2GB
file. My web server will not hold this file. However it will hold a ZIPPED
version of it - ie 80MB.
I believe there is a way to PARSE JSON from a ZIPPED file without actually
having to save the 2GB version of the file on my web server only having to
save the ZIPPED 80MB version instead............Can anybody help?
I have found the below function which I believe will do this (I think) but
I don't know how to link it to my code
private function uncompressFile($srcName, $dstName) {
$sfp = gzopen($srcName, "rb");
$fp = fopen($dstName, "w");
while ($string = gzread($sfp, 4096)) {
fwrite($fp, $string, strlen($string));
}
gzclose($sfp);
fclose($fp);
}
My current PHP code is below and works. It reads a basic small file, JSON
decodes it (The JSON is in a series of separate lines hence the need for
FILE_IGNORE_NEW_LINES) and then takes a value and saves to MySQL database.
However I believe I need to somehow combine these two bits of code so I
can read a ZIPPED file without exceeding my 100MB storage on my webserver
$file="CIF_ALL_UPDATE_DAILY_toc-update-sun";
$trains = file($json_filename, FILE_IGNORE_NEW_LINES |
FILE_SKIP_EMPTY_LINES);
foreach ($trains as $train) {
$json=json_decode($train,true);
foreach ($json as $key => $value) {
$input=$value['main_train_uid'];
$q="INSERT INTO railstptest (main_train_uid) VALUES ('$input')";
$r=mysqli_query($mysql_link,$q);
}
}
}
if (is_null($json)) {
die("Json decoding failed with error: ". json_last_error());
}
mysqli_close($mysql_link);
Many Thanks

how to extract data from preg_replace

how to extract data from preg_replace

I wan to be able to get data from a preg_replace function or a str_replace
function. For example i want to convert any string beginning with @. But i
want to extract that string that begins with @ and put it in my database!
So how can i just extract that specific word that begins with @?
Here is my code:
$string = "@james is awespome";
$convert = preg_replace('@','@$1','$string');
mysql_query( insert stuff);i want to be able to insert @james or james in
the database

Friday, 30 August 2013

(2, 'No such file or directory') when trying to open a csv file on Django

(2, 'No such file or directory') when trying to open a csv file on Django

I cannot for the life in me figure out why I keep getting this error. So I
have a django module that is running the following code
c = open('file.csv', 'rb')
reader = csv.reader(c)
rows = []
rownum = 0
for row in reader:
# Skip header
if rownum != 0:
rows.append(row)
rownum += 1
c.close()
return rows
A few things to keep in mind. file.csv is in the same directory as the
python file calling this function. I run this SAME code in the python
interpreter, outside of the django environment and it works beautifully. I
have tried rb and r, both don't work. I don't know why it doesn't work.
Is there something I am missing?
I am using python2.6

Thursday, 29 August 2013

Split array into separate arrays on tab

Split array into separate arrays on tab

I need to split on the tab delimiter for input example: abcdefghi so that
each group is put in a differnt array
is this done using split('\t')?

Is it possible to preserve the default formula fields values in a crystal report?

Is it possible to preserve the default formula fields values in a crystal
report?

I have a crystal report in which I'm trying to dynamically insert an
image. I've managed to make it work on the report itself by adding the
path to the image in the graphic location property and when I preview the
report the picture displayed is the one I intended to display, not the one
I'm using as placeholder.
However, it doesn't seem to work in the application (I get the image I
used as placeholder instead of the one I set the graphic location to).
After exporting the report from the report viewer, I found out that when
the report is displayed, the formula fields used are wiped and the value
I've stored in the Graphic Location of the picture - which is the path to
the image I want to show dynamically - is blank.
In the code of my application, I'm setting the formula field I'm using as
the path of the image I want to display.
Here's the code:
Dim CrReport As New ReportDocument
CrReport = New myReport
CrReport.DataDefinition.FormulaFields.Item("picpath").Text =
"""C:\Picture.jpg"""
CrystalReportViewer1.RefreshReport()
CrReport.Refresh()
picpath is the formula field that holds the path to the picture.
I'm using Crystal Reports XI and Visual Studio 2008.
What I'd like to know is: is it possible to preserve the default values of
the formula fields so that they can be changed programmatically at
runtime?
For example: If the default value I set for a formula field is
"C:\Picture.jpg", when I run the report in the application without
changing this value, it will remain the same.

Wednesday, 28 August 2013

Unpredictable Behaviour of scanf when used for reading input of Char type.

Unpredictable Behaviour of scanf when used for reading input of Char type.

I am learning linked lists, when I use scanf to input a character, the
code compiles fine but at run time it does not ask for input and skips the
scanf statement.
#include<stdio.h>
#include<stdlib.h>
struct node
{
int data;
struct node *ptr;
};
struct node* allocate();
struct node* create();
void display(struct node*);
int main()
{
struct node *new;
new=create();
display(new);
return 0;
}
struct node* allocate()
{
struct node *temp;
temp=(struct node*)malloc(sizeof(struct node));
return temp;
}
struct node* create()
{
struct node *start,*next;
char ch;
start=next=allocate();
printf("Enter data:\n");
scanf("%d",&start->data);
perror("store data");
start->ptr=NULL;
R1: printf("Do you want to enter more data? y or n:: ");
scanf("%c", &ch); //Check for error here
if(ch=='y'||ch=='Y')
{
while(ch=='y'||ch=='Y')
{
next->ptr=allocate();
next=next->ptr;
printf("Enter data:\n");
scanf("%d",&next->data);
next->ptr=NULL;
printf("Do you want to enter more data? y or n:: ");
scanf(" %c",&ch);
}
}
if(ch=='n'||ch=='N')
{
return start;
}
else
{
printf("Please enter correct option.\n");
goto R1;
}
}
void display(struct node* temp)
{
printf("%d\n",temp->data);
while(temp->ptr!=NULL)
{
temp=temp->ptr;
printf("%d\n",temp->data);
}
}
Please Refer to the comment
Check for error here
in the code to know the statement i am referring to.
Now if i add a space before the the format specifier i.e. space before %c
in scanf statement then my code runs fine. .
scanf(" %c",&ch);
I face the same problem when I use getchar instead of scanf
ch=getchar();
when I run my code without using a space before the format specifier in
scanf statement or I use getchar() statement, my program does not ask for
input. It stores nothing in ch. Can anyone please explain me the reason
behind it? why does scanf behave so differently with character data types?
Additional info:
Using GCC
Linux Kernel 3.6.11-4
OS Fedora 16 (64 bit)
intel i5 processor.

checkbox on gridview automatically checked false when orientation changes

checkbox on gridview automatically checked false when orientation changes

Just now i solved my problem havin the checked state of a ToggleButton
turned off automatically when the grid view is scrolled up or down.
Now the other problem is that these are unchecked when the screen
orientation is changed.
Im using adt - eclipse.
For this one i'm using a custom adapter set to a gridview.

Reporting Services Filter Years

Reporting Services Filter Years

I would like to filter the information on a report chart, so it shows the
data since one and a half years ago, until the present month. I already
have a parameter which is chosen by the user to be used as the month of
"today". Now i'm using the filter option in the query designer, but i
would like this to be done in an automatic way.
My Time dimension is structured like this:
in which año is year, mes y month, and these two are grouped.
How can i do this filter in an automatic way, according to the parameter
already chosed by the user?

jQuery checkbox SUM values

jQuery checkbox SUM values

I have problem with my code. It wont SUM all values - Here What is the
problem here?
I have tried all the ways, but it wont display me anything. Thanks.

Validate two dates from and to

Validate two dates from and to

If i have two date time picker like that :
<telerik:RadDateTimePicker ID="dtp_from" runat="server">
<TimePopupButton ImageUrl=""
HoverImageUrl=""></TimePopupButton>
<TimeView CellSpacing="-1" Culture="Arabic
(Egypt)">
</TimeView>
<Calendar UseRowHeadersAsSelectors="False"
UseColumnHeadersAsSelectors="False">
</Calendar>
<DateInput DisplayDateFormat="dd/MM/yyyy"
DateFormat="dd/MM/yyyy" LabelWidth="40%">
</DateInput>
<DatePopupButton ImageUrl=""
HoverImageUrl=""></DatePopupButton>
</telerik:RadDateTimePicker>



<telerik:RadDateTimePicker ID="dtp_to" runat="server">
<TimePopupButton ImageUrl=""
HoverImageUrl=""></TimePopupButton>
<TimeView CellSpacing="-1" Culture="Arabic
(Egypt)">
</TimeView>
<Calendar UseRowHeadersAsSelectors="False"
UseColumnHeadersAsSelectors="False">
</Calendar>
<DateInput DisplayDateFormat="dd/MM/yyyy"
DateFormat="dd/MM/yyyy" LabelWidth="40%">
</DateInput>
<DatePopupButton ImageUrl=""
HoverImageUrl=""></DatePopupButton>
</telerik:RadDateTimePicker>



and i want to validate that :
1- dtp_from > today and dtp_to > dtp_from client side and server side
when i put
<asp:CompareValidator ID="cv_from_date" runat="server" ErrorMessage="*"
ControlToValidate="dtp_to"
Display="Dynamic" Operator="GreaterThanEqual"
Type="Date" ControlToCompare="dtp_from"
ValidationGroup="G1"></asp:CompareValidator>
it doesn't allow me to insert although the the dtp_to > dtp_from !!

Tuesday, 27 August 2013

having error as library not found in xcode [on hold]

having error as library not found in xcode [on hold]

dyld: Library not loaded:
@loader_path/../Frameworks/CorePlot.framework/Versions/A/CorePlot
Referenced from:
/Users/Madhu/Library/Developer/Xcode/DerivedData/IQTest_sample-dgvnkkcaboablifuwpgmmoboeujg/Build/Products/Debug/IQTest_sample.app/Contents/MacOS/IQTest_sample
Reason: image not found
This is the code. Due to this error I can't run my project. so please help
me to remove this error

How to download respeller for resharper via NuGet?

How to download respeller for resharper via NuGet?

Note: I am a hobbyist C# programmer. I have no experience with NuGet (I'm
not entirely sure what it's for).
I have Resharper (6 or 7, I think), and I want to install Respeller Free.
However, there's no download link from that page, just a vague explanation
about using NuGet...
...As always seems to be the case with these command-line things, there's
no actual explanation anywhere on how to do this; just the standard blurb
on why it's so much better...
Anyway, I've tried running this in the NuGet command line:
PM> Get-Package -filter spell -listavailable
But I can't see anything to do with respeller. So... What am I missing?
Google turns up nothing.
Thanks in advance.

button will not fire jquery

button will not fire jquery

javascript- the .remove button will not fire the javascript. I am not sure
whats wrong with this jquery. The add button click function works just
fine.
function formfill(dblist) {
var tableheader = "<thead><tr><th>Database Nick</th><th>Database IP</th>
<th></th></tr></thead>";
$('#table2').empty();
$('#table2').append(tableheader);
$.each(dblist, function (index, item) {
$('#table2').append('<tr><td>'
+ item['DBNick']
+ '</td><td>'
+ item['DBIP']
+ '</td><td><input class="remove" value="remove"
type="button"></input></td> </tr>');
});
}
$('#userlist').on('change', function gettable() {
var selected = $('#userlist').val();
$.ajax({
url: '/php/user/userdbtable.php',
type: 'POST',
data: { user: selected },
success: function (data) {
formfill(data)
},
error: function (xhr, status, err) { console.log(xhr, status, err); }
});
});
$("#add").click(function () {
var userselected = $('#userlist').val();
var dbselected = $('#dblist').val();
$.ajax({
url: '/php/user/userdblistadd.php',
type: 'POST',
data: { user: userselected, db: dbselected },
success: function (data) {
formfill(data)
},
error: function (xhr, status, err) { console.log(xhr, status, err); }
});
});
$(".add").click(function () {
var userselected = $('#userlist').val();
var dbselected = $(this).closest('tr').children('td.one').text().val();
console.log(dbselected);
$.ajax({
url: '/php/user/userdblistremove.php',
type: 'POST',
data: { user: userselected, db: dbselected },
success: function (data) {
formfill(data)
},
error: function (xhr, status, err) { console.log(xhr, status, err); }
});
});
javascript- the .remove button will not fire the javascript. I am not sure
whats wrong with this jquery. The add button click function works just
fine.

Regular expression for double equals

Regular expression for double equals

Anyone have a good regex to match == and != but NOT === and !== (I'm
planning to use it as a simple check on javascript code).
I tried [^=]==[^=] but this fails at the start and end of strings.

created the div in javascript

created the div in javascript

in my project i have something like this in my html :
<div class="row">
<div class="span3">
<div class="dropdown">
<select class="selectpicker btn-success" id="groupe"
data-style="btn-primary">
<option value="">Awaiting data...</option>
</select>
</div>
</div>
</div>
<div class="tabbable ">
<!-- Only required for left/right tabs -->
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1"
data-toggle="tab">Economics</a></li>
<li><a href="#tab2" data-toggle="tab">Physics</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<p>
<div class="row">
<div class="span4">
<div id="reportingContainer" style='width: 300px;
height: 300px;'></div>
</div>
<div class="span8">
<div id="dashboard">
<div id="combochart" style='width: 915px; height:
300px;'></div>
<div id="control" style='width: 915px; height:
50px;'></div>
</div>
</div>
</div>
</p>
</div>
<div class="tab-pane" id="tab2">
<p></p>
</div>
</div>
</div>
i want that we i click in my drop down and i select something, sometimes i
can see only
<div class="tab-pane active" id="tab1">
and sometimes i can see only
<div class="tab-pane" id="tab2">
and sometimes i can see both of them,actually it depends of my database.
how we can say in javascript for created the div ?

converting string to URL in PHP

converting string to URL in PHP

I have a string in php and I want to convert it into a URL,Basically I am
taking input from the user so I am not sure either he write
http://www.google.com or just www.google.com or maybe just google.com, In
either cases I have to show him the URL link in an anchor tag. I am
looking for any PHP function that can do this, Otherwise I have to
manually search for http and other If else condition will surely gonna
waste my time,If there is no function I would be more than happy to write
one and make it open to the community. EDIT: Another thing is the best way
to write HTML in PHP, I mean is it good if we use echo' long HTML Forms'
etc any solution Thanks

Monday, 26 August 2013

How to convert the array to string in singel array

How to convert the array to string in singel array

Below are the result of array
Array
(
[0] => Array
(
[0] => test
[1] => cate
[2] => category
)
)
I want the result to be
$availableTags = ["test","cate","category"];
How to do this in codeigniter php

How to create "svg" object without appending it?

How to create "svg" object without appending it?

Consider the following code:
var svg = d3.select('#somediv').append("svg").attr("width",
w).attr("height", h);
I would like to refactor this code so that it reads more like this:
var svg = makesvg(w, h);
d3.select("#somediv").append(svg);
Note that, in contrast to the situation shown in the first version, in
this second version append does not create the "svg" object; it only
appends it to d3.select("#somediv").
The problem is how to implement the function makesvg. This in turn reduces
to the problem: how to instantiate an "svg" object without using append to
do this, since one could then do something like:
function makesvg(width, height) {
return _makesvg().attr("width", w).attr("height", h);
}
So my question boils down to what is the generic equivalent of the
hypothetical _makesvg() factory mentioned above?

Cross-Compiling Python From Linux into Windows

Cross-Compiling Python From Linux into Windows

In a linux enviroment, how would one freeze a python script into an
executable. The answers at Cross-compiling a Python script on Linux into a
Windows executable as PyInstaller killed the referenced feature. I have
also tried py2exe with wine to no avail. An suggestions on what works?

Three.js render performance with and without multiple materials (both with textures)

Three.js render performance with and without multiple materials (both with
textures)

I am trying to figure out if the significant performance hit I'm seeing is
something that can be optimized away or is this the state of things:
I have a geometry that looks like Obama, it's about 11K triangles, 5600 or
so faces (both quads and triangles). It was modeled in Maya, and is
exported as OBJ in one of two methods depending upon the render method
being used.
In one export method, we do not export the materials file from Maya. We
take the 5 different texture maps used by the model, stitch them into a
single texture and re-write the UVs in the model to reference the new
texture locations in the unified texture. The final unified texture is
1024x512.
The 2nd export method does use the exported materials file from Maya, and
we reduce the 5 different textures to be smaller in all cases than their
counterpart in the unified texture used by the other method. If the 5
different textures were tiled, you'd get something about 768x512.
The only other difference between the two methods of rendering the same
geometry is the second method has 1 semi-transparent material: the cornea
(the clear layer) over the eyes is set to 0.1 (barely visible)
transparency and a slightly blue/gray tint.
In place of the semi-transparent cornea in the first rendering method, we
simply have the image of the eyeball on the cornea, and the inner eye
(iris and pupil) are never seen by this method. They are there, just
discarded by rendering because they are behind the opaque cornea.
Now here's the big puzzle: render method one easily hits 60 fps and stays
there with two such geometries. Render method 2 is rendering between 20
and 25 frames per second. I've not tried rendering with a second geometry
yet. I'm somewhat surprised at this significant reduction in my frame
rate. If I change the semi-transparent cornea to be opaque, the frame rate
is still poor (same rate).
Is there that much of a hit from using multiple materials and multiple
textures? What are people doing with more complex environments requiring
exponentially more materials than my paltry 6?

Rails: Reordering an Array

Rails: Reordering an Array

I want to retrieve the last five Articles by review date, but I want to
display them in chronological order (ascending order). How do I do this?
# controller
@recent_articles = Article.where("reviewed = ?", true).order("review_date
DESC").limit(5)
# view
<% @recent_articles.each do |ra| %>
# articles sorted by review_date in ascending order
<% end %>
I tried doing this in the controller, but it retrieved the five oldest
review_dates instead (i.e. it just retrieved the records by ASC order
instead of reordering the array already retrieved):
@recent_articles = Article.where("reviewed = ?", true).order("review_date
DESC").limit(5)
@recent_articles = @recent_articles.reorder("review_date ASC")

Installed packages location when not using virtualenv

Installed packages location when not using virtualenv

Where are the packages installed if I don't use virtualenv? (ubuntu)

WSE3 AuthenticateToken gets called on every web service call

WSE3 AuthenticateToken gets called on every web service call

I have microsoft asp.net web services that use WSE3. They use a
SecurityToken for security (Microsoft.Web.Services3.Security.Tokens
namespace).
The AuthenticateToken method gets called every single time a web service
method gets called by the client. The problem is, it speaks to the
database, which causes a major performance problem. I don't need to call
it on every web service call, so is there any way to cache the token so it
doesn't call AuthenticateToken as often? Or any other way of preventing
the AuthenticateToken method being called and just assuming the web
service call is valid?
Thanks

How to change the path that comes with the output of which command?

How to change the path that comes with the output of which command?

When I which mex at the linux system it gives a path but I want to change
this path to another one. How can I set this default path to another
location ?

Load div content from one page and show it to another

Load div content from one page and show it to another

Couple of hours I am trying to load a div content from one page and show
it to another. for example:
We have these page - http://en.wikipedia.org/wiki/Robert_Bales.
I want to get the content of the div with id="mw-content-text" and show it
to my page that has element with id="result".
Is there a way to do it only with javascript/jquery?
p.s. sorry for my englsh

Sunday, 25 August 2013

how to check the div value in javascript

how to check the div value in javascript

how to set the div CSS styles using javascript? i have a problem on
getting the value of class name. please help if anyone know it.
var className = $('.divname').attr('class');
var t = 'divalue';
if(className == t){
$('.divname').css('background', '#0962ae');
}

Set jQuery .css() based on variable

Set jQuery .css() based on variable

I'm trying to set the margin-top and margin-left to half of there elements
respective size so to center it. Logically this should work however it
just goes 50% on the left and top.
var $img = document.getElementsByClassName('box');
var $width = $img.clientWidth;
var $height = $img.clientHeight;
$('#overlay').append('<div id="boxOverlay"></div>');
$('#boxOverlay').css('position', 'fixed');
$('#boxOverlay').css('top', '50%');
$('#boxOverlay').css('margin-top', '-$height/2');
$('#boxOverlay').css('left', '50%');
$('#boxOverlay').css('margin-left', '-$width/2');
$('#boxOverlay').css('max-height','80%');
$('#boxOverlay').css('max-width','90%');
$('#boxOverlay').height($height);
$('#boxOverlay').width($width);

[ Heart Diseases ] Open Question : My chest hurts sometimes when I breathe in. Is it a symptom of heart attack?

[ Heart Diseases ] Open Question : My chest hurts sometimes when I breathe
in. Is it a symptom of heart attack?

Hi. I have been experiencing chest pain on the left side of my chest when
I breathe in. It doesn't happen all the time. It happens usually during
calm situations. Such as,when I'm playing with my phone or not talking. It
hurts and I'm really scared. Im not sure if I have asthma but i have
shortness of breath so yea. Is it a symptom of heart attack? Please tell
me as I haven't told my mom about this pain I'm having. It has been going
for a long time and im worried. Please tell me, should I see a doctor ?

"Force Stop" error when pressing Back button and then returning to app

"Force Stop" error when pressing Back button and then returning to app

I am developing Android, i used codes from tutorials to write my app, my
app is a chatbot which take an input (string) from user and give suitable
answer: for example user types "hi" and chatbot answer "hi there"
my app works fine, but i tried to add a method to handle if user type last
inputSentence again in input, i just added simple if() to check
repetition, but now problem faced new problem. when user and chatbot chat
to eahother and then user press back button on phone, and then back to app
and try to chat again, when user type something in input, then when
chatbot try to find suitable answer from database, program crashed with
"force stop" error,
i just added code here and make new method BOLD:It's a little long...
package com.color.speechbubble;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Random;
import android.app.ListActivity;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.hardware.Camera.Size;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.InputFilter.LengthFilter;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
/**
* MessageActivity is a main Activity to show a ListView containing Message
* items
*
* @author Adil Soomro
* @author Mehrdad4all
*
*/
public class MessageActivity extends ListActivity {
/** Called when the activity is first created. */
// Variables,Constants and Objects $$$$$$$$$$$$$$$$$$
// DATABASE VARIABLES
private String USER = "user";
private String SHOMPET = "shompet";
Utility utility_obj = new Utility();
private static String newMessage = "null in sql";
ir.mehrdadsalimi.ShompetBot.DataBaseHelper myDbHelper = new
ir.mehrdadsalimi.ShompetBot.DataBaseHelper(
this);
ArrayList<Message> messages;
AwesomeAdapter adapter;
EditText text;
static Random rand = new Random();
static String sender;
// to save USER chat Log and check repeatation
ArrayList<String> userChatLogArray = new ArrayList<String>();
// to check whether this is user's first input
public static Boolean firstInput = true;
// $$$$$$$$$$$$$$$$$$$
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
text = (EditText) this.findViewById(R.id.text);
sender = utility_obj.sender[rand.nextInt(utility_obj.sender.length
- 1)];
this.setTitle("ShompetBot(" + sender + ")");
messages = new ArrayList<Message>();
// here we choose between two method, user starts chat or ShompetBot
// starts it!
// we use random method to choose,
// it makes ShompetBot more Real!
// we have 7 condition 4 for user starts which is nothing
// and 4 which ShompetBot choose one of this sentences randomly
switch (rand.nextInt(7)) {
case 0:
messages.add(new Message("Welcome here!", false));
break;
case 1:
messages.add(new Message("user, how are you doing today??!",
false));
break;
case 2:
messages.add(new Message("What's up?", false));
break;
case 3:
messages.add(new Message("Hey, How can i help you?", false));
break;
default:
break;
}
// messages.add(new Message("Hello", false));
// messages.add(new Message("Hi!", true));
// messages.add(new Message("Wassup??", false));
// messages.add(new
// Message("nothing much, working on speech bubbles.",true));
// messages.add(new Message("you say!", true));
// messages.add(new Message("oh thats great. how are you showing
them",
// false));
adapter = new AwesomeAdapter(this, messages);
setListAdapter(adapter);
// addNewMessage(new
// Message("mmm, well, using 9 patches png to show them.", true));
}
public void sendMessage(View v) {
String newMessage = text.getText().toString().trim();
userChatLogArray.add(newMessage);
this.newMessage = newMessage;
if (newMessage.length() > 0) {
text.setText("");
addNewMessage(new Message(newMessage, true));
new SendMessage().execute();
}
}
private class SendMessage extends AsyncTask<Void, String, String> {
@Override
protected String doInBackground(Void... params) {
try {
Thread.sleep(2000); // simulate a network call
} catch (InterruptedException e) {
e.printStackTrace();
}
this.publishProgress(String.format("%s started writing",
sender));
try {
Thread.sleep(2000); // simulate a network call
} catch (InterruptedException e) {
e.printStackTrace();
}
this.publishProgress(String.format("%s has entered text",
sender));
try {
Thread.sleep(3000);// simulate a network call
} catch (InterruptedException e) {
e.printStackTrace();
}
// **************************************************
try { // here
myDbHelper.createDataBase(); // we
} catch (IOException ioe) { // create
throw new Error("Unable to create database"); // and
} // open
try { // DB
myDbHelper.openDataBase(); //
} catch (SQLException sqle) { //
throw sqle; //
} //
SQLiteDatabase db = myDbHelper.getReadableDatabase();// make an
// readable
// database
// from
// existing
// one
String shompetAnswer = "";// shompet final answer
**if (checkRepeatation(firstInput)) {
shompetAnswer = " rep test";
} else {**
// here we first edit userInput to make it easier to search
// for suitable answer in DB
editEndOfNewMessage();
Cursor cursor = db.rawQuery(
"SELECT shompet FROM exact_sentence WHERE " + USER
+ " = '" + newMessage + "'", null);// query
//
exact_sentence
// table
ArrayList<String> stringArrayList = new ArrayList<String>();
String shompetAnswersSet[] = null;
String tempString = "";
// check if got answer from exact_sentence table(first
engine)
if (cursor.moveToFirst()) {
do {
// add to arraylist
tempString = cursor.getString(cursor
.getColumnIndex("shompet"));
stringArrayList.add(tempString);
} while (cursor.moveToNext());
shompetAnswersSet = stringArrayList
.toArray(new String[stringArrayList.size()]);
shompetAnswer = shompetAnswersSet[rand
.nextInt(shompetAnswersSet.length)];
cursor.close();
}
// Here we will use second engine to search DB with 40%
accuracy
else {
cursor = db.rawQuery("SELECT shompet FROM sentence "
+ "WHERE LENGTH(user) = ( "
+ " SELECT MAX(LENGTH(user)) FROM sentence "
+ " WHERE ? LIKE '%' || " + USER + " || '%' "
+ ") AND ? LIKE '%' || " + USER + " || '%' ",
new String[] { newMessage, newMessage });
// check if find answer from second engine
if (cursor.moveToFirst()) {
do {
// add to arraylist
tempString = cursor.getString(cursor
.getColumnIndex("shompet"));
stringArrayList.add(tempString);
} while (cursor.moveToNext());
shompetAnswersSet = stringArrayList
.toArray(new String[stringArrayList.size()]);
shompetAnswer = shompetAnswersSet[rand
.nextInt(shompetAnswersSet.length)];
}
cursor.close();
}
// ***************************************************
}
// to prevent from onPause and onResume errors
myDbHelper.close();
return shompetAnswer;
}
@Override
public void onProgressUpdate(String... v) {
if (messages.get(messages.size() - 1).isStatusMessage)// check
//
wether
we
// have
//
already
//
added
a
// status
//
message
{
messages.get(messages.size() - 1).setMessage(v[0]); // update
// the
// status
// for
that
adapter.notifyDataSetChanged();
getListView().setSelection(messages.size() - 1);
} else {
addNewMessage(new Message(true, v[0])); // add new
message, if
// there I'm fine,
// thanks, what about
// you?is no existing
// status message
}
}
@Override
protected void onPostExecute(String text) {
if (messages.get(messages.size() - 1).isStatusMessage)// check if
//
there
is
// any
// status
//
message,
// now
// remove
// it.
{
messages.remove(messages.size() - 1);
}
addNewMessage(new Message(text, false)); // add the original
message
// from server.
}
}
void addNewMessage(Message m) {
messages.add(m);
adapter.notifyDataSetChanged();
getListView().setSelection(messages.size() - 1);
}
void editEndOfNewMessage() {
// here we edit userinput from useless sign at the end of the
statement
while (newMessage.charAt(newMessage.length() - 1) == '!'
|| newMessage.charAt(newMessage.length() - 1) == '.'
|| newMessage.charAt(newMessage.length() - 1) == '?') {
newMessage = newMessage.substring(0, newMessage.length() - 1);
} //
newMessage = newMessage.trim();// delete whitespace from end of
// statement
newMessage = newMessage.toLowerCase();// clear!
}
**public Boolean checkRepeatation(Boolean input)// check equality of user
// //
// input with last user
{ // input for repeatation
if (input) {
firstInput = false;
return false;
} else {
String userChatLog[] = userChatLogArray
.toArray(new String[userChatLogArray.size()]);
if (userChatLog[userChatLog.length - 2].equals(newMessage)) {
return true;
}
return false;
}
}**
}
and class which extend SQLiteOpenHelper class:
package ir.mehrdadsalimi.ShompetBot;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Environment;
public class DataBaseHelper extends SQLiteOpenHelper{
//The Android's default system path of your application database.
private static String DB_PATH =
"/data/data/com.color.speechbubble/databases/";
private static String DB_NAME = "ShompetBot_DBTest";
private SQLiteDatabase myDataBase;
private final Context myContext;
/**
* Constructor
* Takes and keeps a reference of the passed context in order to
access to the application assets and resources.
* @param context
*/
public DataBaseHelper(Context context) {
super(context, DB_NAME, null, 1);
this.myContext = context;
}
/**
* Creates a empty database on the system and rewrites it with your
own database.
* */
public void createDataBase() throws IOException{
boolean dbExist = checkDataBase();
if(dbExist){
//do nothing - database already exist
}else{
//By calling this method and empty database will be created
into the default system path
//of your application so we are gonna be able to overwrite
that database with our database.
this.getReadableDatabase();
try {
copyDataBase();
} catch (IOException e) {
throw new Error("Error copying database");
}
}
}
/**
* Check if the database already exist to avoid re-copying the file
each time you open the application.
* @return true if it exists, false if it doesn't
*/
private boolean checkDataBase(){
SQLiteDatabase checkDB = null;
try{
String myPath = Environment.getExternalStorageDirectory() +
"/" + DB_NAME;
checkDB = SQLiteDatabase.openDatabase(myPath, null,
SQLiteDatabase.OPEN_READONLY);
}catch(SQLiteException e){
//database does't exist yet.
}
if(checkDB != null){
checkDB.close();
}
return checkDB != null ? true : false;
}
/**
* Copies your database from your local assets-folder to the just
created empty database in the
* system folder, from where it can be accessed and handled.
* This is done by transfering bytestream.
* */
private void copyDataBase() throws IOException{
//Open your local db as the input stream
InputStream myInput = myContext.getAssets().open(DB_NAME);
// Path to the just created empty db
String outFileName = DB_PATH + DB_NAME;
//Open the empty db as the output stream
OutputStream myOutput = new FileOutputStream(outFileName);
//transfer bytes from the inputfile to the outputfile
byte[] buffer = new byte[1024];
int length;
while ((length = myInput.read(buffer))>0){
myOutput.write(buffer, 0, length);
}
//Close the streams
myOutput.flush();
myOutput.close();
myInput.close();
}
public void openDataBase() throws SQLException{
//Open the database
String myPath = DB_PATH + DB_NAME;
myDataBase = SQLiteDatabase.openDatabase(myPath, null,
SQLiteDatabase.OPEN_READONLY);
}
@Override
public synchronized void close() {
if(myDataBase != null)
myDataBase.close();
super.close();
}
@Override
public void onCreate(SQLiteDatabase db) {
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int
newVersion) {
}
// Add your public helper methods to access and get content from
the database.
// You could return cursors by doing "return
myDataBase.query(....)" so it'd be easy
// to you to create adapters for your views.
}

MYSQL cannot be updated

MYSQL cannot be updated

Please Help...This is my first attempt to php... I have tried to echo the
$id, $firstname etc. and it does echo the correct results, but the
database cannot be updated. I dunno what's wrong...
Here is "profile.php"
<?
include("common.php");
include("header.php");
?>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="145" align="left" valign="top"><script
type="text/javascript" src="menu.js"></script></td>
<td width="50" align="left" valign="top"><img
src="images/header/divided1.jpg" width="40" height="473" /></td>
<td align="left" valign="top">
<? $link = mysql_connect("localhost", "root", "password");
mysql_select_db("test");
$email = $_SESSION['email'];
$sql = "SELECT * FROM fmcmember where email='$email'";
$result = mysql_query($sql);
$row = mysql_fetch_row($result); ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="form4" method="post" action="update.php">
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width="200" class="title">My Profile</td>
<td width="300" class="title">
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="id" type="hidden" value="<? echo $row[0] ?>"
size="30"/></td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="email">Email</td>
<td class="email"><? echo $row[6] ?></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Firstname</td>
<td><input name="firstname" type="text" class="inputfield"
value="<? echo $row[1] ?>" size="30" maxlength="40" /></td>
<? if($row[3] == "M") { ?>
<td rowspan="16" align="left" valign="top">
<img src="images/myinfo/male.png" width="200" height="200" /></td>
<? } else { ?>
<td rowspan="16" align="left" valign="top">
<img src="images/myinfo/female.jpg" width="200" height="200" /></td>
<? } ?>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Lastname</td>
<td><input name="lastname" type="text" class="inputfield"
value="<? echo $row[2] ?>" size="30" maxlength="40" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Gender</td>
<td class="content">
<input name="gender" type="radio" value="M" <? if($row[3] ==
"M") { echo "checked"; }?> />Male
<input name="gender" type="radio" value="F" <? if($row[3] ==
"F") { echo "checked"; }?> />Female</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Date of birth</td>
<td><input name="dob" type="text" class="inputfield" value="<?
echo $row[4] ?>" size="30" maxlength="40" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Address</td>
<td><input name="address" type="text" class="inputfield" value="<?
echo $row[5] ?>" size="30" maxlength="200" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Tel</td>
<td><input name="tel" type="text" class="inputfield" value="<?
echo $row[7] ?>" size="30" maxlength="40" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Fax</td>
<td><input name="fax" type="text" class="inputfield" value="<?
echo $row[8] ?>" size="30" maxlength="40" /></td>
</tr>
<tr>
<td class="content">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="Update" type="submit" value="Update" />
<input name="Reset" type="button" value="Reset"
onclick="javascript:document.location.href='profile.php?action=reset'"/></td>
<td>&nbsp;</td>
</tr>
</form>
</table></td>
</tr>
</table></td>
<?
include("footer.php");
?>
update.php
<?
include("common.php");
//"¾"žregister.php •\šd"IÉŸ
$id = $_POST["id"];
$firstname = $_POST["firstname"];
$lastname = $_POST["lastname"];
$gender = $_POST["gender"];
$dob = $_POST["dob"];
$address = $_POST["address"];
$tel = $_POST["tel"];
$fax = $_POST["fax"];
$link = mysql_connect("localhost", "root", "password");
mysql_select_db("test");
mysql_query($sql, $link);
$sql = "update fmcmember set firstname='$firstname', lastname='$lastname',
gender='$gender', dob='$dob', address='$address', tel='$tel', fax='$fax'
where id='$id'";
include("header.php");
?>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="145" align="left" valign="top"><script
type="text/javascript" src="menu.js"></script></td>
<td width="50" align="left" valign="top"><img
src="images/header/divided1.jpg" width="40" height="473" /></td>
<td align="left" valign="top"><table width="100%" align="left"
valign="top" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="300"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td class="title">&nbsp;</td>
</tr>
<tr>
<td class="title">My Profile</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td class="content">Your profile has been updated. Please
return back to <a href="profile.php">my profile</a> page.</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<?
include("footer.php");
?>

how to find list of files file name starts with All_Responses_11367*.txt and copy total files to another directory in unix command

how to find list of files file name starts with All_Responses_11367*.txt
and copy total files to another directory in unix command

I want to find list of files starting with All_Responses_11367 and copy
those files to another directory.
for example...like below for each day i have 40 files and need to copy for
last 80 days files.
All_Responses_11367_8_20_2013.txt
All_Responses_11368_8_20_2013.txt
All_Responses_11369_8_20_2013.txt
All_Responses_11367_8_21_2013.txt
All_Responses_11368_8_21_2013.txt
All_Responses_11369_8_21_2013.txt
All_Responses_11367_8_22_2013.txt
All_Responses_11368_8_22_2013.txt
All_Responses_11369_8_22_2013.txt
my request is to copy one same files for all dates at a time.
All_Responses_11367_8_20_2013.txt
All_Responses_11367_8_21_2013.txt
All_Responses_11367_8_22_2013.txt
Pl help

Saturday, 24 August 2013

Why is For loop on Regex Matches slow?

Why is For loop on Regex Matches slow?

I have the following code:
string pattern = @"(?:\S+\s){1,6}\S*" + search +
@"\S*(?:\s\S+){1,6}";
String dbContents = row[2].ToString();
var matches = Regex.Matches(dbContents, pattern,
RegexOptions.IgnoreCase | RegexOptions.Compiled);
for (int i = 0; i < matches.Count; i++)
{
if (i == 3)
break;
Contents += String.Format("... {0} ...", matches[i].Value);
}
What I'm trying to accomplish is to get one to six words before the search
term and 1-6 words after the search term. When executing the code the
performance hit on the for loop "matches.Count". With very large strings,
its taking upwards of a min to execute. I'm confused on why and what to do
to fix the issue.

UDP-videostream in quartz composer?

UDP-videostream in quartz composer?

is there any way, to input a udp-stream into quartz composer? I just got a
rtmp-stream into the composition - but udp seems not to work.
Thx!

Enjoyjs, leaflet and markercluster

Enjoyjs, leaflet and markercluster

I´m trying to write an application using enjoyjs, leafglet and the leaflet
plugin markercluster.
leaflet is working fine, but markercluster gives me the error:
Reference error: L is not defined L.MarkerClusterGroup =
L.FeatureGroup.extend({
in /markercluster/dist/leaflet.markercluster-src.js
And then TypeError: L.MarkerClusterGroup is not a constructor in my js
The js is loaded and the css (checked with firebug). If i create a marker
it works fine.
Where or how must i ibclude this plugin to make it work?
this is my kind
enyo.kind({ name: "mapContainer",
published: {
map: null,
mi_lat: 44.981014,
mi_lng: -93.270520,
zoom_actual: 16,
zoom_max: 18
},
rendered: function(){
this.inherited(arguments);
//Initialize the map
this.map = L.map(this.id,{
center: [this.mi_lat, this.mi_lng],
zoom: this.zoom_actual,
maxZoom: this.zoom_max,
});
L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
{attribution: "Map data &copy; OpenStreetMap contributors"}
).addTo(this.map);
var markersLayer = new L.MarkerClusterGroup();
//Initilize the marker and popup
var mark = new L.marker([44.981014, -93.270520]).addTo(this.map);
var popDiv = L.DomUtil.create("div");
var pop = new L.popup();
mark.bindPopup(pop);
},
});
Thank you very much for your help

Intellij Custom Scope Hiding package-info.java

Intellij Custom Scope Hiding package-info.java

I have a custom scope for a java module within a project. The scope is
automatically excluding package-info.java from the hierarchy of files. The
file is included in the scope definition (in the scope it is highlighted
green and recursively included). It seems that I can't see these
package-info.java files from any of the scopes and not just my custom
version.
Does Intellij filter these files out? If so, can this filter be disabled?
I'm using Intellij IDEA 12.4 Ultimate on Windows 7.

Use Android jack as a transmitter rather than receiver

Use Android jack as a transmitter rather than receiver

While the phone is in call mode it seems to use the mic from the bluetooth
headset. What I'd like however is to convert the audio jack into something
of an input device completely.
Say a 3.5mm jack is plugged into the phone, on the click of a button in my
app it should be able to receive audio input.
I've tried:
audioManager.setBluetoothScoOn(true);
audioManager.setMode(AudioManager.MODE_IN_CALL);
With all the possible 4 combinations of these two commands. No effect
however. I don't even hear the output audio through the headset. How can I
programmatically read data from the headset microphone without having to
be on a call?

Avoid showing hidden applications in the cmd+tab navigation menu

Avoid showing hidden applications in the cmd+tab navigation menu

I recently switched to Mac OS X Mountain Lion. I have applications like
skype,pidgin which start at login and are hidden. But when I have more
applications running and I do
Cmd+Tab
to switch between application these hidden applications also appear there.
How should I avoid them?

ImageButton control with Google TV andorid application development

ImageButton control with Google TV andorid application development

My application is working successfully in Android 2.x to 4.1.x
In Google TV emulator i am running my existing application.
Google TV is not support touch input, So user must use navigation flow
like move left, move right, move top and move bottom.
But this control can not point on ImageButton control.
How can reach my pointer for operate ImageButton.?

Friday, 23 August 2013

iframe contentDocument: Access is denied

iframe contentDocument: Access is denied

The following code runs as part of a bookmarklet. It creates and iframe
and then tries to access that iframe.
For some sites on IE (tried IE 10) it fails with "Access is denied" for
iframeDoc = i.contentDocument || i.contentWindow.document;
I've put the call inside a setInterval, which seemed to work for some
sites. Apparently they just needed a bit of time.
An example of a site where it does NOT work is
http://www.epicurious.com/recipes/food/views/Rum-Raisin-Apple-Pie-236430
var i=document.createElement('iframe');
document.body.appendChild(i);
var intervalID = setInterval( function(){
try{
var iframeDoc = i.contentDocument || i.contentWindow.document;
clearInterval(intervalID);
alert("success!");
} catch(e){}
}, 10 );

Chicago Bears vs Oakland Raiders Live Streaming NFL online HD Tv on your Pc 2013

Chicago Bears vs Oakland Raiders Live Streaming NFL online HD Tv on your
Pc 2013

You can simply lookout NFL Match Between Chicago Bears vs Oakland Raiders
Free live streaming available on your PC, fair follow our streaming link.
Enjoy Chicago Bears vs Oakland Raiders live streaming NFL Game Online HD
on your Pc. Our software likewise allows you to watch Chicago Bears vs
Oakland Raiders Free live Streaming Online. You can watch this match up
from home through your family if you don't have sufficient time to visit
the stadium, Just opportunity on your PC, Laptop, PC Mac and IPhone ipad
then watch the game from your PC or laptop or PC Mac and iPhone Ipad.
Don't worry, it is too easy to watch.
Click Here Watch Only $4 Live Guarantee that you must be 100% satisfied in
out service so don't be hesitated just click the link bellow and start
watching and enjoy more. Best of luck both team are ready to face each
other. So this match will be very Pleasant Watch Live Sky Sporting, Bet
Air Tv, CBS, HD4, FOX, NBC, ESPN TV and 3500+ HD Stations Get the best
online sports coverage on the net directly on your PC, MAC or LAPTOP Click
Here Watch HD Live
http://satellite-nfltv.blogspot.com/2013/08/watchchicago-bears-vs-oakland-raiders.html
http://satellite-nfltv.blogspot.com/2013/08/watchchicago-bears-vs-oakland-raiders.html
Click Here Watch HQ Live Fixture Details Match : Chicago Bears vs Oakland
Raiders live NFL: Preseason Week 3, 2013 DATE: Friday, August 23, 2013
TIME: 10:00 PM( ET) Live / Repeat:Live Don't worry,it is too easy to
watch.just try it.
Over 3500 Live Streaming HD Channels Stream Nonstop to your PC or Laptop
No hardware purchases required ever No Monthly charges / No Bandwidth
limits unrestricted worldwide TV Channel coverage No TV restrictions / No
Streaming restrictions Full HD widescreen Playback Support. You all about
US,UK,CAN, AUS, NEZ, Game entertainment like NFL, NCAAF, NFL, MLB, RUGBY,
NASCAR, SOCCER, BOXING, FORMULA ONE, ect by which All of you can watch
each and every games live streaming online. From any location! Get instant
access and most exciting sports coverage stream software online directly
on your PC. Download and install our software and like all the pleasures
of the sporting world comfortably like you are at the stadium watching the
Our software also allows you to watch Chicago Bears vs Oakland Raiders
free Live Game online in perfect HD quality,

brightcove not showing when rendered (not page refresh - plain Backbone.js View re-render)

brightcove not showing when rendered (not page refresh - plain Backbone.js
View re-render)

TLDR; The video player doesn't show on re-render (Backbone View)
Is there some global state brightcove keeps?
I'm using backbone.js and rendering the page using a backbone View with
this jst.ejs template. It works perfectly the first time around. But if I
navigate to next page and then back, it doesn't show anymore.
<script language="JavaScript" type="text/javascript"
src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<script>
window.BCVideo = BCVideoFunction(); //BCVideoFunction as module pattern.
</script>
<object id="bc_experience" class="BrightcoveExperience">
<param name="includeAPI" value="true" />
<param name="templateLoadHandler" value="BCVideo.onTemplateLoad" />
<param name="templateReadyHandler" value="BCVideo.onTemplateReady" />
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="100%" />
<param name="height" value="100%" />
<param name="playerID" value="1426444499001" />
<param name="playerKey"
value="AQ~~,AAABTAHETAE~,G1RKcv5og48msI78DncnAb9MEySkUi_b" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="wmode" value="transparent"/>
<param name="dynamicStreaming" value="true" />
<param name="wmode" value="transparent"/>
<param name="@videoPlayer" value="<%= variables.video_id %>" />
</object>
after rerender (second visit), I can see the object exists
> window.bc_experience `
<object type=&#8203;"application/&#8203;x-shockwave-flash"
data=&#8203;"http:&#8203;/&#8203;/&#8203;c.brightcove.com ...
# window.bc_experience.remove() doesn't help
Removing it from the dom doesn't help.
Hitting BCVideo.play will log 'play video' (my code, calling
videoPlayer.play() as in the examples) as many times as I navigated to
(rerendered) that view.
> BCVideo.play()
playing video
playing video
playing video
Obviously it's live an kicking... Am I missing something obvious? Thanks
for helping!
The brightcove video is loaded and running perfectly on first load.

Access php api with powershell script

Access php api with powershell script

I have built some php software that I am currently working on building out
the API. I know that I am going to need to use this API inside a
powershell script that validates a code deployment. What is the best way
within the powershell script to access the data from the php software?

JPanels are not centered when using BoxLayout

JPanels are not centered when using BoxLayout

I've been making a dumb little card trick to get back into Java after a
few years and I've been having some difficulty in making JPanels go where
I want them.
The components that are giving me trouble are chosenCard and label.
Everything else sits nicely at the center. Each of the cardRow JPanels
holds 7 cards and mainRow# holds the cardRow with a button next to it.
each card is 74x98 so I tried to keep everything sized well.
Here's the Trick class that handles all the placements and layouts.
public Trick()
{
setMaximumSize(new Dimension(650, 600)); //set the size large enough
to hold all panels neatly
//Card row setup
trickCards = new Deck().getCards(21);
cardRow1 = new JPanel();
cardRow2 = new JPanel();
cardRow3 = new JPanel();
cardRow1.setPreferredSize(new Dimension(650, 120));
cardRow2.setPreferredSize(new Dimension(650, 120));
cardRow3.setPreferredSize(new Dimension(650, 120));
cardRow1.setLayout(new BoxLayout(cardRow1, BoxLayout.X_AXIS));
cardRow2.setLayout(new BoxLayout(cardRow2, BoxLayout.X_AXIS));
cardRow3.setLayout(new BoxLayout(cardRow3, BoxLayout.X_AXIS));
setToRows();
button1 = new JButton("Row 1");
button1.setMnemonic(KeyEvent.VK_1);
button1.setActionCommand("1");
button2 = new JButton("Row 2");
button2.setMnemonic(KeyEvent.VK_2);
button2.setActionCommand("2");
button3 = new JButton("Row 3");
button3.setMnemonic(KeyEvent.VK_3);
button3.setActionCommand("3");
group = new ButtonGroup();
group.add(button1);
group.add(button2);
group.add(button3);
button1.addActionListener(this);
button2.addActionListener(this);
button3.addActionListener(this);
chosenCard = new JPanel();
chosenCard.setLayout(new BoxLayout(chosenCard, BoxLayout.Y_AXIS));
chosenCard.setPreferredSize(new Dimension(100, 120));
chosenCard.add(new Card(trickCards[1].getCardFace(), -1, -1));
label = new JLabel("Card Trick! Pick any one card and click the row it
is in [1, 2, 3]");
label.setPreferredSize(new Dimension(200, 20));
mainRow1 = new JPanel();
mainRow2 = new JPanel();
mainRow3 = new JPanel();
mainRow1.setPreferredSize(new Dimension(750, 120));
mainRow1.add(cardRow1);
mainRow1.add(button1);
mainRow2.setPreferredSize(new Dimension(750, 120));
mainRow2.add(cardRow2);
mainRow2.add(button2);
mainRow3.setPreferredSize(new Dimension(750, 120));
mainRow3.add(cardRow3);
mainRow3.add(button3);
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
add(mainRow1);
add(mainRow2);
add(mainRow3);
add(label);
add(chosenCard);
}
//Refreshes what cards are in the rows
//Usually done after a selection is made
private void setToRows()
{
cardRow1.removeAll();
cardRow2.removeAll();
cardRow3.removeAll();
for(int x = 0; x < trickCards.length / 3; x++)
{
cardRow1.add(trickCards[x]);
cardRow2.add(trickCards[x + (trickCards.length / 3)]);
cardRow3.add(trickCards[x + ((trickCards.length / 3) * 2)]);
}
}
//The listener for the buttons
//Will be expanded
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("1"))
{
System.out.println("1");
label.setText("You chose 1!");
}
else if(e.getActionCommand().equals("2"))
{
System.out.println("2");
}
else if(e.getActionCommand().equals("3"))
{
System.out.println("3");
}
else
System.out.println("There's something wrong with the choice! Set
to 0");
}

How to include a dynamically created file in the project?

How to include a dynamically created file in the project?

I have dynamically created a text file in my project location using
string path = Server.MapPath("~") + "\\Images\\abc.png";
FileStream fs = File.Open(path, FileMode.OpenOrCreate);
But am unable to read that file as it is found to be not included in the
project. Including manually is the only way? How can we achieve this
dynamically?

Thursday, 22 August 2013

How to share a photo from picasa to google plus use gdata api in .net

How to share a photo from picasa to google plus use gdata api in .net

I get photo from Picasa use Google gdata api,but I want to share a photo
to google plus. How Can I share a photo from Picasa album to Google plus
use gdata in c#?

Gzip, firmware problems

Gzip, firmware problems

I am trying to unpackage firmware. The file command gives me this.
enter preformatted text heregzip compressed data, ASCII, has CRC, extra field
gzip -d gzip.gz gives this.
gzip: gzip.gz has flags 0xcf -- not supported
Any suggestions?

Servlet Filter that catches and blocks IP's that request suspicious URL's

Servlet Filter that catches and blocks IP's that request suspicious URL's

Before I go off and write my own, Is anyone aware of a servlet filter that
does some basic security checks and filtering. ie If someone hits our
server with a url that ends in .exe or contains "../../.." they are
clearly rootkit/exploit scanners not valid users (in our case at least).
I also wonder if a Thread.sleep(1000); in the servlet filter for those
particular types of requests wouldn't be such a bad thing.

How to center without the tag using CSS?

How to center without the tag using CSS?

I have some code that uses the tag to center two buttons on the screen:
<center>
<input type="button" onclick="parent.window.close();" value="Close
Window" id="Button1" name="Button1" />
<%
if (Session["MyRoleName"].ToString().ToUpper() == "SUPERMANADMIN")
{
%>
<input type="button" onclick="if (confirm('ARE YOU SURE? This cannot
be undone except by IT at great cost!')) { PurgeCourse(); }"
value="Purge Course Comments" id="Button2" name="Button2" />
<% } %>
</center>
Since the center tag is deprecated, I thought I'd try replacing it with a
<div> tag, and setting the margin to margin: 0 auto. This did not center
the buttons on the screen.
My question is, how can I center these two buttons on the screen,
horizontally, without using the <center> tag?

SID for previous working page

SID for previous working page

I think its a beginner question but bare with me.
I want to make an authentication model using perl on server side and the
javascript on the client side:
First requirement is to authenticate the username and password. For this i
have created the login page and it prompts the user to input username and
password and then the password is converted to hashed value and then send
to the server where it is matched with the stored hashed password bingooo
it works...
The second requirement is to maintain the state.. i.e if user comes again
then it must go back to the previous page (index) where he was working.
For this my arqument is i can use a file to store the location of the user
at server whenever the user revisits the site he is redirected to previous
page he was working at.
The third requirement is that that specific users are allowed a collection
of pages e.g 10 to 30 which i can do from checking the user url and telly
with the limit of page in the user.txt file
But the project manager told me to use session ids stuff to remember the
previous state... i tried but not understood how it may help my scenerio .
Precious comments are required..

Get TFS Build Server to obtain stylecop.settings file in root folder

Get TFS Build Server to obtain stylecop.settings file in root folder

We have a number of TFS projects in a single collection.
Each TFS project has a number of Visual Studio Solutions, with each sln
file in it's own folder.
Each TFS project has a project-specific StyleCop.settings files in the
root of the TFS project.
However, when we create a build for each solution, we get the build to
only obtain the folder containing the solution (as recommended by
Microsoft, to improve build performance). Therefore, we miss out on the
StyleCop.settings file in the TFS project root.
Therefore, my question is:
How can I apply my settings file to the building of a solution, and meet
the following criteria
All StyleCop.settings files must be stored in source control.
The number of StyleCop.settings files must be kept to a minimum (ideally
no more than 1 per TFS project).
Only the solution folder should be downloaded from TFS on a build.
Appendix 1. Folder structure
For reference/clarity, here is an example of the folder structure I've
described above. A TFS build will only check out the Application1 or
Application2 folder (depending on which application it builds).
C:\Source\
TfsProject1\
stylecop.settings
Application1\
Application1.sln
Application2\
Application2.sln

Replacing cloneNode() in jquery

Replacing cloneNode() in jquery

I am not very experienced in jquery. I have one function written in java
script, wanted to replace with jquery language. But some errors are keep
coming up while doing that. the function is

function moreFields() {
counter++; var newFields =
document.getElementById('readroot').cloneNode(true);
newFields.id = '';
newFields.style.display = 'block';
var newField = newFields.childNodes;
for (var i=0;i<newField.length;i++)
{
var theName = newField[i].name
if (theName)
newField[i].name = theName + counter;
}
var insertHere = document.getElementById('writeroot');
insertHere.parentNode.insertBefore(newFields,insertHere);
}
If anyone can help me out on this, I will be very much obliged.

Wednesday, 21 August 2013

CSV to JSON using java

CSV to JSON using java

i have used below code to get json out of csv file.
import java.io.File;
import java.io.IOException;
import java.net.URL;
import org.apache.commons.io.IOUtils;
public class Transform {
public static String getJSONFromURL(URL url,String separator) throws
IOException{
String csv=IOUtils.toString(url);
return getJSON(csv,separator);
}
public static String getJSONFromFile(String fileName, String separator)
throws IOException {
byte[] bytes=null;
bytes = org.apache.commons.io.FileUtils
.readFileToByteArray(new File(fileName));
String csv = new String(bytes);
return getJSON(csv,separator);
}
public static String getJSON(String content,String separator){
StringBuilder sb=new StringBuilder("[\n");
String csv = content;
String csvValues[] = csv.split("\n");
String header[]=csvValues[0].split(separator);
for(int i=1;i<csvValues.length;i++){
sb.append("\t").append("{").append("\n");
String tmp[]=csvValues[i].split(separator);
for(int j=0;j<tmp.length;j++){
sb.append("\t").append("\t\"").append(header[j]).append("\":\"").append(tmp[j]).append("\"");
if(j<tmp.length-1){
sb.append(",\n");
}else{
sb.append("\n");
}
}
if(i<csvValues.length-1){
sb.append("\t},\n");
}
else{
sb.append("\t}\n");
}
}
sb.append("]");
return sb.toString();
}
public static void main(String[] args) throws Exception{
System.out.println(getJSONFromFile("data.csv", ","));
}
}
data.csv file :
info value
off to home now
off to office tomorrow
getting output:
[
{
"info":""off to home"",
"value
":""now"
"
},
{
"info":""off to office"",
"value
":""tomorrow""
}
]
desired output:
{
"items": [
{
"info": "off to home",
"value": "now"
},
{
"info": "310",
"value": "tomorrow"
},
]
}

"Ant debug" output always shows no changes. How can I force apkbuilder to build APK?

"Ant debug" output always shows no changes. How can I force apkbuilder to
build APK?

When I type "ant debug" on Jenkins, I always get message like :
[aapt] No changed resources. R.java and Manifest.java untouched.
[dex] No new compiled code. No need to convert bytecode to dalvik format.
[aapt] No changed resources or assets.
[apkbuilder] No changes. No need to create apk.
The same command from my local computer against the same code from Eclipse
does not output the messages above. And it always finds modified input and
creates an apk with debug key correctly from command-line. My goal is to
create an APK with debug key on Jenkins also.
Any idea why "ant debug" is showing the output as following? Is there a
way to force apkbuilder to create an apk?
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
-post-compile:
-obfuscate:
-dex:
[dex] input:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/classes
[dex] input:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/libs/Robotium.jar
[dex] Using Pre-Dexed Robotium-764572c80737d765208bdb367579ac89.jar
<-
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/libs/Robotium.jar
[dex] No new compiled code. No need to convert bytecode to dalvik
format.
-crunch:
[crunch] Crunching PNG Files in source dir:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/res
[crunch] To destination dir:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] No changed resources or assets. Settings_Tests_New.ap_ remains
untouched
-package:
[apkbuilder] No changes. No need to create apk.
-post-package:
-do-debug:
[zipalign] Run cancelled: no changes to input file
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/Settings_Tests_New-debug-unaligned.apk
[echo] Debug Package:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/Settings_Tests_New-debug.apk
[propertyfile] Updating property file:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
[propertyfile] Updating property file:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
[propertyfile] Updating property file:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
[propertyfile] Updating property file:
/Users/buildmaster/.jenkins/workspace/my-ci-job-name/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL

Issues pulling content from Facebook Comment Box, in Rails using JS SDK

Issues pulling content from Facebook Comment Box, in Rails using JS SDK

So I am working on a Rails project and I am using the facebook JS SDK and
have the comment box in my page. I followed this link to fix a javascript
issue where it could not find the FB variable. But now I am getting an
issue that feed.text is undefined...
Basically what I am trying to do is when a user comments, I want to
trigger an email to the owner of that page. The email will have the
posting users name, time, and comment. But for some reason I am not
getting any of the information when the comment is posted. I am getting
the trigger that lets me know a new message has been posted tho.
Then I started poking around on the FB developer site a little more where
there was a blog posts about trying to do what I am having difficulties
with here. But the problem with that is, it is for php and I am using
RoR... But I decided to keep looking into what could be the issue.
I looked at the page that is supposed to have all the content from the
comments, but when I went there all I saw was:
{
"http://www.gofitcause.com/missions/51b61acedba888849d00001b": {
"comments": {
"data": [
]
}
}
}
So now I am a little confused, the issue with the first solution I linked
to seems to be breaking because there is no information being logged
above. So I guess my question is pretty broad but I basically just need
insight on why I can't seem to find the content for the comments that are
being posted.
Below is the code I am using that was taken from the first link:
<script>
window.fbAsyncInit = function () {
//FB.init({ appId: 'your-app-id', cookie: true, xfbml: true, oauth:
true });
if (typeof facebookInit == 'function') {
facebookInit();
}
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src =
"//connect.facebook.net/en_US/all.js#xfbml=1&appId=452464168153305";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
function facebookInit(){
FB.Event.subscribe('comment.create', function(response) {
FB.api({
method: 'fql.query',
query: "select post_fbid, fromid, object_id, text, time from
comment where object_id in (select comments_fbid from link_stat
where url ='<%= mission_url(@mission)%>') or object_id in
(select post_fbid from comment where object_id in (select
comments_fbid from link_stat where url ='<%=
mission_url(@mission)%>')) order by time desc limit 1"
},
function(response) {
var feed = response[0];
alert(feed.text);
}
);
});
}
</script>
And this is the error I see in firebug:
TypeError: feed is undefined
alert(feed.text);
Thanks for reading, any help or insight would be appreciated.

Why do we use masking and what are the advantages

Why do we use masking and what are the advantages

I have seen code today where a developer had used masking to send multiple
values in one parameter and later unmasked the value in stored procedure.
Can some one explain what is masking and why do we need to use it in
languages like c#

Thread is already running when it is already stopped

Thread is already running when it is already stopped

In my download manager, I auto-pause the download when the activity is
paused or stop. Any running downloads are interrupted. I know I should let
it download even in background but that is not the point here.
The thing is, on resume, the download must continue. However, I get an
exception that the thread is already running when in logcat I have a log
that I placed which clearly says thread is interrupted.
The line pointed to is of the Scheduler class which is responsible for
running the threads:
public class Scheduler extends TimerTask {
private static int index = 0;
//------------------------------------------------------------------------------
@Override
public void run() {
if(Sharable.isResumed()){ // activity is ready for interaction
with user
if(Sharable.getShouldLook()){ // and we are ready to download
while(index < Sharable.downloads.size()){
Task t = Sharable.downloads.get(index++);
Log.v("SCHEDULER", "CHECKING");
if(t.getReadiness()==true && t.getProgress() != 100){
Log.v("TASK-- ", t.toString() + " is not
running. Now starting");
if(!t.isAlive()){ // check if not already running
t.start(); // start the thread
}
break;
}
}
index = 0;
}
}
}
//------------------------------------------------------------------------------
}
t.start() is the culprit. WHY? I do not know why.
So what is in the logcat ?
08-21 15:50:54.316: V/TASKPATH(1460): /sdcard/tqa-se3ep47.mp3
08-21 15:50:54.386: V/TASK(1460): SETTING PATH
08-21 15:50:54.437: V/TASK(1460): MAKING URL
08-21 15:50:54.437: V/TASK(1460): MAKING CONNECTION
08-21 15:50:54.466: V/TASK(1460): Range:bytes=16636099-
08-21 15:50:54.466: V/TASK(1460): BYTES-WRITTEN: 16636099
08-21 15:50:54.514: V/TASK(1460): CONTENT-LENGTH: 27452333
08-21 15:50:55.326: V/TASK(1460): CONNECTED
08-21 15:50:56.886: V/TASK(1460): CODE: 206
08-21 15:50:56.886: V/TASK(1460): Partial Content
08-21 15:50:56.896: V/TASK(1460): Writing at location 16636099
.... some useless logs skipped for sake of sanity ....
08-21 15:51:00.986: V/TASK(1460): Writing at location 16763075
08-21 15:51:01.036: V/TASK(1460): 61.0
08-21 15:51:01.046: V/TASK(1460): Writing at location 16765123
08-21 15:51:01.056: V/TASK(1460): 61.0
08-21 15:51:01.196: V/TASK(1460): Writing at location 16767171
08-21 15:51:01.196: V/TASK(1460): 61.0
08-21 15:51:01.246: V/TASK(1460): Writing at location 16769219
08-21 15:51:01.246: V/TASK(1460): 61.0
08-21 15:51:01.266: V/TASK(1460): Writing at location 16771267
08-21 15:51:01.286: V/TASK(1460): 61.0
08-21 15:51:01.426: V/TASK(1460): Writing at location 16773315
08-21 15:51:01.437: V/TASK(1460): 61.0
08-21 15:51:01.486: V/TASK(1460): Writing at location 16775363
08-21 15:51:01.516: V/TASK(1460): 61.0
08-21 15:51:01.546: V/TASK(1460): Writing at location 16777411
08-21 15:51:01.546: V/TASK(1460): 61.0
08-21 15:51:01.586: V/TASK(1460): Writing at location 16779459
08-21 15:51:01.586: V/TASK(1460): 61.0
08-21 15:51:01.616: V/TASK(1460): Writing at location 16781507
08-21 15:51:01.616: V/TASK(1460): 61.0
08-21 15:51:01.676: V/TASK(1460): Writing at location 16783555
08-21 15:51:01.887: V/TASK(1460): 61.0
08-21 15:51:02.106: V/TASK(1460): INTERRUPTED
08-21 15:51:12.319: V/TASK--(1460): tqa-se3ep47.mp3 is not running. Now
starting
Well, and then the app stops working. How do I solve this ???