php mailer email something other than option value
I have built a form on my site that acts as a quote calculator, a user
selects options, each option has a value and those values are added up and
displayed as the final quote. I now need to be able to email that form
which I'm doing using a php mailer.
The issue I'm having is that as far as I can tell, the mailer just sends
the value of the selected options, and not the name. Below is a snippet of
code from my form:
<form action="quote_mailer.php" method="POST">
// Some more select options... //
<select class="select" id="singerName" name="singerName">
<option value="0" name="first"></option>
<option value="195" name="jack">Jack</option>
<option value="195" name="james">James</option>
<option value="195" name="toni">Toni</option>
<option value="195" name="yvonne">Yvonne</option>
</select>
<input type="submit" value="Send"><input type="reset" value="Clear">
</form>
And for my php:
<?php
$name = $_POST['quote_name'];
$email = $_POST['quote_email'];
$number = $_POST['quote_number'];
$singerName = $_POST['singerName'];
$formcontent="From: $name \n Number: $number \n Email: $email \n Event
Type: $eventType \n Singer Name: $singerName \n Instruments:
$instruments";
$recipient = "sam.skirrow@gmail.com";
$subject = "Contact Form";
$mailheader = "From: $quote_email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
As you can see from the above code, in my email this returns "Singer Name:
195" as that is the option value, but I need it to return the option NAME
- is this possible?
Thursday, 3 October 2013
Wednesday, 2 October 2013
Django cannot save postgresql instance on heroku
Django cannot save postgresql instance on heroku
I am new to Django and Heroku. I just deployed my project following the
heroku documents. Part of settings.py is:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'dfuldndi54p56q',
'HOST': 'ec2-54-227-251-13.compute-1.amazonaws.com',
'PORT': 5432,
'USER': 'pmotmgcaijwixy',
'PASSWORD': 'Wp0Gjf66JEC4mRKkvKrF22ptnj'
}
}
# Parse database configuration from $DATABASE_URL
import dj_database_url
DATABASES['default'] = dj_database_url.config()
part of models.py
class userInfo(models.Model):
"""The member information
"""
email = models.EmailField()
password = models.TextField()
account = models.CharField()
gender = models.CharField()
iconID = models.IntegerField()
gymID = models.IntegerField()
friendsNumber = models.IntegerField()
signature = models.CharField()
weibo = models.BooleanField()
in process.py:
try:
userInfo.objects.exists()
except DatabaseError:
user = userInfo()
else:
user = userInfo.objects.filter(email = email)
if user:
# check if the account is fully registered
if user.gymID:
return HttpResponse(content = 'user exist', status = 503)
user.email = email
pwmd5 = hashlib.md5(password)
user.password = pwmd5.hexdigest()
user.save()
after I push to heroku & syncdb, the following error occurred:
2013-10-03T01:40:49.936828+00:00 app[web.1]: Internal Server Error:
/ios/registerBasicInfo/json
2013-10-03T01:40:49.936828+00:00 app[web.1]: Traceback (most recent call
last):
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py",
line 115, in get_response
2013-10-03T01:40:49.936828+00:00 app[web.1]: response =
callback(request, *callback_args, **callback_kwargs)
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/server/ios/registerBasicInfo.py", line 50, in post
2013-10-03T01:40:49.936828+00:00 app[web.1]: user.save()
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py",
line 546, in save
2013-10-03T01:40:49.936828+00:00 app[web.1]:
force_update=force_update, update_fields=update_fields)
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py",
line 650, in save_base
2013-10-03T01:40:49.936828+00:00 app[web.1]: result =
manager._insert([self], fields=fields, return_id=update_pk, using=using,
raw=raw)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/manager.py",
line 215, in _insert
2013-10-03T01:40:49.937035+00:00 app[web.1]: return
insert_query(self.model, objs, fields, **kwargs)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py",
line 1675, in insert_query
2013-10-03T01:40:49.937035+00:00 app[web.1]: return
query.get_compiler(using=using).execute_sql(return_id)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
line 937, in execute_sql
2013-10-03T01:40:49.937035+00:00 app[web.1]: cursor.execute(sql, params)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/util.py",
line 41, in execute
2013-10-03T01:40:49.937035+00:00 app[web.1]: return
self.cursor.execute(sql, params)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py",
line 58, in execute
2013-10-03T01:40:49.937035+00:00 app[web.1]:
six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)),
sys.exc_info()[2])
2013-10-03T01:40:49.937192+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py",
line 54, in execute
2013-10-03T01:40:49.937192+00:00 app[web.1]: return
self.cursor.execute(query, args)
2013-10-03T01:40:49.937192+00:00 app[web.1]: DatabaseError: current
transaction is aborted, commands ignored until end of transaction block
Any idea to solve it? I suffered it for days, appreciate your help!
I am new to Django and Heroku. I just deployed my project following the
heroku documents. Part of settings.py is:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'dfuldndi54p56q',
'HOST': 'ec2-54-227-251-13.compute-1.amazonaws.com',
'PORT': 5432,
'USER': 'pmotmgcaijwixy',
'PASSWORD': 'Wp0Gjf66JEC4mRKkvKrF22ptnj'
}
}
# Parse database configuration from $DATABASE_URL
import dj_database_url
DATABASES['default'] = dj_database_url.config()
part of models.py
class userInfo(models.Model):
"""The member information
"""
email = models.EmailField()
password = models.TextField()
account = models.CharField()
gender = models.CharField()
iconID = models.IntegerField()
gymID = models.IntegerField()
friendsNumber = models.IntegerField()
signature = models.CharField()
weibo = models.BooleanField()
in process.py:
try:
userInfo.objects.exists()
except DatabaseError:
user = userInfo()
else:
user = userInfo.objects.filter(email = email)
if user:
# check if the account is fully registered
if user.gymID:
return HttpResponse(content = 'user exist', status = 503)
user.email = email
pwmd5 = hashlib.md5(password)
user.password = pwmd5.hexdigest()
user.save()
after I push to heroku & syncdb, the following error occurred:
2013-10-03T01:40:49.936828+00:00 app[web.1]: Internal Server Error:
/ios/registerBasicInfo/json
2013-10-03T01:40:49.936828+00:00 app[web.1]: Traceback (most recent call
last):
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py",
line 115, in get_response
2013-10-03T01:40:49.936828+00:00 app[web.1]: response =
callback(request, *callback_args, **callback_kwargs)
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/server/ios/registerBasicInfo.py", line 50, in post
2013-10-03T01:40:49.936828+00:00 app[web.1]: user.save()
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py",
line 546, in save
2013-10-03T01:40:49.936828+00:00 app[web.1]:
force_update=force_update, update_fields=update_fields)
2013-10-03T01:40:49.936828+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/base.py",
line 650, in save_base
2013-10-03T01:40:49.936828+00:00 app[web.1]: result =
manager._insert([self], fields=fields, return_id=update_pk, using=using,
raw=raw)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/manager.py",
line 215, in _insert
2013-10-03T01:40:49.937035+00:00 app[web.1]: return
insert_query(self.model, objs, fields, **kwargs)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/query.py",
line 1675, in insert_query
2013-10-03T01:40:49.937035+00:00 app[web.1]: return
query.get_compiler(using=using).execute_sql(return_id)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py",
line 937, in execute_sql
2013-10-03T01:40:49.937035+00:00 app[web.1]: cursor.execute(sql, params)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/util.py",
line 41, in execute
2013-10-03T01:40:49.937035+00:00 app[web.1]: return
self.cursor.execute(sql, params)
2013-10-03T01:40:49.937035+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py",
line 58, in execute
2013-10-03T01:40:49.937035+00:00 app[web.1]:
six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)),
sys.exc_info()[2])
2013-10-03T01:40:49.937192+00:00 app[web.1]: File
"/app/.heroku/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py",
line 54, in execute
2013-10-03T01:40:49.937192+00:00 app[web.1]: return
self.cursor.execute(query, args)
2013-10-03T01:40:49.937192+00:00 app[web.1]: DatabaseError: current
transaction is aborted, commands ignored until end of transaction block
Any idea to solve it? I suffered it for days, appreciate your help!
Android Listview -How to set listview in getview() override. Listview taking parent layout instead of listview
Android Listview -How to set listview in getview() override. Listview
taking parent layout instead of listview
I have posted this earlier in forums but i guess i am not clear . I have a
sidebar Listview and a main panel which contains my controls. I want to
highlight the active item in listview in oncreate() as a new activity is
launched for each click in sidebar.Here is my listview layout for
reference-
But i am writing my GetView() override wrong ,so my layout is ending up
like this.
This is my Activity Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?android:attr/activatedBackgroundIndicator">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="4">
<TextView
android:layout_width="fill_parent"
android:layout_height="40dp"
android:id="@+id/textViewMenuA2"
android:text="Menu"
android:background="@android:color/background_dark"
android:textSize="20dp"
>
</TextView>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_gravity="center"
android:background="@android:color/holo_green_light"
android:minHeight="50dp"
/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="2">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4"
android:layout_marginTop="40dp"
android:layout_marginLeft="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time To Gather Knapsacks
"
android:id="@+id/textView4"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4"
android:layout_marginTop="0dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Number of KnapSacks"
android:id="@+id/textView5"
android:layout_marginLeft="28dp"
android:layout_marginTop="10dp"
android:textSize="15dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="@+id/numberKnapSack"
android:layout_marginLeft="200dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start Time"
android:id="@+id/A2Stbutton"
android:layout_alignParentBottom="true"
android:layout_alignLeft="@+id/textView5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:id="@+id/A2textView2"
android:layout_alignParentBottom="true"
android:layout_alignLeft="@+id/numberKnapSack"
android:textSize="20dp"
android:layout_marginLeft="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="End Time"
android:id="@+id/A2Stopbutton2"
android:layout_marginLeft="25dp"
android:onClick="SetEndTime"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="20dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:id="@+id/A2textView3"
android:layout_marginLeft="212dp"
android:textSize="20dp"
android:layout_toLeftOf="@+id/A2button3"
android:layout_alignParentTop="true"
android:layout_alignBottom="@+id/A2button3"
android:layout_marginTop="45dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="2"
android:layout_alignBottom="@+id/A2button3"
android:layout_alignParentLeft="true"
android:layout_marginBottom="42dp"
android:layout_gravity="left|center_vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:id="@+id/A2button3"
android:layout_marginTop="0dp"
android:onClick="NextActivity"
android:layout_marginRight="65dp"
android:layout_below="@+id/A2Stopbutton2"
android:layout_alignParentRight="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Take Picture"
android:id="@+id/button"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:id="@+id/imageView"
android:layout_below="@+id/button"
android:layout_toLeftOf="@+id/A2button3"
android:layout_marginTop="20dp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
This is my CustomAdapter
package com.example.listviewandroid;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.ArrayList;
import java.util.List;
/**
* Created by polak_000 on 10/2/13.
*/
public class CustomAdapter extends BaseAdapter{
Context mycontext;
ArrayList<String> contactsList;
LayoutInflater minflater;
public CustomAdapter(Context context, ArrayList<String> list)
{
this.mycontext=context;
contactsList=list;
minflater =LayoutInflater.from(context);
}
@Override
public int getCount()
{
return contactsList.size();
}
@Override
public Object getItem(int position)
{
return contactsList.get(position);
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public View getView(int position,View convertView,ViewGroup parent)
{
LayoutInflater inflater=(LayoutInflater)
mycontext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view =inflater.inflate(R.layout.layout2,parent,false);
if (convertView !=null)
{
if (position ==1)
{
view.setBackgroundColor(Color.BLUE);
}
}
return view;
}
}
This is my Activity Code
package com.example.listviewandroid;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.text.format.Time;
import com.ball.sgxconnection.*;
import java.util.ArrayList;
/**
* Created by polak_000 on 9/26/13.
*/
public class Activity2 extends Activity {
ListView listView ;
static final String A2STE="";
static final String A2STM="";
static final String Knapsacks="";
private NBConnection sgxConnection;
@Override
protected void onCreate(Bundle savedInstanceState) {
sgxConnection = new NBConnection(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.layout2);
listView = (ListView) findViewById(R.id.listView);
ArrayList<String > list = new ArrayList<String>();
list.add("Test");
list.add("Test");list.add("Test");list.add("Test");list.add("Test");list.add("Test");
CustomAdapter adapter=new CustomAdapter(this,list);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new
AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
switch( position )
{
case 0: Intent newActivity = new
Intent(Activity2.this,MainActivity.class);
startActivity(newActivity);
break;
case 2: Intent newActivity1 = new
Intent(Activity2.this,Activity3.class);
startActivity(newActivity1);
break;
case 3: Intent newActivity2 = new
Intent(Activity2.this,Activity4.class);
startActivity(newActivity2);
break;
case 4: Intent newActivity3 = new
Intent(Activity2.this,Activity5.class);
startActivity(newActivity3);
break;
case 5: Intent newActivity4 = new
Intent(Activity2.this,Activity6.class);
startActivity(newActivity4);
break;
}
/* Toast.makeText(getApplicationContext(),
"Position :" + itemPosition + " ListItem : " +
itemValue, Toast.LENGTH_LONG)
.show();
*/
}
});
Time now = new Time();
now.setToNow();
TextView textview2= (TextView)findViewById(R.id.A2textView2);
textview2.setText(now.hour+" : "+now.minute);
if (savedInstanceState !=null)
{
restoreState(savedInstanceState);
}
this.listView.setSelector(R.drawable.selector_resource);
}
private void restoreState(Bundle savedInstanceState) {
EditText editText=(EditText)findViewById(R.id.numberKnapSack);
editText.setText(savedInstanceState.getString(Knapsacks));
TextView startime=(TextView)findViewById(R.id.A2textView2);
startime.setText(savedInstanceState.getString(A2STE));
TextView endtime=(TextView)findViewById(R.id.A2textView3);
endtime.setText(savedInstanceState.getString(A2STM));
}
public void SetEndTime(View view) {
Time now = new Time();
now.setToNow();
TextView textview3= (TextView)findViewById(R.id.A2textView3);
textview3.setText(now.hour+" : "+now.minute);
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
EditText editText=(EditText)findViewById(R.id.numberKnapSack);
outState.putString(Knapsacks,editText.getText().toString());
TextView startime=(TextView)findViewById(R.id.A2textView2);
outState.putString(A2STE,startime.getText().toString());
TextView endtime=(TextView)findViewById(R.id.A2textView3);
outState.putString(A2STM,endtime.getText().toString());
}
public void NextActivity(View view) {
Intent newActivity1 = new Intent(Activity2.this,Activity3.class);
startActivity(newActivity1);
this.overridePendingTransition(android.R.anim.slide_in_left,android.R.anim.slide_out_right);
}
}
Where am i going wrong ?
taking parent layout instead of listview
I have posted this earlier in forums but i guess i am not clear . I have a
sidebar Listview and a main panel which contains my controls. I want to
highlight the active item in listview in oncreate() as a new activity is
launched for each click in sidebar.Here is my listview layout for
reference-
But i am writing my GetView() override wrong ,so my layout is ending up
like this.
This is my Activity Layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?android:attr/activatedBackgroundIndicator">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="4">
<TextView
android:layout_width="fill_parent"
android:layout_height="40dp"
android:id="@+id/textViewMenuA2"
android:text="Menu"
android:background="@android:color/background_dark"
android:textSize="20dp"
>
</TextView>
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/listView"
android:layout_gravity="center"
android:background="@android:color/holo_green_light"
android:minHeight="50dp"
/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="2">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4"
android:layout_marginTop="40dp"
android:layout_marginLeft="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time To Gather Knapsacks
"
android:id="@+id/textView4"
android:textSize="20dp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4"
android:layout_marginTop="0dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Number of KnapSacks"
android:id="@+id/textView5"
android:layout_marginLeft="28dp"
android:layout_marginTop="10dp"
android:textSize="15dp" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:ems="10"
android:id="@+id/numberKnapSack"
android:layout_marginLeft="200dp" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Start Time"
android:id="@+id/A2Stbutton"
android:layout_alignParentBottom="true"
android:layout_alignLeft="@+id/textView5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:id="@+id/A2textView2"
android:layout_alignParentBottom="true"
android:layout_alignLeft="@+id/numberKnapSack"
android:textSize="20dp"
android:layout_marginLeft="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="4">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="End Time"
android:id="@+id/A2Stopbutton2"
android:layout_marginLeft="25dp"
android:onClick="SetEndTime"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="20dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:id="@+id/A2textView3"
android:layout_marginLeft="212dp"
android:textSize="20dp"
android:layout_toLeftOf="@+id/A2button3"
android:layout_alignParentTop="true"
android:layout_alignBottom="@+id/A2button3"
android:layout_marginTop="45dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="2"
android:layout_alignBottom="@+id/A2button3"
android:layout_alignParentLeft="true"
android:layout_marginBottom="42dp"
android:layout_gravity="left|center_vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:id="@+id/A2button3"
android:layout_marginTop="0dp"
android:onClick="NextActivity"
android:layout_marginRight="65dp"
android:layout_below="@+id/A2Stopbutton2"
android:layout_alignParentRight="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Take Picture"
android:id="@+id/button"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:id="@+id/imageView"
android:layout_below="@+id/button"
android:layout_toLeftOf="@+id/A2button3"
android:layout_marginTop="20dp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
This is my CustomAdapter
package com.example.listviewandroid;
import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.ArrayList;
import java.util.List;
/**
* Created by polak_000 on 10/2/13.
*/
public class CustomAdapter extends BaseAdapter{
Context mycontext;
ArrayList<String> contactsList;
LayoutInflater minflater;
public CustomAdapter(Context context, ArrayList<String> list)
{
this.mycontext=context;
contactsList=list;
minflater =LayoutInflater.from(context);
}
@Override
public int getCount()
{
return contactsList.size();
}
@Override
public Object getItem(int position)
{
return contactsList.get(position);
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public View getView(int position,View convertView,ViewGroup parent)
{
LayoutInflater inflater=(LayoutInflater)
mycontext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view =inflater.inflate(R.layout.layout2,parent,false);
if (convertView !=null)
{
if (position ==1)
{
view.setBackgroundColor(Color.BLUE);
}
}
return view;
}
}
This is my Activity Code
package com.example.listviewandroid;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.text.format.Time;
import com.ball.sgxconnection.*;
import java.util.ArrayList;
/**
* Created by polak_000 on 9/26/13.
*/
public class Activity2 extends Activity {
ListView listView ;
static final String A2STE="";
static final String A2STM="";
static final String Knapsacks="";
private NBConnection sgxConnection;
@Override
protected void onCreate(Bundle savedInstanceState) {
sgxConnection = new NBConnection(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.layout2);
listView = (ListView) findViewById(R.id.listView);
ArrayList<String > list = new ArrayList<String>();
list.add("Test");
list.add("Test");list.add("Test");list.add("Test");list.add("Test");list.add("Test");
CustomAdapter adapter=new CustomAdapter(this,list);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new
AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
switch( position )
{
case 0: Intent newActivity = new
Intent(Activity2.this,MainActivity.class);
startActivity(newActivity);
break;
case 2: Intent newActivity1 = new
Intent(Activity2.this,Activity3.class);
startActivity(newActivity1);
break;
case 3: Intent newActivity2 = new
Intent(Activity2.this,Activity4.class);
startActivity(newActivity2);
break;
case 4: Intent newActivity3 = new
Intent(Activity2.this,Activity5.class);
startActivity(newActivity3);
break;
case 5: Intent newActivity4 = new
Intent(Activity2.this,Activity6.class);
startActivity(newActivity4);
break;
}
/* Toast.makeText(getApplicationContext(),
"Position :" + itemPosition + " ListItem : " +
itemValue, Toast.LENGTH_LONG)
.show();
*/
}
});
Time now = new Time();
now.setToNow();
TextView textview2= (TextView)findViewById(R.id.A2textView2);
textview2.setText(now.hour+" : "+now.minute);
if (savedInstanceState !=null)
{
restoreState(savedInstanceState);
}
this.listView.setSelector(R.drawable.selector_resource);
}
private void restoreState(Bundle savedInstanceState) {
EditText editText=(EditText)findViewById(R.id.numberKnapSack);
editText.setText(savedInstanceState.getString(Knapsacks));
TextView startime=(TextView)findViewById(R.id.A2textView2);
startime.setText(savedInstanceState.getString(A2STE));
TextView endtime=(TextView)findViewById(R.id.A2textView3);
endtime.setText(savedInstanceState.getString(A2STM));
}
public void SetEndTime(View view) {
Time now = new Time();
now.setToNow();
TextView textview3= (TextView)findViewById(R.id.A2textView3);
textview3.setText(now.hour+" : "+now.minute);
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
EditText editText=(EditText)findViewById(R.id.numberKnapSack);
outState.putString(Knapsacks,editText.getText().toString());
TextView startime=(TextView)findViewById(R.id.A2textView2);
outState.putString(A2STE,startime.getText().toString());
TextView endtime=(TextView)findViewById(R.id.A2textView3);
outState.putString(A2STM,endtime.getText().toString());
}
public void NextActivity(View view) {
Intent newActivity1 = new Intent(Activity2.this,Activity3.class);
startActivity(newActivity1);
this.overridePendingTransition(android.R.anim.slide_in_left,android.R.anim.slide_out_right);
}
}
Where am i going wrong ?
How to send an email via outlook with .asp
How to send an email via outlook with .asp
I'm not to familiar with this but i have done similar in the past.
Basically i want to have an html, or .asp page with a simple form for the
user to input data. I've accomplished this in VB.net with the following:
Imports Outlook = Microsoft.Office.Interop.Outlook
Private Sub cmdFax_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)Handles cmdFax.Click
Dim oApp As Outlook._Application
oApp = New Outlook.Application()
Dim oMsg As Outlook._MailItem
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg.Subject = ""
oMsg.Body = "" & vbCr & vbCr
If Len(txtEmail.Text) > 0 Then
oMsg.To = Me.txtEmail.Text
Else
oMsg.To = "[Fax:" & Me.txtAttn.Text & " @ " &
Me.txtFaxNum.Text & "]"
End If
Dim sSource As String = "C:\ValidPath.txt"
Dim sDisplayName As String = "Hello.txt"
Dim sBodyLen As String = oMsg.Body.Length
Dim oAttachs As Outlook.Attachments = oMsg.Attachments
Dim oAttach As Outlook.Attachment
If Len(Me.TextBox1.Text) > 0 Then
oAttach = oAttachs.Add(Me.TextBox1.Text)
Else
End If
oAttachs.Add(Me.cboForm.SelectedValue)
oMsg.Send()
oApp = Nothing
oMsg = Nothing
oAttach = Nothing
oAttachs = Nothing
'MsgBox("Your Fax Has Been Sent Successfully")
lblStatus.Text = "Fax Sent"
'lblStatus.Text = "Ready"
End If
End Sub
Is there anyway to accomplish the same thing using .asp? or is there an
easier way to do this using a contact form and .asp page? I'm just trying
to avoid using an external mail server and have the form send from the
actual user.
Open to any suggestions!
I'm not to familiar with this but i have done similar in the past.
Basically i want to have an html, or .asp page with a simple form for the
user to input data. I've accomplished this in VB.net with the following:
Imports Outlook = Microsoft.Office.Interop.Outlook
Private Sub cmdFax_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)Handles cmdFax.Click
Dim oApp As Outlook._Application
oApp = New Outlook.Application()
Dim oMsg As Outlook._MailItem
oMsg = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oMsg.Subject = ""
oMsg.Body = "" & vbCr & vbCr
If Len(txtEmail.Text) > 0 Then
oMsg.To = Me.txtEmail.Text
Else
oMsg.To = "[Fax:" & Me.txtAttn.Text & " @ " &
Me.txtFaxNum.Text & "]"
End If
Dim sSource As String = "C:\ValidPath.txt"
Dim sDisplayName As String = "Hello.txt"
Dim sBodyLen As String = oMsg.Body.Length
Dim oAttachs As Outlook.Attachments = oMsg.Attachments
Dim oAttach As Outlook.Attachment
If Len(Me.TextBox1.Text) > 0 Then
oAttach = oAttachs.Add(Me.TextBox1.Text)
Else
End If
oAttachs.Add(Me.cboForm.SelectedValue)
oMsg.Send()
oApp = Nothing
oMsg = Nothing
oAttach = Nothing
oAttachs = Nothing
'MsgBox("Your Fax Has Been Sent Successfully")
lblStatus.Text = "Fax Sent"
'lblStatus.Text = "Ready"
End If
End Sub
Is there anyway to accomplish the same thing using .asp? or is there an
easier way to do this using a contact form and .asp page? I'm just trying
to avoid using an external mail server and have the form send from the
actual user.
Open to any suggestions!
Python: connect to VPN server
Python: connect to VPN server
Is it possible to connect to VPN server using python? Different types:
PPTP, L2TP, OpenVPN, Cisco.
My goal is check if server is alive (and then disconnect).
Is it possible to connect to VPN server using python? Different types:
PPTP, L2TP, OpenVPN, Cisco.
My goal is check if server is alive (and then disconnect).
Tuesday, 1 October 2013
Message Length Zero and packet repeating
Message Length Zero and packet repeating
I am using an TinyOS application to send packets from Radio To Serial. I
am broadcasting messages. When I read motes using Java Listen class,
sometimes I receive packet length as zero and packet counter repeating
itself. What could be the problem? I get data something like this:
00 FF FF FF 01 12 3F 06 00 00 F7 54 00 00 F6 30 02 E0 00 18 27 6C 00 18 27 75
00 FF FF FF 01 12 3F 06 00 00 F7 55 00 00 F6 31 02 E0 00 18 27 82 00 18 27 8F
00 00 FF FF 01 00 3F 06 00 00 F7 57 00 00 F6 32 02 E0 00 18 27 98 00 18 27 AA
00 FF FF FF 01 12 3F 06 00 00 F7 57 00 00 F6 33 02 E0 00 18 27 B8 00 18 27 BD
00 FF FF FF 01 12 3F 06 00 00 F7 58 00 00 F6 34 02 E0 00 18 27 CE 00 18 27 D5
Here 00 00 F7 54, 00 00 F7 55 ... are my packet counters. So, if you see
this data, I have received packet length as '00' in third row and packet
counter repeating itself in 4th row. This happens sometimes only. If you
need I can post code too. Please help.
I am using an TinyOS application to send packets from Radio To Serial. I
am broadcasting messages. When I read motes using Java Listen class,
sometimes I receive packet length as zero and packet counter repeating
itself. What could be the problem? I get data something like this:
00 FF FF FF 01 12 3F 06 00 00 F7 54 00 00 F6 30 02 E0 00 18 27 6C 00 18 27 75
00 FF FF FF 01 12 3F 06 00 00 F7 55 00 00 F6 31 02 E0 00 18 27 82 00 18 27 8F
00 00 FF FF 01 00 3F 06 00 00 F7 57 00 00 F6 32 02 E0 00 18 27 98 00 18 27 AA
00 FF FF FF 01 12 3F 06 00 00 F7 57 00 00 F6 33 02 E0 00 18 27 B8 00 18 27 BD
00 FF FF FF 01 12 3F 06 00 00 F7 58 00 00 F6 34 02 E0 00 18 27 CE 00 18 27 D5
Here 00 00 F7 54, 00 00 F7 55 ... are my packet counters. So, if you see
this data, I have received packet length as '00' in third row and packet
counter repeating itself in 4th row. This happens sometimes only. If you
need I can post code too. Please help.
therubyracer installation on windows with libv8 installed --with-system-v8
therubyracer installation on windows with libv8 installed --with-system-v8
I finally got libv8 installed on my windows with gem install libv8 --
--with-system-v8
now when I am trying to install therubyracer I get
gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-system-v8
checking for main() in -lpthread... no
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby193/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/
C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in
`configure': You hav
e chosen to use the version of V8 found on your system
(Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
thanks,
The Mgmt
What I want to know is what this error message really means? Also I looked
this up https://github.com/cowboyd/libv8#bring-your-own-v8 How do I
install headers for v8?
I finally got libv8 installed on my windows with gem install libv8 --
--with-system-v8
now when I am trying to install therubyracer I get
gem install therubyracer
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-system-v8
checking for main() in -lpthread... no
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby193/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/
C:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:50:in
`configure': You hav
e chosen to use the version of V8 found on your system
(Libv8::Location::System::NotFoundError)
and *not* the one that is bundle with the libv8 rubygem. However,
it could not be located. please make sure you have a version of
v8 that is compatible with 3.16.14.3 installed. You may
need to special --with-v8-dir options if it is in a non-standard
location
thanks,
The Mgmt
What I want to know is what this error message really means? Also I looked
this up https://github.com/cowboyd/libv8#bring-your-own-v8 How do I
install headers for v8?
why query giving 0 rows
why query giving 0 rows
Query1
SELECT SessionInfo.IVRSessionInfoID
FROM SessionInfo
WHERE SessionCallTime BETWEEN UNIX_TIMESTAMP('2013-08-01 00:00:00')
AND UNIX_TIMESTAMP('2013-08-01 23:59:59')
ORDER BY SessionInfo.SessionCallTime DESC;
Query2
SELECT SessionInfo.IVRSessionInfoID
FROM SessionInfo
WHERE (SessionInfo.SessionCallTime BETWEEN '2013-08-01 00:00:00'
AND '2013-08-01 23:59:59')
ORDER BY SessionInfo.SessionCallTime DESC;
what is the diffrence why first query gives 0 rows second query gives records
in this tables 20000 rows betwqeen this two dates
table schema
CREATE TABLE `SessionInfo` (
`IVRSessionInfoID` bigint(8) unsigned NOT NULL AUTO_INCREMENT,
`SessionCallTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`MGServerIP` varchar(15) NOT NULL,
`MGServerPort` smallint(2) unsigned NOT NULL DEFAULT '5060',
`SessionUniqueID` varchar(64) NOT NULL,
`ANI` varchar(20) NOT NULL,
`CountryID` int(4) unsigned DEFAULT NULL,
`CountryStateAreaID` int(4) unsigned DEFAULT NULL,
`AccessNumberProviderLogID` int(4) unsigned DEFAULT NULL,
`AccessNumberLogID` int(4) unsigned DEFAULT NULL,
`AccessRestrictionLogID` int(4) unsigned DEFAULT NULL,
`SubscriberCardID` bigint(8) unsigned DEFAULT NULL,
`SessionDuration` int(4) unsigned NOT NULL,
`SessionRNDDuration` int(4) unsigned NOT NULL,
`TotalCharge` decimal(15,6) unsigned NOT NULL,
`RuleSetLogID` int(4) unsigned DEFAULT NULL,
`RuleSetChargeInfoLogID` int(4) unsigned DEFAULT NULL,
`RuleSetRNDDuration` int(4) unsigned NOT NULL,
`RuleSetTotalCharge` decimal(15,6) unsigned NOT NULL,
PRIMARY KEY (`IVRSessionInfoID`),
UNIQUE KEY `UNIQUE` (`SessionUniqueID`),
KEY `SessionCallTime` (`SessionCallTime`),
KEY `ANI` (`ANI`),
KEY `CountryID` (`CountryID`),
KEY `CountryStateAreaID` (`CountryStateAreaID`),
KEY `AccessNumberProviderLogID` (`AccessNumberProviderLogID`),
KEY `AccessNumberLogID` (`AccessNumberLogID`),
KEY `AccessRestrictionLogID` (`AccessRestrictionLogID`),
KEY `SubscriberCardID` (`SubscriberCardID`),
) ENGINE=InnoDB AUTO_INCREMENT=22199955 DEFAULT CHARSET=latin1
ROW_FORMAT=COMPACT;
Query1
SELECT SessionInfo.IVRSessionInfoID
FROM SessionInfo
WHERE SessionCallTime BETWEEN UNIX_TIMESTAMP('2013-08-01 00:00:00')
AND UNIX_TIMESTAMP('2013-08-01 23:59:59')
ORDER BY SessionInfo.SessionCallTime DESC;
Query2
SELECT SessionInfo.IVRSessionInfoID
FROM SessionInfo
WHERE (SessionInfo.SessionCallTime BETWEEN '2013-08-01 00:00:00'
AND '2013-08-01 23:59:59')
ORDER BY SessionInfo.SessionCallTime DESC;
what is the diffrence why first query gives 0 rows second query gives records
in this tables 20000 rows betwqeen this two dates
table schema
CREATE TABLE `SessionInfo` (
`IVRSessionInfoID` bigint(8) unsigned NOT NULL AUTO_INCREMENT,
`SessionCallTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`MGServerIP` varchar(15) NOT NULL,
`MGServerPort` smallint(2) unsigned NOT NULL DEFAULT '5060',
`SessionUniqueID` varchar(64) NOT NULL,
`ANI` varchar(20) NOT NULL,
`CountryID` int(4) unsigned DEFAULT NULL,
`CountryStateAreaID` int(4) unsigned DEFAULT NULL,
`AccessNumberProviderLogID` int(4) unsigned DEFAULT NULL,
`AccessNumberLogID` int(4) unsigned DEFAULT NULL,
`AccessRestrictionLogID` int(4) unsigned DEFAULT NULL,
`SubscriberCardID` bigint(8) unsigned DEFAULT NULL,
`SessionDuration` int(4) unsigned NOT NULL,
`SessionRNDDuration` int(4) unsigned NOT NULL,
`TotalCharge` decimal(15,6) unsigned NOT NULL,
`RuleSetLogID` int(4) unsigned DEFAULT NULL,
`RuleSetChargeInfoLogID` int(4) unsigned DEFAULT NULL,
`RuleSetRNDDuration` int(4) unsigned NOT NULL,
`RuleSetTotalCharge` decimal(15,6) unsigned NOT NULL,
PRIMARY KEY (`IVRSessionInfoID`),
UNIQUE KEY `UNIQUE` (`SessionUniqueID`),
KEY `SessionCallTime` (`SessionCallTime`),
KEY `ANI` (`ANI`),
KEY `CountryID` (`CountryID`),
KEY `CountryStateAreaID` (`CountryStateAreaID`),
KEY `AccessNumberProviderLogID` (`AccessNumberProviderLogID`),
KEY `AccessNumberLogID` (`AccessNumberLogID`),
KEY `AccessRestrictionLogID` (`AccessRestrictionLogID`),
KEY `SubscriberCardID` (`SubscriberCardID`),
) ENGINE=InnoDB AUTO_INCREMENT=22199955 DEFAULT CHARSET=latin1
ROW_FORMAT=COMPACT;
Why is headhunting uncommon for academic positions=?iso-8859-1?Q?=3F_=96_academia.stackexchange.com?=
Why is headhunting uncommon for academic positions? –
academia.stackexchange.com
In scientific conferences, there are usually many headhunters who come to
offer newly graduated scholars jobs in the industry sector. As a matter of
fact, the recruitment in industry mostly works with …
academia.stackexchange.com
In scientific conferences, there are usually many headhunters who come to
offer newly graduated scholars jobs in the industry sector. As a matter of
fact, the recruitment in industry mostly works with …
Monday, 30 September 2013
Evaluate $ \lim=?iso-8859-1?Q?=5F{x\rightarrow{\frac\pi2_}}_?=(\sec(x) \tan(x))^{\cos(x)}$ without L'Hôpital's rule math.stackexchange.com
Evaluate $ \lim_{x\rightarrow{\frac\pi2 }} (\sec(x) \tan(x))^{\cos(x)}$
without L'Hôpital's rule – math.stackexchange.com
I have tried changing limit to $\lim_{x\rightarrow0}$ and use some
trigonometry identity ($\sin^2(x)+\cos^2(x) = 1$ and $\sin (x+\pi/2) =
\cos(x)$) but doesn't work I have no idea on how to do this …
without L'Hôpital's rule – math.stackexchange.com
I have tried changing limit to $\lim_{x\rightarrow0}$ and use some
trigonometry identity ($\sin^2(x)+\cos^2(x) = 1$ and $\sin (x+\pi/2) =
\cos(x)$) but doesn't work I have no idea on how to do this …
How to show that $(\delta'f)(e)=\delta(\phi^* f)(e)$?
How to show that $(\delta'f)(e)=\delta(\phi^* f)(e)$?
I am reading linear algebraic groups.
I have a question in line 4 of the third paragraph of Page 66. How to show
that $(\delta'f)(e)=\delta(\phi^* f)(e)$ for all $f\in K[G]$? Here $G$ is
an algebraic group, $K$ is an algebraic closed field, $\delta' =
\operatorname{Ad} x(\delta) = d(\operatorname{Int} x(\delta))$,
$\phi=\operatorname{Int} x$, $\operatorname{Int} x(y) = xyx^{-1}$, $x, y
\in G$. Thank you very much.
I think that $\delta'f = d(\operatorname{Int} x(\delta))f$.
I am reading linear algebraic groups.
I have a question in line 4 of the third paragraph of Page 66. How to show
that $(\delta'f)(e)=\delta(\phi^* f)(e)$ for all $f\in K[G]$? Here $G$ is
an algebraic group, $K$ is an algebraic closed field, $\delta' =
\operatorname{Ad} x(\delta) = d(\operatorname{Int} x(\delta))$,
$\phi=\operatorname{Int} x$, $\operatorname{Int} x(y) = xyx^{-1}$, $x, y
\in G$. Thank you very much.
I think that $\delta'f = d(\operatorname{Int} x(\delta))f$.
Remove x amount of elements with .remove()
Remove x amount of elements with .remove()
I am not seeing any clear documentation on removing a certain amount of
elements without it being in a specific order, of course there are many
ways to remove a list of say 5 items, if they are in that order. What if
there is elements that you don't want removed in between? Let me show you
an example
FIDDLE: Below is just pieces from this fiddle, it would be easier just
taking a look at the fiddle.
HTML
<div class="item empty">Empty</div>
<div class="item empty">Empty</div>
<div class="item editable">Editable</div>
<div class="item empty">Empty</div>
</div>
<button class="demo">Demo</button>
jQuery
$('.demo').click(function() {
var length = $('.item').length,
columns = 12/6,
addColumn = columns - length
//Set this for subtracting elements if addColumn is a negitive
if(addColumn < 0) {
//Want to remove the amount of items which is -2 in this case
$('.item.empty').eq(/*Remove whatever amount of addColumn */ ).remove()
}
//Equals -2
alert(addColumn)
});
So just to be clear, I am trying to remove the amount of .empty items
based on whatever the amount is passed into the addColumn variable in this
case its static set at -2.
So I ask if addColumn < 0 is a negative number then we do subtraction
using .remove() and I need to remove the amount of .empty items equal to
the addColumn variable.
12/6 comes from a 12 column grid and the 6 is a two column layout span6
span6 and so if the layout is set at 4 columns we need to remove 2
columns, which is where the -2 comes from.
I am not seeing any clear documentation on removing a certain amount of
elements without it being in a specific order, of course there are many
ways to remove a list of say 5 items, if they are in that order. What if
there is elements that you don't want removed in between? Let me show you
an example
FIDDLE: Below is just pieces from this fiddle, it would be easier just
taking a look at the fiddle.
HTML
<div class="item empty">Empty</div>
<div class="item empty">Empty</div>
<div class="item editable">Editable</div>
<div class="item empty">Empty</div>
</div>
<button class="demo">Demo</button>
jQuery
$('.demo').click(function() {
var length = $('.item').length,
columns = 12/6,
addColumn = columns - length
//Set this for subtracting elements if addColumn is a negitive
if(addColumn < 0) {
//Want to remove the amount of items which is -2 in this case
$('.item.empty').eq(/*Remove whatever amount of addColumn */ ).remove()
}
//Equals -2
alert(addColumn)
});
So just to be clear, I am trying to remove the amount of .empty items
based on whatever the amount is passed into the addColumn variable in this
case its static set at -2.
So I ask if addColumn < 0 is a negative number then we do subtraction
using .remove() and I need to remove the amount of .empty items equal to
the addColumn variable.
12/6 comes from a 12 column grid and the 6 is a two column layout span6
span6 and so if the layout is set at 4 columns we need to remove 2
columns, which is where the -2 comes from.
Getting div id by GET in Javascript
Getting div id by GET in Javascript
Ciao
I need to create a dynamic form based on user selections.
I.e. in the first form field I select "John Smith", this will populate
(through an external php/mysql file ) the second select field "Artist,
Carpenter, Other", if I choose Artist I populate the third select field
with "Singer, Painter, Sculptor" and so on
Giving my incompetence on javascript, I spent the morning googling for
scripts and I found a cool tutorial here
It works, it's clean, but it updates only the div with id txtResult, which
is statically included in the js file (see lines 19 and 31 of
ajax_req.js). I thought I could pass the id name by GET, but I don't know
how to make the script recognize the variable.
This is the code:
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("txtResult").innerHTML=
xmlHttp.responseText;
}
}
I had in mind to pass by GET the id name and have something like this:
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("GET[idName]").innerHTML=
xmlHttp.responseText;
}
}
Can you please help me? I could change script too if you happen to know
something better
Ciao and thank you,
Ed
Ciao
I need to create a dynamic form based on user selections.
I.e. in the first form field I select "John Smith", this will populate
(through an external php/mysql file ) the second select field "Artist,
Carpenter, Other", if I choose Artist I populate the third select field
with "Singer, Painter, Sculptor" and so on
Giving my incompetence on javascript, I spent the morning googling for
scripts and I found a cool tutorial here
It works, it's clean, but it updates only the div with id txtResult, which
is statically included in the js file (see lines 19 and 31 of
ajax_req.js). I thought I could pass the id name by GET, but I don't know
how to make the script recognize the variable.
This is the code:
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("txtResult").innerHTML=
xmlHttp.responseText;
}
}
I had in mind to pass by GET the id name and have something like this:
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("GET[idName]").innerHTML=
xmlHttp.responseText;
}
}
Can you please help me? I could change script too if you happen to know
something better
Ciao and thank you,
Ed
Sunday, 29 September 2013
Visited every section of the FAQ (retired)
Visited every section of the FAQ (retired)
The way to earn the 'Analytical' badge is: Visited every section of the
FAQ (retired). What does (retired) mean? Does it mean that it is no longer
available?
The way to earn the 'Analytical' badge is: Visited every section of the
FAQ (retired). What does (retired) mean? Does it mean that it is no longer
available?
SQL- Getting maximum value along with all other columns?
SQL- Getting maximum value along with all other columns?
I have a table, which can be seen as a evaluation of two courses in
several classroom tests, like this:
student_ID Evaluation Course1 Course2
------------------------------------------------------
1 5 88 93
2 4 70 87
1 5 93 90
2 5 99 91
3 3 65 60
3 4 88 70
I need to get the result of the Evaluation=5 for each student, if any. If
that student has more than one Evaluation=5, the query only show any one
of them. So for the above example table, the query result will be
student_ID Evaluation Course1 Course2
------------------------------------------------------
1 5 88 93
2 5 99 91
Of course in my real table, the "Courses" number is more than 2.
Thanks for the help.
I have a table, which can be seen as a evaluation of two courses in
several classroom tests, like this:
student_ID Evaluation Course1 Course2
------------------------------------------------------
1 5 88 93
2 4 70 87
1 5 93 90
2 5 99 91
3 3 65 60
3 4 88 70
I need to get the result of the Evaluation=5 for each student, if any. If
that student has more than one Evaluation=5, the query only show any one
of them. So for the above example table, the query result will be
student_ID Evaluation Course1 Course2
------------------------------------------------------
1 5 88 93
2 5 99 91
Of course in my real table, the "Courses" number is more than 2.
Thanks for the help.
How to create FlexSlider with flipping content
How to create FlexSlider with flipping content
I'm starting to get in to web development. I'm keenly interested on
minimal designs and flat UIs.
I was googling around and found some interested sites. This particular
site caught my eye which has a unique slideshow. I did a bit of snooping
with dev tools and found that the site uses Flexslider.
I would really like to know how to achieve this kind of effect.
A sample on Fiddle with 2 image slides with flipping content would be
really appreciated if possible to be provided.
URL for the site: http://skincollective.net/
[ This is not an advertisement if it's against the rules ]
I'm starting to get in to web development. I'm keenly interested on
minimal designs and flat UIs.
I was googling around and found some interested sites. This particular
site caught my eye which has a unique slideshow. I did a bit of snooping
with dev tools and found that the site uses Flexslider.
I would really like to know how to achieve this kind of effect.
A sample on Fiddle with 2 image slides with flipping content would be
really appreciated if possible to be provided.
URL for the site: http://skincollective.net/
[ This is not an advertisement if it's against the rules ]
How to increment a single number in a text file with PHP
How to increment a single number in a text file with PHP
I am writing a VoteBox (like/dislike box) in html and I cannot find how to
do this anywhere.
Basically, there will be a like and a dislike button. When one of them
gets clicked, it will forward the user to a page. And in that, I want some
PHP code that will increase the number in upvotes.txt/downvotes.txt
I have tried doing it with a database but the problem is I want anyone to
be able to use this without any setup.
i also want the front page to display the number of upvotes and the number
of downvotes
so its kinda like this (most of this isn't real code BTW im new to PHP):
//this is the code for upvote.html
$upvotes = get_data_from_TXT_file
$changedupvotes = $upvotes + 1
set_data_in_txt_file_to_$changedupvotes
Sorry if i havent explained this very well
Any help appreciated
I am writing a VoteBox (like/dislike box) in html and I cannot find how to
do this anywhere.
Basically, there will be a like and a dislike button. When one of them
gets clicked, it will forward the user to a page. And in that, I want some
PHP code that will increase the number in upvotes.txt/downvotes.txt
I have tried doing it with a database but the problem is I want anyone to
be able to use this without any setup.
i also want the front page to display the number of upvotes and the number
of downvotes
so its kinda like this (most of this isn't real code BTW im new to PHP):
//this is the code for upvote.html
$upvotes = get_data_from_TXT_file
$changedupvotes = $upvotes + 1
set_data_in_txt_file_to_$changedupvotes
Sorry if i havent explained this very well
Any help appreciated
Saturday, 28 September 2013
Pretty new to Java, how to insert user-inputted string to direct a reference?
Pretty new to Java, how to insert user-inputted string to direct a reference?
(In java,) This may or may not be possible, I assume it is because it
seems to short-cutty/easy to not exist. Basically what I want to do is
have the user insert the name of a state, then it add one to that state's
counter, which is stored in a different class. I want to do this without
creating 50 if/else statements. Here's pseudocode which represents how I
would expect it to be done. (this code would be encapsuled in a while loop
in mainclass.java and the counters and state names are in a class named
state.java.)
Scanner userstate = new Scanner(System.in);
String statename = userstate.nextLine();
state.(statename).counter++;
in state.java:
public state(int counter){
}
public static state Alabama = new state(0);
For time's sake, I hope there is a shortcut similar to the above.
(In java,) This may or may not be possible, I assume it is because it
seems to short-cutty/easy to not exist. Basically what I want to do is
have the user insert the name of a state, then it add one to that state's
counter, which is stored in a different class. I want to do this without
creating 50 if/else statements. Here's pseudocode which represents how I
would expect it to be done. (this code would be encapsuled in a while loop
in mainclass.java and the counters and state names are in a class named
state.java.)
Scanner userstate = new Scanner(System.in);
String statename = userstate.nextLine();
state.(statename).counter++;
in state.java:
public state(int counter){
}
public static state Alabama = new state(0);
For time's sake, I hope there is a shortcut similar to the above.
Android change text in textview on swipe with animation
Android change text in textview on swipe with animation
I am developing an android application and i have set of messages to show
on a display page. At a given time only one message will be shown, but if
user swipes the screen i want to change the message on textview on swipe.
I want animation direction based on swipe direction meaning if user swipe
left to right then left-right textview animation, similarly right-left and
bottom-top animation. Please advise me how to achieve this.
I am developing an android application and i have set of messages to show
on a display page. At a given time only one message will be shown, but if
user swipes the screen i want to change the message on textview on swipe.
I want animation direction based on swipe direction meaning if user swipe
left to right then left-right textview animation, similarly right-left and
bottom-top animation. Please advise me how to achieve this.
ASP.NET MVC application that needs reading from SQL server not working on IIS but on visual studio, while ASP.NET Web Applicatopn worked for...
ASP.NET MVC application that needs reading from SQL server not working on
IIS but on visual studio, while ASP.NET Web Applicatopn worked for...
I followed an example of using SQL databse from an ASP.NET MVC application
and can get it work on Visual Studio, but when I tried to deploy it on the
local IIS and provide the values on the URL it was said "... The resource
cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly. ..."
I can access the same SQL database from APS.NET Web application but not MVC.
Can you tell me why this happens and how to solve the problem?
IIS but on visual studio, while ASP.NET Web Applicatopn worked for...
I followed an example of using SQL databse from an ASP.NET MVC application
and can get it work on Visual Studio, but when I tried to deploy it on the
local IIS and provide the values on the URL it was said "... The resource
cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure
that it is spelled correctly. ..."
I can access the same SQL database from APS.NET Web application but not MVC.
Can you tell me why this happens and how to solve the problem?
Communication Bluetooth android-arduino
Communication Bluetooth android-arduino
I have modified the android app "Bluetooth Chat" that you can find in
android sdk examples version 2.1 The app estabilished a bluetooth
connection with arduino, and, when with the app I send 0 or 1, arduino
send a simple message "You have pressed 0 or 1". It works if I test with
eclipse's debug, but when I test with my smartphone, the result in the
display is different, arduino's string is fragmented
example: smartphone: 0 -> arduino "You have pressed 0 or 1" smartphone
display: "y" "ou pr"
The rest of the string was lost or not shown in the display. Can you help
me? No error in logcat, only this bug.
This is the code:
public class BluetoothLampService {
// Debugging
private static final String TAG = "BluetoothLampService";
private static final boolean D = true;
// Name for the SDP record when creating server socket
private static final String NAME = "BluetoothLamp";
// Unique UUID for this application - Standard SerialPortService ID
private static final UUID MY_UUID =
UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
// Member fields
private final BluetoothAdapter Adapter;
private final Handler Handler;
// private AcceptThread AcceptThread;
private ConnectThread ConnectThread;
private ConnectedThread ConnectedThread;
private int State;
// Constants that indicate the current connection state
public static final int STATE_NONE = 0; // we're doing nothing
public static final int STATE_LISTEN = 1; // now listening for
incoming connections
public static final int STATE_CONNECTING = 2; // now initiating an
outgoing connection
public static final int STATE_CONNECTED = 3; // now connected to a
remote device
/**
* Constructor. Prepares a new BluetoothChat session.
* @param context The UI Activity Context
* @param handler A Handler to messages back to the UI Activity
*/
public BluetoothLampService(Context context, Handler handler) {
Adapter = BluetoothAdapter.getDefaultAdapter();
State = STATE_NONE;
Handler = handler;
}
/**
* Set the current state of the chat connection
* @param state An integer defining the current connection state
*/
private synchronized void setState(int state) {
State = state;
// Give the new state to the Handler so the UI Activity can update
Handler.obtainMessage(MainActivity.MESSAGE_STATE_CHANGE, state,
-1).sendToTarget();
}
/**
* Return the current connection state. */
public synchronized int getState() {
return State;
}
/**
* Start the chat service. Specifically start AcceptThread to begin a
* session in listening (server) mode. Called by the Activity
onResume() */
public synchronized void start() {
// Cancel any thread attempting to make a connection
if (ConnectThread != null) {ConnectThread.cancel(); ConnectThread
= null;}
// Cancel any thread currently running a connection
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// Start the thread to listen on a BluetoothServerSocket
// if (AcceptThread == null) {
// AcceptThread = new AcceptThread();
// AcceptThread.start();
// }
setState(STATE_LISTEN);
}
/**
* Start the ConnectThread to initiate a connection to a remote device.
* @param device The BluetoothDevice to connect
*/
public synchronized void connect(BluetoothDevice device) {
// Cancel any thread attempting to make a connection
if (State == STATE_CONNECTING) {
if (ConnectThread != null) {ConnectThread.cancel();
ConnectThread = null;}
}
// Cancel any thread currently running a connection
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// Start the thread to connect with the given device
ConnectThread = new ConnectThread(device);
ConnectThread.start();
setState(STATE_CONNECTING);
}
/**
* Start the ConnectedThread to begin managing a Bluetooth connection
* @param socket The BluetoothSocket on which the connection was made
* @param device The BluetoothDevice that has been connected
*/
public synchronized void connected(BluetoothSocket socket,
BluetoothDevice device) {
// Cancel the thread that completed the connection
if (ConnectThread != null) {ConnectThread.cancel(); ConnectThread
= null;}
// Cancel any thread currently running a connection
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// Cancel the accept thread because we only want to connect to one
device
// if (AcceptThread != null) {AcceptThread.cancel(); AcceptThread =
null;}
// Start the thread to manage the connection and perform
transmissions
ConnectedThread = new ConnectedThread(socket);
ConnectedThread.start();
// Send the name of the connected device back to the UI Activity
Message msg =
Handler.obtainMessage(MainActivity.MESSAGE_DEVICE_NAME);
Bundle bundle = new Bundle();
bundle.putString(MainActivity.DEVICE_NAME, device.getName());
msg.setData(bundle);
Handler.sendMessage(msg);
setState(STATE_CONNECTED);
}
/**
* Stop all threads
*/
public synchronized void stop() {
if (ConnectThread != null) {ConnectThread.cancel(); ConnectThread
= null;}
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// if (AcceptThread != null) {AcceptThread.cancel(); AcceptThread =
null;}
setState(STATE_NONE);
}
/**
* Write to the ConnectedThread in an unsynchronized manner
* @param out The bytes to write
* @see ConnectedThread#write(byte[])
*/
public void write(byte[] out) {
// Create temporary object
ConnectedThread r;
// Synchronize a copy of the ConnectedThread
synchronized (this) {
if (State != STATE_CONNECTED) return;
r = ConnectedThread;
}
// Perform the write unsynchronized
r.write(out);
}
/**
* Indicate that the connection attempt failed and notify the UI
Activity.
*/
private void connectionFailed() {
setState(STATE_LISTEN);
// Send a failure message back to the Activity
Message msg = Handler.obtainMessage(MainActivity.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(MainActivity.TOAST, "Unable to connect device");
msg.setData(bundle);
Handler.sendMessage(msg);
}
/**
* Indicate that the connection was lost and notify the UI Activity.
*/
private void connectionLost() {
setState(STATE_LISTEN);
// Send a failure message back to the Activity
Message msg = Handler.obtainMessage(MainActivity.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(MainActivity.TOAST, "Device connection was lost");
msg.setData(bundle);
Handler.sendMessage(msg);
}
/**
* This thread runs while listening for incoming connections. It behaves
* like a server-side client. It runs until a connection is accepted
* (or until cancelled).
*/
/*
private class AcceptThread extends Thread {
// The local server socket
private final BluetoothServerSocket ServerSocket;
public AcceptThread() {
BluetoothServerSocket tmp = null;
// Create a new listening server socket
try {
tmp = Adapter.listenUsingRfcommWithServiceRecord(NAME,
MY_UUID);
} catch (IOException e) {
}
ServerSocket = tmp;
}
public void run() {
//Looper.prepare();
setName("AcceptThread");
BluetoothSocket socket = null;
// Listen to the server socket if we're not connected
while (State != STATE_CONNECTED) {
try {
// This is a blocking call and will only return on a
// successful connection or an exception
socket = ServerSocket.accept();
} catch (IOException e) {
break;
}
// If a connection was accepted
if (socket != null) {
synchronized (BluetoothLampService.this) {
switch (State) {
case STATE_LISTEN:
case STATE_CONNECTING:
// Situation normal. Start the
connected thread.
connected(socket,
socket.getRemoteDevice());
break;
case STATE_NONE:
case STATE_CONNECTED:
// Either not ready or already
connected. Terminate new
socket.
try {
socket.close();
} catch (IOException e) {
}
break;
}
}
}
}
// Looper.loop();
}
public void cancel() {
try {
ServerSocket.close();
} catch (IOException e) {
}
}
}
*/
/**
* This thread runs while attempting to make an outgoing connection
* with a device. It runs straight through; the connection either
* succeeds or fails.
*/
private class ConnectThread extends Thread {
private final BluetoothSocket Socket;
private final BluetoothDevice Device;
public ConnectThread(BluetoothDevice device) {
Device = device;
BluetoothSocket tmp = null;
// Get a BluetoothSocket for a connection with the
// given BluetoothDevice
try {
tmp = device.createRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
}
Socket = tmp;
}
public void run() {
Looper.prepare();
setName("ConnectThread");
// Always cancel discovery because it will slow down a connection
Adapter.cancelDiscovery();
// Make a connection to the BluetoothSocket
try {
// This is a blocking call and will only return on a
// successful connection or an exception
Socket.connect();
} catch (IOException e) {
connectionFailed();
// Close the socket
try {
Socket.close();
} catch (IOException e2) {}
// Start the service over to restart listening mode
BluetoothLampService.this.start();
return;
}
// Reset the ConnectThread because we're done
synchronized (BluetoothLampService.this) {
ConnectThread = null;
}
// Start the connected thread
connected(Socket, Device);
Looper.loop();
}
public void cancel() {
try {
Socket.close();
} catch (IOException e) {
}
}
}
/**
* This thread runs during a connection with a remote device.
* It handles all incoming and outgoing transmissions.
*/
private class ConnectedThread extends Thread {
private final BluetoothSocket Socket;
private final InputStream InStream;
private final OutputStream OutStream;
public ConnectedThread(BluetoothSocket socket) {
Socket = socket;
InputStream tmpIn = null;
OutputStream tmpOut = null;
// Get the BluetoothSocket input and output streams
try {
tmpIn = socket.getInputStream();
tmpOut = socket.getOutputStream();
} catch (IOException e) {
}
InStream = tmpIn;
OutStream = tmpOut;
}
public void run() {
Looper.prepare();
byte[] buffer = new byte[1024];
int bytes;
// Keep listening to the InputStream while connected
while (true) {
try {
// Read from the InputStream
// FUNZIONANTE
bytes = InStream.read(buffer);
Log.i("BYTES", Integer.toString(bytes));
//String dati = new String(buffer);
//fine aggiunto da me
// Send the obtained bytes to the UI Activity
Handler.obtainMessage(MainActivity.MESSAGE_READ, 27, -1,
buffer).sendToTarget();//buffer
} catch (IOException e) {
connectionLost();
break;
}
}
Looper.loop();
}
/**
* Write to the connected OutStream.
* @param buffer The bytes to write
*/
public void write(byte[] buffer) {
try {
OutStream.write(buffer);
// Share the sent message back to the UI Activity
Handler.obtainMessage(MainActivity.MESSAGE_WRITE, -1, -1,
buffer).sendToTarget();
} catch (IOException e) {
}
}
public void cancel() {
try {
Socket.close();
} catch (IOException e) {
}
}
}
}
I have modified the android app "Bluetooth Chat" that you can find in
android sdk examples version 2.1 The app estabilished a bluetooth
connection with arduino, and, when with the app I send 0 or 1, arduino
send a simple message "You have pressed 0 or 1". It works if I test with
eclipse's debug, but when I test with my smartphone, the result in the
display is different, arduino's string is fragmented
example: smartphone: 0 -> arduino "You have pressed 0 or 1" smartphone
display: "y" "ou pr"
The rest of the string was lost or not shown in the display. Can you help
me? No error in logcat, only this bug.
This is the code:
public class BluetoothLampService {
// Debugging
private static final String TAG = "BluetoothLampService";
private static final boolean D = true;
// Name for the SDP record when creating server socket
private static final String NAME = "BluetoothLamp";
// Unique UUID for this application - Standard SerialPortService ID
private static final UUID MY_UUID =
UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
// Member fields
private final BluetoothAdapter Adapter;
private final Handler Handler;
// private AcceptThread AcceptThread;
private ConnectThread ConnectThread;
private ConnectedThread ConnectedThread;
private int State;
// Constants that indicate the current connection state
public static final int STATE_NONE = 0; // we're doing nothing
public static final int STATE_LISTEN = 1; // now listening for
incoming connections
public static final int STATE_CONNECTING = 2; // now initiating an
outgoing connection
public static final int STATE_CONNECTED = 3; // now connected to a
remote device
/**
* Constructor. Prepares a new BluetoothChat session.
* @param context The UI Activity Context
* @param handler A Handler to messages back to the UI Activity
*/
public BluetoothLampService(Context context, Handler handler) {
Adapter = BluetoothAdapter.getDefaultAdapter();
State = STATE_NONE;
Handler = handler;
}
/**
* Set the current state of the chat connection
* @param state An integer defining the current connection state
*/
private synchronized void setState(int state) {
State = state;
// Give the new state to the Handler so the UI Activity can update
Handler.obtainMessage(MainActivity.MESSAGE_STATE_CHANGE, state,
-1).sendToTarget();
}
/**
* Return the current connection state. */
public synchronized int getState() {
return State;
}
/**
* Start the chat service. Specifically start AcceptThread to begin a
* session in listening (server) mode. Called by the Activity
onResume() */
public synchronized void start() {
// Cancel any thread attempting to make a connection
if (ConnectThread != null) {ConnectThread.cancel(); ConnectThread
= null;}
// Cancel any thread currently running a connection
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// Start the thread to listen on a BluetoothServerSocket
// if (AcceptThread == null) {
// AcceptThread = new AcceptThread();
// AcceptThread.start();
// }
setState(STATE_LISTEN);
}
/**
* Start the ConnectThread to initiate a connection to a remote device.
* @param device The BluetoothDevice to connect
*/
public synchronized void connect(BluetoothDevice device) {
// Cancel any thread attempting to make a connection
if (State == STATE_CONNECTING) {
if (ConnectThread != null) {ConnectThread.cancel();
ConnectThread = null;}
}
// Cancel any thread currently running a connection
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// Start the thread to connect with the given device
ConnectThread = new ConnectThread(device);
ConnectThread.start();
setState(STATE_CONNECTING);
}
/**
* Start the ConnectedThread to begin managing a Bluetooth connection
* @param socket The BluetoothSocket on which the connection was made
* @param device The BluetoothDevice that has been connected
*/
public synchronized void connected(BluetoothSocket socket,
BluetoothDevice device) {
// Cancel the thread that completed the connection
if (ConnectThread != null) {ConnectThread.cancel(); ConnectThread
= null;}
// Cancel any thread currently running a connection
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// Cancel the accept thread because we only want to connect to one
device
// if (AcceptThread != null) {AcceptThread.cancel(); AcceptThread =
null;}
// Start the thread to manage the connection and perform
transmissions
ConnectedThread = new ConnectedThread(socket);
ConnectedThread.start();
// Send the name of the connected device back to the UI Activity
Message msg =
Handler.obtainMessage(MainActivity.MESSAGE_DEVICE_NAME);
Bundle bundle = new Bundle();
bundle.putString(MainActivity.DEVICE_NAME, device.getName());
msg.setData(bundle);
Handler.sendMessage(msg);
setState(STATE_CONNECTED);
}
/**
* Stop all threads
*/
public synchronized void stop() {
if (ConnectThread != null) {ConnectThread.cancel(); ConnectThread
= null;}
if (ConnectedThread != null) {ConnectedThread.cancel();
ConnectedThread = null;}
// if (AcceptThread != null) {AcceptThread.cancel(); AcceptThread =
null;}
setState(STATE_NONE);
}
/**
* Write to the ConnectedThread in an unsynchronized manner
* @param out The bytes to write
* @see ConnectedThread#write(byte[])
*/
public void write(byte[] out) {
// Create temporary object
ConnectedThread r;
// Synchronize a copy of the ConnectedThread
synchronized (this) {
if (State != STATE_CONNECTED) return;
r = ConnectedThread;
}
// Perform the write unsynchronized
r.write(out);
}
/**
* Indicate that the connection attempt failed and notify the UI
Activity.
*/
private void connectionFailed() {
setState(STATE_LISTEN);
// Send a failure message back to the Activity
Message msg = Handler.obtainMessage(MainActivity.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(MainActivity.TOAST, "Unable to connect device");
msg.setData(bundle);
Handler.sendMessage(msg);
}
/**
* Indicate that the connection was lost and notify the UI Activity.
*/
private void connectionLost() {
setState(STATE_LISTEN);
// Send a failure message back to the Activity
Message msg = Handler.obtainMessage(MainActivity.MESSAGE_TOAST);
Bundle bundle = new Bundle();
bundle.putString(MainActivity.TOAST, "Device connection was lost");
msg.setData(bundle);
Handler.sendMessage(msg);
}
/**
* This thread runs while listening for incoming connections. It behaves
* like a server-side client. It runs until a connection is accepted
* (or until cancelled).
*/
/*
private class AcceptThread extends Thread {
// The local server socket
private final BluetoothServerSocket ServerSocket;
public AcceptThread() {
BluetoothServerSocket tmp = null;
// Create a new listening server socket
try {
tmp = Adapter.listenUsingRfcommWithServiceRecord(NAME,
MY_UUID);
} catch (IOException e) {
}
ServerSocket = tmp;
}
public void run() {
//Looper.prepare();
setName("AcceptThread");
BluetoothSocket socket = null;
// Listen to the server socket if we're not connected
while (State != STATE_CONNECTED) {
try {
// This is a blocking call and will only return on a
// successful connection or an exception
socket = ServerSocket.accept();
} catch (IOException e) {
break;
}
// If a connection was accepted
if (socket != null) {
synchronized (BluetoothLampService.this) {
switch (State) {
case STATE_LISTEN:
case STATE_CONNECTING:
// Situation normal. Start the
connected thread.
connected(socket,
socket.getRemoteDevice());
break;
case STATE_NONE:
case STATE_CONNECTED:
// Either not ready or already
connected. Terminate new
socket.
try {
socket.close();
} catch (IOException e) {
}
break;
}
}
}
}
// Looper.loop();
}
public void cancel() {
try {
ServerSocket.close();
} catch (IOException e) {
}
}
}
*/
/**
* This thread runs while attempting to make an outgoing connection
* with a device. It runs straight through; the connection either
* succeeds or fails.
*/
private class ConnectThread extends Thread {
private final BluetoothSocket Socket;
private final BluetoothDevice Device;
public ConnectThread(BluetoothDevice device) {
Device = device;
BluetoothSocket tmp = null;
// Get a BluetoothSocket for a connection with the
// given BluetoothDevice
try {
tmp = device.createRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
}
Socket = tmp;
}
public void run() {
Looper.prepare();
setName("ConnectThread");
// Always cancel discovery because it will slow down a connection
Adapter.cancelDiscovery();
// Make a connection to the BluetoothSocket
try {
// This is a blocking call and will only return on a
// successful connection or an exception
Socket.connect();
} catch (IOException e) {
connectionFailed();
// Close the socket
try {
Socket.close();
} catch (IOException e2) {}
// Start the service over to restart listening mode
BluetoothLampService.this.start();
return;
}
// Reset the ConnectThread because we're done
synchronized (BluetoothLampService.this) {
ConnectThread = null;
}
// Start the connected thread
connected(Socket, Device);
Looper.loop();
}
public void cancel() {
try {
Socket.close();
} catch (IOException e) {
}
}
}
/**
* This thread runs during a connection with a remote device.
* It handles all incoming and outgoing transmissions.
*/
private class ConnectedThread extends Thread {
private final BluetoothSocket Socket;
private final InputStream InStream;
private final OutputStream OutStream;
public ConnectedThread(BluetoothSocket socket) {
Socket = socket;
InputStream tmpIn = null;
OutputStream tmpOut = null;
// Get the BluetoothSocket input and output streams
try {
tmpIn = socket.getInputStream();
tmpOut = socket.getOutputStream();
} catch (IOException e) {
}
InStream = tmpIn;
OutStream = tmpOut;
}
public void run() {
Looper.prepare();
byte[] buffer = new byte[1024];
int bytes;
// Keep listening to the InputStream while connected
while (true) {
try {
// Read from the InputStream
// FUNZIONANTE
bytes = InStream.read(buffer);
Log.i("BYTES", Integer.toString(bytes));
//String dati = new String(buffer);
//fine aggiunto da me
// Send the obtained bytes to the UI Activity
Handler.obtainMessage(MainActivity.MESSAGE_READ, 27, -1,
buffer).sendToTarget();//buffer
} catch (IOException e) {
connectionLost();
break;
}
}
Looper.loop();
}
/**
* Write to the connected OutStream.
* @param buffer The bytes to write
*/
public void write(byte[] buffer) {
try {
OutStream.write(buffer);
// Share the sent message back to the UI Activity
Handler.obtainMessage(MainActivity.MESSAGE_WRITE, -1, -1,
buffer).sendToTarget();
} catch (IOException e) {
}
}
public void cancel() {
try {
Socket.close();
} catch (IOException e) {
}
}
}
}
Friday, 27 September 2013
Facebook API: best way to get like, share, comment count for a page/group post?
Facebook API: best way to get like, share, comment count for a page/group
post?
What's the best way to get the like, share, comment count for a post?
I'm trying via FQL but it doesn't seem to give any data when the URL is a
FB post URL:
SELECT like_count, comment_count, share_count FROM link_stat WHERE
url="https://www.facebook.com/Macklemore/posts/10153256675935268"
When I get the post info via the Graph API Explorer:
386050065267_10153256675935268
It gives me the like count and share count and I can get the comment count
via 386050065267_10153256675935268/comments?summary=true
{
"id": "386050065267_10153256675935268",
"from": {
"category": "Musician/band",
"name": "Macklemore",
"id": "386050065267"
},
"message": "We're playing a FREE show in November to celebrate the new
Microsoft Store opening in Jacksonville, Florida. Come see us! Info
here: http://msft.it/STJevent\n\nThursday, November 21, 2013\n10:00
p.m.\nStart lining up for your chance to attend the show on
Saturday.\nLocation: Outdoors behind Oakley, near Dick's Sporting
Goods.",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/386050065267/posts/10153256675935268"
},
{
"name": "Like",
"link": "https://www.facebook.com/386050065267/posts/10153256675935268"
}
],
"privacy": {
"value": ""
},
"type": "status",
"status_type": "mobile_status_update",
"created_time": "2013-09-26T16:30:23+0000",
"updated_time": "2013-09-27T20:39:45+0000",
**"shares": {
"count": 274
},**
"likes": {
"data": [
{
"name": "Jabson Ramos",
"id": "100005418486411"
},
{
"name": "Sophia Belen Parada Andrades",
"id": "100002552653152"
},
{
"name": "Oli Barrera",
"id": "100001718791443"
},
{
"name": "Viktoria Martinez",
"id": "1697663024"
}
],
**"count": 3345**
},
"comments": {
"data": [
{
"id": "10153256675935268_43537841",
"from": {
"name": "Vu Thai",
"id": "1338690172"
},
"message": "Sean Viray Matt Win Soo... about my birthday weekend...",
"message_tags": [
{
"id": "75311036",
"name": "Sean Viray",
"type": "user",
"offset": 0,
"length": 10
},
{
"id": "25113189",
"name": "Matt Win",
"type": "user",
"offset": 11,
"length": 8
}
],
"can_remove": false,
"created_time": "2013-09-26T16:31:03+0000",
"like_count": 4,
"user_likes": false
},
.....
],
"paging": {
"cursors": {
"after": "MjY=",
"before": "MQ=="
},
"next":
"https://graph.facebook.com/386050065267_10153256675935268/comments?limit=25&after=MjY="
}
}
}
Weird thing is when I run that query in my app I don't get the share count
or like count. Am I doing something wrong? Is the data in the explorer
different from what apps have access to?
I know I can get the like count via
386050065267_10153256675935268/likes?summary=true
Biggest thing would be the missing share count.
So summary,
Can you get these stats via FQL? If not, how can you obtain the share
count via the graph API?
Thx.
post?
What's the best way to get the like, share, comment count for a post?
I'm trying via FQL but it doesn't seem to give any data when the URL is a
FB post URL:
SELECT like_count, comment_count, share_count FROM link_stat WHERE
url="https://www.facebook.com/Macklemore/posts/10153256675935268"
When I get the post info via the Graph API Explorer:
386050065267_10153256675935268
It gives me the like count and share count and I can get the comment count
via 386050065267_10153256675935268/comments?summary=true
{
"id": "386050065267_10153256675935268",
"from": {
"category": "Musician/band",
"name": "Macklemore",
"id": "386050065267"
},
"message": "We're playing a FREE show in November to celebrate the new
Microsoft Store opening in Jacksonville, Florida. Come see us! Info
here: http://msft.it/STJevent\n\nThursday, November 21, 2013\n10:00
p.m.\nStart lining up for your chance to attend the show on
Saturday.\nLocation: Outdoors behind Oakley, near Dick's Sporting
Goods.",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/386050065267/posts/10153256675935268"
},
{
"name": "Like",
"link": "https://www.facebook.com/386050065267/posts/10153256675935268"
}
],
"privacy": {
"value": ""
},
"type": "status",
"status_type": "mobile_status_update",
"created_time": "2013-09-26T16:30:23+0000",
"updated_time": "2013-09-27T20:39:45+0000",
**"shares": {
"count": 274
},**
"likes": {
"data": [
{
"name": "Jabson Ramos",
"id": "100005418486411"
},
{
"name": "Sophia Belen Parada Andrades",
"id": "100002552653152"
},
{
"name": "Oli Barrera",
"id": "100001718791443"
},
{
"name": "Viktoria Martinez",
"id": "1697663024"
}
],
**"count": 3345**
},
"comments": {
"data": [
{
"id": "10153256675935268_43537841",
"from": {
"name": "Vu Thai",
"id": "1338690172"
},
"message": "Sean Viray Matt Win Soo... about my birthday weekend...",
"message_tags": [
{
"id": "75311036",
"name": "Sean Viray",
"type": "user",
"offset": 0,
"length": 10
},
{
"id": "25113189",
"name": "Matt Win",
"type": "user",
"offset": 11,
"length": 8
}
],
"can_remove": false,
"created_time": "2013-09-26T16:31:03+0000",
"like_count": 4,
"user_likes": false
},
.....
],
"paging": {
"cursors": {
"after": "MjY=",
"before": "MQ=="
},
"next":
"https://graph.facebook.com/386050065267_10153256675935268/comments?limit=25&after=MjY="
}
}
}
Weird thing is when I run that query in my app I don't get the share count
or like count. Am I doing something wrong? Is the data in the explorer
different from what apps have access to?
I know I can get the like count via
386050065267_10153256675935268/likes?summary=true
Biggest thing would be the missing share count.
So summary,
Can you get these stats via FQL? If not, how can you obtain the share
count via the graph API?
Thx.
How to put command include ("/path/public_html/file.php"); inside a variable?
How to put command include ("/path/public_html/file.php"); inside a variable?
I have something like
$example['description']="print this text: *** " ;
and instead of * I like to include a file /home/path/public_html/list.php
where is stored the html text (php formatted).
How to implement the function
include ("/home/path/public_html/list.php");
inside the variable? Thank you for help.
I have something like
$example['description']="print this text: *** " ;
and instead of * I like to include a file /home/path/public_html/list.php
where is stored the html text (php formatted).
How to implement the function
include ("/home/path/public_html/list.php");
inside the variable? Thank you for help.
get php posted id on ajax
get php posted id on ajax
I added two buttons, 1 on html and one on php .... by getting second
button with ajax..
but when i add event to the buttons the one on the html page works only
... need some help....
HTML
<input type="button" value="button 1" class="btn">
<div id="div"><div>
<script>
$.ajax({
url:"btn2.php", success:function(data){
$('#div').html(data);}
});
$('.btn').click(function(){
alert("button is wrking");
});
</script>
PHP
<?php
echo"<input type='button' value='button 2' class='btn'>";
?>
can any one help me on this
I added two buttons, 1 on html and one on php .... by getting second
button with ajax..
but when i add event to the buttons the one on the html page works only
... need some help....
HTML
<input type="button" value="button 1" class="btn">
<div id="div"><div>
<script>
$.ajax({
url:"btn2.php", success:function(data){
$('#div').html(data);}
});
$('.btn').click(function(){
alert("button is wrking");
});
</script>
PHP
<?php
echo"<input type='button' value='button 2' class='btn'>";
?>
can any one help me on this
Javascript string concatenation with a function behaves strange
Javascript string concatenation with a function behaves strange
I am trying to concate something like "string"+function(){return "string"}
in document.write() in javascript.
For example:
document.write("I don't know "+function(){if(true){return "why does it
concat?"}});
And it prints something like this bellow (see it running in the jsfiddle:
http://jsfiddle.net/sadaf2605/3AuLD/):
I don't know function (){if(true){return "why does it concat?"}}
I know I have written something very very silly but still why should it
print something like this? I am curious about that!
I am trying to concate something like "string"+function(){return "string"}
in document.write() in javascript.
For example:
document.write("I don't know "+function(){if(true){return "why does it
concat?"}});
And it prints something like this bellow (see it running in the jsfiddle:
http://jsfiddle.net/sadaf2605/3AuLD/):
I don't know function (){if(true){return "why does it concat?"}}
I know I have written something very very silly but still why should it
print something like this? I am curious about that!
VBScript read digital signature of file
VBScript read digital signature of file
Is there any way to read Digital Signature of file using VBScript? I need
to read property: "Name of signer"... I need to check if tested java.exe
file is signed by Oracle.
Is there any way to read Digital Signature of file using VBScript? I need
to read property: "Name of signer"... I need to check if tested java.exe
file is signed by Oracle.
change the submit method of a jquery POST form
change the submit method of a jquery POST form
i have 2 jquery codes. How can i put this toghether.
example
if checkbox is checked use
<script>
$(document).ready(LoadMe);
function LoadMe()
{
$('#msg_text').bind('keypress', function(e){
var code = e.keyCode ? e.keyCode : e.which;
if(code == 13 && !e.shiftKey) // Enter key is pressed
{
var msg = $("#msg_text").val();
var ontvanger = $("#ontvanger").val();
if ( $.trim( $('#msg_text').val() ) == '')
{
}
else
{
$("#send_msg").hide();
$("#dis_sub").show();
$.ajax({
type: "POST",
url: "post_message.php",
data: { msg: msg, ontvanger: ontvanger},
cache: false,
success: function(html){
$("#msg_text").val('');
$("#content").prepend(html);
$("#dis_sub").hide();
$("#send_msg").show();
}
});
}return false;
}
});
}
else use
<script type="text/javascript">
$(function() {
$("#send_msg").click(function()
{
var msg = $("#msg_text").val();
var ontvanger = $("#ontvanger").val();
if ( $.trim( $('#msg_text').val() ) == '')
{
}
else
{
$("#send_msg").hide();
$("#dis_sub").show();
$.ajax({
type: "POST",
url: "post_message.php",
data: { msg: msg, ontvanger: ontvanger},
cache: false,
success: function(html){
$("#msg_text").val('');
$("#content").prepend(html);
$("#dis_sub").hide();
$("#send_msg").show();
}
});
}return false;
}); });
</script>
if checkbox is checked i want to submit my form with a enter key else
submit the form with click on a button
i have 2 jquery codes. How can i put this toghether.
example
if checkbox is checked use
<script>
$(document).ready(LoadMe);
function LoadMe()
{
$('#msg_text').bind('keypress', function(e){
var code = e.keyCode ? e.keyCode : e.which;
if(code == 13 && !e.shiftKey) // Enter key is pressed
{
var msg = $("#msg_text").val();
var ontvanger = $("#ontvanger").val();
if ( $.trim( $('#msg_text').val() ) == '')
{
}
else
{
$("#send_msg").hide();
$("#dis_sub").show();
$.ajax({
type: "POST",
url: "post_message.php",
data: { msg: msg, ontvanger: ontvanger},
cache: false,
success: function(html){
$("#msg_text").val('');
$("#content").prepend(html);
$("#dis_sub").hide();
$("#send_msg").show();
}
});
}return false;
}
});
}
else use
<script type="text/javascript">
$(function() {
$("#send_msg").click(function()
{
var msg = $("#msg_text").val();
var ontvanger = $("#ontvanger").val();
if ( $.trim( $('#msg_text').val() ) == '')
{
}
else
{
$("#send_msg").hide();
$("#dis_sub").show();
$.ajax({
type: "POST",
url: "post_message.php",
data: { msg: msg, ontvanger: ontvanger},
cache: false,
success: function(html){
$("#msg_text").val('');
$("#content").prepend(html);
$("#dis_sub").hide();
$("#send_msg").show();
}
});
}return false;
}); });
</script>
if checkbox is checked i want to submit my form with a enter key else
submit the form with click on a button
Thursday, 26 September 2013
Location manager delegate not getting called
Location manager delegate not getting called
I am using location service to keep my app alive for longer, its working
fine in my iOS6 (Device and Simulator), but in iOS7 its not calling this
delegate function of CLLocationManager,
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation
*)oldLocation
How to make this work in iOS7?
I am using location service to keep my app alive for longer, its working
fine in my iOS6 (Device and Simulator), but in iOS7 its not calling this
delegate function of CLLocationManager,
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation
*)oldLocation
How to make this work in iOS7?
Skip before_filter defined with block
Skip before_filter defined with block
Is it possible to skip a before filter in using skip_before_filter when
the before_filter is defined with a block. For example:
class ApplicationController < ActionController::Base
before_filter do |controller|
# filter stuff
end
end
I know, that is it possible using the "normal" way of defining the filter
with a method name.
Is it possible to skip a before filter in using skip_before_filter when
the before_filter is defined with a block. For example:
class ApplicationController < ActionController::Base
before_filter do |controller|
# filter stuff
end
end
I know, that is it possible using the "normal" way of defining the filter
with a method name.
Thursday, 19 September 2013
how to filter list using linq windows phone ListPicker
how to filter list using linq windows phone ListPicker
I have List< Parameter > = App.ViewModel.Items where Parameter has a
string Category. In the List, there are 30 Parameters with 4 distinct
Category (Head, Neck, Ears and Throat). The list populates the
MainLongListSelector on the main page.
I have a _categorySelector (ListPicker) populated using :
_categorySelector.ItemsSource = App.ViewModel.Items.Select(m =>
m.Category).Distinct().ToList();
On the SelectionChanged event handler, I want to filter to
MainLongListSelector with the selected value of the ListPicker.
I have this so far, that doesn't work:
private void _categorySelector_SelectionChanged(object sender,
SelectionChangedEventArgs e)
{
var query = (from jj in App.ViewModel.Items
where (_categorySelector.SelectedItem as
Parameter).Category == jj.Category
select jj).ToList(); //doesn't work
var qq = App.ViewModel.Items.Select(mm => mm.Category).Distinct();
//doesn't connect selected item content to query
MainLongListSelector.ItemsSource = query;
}
I have List< Parameter > = App.ViewModel.Items where Parameter has a
string Category. In the List, there are 30 Parameters with 4 distinct
Category (Head, Neck, Ears and Throat). The list populates the
MainLongListSelector on the main page.
I have a _categorySelector (ListPicker) populated using :
_categorySelector.ItemsSource = App.ViewModel.Items.Select(m =>
m.Category).Distinct().ToList();
On the SelectionChanged event handler, I want to filter to
MainLongListSelector with the selected value of the ListPicker.
I have this so far, that doesn't work:
private void _categorySelector_SelectionChanged(object sender,
SelectionChangedEventArgs e)
{
var query = (from jj in App.ViewModel.Items
where (_categorySelector.SelectedItem as
Parameter).Category == jj.Category
select jj).ToList(); //doesn't work
var qq = App.ViewModel.Items.Select(mm => mm.Category).Distinct();
//doesn't connect selected item content to query
MainLongListSelector.ItemsSource = query;
}
Keyframe rules not working on firefox
Keyframe rules not working on firefox
Animations not working on firefox but working on chrome and IE. please
help Keyframe rules are set for moz @-moz-keyframes cf4FadeInOut the
problem is that all keyframes rules are set for webkit moz and -o- but
still not working.
http://jsfiddle.net/eVULR/1/
/* full image slider */
@-webkit-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
@-moz-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
@-o-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
@keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
#cf4a
{
overflow:hidden;
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background-color:black;
}
#cf4a img
{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
#cf4a img {
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
}
#page-wrap, #cf4a img:nth-of-type(1) {
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
z-index:4;
}
#page-wrap{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 3s;
-moz-animation-delay: 3s;
-o-animation-delay: 3s;
animation-delay: 3s;
z-index:5;
}
#page-wrap1,#cf4a img:nth-of-type(2) {
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
z-index:3;
}
#page-wrap1{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
z-index:3;
}
#page-wrap2,#cf4a img:nth-of-type(3) {
-webkit-animation-delay: 8s;
-moz-animation-delay: 8s;
-o-animation-delay: 8s;
animation-delay: 8s;
z-index:2;
}
#page-wrap2{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
z-index:2;
}
#page-wrap,#cf4a img:nth-of-type(4) {
-webkit-animation-delay: 12s;
-moz-animation-delay: 12s;
-o-animation-delay: 12s;
animation-delay: 12s;
z-index:1;
}
Animations not working on firefox but working on chrome and IE. please
help Keyframe rules are set for moz @-moz-keyframes cf4FadeInOut the
problem is that all keyframes rules are set for webkit moz and -o- but
still not working.
http://jsfiddle.net/eVULR/1/
/* full image slider */
@-webkit-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
@-moz-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
@-o-keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
@keyframes cf4FadeInOut {
0% {opacity:1;}
19% {opacity:1;}
25% {opacity:0;}
94% {opacity:0;}
100% {opacity:1;}
}
#cf4a
{
overflow:hidden;
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background-color:black;
}
#cf4a img
{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
#cf4a img {
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
}
#page-wrap, #cf4a img:nth-of-type(1) {
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
z-index:4;
}
#page-wrap{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 3s;
-moz-animation-delay: 3s;
-o-animation-delay: 3s;
animation-delay: 3s;
z-index:5;
}
#page-wrap1,#cf4a img:nth-of-type(2) {
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
z-index:3;
}
#page-wrap1{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 0s;
-moz-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
z-index:3;
}
#page-wrap2,#cf4a img:nth-of-type(3) {
-webkit-animation-delay: 8s;
-moz-animation-delay: 8s;
-o-animation-delay: 8s;
animation-delay: 8s;
z-index:2;
}
#page-wrap2{
-webkit-animation-name: cf4FadeInOut;
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-iteration-count: infinite;
-webkit-animation-duration: 20s;
-moz-animation-name: cf4FadeInOut;
-moz-animation-timing-function: ease-in-out;
-moz-animation-iteration-count: infinite;
-moz-animation-duration: 20s;
-o-animation-name: cf4FadeInOut;
-o-animation-timing-function: ease-in-out;
-o-animation-iteration-count: infinite;
-o-animation-duration: 20s;
animation-name: cf4FadeInOut;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-duration: 20s;
-webkit-animation-delay: 4s;
-moz-animation-delay: 4s;
-o-animation-delay: 4s;
animation-delay: 4s;
z-index:2;
}
#page-wrap,#cf4a img:nth-of-type(4) {
-webkit-animation-delay: 12s;
-moz-animation-delay: 12s;
-o-animation-delay: 12s;
animation-delay: 12s;
z-index:1;
}
sending mass email using java mail API
sending mass email using java mail API
I have a requirement of sending emails to approximately 15,000 email
addresses. Content of the email is same for all. I talked to my mail
server administrator and according to him I can send only 500 emails/
hour. I wrote an utility using java mail API to achieve this. I am
creating a connection(transport.connect()) and then reusing it. My utility
will be running for approx 30 hours to send all 15,000 emails. The
question I have "Is there any limit on number of emails being sent per
connection? And is there any time out issues I could run into? Should I
close the connection and get a new connection at some interval? like after
sending 100 emails or after 1 hour?"
I have a requirement of sending emails to approximately 15,000 email
addresses. Content of the email is same for all. I talked to my mail
server administrator and according to him I can send only 500 emails/
hour. I wrote an utility using java mail API to achieve this. I am
creating a connection(transport.connect()) and then reusing it. My utility
will be running for approx 30 hours to send all 15,000 emails. The
question I have "Is there any limit on number of emails being sent per
connection? And is there any time out issues I could run into? Should I
close the connection and get a new connection at some interval? like after
sending 100 emails or after 1 hour?"
Hide disqus features like rss and email
Hide disqus features like rss and email
How can you hide rss & email function on disqus? I don't wan't it to
display! Eventually delete the DISQUS logo too? PLEASE HELP!!! if you want
this is the link for disqus, http://disqus.com
How can you hide rss & email function on disqus? I don't wan't it to
display! Eventually delete the DISQUS logo too? PLEASE HELP!!! if you want
this is the link for disqus, http://disqus.com
Tomcat possible memory leak
Tomcat possible memory leak
The university I work at uses a Tomcat/Railo server to render ColdFusion
pages. For about 6 months (before I was hired) the servers have been
randomly crashing at different times, usually runnign service railo_ctl
restart has fixed hte issue, however lately this hasn't been working as
well.
Over the past two weeks I've narrowed the issue down, and I'm fairly sure
Tomcat where the issue is coming from. I've never used Tomcat, so I'm not
sure where to start. I have reviewed the Catalina.out files, and looked at
the time when the servers crashed and found this error message:
Sep 18, 2013 3:17:12 PM org.apache.catalina.core.StandardServer await.
INFO: A valid shutdown command was received via the shutdown port.
Stopping the Server instanc
Sep 18, 2013 3:17:12 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8888"]
Sep 18, 2013 3:17:13 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 3:17:14 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Sep 18, 2013 3:17:19 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [] is still processing a request that has yet
to finish. This is very likely to create a memory leak. You can control
the time allowed for requests to finish by using the unloadDelay attribute
of the standard Context implementation.
This SEVERE error prints a probably 200 times
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8888"]
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8888"]
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 11:19:35 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
I also noticed that this error came up, but it doesn't seem to pop up the
same time the servers crashed
Sep 18, 2013 11:06:39 AM org.apache.catalina.loader.WebappClassLoader
findResourceInternal
INFO: Illegal access: this web application instance has been stopped
already. Could not load
META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration.
The eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact.
Sep 18, 2013 11:06:39 AM org.apache.catalina.loader.WebappClassLoader
loadClass
INFO: Illegal access: this web application instance has been stopped
already. Could not load
org.apache.xerces.parsers.XIncludeAwareParserConfiguration. The eventual
following stack trace is caused by an error thrown for debugging purposes
as well as to attempt to terminate the thread which caused the illegal
access, and has no functional impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1564)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at org.apache.xerces.parsers.ObjectFactory.findProviderClass(Unknown
Source)
at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setAttribute(Unknown
Source)
at railo.runtime.text.xml.XMLUtil.setAttributeEL(XMLUtil.java:270)
at railo.runtime.text.xml.XMLUtil.parse(XMLUtil.java:221)
at railo.runtime.functions.decision.IsXML.call(IsXML.java:22)
at
content.feed.feedmanager_cfc$cf._2(/var/www/vhosts/my_web_app/requirements/mura/content/feed/feedManager.cfc:346)
at
content.feed.feedmanager_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/feed/feedManager.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
fsu.includes.display_objects.dsp_feed_cfm$cf.call(/var/www/vhosts/my_web_app/fsu/includes/display_objects/dsp_feed.cfm:132)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:746)
at
content.contentrenderer_cfc$cf._5(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:956)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentrenderer_cfc$cf._5(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:902)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774)
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495)
at
content.contentrenderer_cfc$cf._call000069(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1113)
at
content.contentrenderer_cfc$cf._5(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1113)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
formbuilder_21.eventhandlers.contentrenderer_cfm$cf.udfCall(/var/www/vhosts/my_web_app/plugins/FormBuilder_21/eventHandlers/contentRenderer.cfm:27)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
ldapsurvey_25.eventhandlers.contentrenderer_cfm$cf.udfCall(/var/www/vhosts/my_web_app/plugins/LDAPSurvey_25/eventHandlers/contentRenderer.cfm:73)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:721)
at
railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:706)
at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:52)
at
railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:187)
at
railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:76)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:69)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:22)
at
content.contentrenderer_cfc$cf._8(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1817)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentrenderer_cfc$cf._9(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:2141)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
in_contexteditor_16135.incontexteditor.eventhandler_cfc$cf.udfCall(/var/www/vhosts/my_web_app/plugins/In-ContextEditor_16/inContextEditor/EventHandler.cfc:120)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at railo.runtime.tag.Invoke.doComponent(Invoke.java:210)
at railo.runtime.tag.Invoke.doEndTag(Invoke.java:183)
at
plugin.pluginmanager_cfc$cf._call000020(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc:1478)
at
plugin.pluginmanager_cfc$cf._3(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc:1391)
at
plugin.pluginmanager_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
plugin.pluginmanager_cfc$cf._3(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc:1219)
at
plugin.pluginmanager_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentrenderer_cfc$cf._6(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1268)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at railo.runtime.tag.Invoke.doComponent(Invoke.java:210)
at railo.runtime.tag.Invoke.doEndTag(Invoke.java:183)
at
murascope_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/MuraScope.cfc:110)
at
murascope_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/MuraScope.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl.onMissingMethod(ComponentImpl.java:539)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:504)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1834)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:769)
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495)
at
fsu.includes.themes.fsu.templates.default_cfm$cf.call(/var/www/vhosts/my_web_app/fsu/includes/themes/fsu/templates/default.cfm:109)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:746)
at
translator.standardhtmltranslator_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Translator/standardHTMLTranslator.cfc:80)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1834)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:769)
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495)
at
plugin.pluginstandardeventwrapper_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginStandardEventWrapper.cfc:121)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
handler.standardeventshandler_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc:60)
at
handler.standardeventshandler_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755)
at
railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:705)
at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:52)
at
railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:187)
at
railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:76)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:69)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:22)
at
plugin.pluginstandardeventwrapper_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginStandardEventWrapper.cfc:84)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
handler.standardeventshandler_cfc$cf._2(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc:311)
at
handler.standardeventshandler_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755)
at
railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:705)
at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:52)
at
railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:187)
at
railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:76)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:69)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:22)
at
plugin.pluginstandardeventwrapper_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginStandardEventWrapper.cfc:84)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
servlet_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/servlet.cfc:85)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
mura_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Mura.cfc:84)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentserver_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc:225)
at
content.contentserver_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentserver_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc:271)
at
content.contentserver_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at index_cfm$cf.call(/var/www/vhosts/my_web_app/index.cfm:53)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:751)
at
railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:179)
at
railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23)
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2035)
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2002)
at
railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:297)
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any thoughts or suggestions on this would be greatly appreciated.
The university I work at uses a Tomcat/Railo server to render ColdFusion
pages. For about 6 months (before I was hired) the servers have been
randomly crashing at different times, usually runnign service railo_ctl
restart has fixed hte issue, however lately this hasn't been working as
well.
Over the past two weeks I've narrowed the issue down, and I'm fairly sure
Tomcat where the issue is coming from. I've never used Tomcat, so I'm not
sure where to start. I have reviewed the Catalina.out files, and looked at
the time when the servers crashed and found this error message:
Sep 18, 2013 3:17:12 PM org.apache.catalina.core.StandardServer await.
INFO: A valid shutdown command was received via the shutdown port.
Stopping the Server instanc
Sep 18, 2013 3:17:12 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8888"]
Sep 18, 2013 3:17:13 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 3:17:14 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Sep 18, 2013 3:17:19 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesThreads
SEVERE: The web application [] is still processing a request that has yet
to finish. This is very likely to create a memory leak. You can control
the time allowed for requests to finish by using the unloadDelay attribute
of the standard Context implementation.
This SEVERE error prints a probably 200 times
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8888"]
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8888"]
Sep 18, 2013 11:19:26 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Sep 18, 2013 11:19:35 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
I also noticed that this error came up, but it doesn't seem to pop up the
same time the servers crashed
Sep 18, 2013 11:06:39 AM org.apache.catalina.loader.WebappClassLoader
findResourceInternal
INFO: Illegal access: this web application instance has been stopped
already. Could not load
META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration.
The eventual following stack trace is caused by an error thrown for
debugging purposes as well as to attempt to terminate the thread which
caused the illegal access, and has no functional impact.
Sep 18, 2013 11:06:39 AM org.apache.catalina.loader.WebappClassLoader
loadClass
INFO: Illegal access: this web application instance has been stopped
already. Could not load
org.apache.xerces.parsers.XIncludeAwareParserConfiguration. The eventual
following stack trace is caused by an error thrown for debugging purposes
as well as to attempt to terminate the thread which caused the illegal
access, and has no functional impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1564)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at org.apache.xerces.parsers.ObjectFactory.findProviderClass(Unknown
Source)
at org.apache.xerces.parsers.ObjectFactory.newInstance(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
at
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setAttribute(Unknown
Source)
at railo.runtime.text.xml.XMLUtil.setAttributeEL(XMLUtil.java:270)
at railo.runtime.text.xml.XMLUtil.parse(XMLUtil.java:221)
at railo.runtime.functions.decision.IsXML.call(IsXML.java:22)
at
content.feed.feedmanager_cfc$cf._2(/var/www/vhosts/my_web_app/requirements/mura/content/feed/feedManager.cfc:346)
at
content.feed.feedmanager_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/feed/feedManager.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
fsu.includes.display_objects.dsp_feed_cfm$cf.call(/var/www/vhosts/my_web_app/fsu/includes/display_objects/dsp_feed.cfm:132)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:746)
at
content.contentrenderer_cfc$cf._5(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:956)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentrenderer_cfc$cf._5(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:902)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:774)
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495)
at
content.contentrenderer_cfc$cf._call000069(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1113)
at
content.contentrenderer_cfc$cf._5(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1113)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
formbuilder_21.eventhandlers.contentrenderer_cfm$cf.udfCall(/var/www/vhosts/my_web_app/plugins/FormBuilder_21/eventHandlers/contentRenderer.cfm:27)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
ldapsurvey_25.eventhandlers.contentrenderer_cfm$cf.udfCall(/var/www/vhosts/my_web_app/plugins/LDAPSurvey_25/eventHandlers/contentRenderer.cfm:73)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:721)
at
railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:706)
at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:52)
at
railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:187)
at
railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:76)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:69)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:22)
at
content.contentrenderer_cfc$cf._8(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1817)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentrenderer_cfc$cf._9(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:2141)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
in_contexteditor_16135.incontexteditor.eventhandler_cfc$cf.udfCall(/var/www/vhosts/my_web_app/plugins/In-ContextEditor_16/inContextEditor/EventHandler.cfc:120)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at railo.runtime.tag.Invoke.doComponent(Invoke.java:210)
at railo.runtime.tag.Invoke.doEndTag(Invoke.java:183)
at
plugin.pluginmanager_cfc$cf._call000020(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc:1478)
at
plugin.pluginmanager_cfc$cf._3(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc:1391)
at
plugin.pluginmanager_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
plugin.pluginmanager_cfc$cf._3(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc:1219)
at
plugin.pluginmanager_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginManager.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentrenderer_cfc$cf._6(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc:1268)
at
content.contentrenderer_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentRenderer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at railo.runtime.tag.Invoke.doComponent(Invoke.java:210)
at railo.runtime.tag.Invoke.doEndTag(Invoke.java:183)
at
murascope_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/MuraScope.cfc:110)
at
murascope_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/MuraScope.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl.onMissingMethod(ComponentImpl.java:539)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:504)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1834)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:769)
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495)
at
fsu.includes.themes.fsu.templates.default_cfm$cf.call(/var/www/vhosts/my_web_app/fsu/includes/themes/fsu/templates/default.cfm:109)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:746)
at
translator.standardhtmltranslator_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Translator/standardHTMLTranslator.cfc:80)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1834)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:769)
at
railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1495)
at
plugin.pluginstandardeventwrapper_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginStandardEventWrapper.cfc:121)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
handler.standardeventshandler_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc:60)
at
handler.standardeventshandler_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755)
at
railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:705)
at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:52)
at
railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:187)
at
railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:76)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:69)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:22)
at
plugin.pluginstandardeventwrapper_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginStandardEventWrapper.cfc:84)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
handler.standardeventshandler_cfc$cf._2(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc:311)
at
handler.standardeventshandler_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Handler/standardEventsHandler.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:377)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:616)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at
railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1830)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:755)
at
railo.runtime.util.VariableUtilImpl.callFunction(VariableUtilImpl.java:705)
at railo.runtime.interpreter.ref.func.UDFCall.getValue(UDFCall.java:52)
at
railo.runtime.interpreter.CFMLExpressionInterpreter.interpret(CFMLExpressionInterpreter.java:187)
at
railo.runtime.functions.dynamicEvaluation.Evaluate._call(Evaluate.java:76)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:69)
at
railo.runtime.functions.dynamicEvaluation.Evaluate.call(Evaluate.java:22)
at
plugin.pluginstandardeventwrapper_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/plugin/pluginStandardEventWrapper.cfc:84)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
servlet_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/servlet.cfc:85)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
mura_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/Mura.cfc:84)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentserver_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc:225)
at
content.contentserver_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:738)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at
content.contentserver_cfc$cf._1(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc:271)
at
content.contentserver_cfc$cf.udfCall(/var/www/vhosts/my_web_app/requirements/mura/content/contentServer.cfc)
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215)
at railo.runtime.type.UDFImpl._call(UDFImpl.java:434)
at railo.runtime.type.UDFImpl.call(UDFImpl.java:384)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:615)
at railo.runtime.ComponentImpl._call(ComponentImpl.java:502)
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815)
at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:733)
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1480)
at index_cfm$cf.call(/var/www/vhosts/my_web_app/index.cfm:53)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:799)
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:751)
at
railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:179)
at
railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23)
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2035)
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2002)
at
railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:297)
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Any thoughts or suggestions on this would be greatly appreciated.
Subscribe to:
Comments (Atom)