Saturday, 31 August 2013

what is the meaning of stable in zfile_stable - CZMQ

what is the meaning of stable in zfile_stable - CZMQ

CZMQ man page for zfile explains zfile_stable as:
// Check if file is 'stable'
CZMQ_EXPORT bool zfile_stable (const char *filename);
What is the meaning of stable? when a file is said to be stable?

How does this work in javascript

How does this work in javascript

var temp = temp || {};
In the above syntax temp is created if it is not already exist otherwise
it will refer to the variable which was already created. Just I am curious
that how does this work. I think right side of expression should return
true if temp exists but it is creating an object. How does this work. Any
explanation would be helpful.

Same column for two different relational entities with doctrine

Same column for two different relational entities with doctrine

Well, I have these three tables:
likes
id_like | post | post_type
post: it has the post id where the "like button" was triggered.
post_type: it has the type of the post, it could "article" or "comment".
Comment
id_comment | body
Article
id_article | body
I am trying to create the models "Article" and "Comment" where each one
can has an array of its likes. For example, I have tried this with:
Model Like
/**
* @Entity
* @Table(name="likes")
*/
class Like
{
/**
* @Id @Column(type="integer", nullable=false, name="id_like")
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @Column(type="integer", nullable=false, name="like_type")
*/
protected $type;
Model Article
namespace models;
use \Doctrine\Common\Collections\ArrayCollection;
/** * @Entity * @Table(name="article") */ class Article {
/**
* @Id @Column(type="integer", nullable=false, name="id_article")
* @GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @OneToMany(targetEntity="Vote", mappedBy="article")
* @JoinColumn(name="id_article", referencedColumnName="post")
*/
protected $likes;
My first problem comes when I try to get the "likes" from the article. If
I do:
$likes = $article->getLikes();
I get this error:
Severity: Notice
Message: Undefined index: article
Filename: Persisters/BasicEntityPersister.php
Line Number: 1574
Now, the second problem (or question) that eventually will come is about
the "Comment" model. Is be possible do a OneToMany from Comment to Likes
using as the same way as Article do?

How to extract skeleton information from kinect sensor using openNI and primesense's python bindings?

How to extract skeleton information from kinect sensor using openNI and
primesense's python bindings?

I've downloaded and installed the bindings and have been poking around the
C API, but haven't been able to find even a workflow for extracting this
information, and the examples that ship with openNI seem to be closed
source.
Ultimately, i'm looking to get XYZ and orientation data for each joint,
but I can't even get raw data out of it yet.
Any thoughts?

SQL server multiple databases with same schema

SQL server multiple databases with same schema

I have a solution that is sharded across multiple SQL Azure databases.
These databases all have the exact same data schema and I generate an edmx
from one of them.
How can I maintain the schemas of multiple databases with respect to
change management? Any change in one schema has to be automatically
applied on all the other databases. Is there something I am missing? I
looked at data sync but it seems to be solving another problem. In my case
the schema is exactly the same and the data stored is different.

How do I open thrift transport in Objective C?

How do I open thrift transport in Objective C?

I've created TBinaryProtocol and thrift client:
TSocketClient *socket = [[TSocketClient alloc] initWithHostname:serviceUrl
port:servicePort];
TFramedTransport *transport = [[TFramedTransport alloc]
initWithTransport:socket];
TBinaryProtocol *protocol = [[TBinaryProtocol alloc]
initWithTransport:transport strictRead:YES strictWrite:YES];
_client = [[BackendServiceClient alloc] initWithProtocol:protocol];
But every time I try to write (and flush) something to outProtocol,
TTransportException raised with reason: 'Error writing to transport output
stream'.
As far as I know, I should call open method on TTransport instance which
is either socket, but there is no such method in TTransport protocol.
So, SUBJ.

Simple bit setting and cleaning

Simple bit setting and cleaning

I'm coding an exercise from a book. This program should set a "bitmapped
graphics device" bits, and then check for any of them if they are 1 or 0.
The setting function was already written so I only wrote the test_bit
function, but it doesn't work. In the main() I set the first byte's first
bit to 1, so the byte is 10000000, then I want to test it: 1000000 &
10000000 == 10000000, so not null, but I still get false when I want to
print it out. What's wrong?
#include <iostream>
const int X_SIZE = 32;
const int Y_SIZE = 24;
char graphics[X_SIZE / 8][Y_SIZE];
inline void set_bit(const int x, const int y)
{
graphics[(x)/8][y] |= (0x80 >> ((x)%8));
}
inline bool test_bit(const int x, const int y)
{
if(graphics[x/8][y] & (0.80 >> ((x)%8)) != 0)
return true;
else return false;
}
void print_graphics(void) //this function simulate the bitmapped graphics
device
{
int x;
int y;
int bit;
for(y=0; y < Y_SIZE; y++)
{
for(x = 0; x < X_SIZE / 8; x++)
{
for(bit = 0x80;bit > 0; bit = (bit >> 1))
{
if((graphics[x][y] & bit) != 0)
std::cout << 'X';
else
std::cout << '.';
}
}
std::cout << '\n';
}
}
main()
{
int loc;
for (loc = 0; loc < X_SIZE; loc++)
{
set_bit(loc,loc);
}
print_graphics();
std::cout << "Bit(0,0): " << test_bit(0,0) << std::endl;
return 0;
}

retrieve Image from parse android

retrieve Image from parse android

The ParseFile file has url image and info, but when it goes to
getDatainBackground it failed, it never go into it. can anyone help me or
any other way to retrieve the image from parse.
ParseFile parseFile = new ParseFile("profileImage.png",
MainActivity.convertBitmapToByteArray(profilePicture));
parseFile.saveInBackground(); _parseUser.put("ProfilePicture", parseFile);
ParseUser user = ParseUser.getCurrentUser();
ParseFile file = (ParseFile)user.get("ProfilePicture");
file.getDataInBackground(new GetDataCallback() {
@Override
public void done(byte[] data, ParseException e) {
if (e == null)
profilePicture = BitmapFactory.decodeByteArray(data,
0, data.length);
else
Log.d("failed", "msg");
}
});

Friday, 30 August 2013

How to generate ALL floating numbers?

How to generate ALL floating numbers?

I'm trying to generate ALL float numbers to a file on C++ (using gcc). My
first attempt was to use FLT_MIN, FLT_MAX & FLT_EPSILON to generate them,
the code was something like this:
#include <cfloat>
#include <stdio.h>
#include <iostream>
using namespace std;
int main(){
FILE* handle = freopen("todos_los_float.in","w",stdout);
for(float x = FLT_MIN; x < FLT_MAX; x = x + FLT_EPSILON)
cout << x << endl;
fclose(handle);
return 0;
}
This is not working, as FLT_EPSILON destroys the precision of the number,
for FLT_MIN it takes a huge jump, and it's stop adding much before
reaching FLT_MAX.
I have thought on working and adding on binary form, and just skip the
special meanings (inf, -inf, NaN) but I'm also not sure which is the best
approach for this. How do you suggest to generate the numbers?

Thursday, 29 August 2013

Crawlability of actions with HttpPost attribute

Crawlability of actions with HttpPost attribute

The technology used is ASP.NET MVC 4.
Are the search engines able to crawl actions which have HttpPost attribute?
Thank you.

Get the Whole Black Image When Using the TakesScreenshot in WebDriver Test with ChromeDriver

Get the Whole Black Image When Using the TakesScreenshot in WebDriver Test
with ChromeDriver

As the title mentioned above, I need to capture the browser screen using
the TakesScreenshot class and save as the image file while running my
WebDriver tests.
However, I got what I was expected in Firefox and IE browsers except the
Chrome, which just created the whole black image.
Of course, I have searched for the solution serval times but still not
fixed it yet. Any idea with this problem?
Tools: selenium-java-2.34.0.jar ChromeDriver v2.2

Wednesday, 28 August 2013

How do Java runtimes targeting pre-SSE2 processors implement floating-point basic operations?

How do Java runtimes targeting pre-SSE2 processors implement
floating-point basic operations?

How does(did) a Java runtime targeting an Intel processor without SSE2
deal with floating-point denormals, when strictfp is set?
Even when the 387 FPU is set for 53-bit precision, it keeps an oversized
exponent range that:
forces to detect underflow/overflow at each intermediate result, and
makes it difficult to avoid double-rounding of denormals.
Strategies include re-computing the operation that resulted in a denormal
value with emulated floating-point, or a permanent exponent offset along
the lines of this technique to equip OCaml with 63-bit floats, borrowing a
bit from the exponent in order to avoid double-rounding.
In any case, I see no way to avoid at least one conditional branch for
each floating-point computation, unless the operation can statically be
determined not to underflow/overflow. How exceptional (overflow/underflow)
cases are dealt with is part of my question, but this cannot be separated
from the question of the representation (the permanent exponent offset
strategy seems to mean that only overflows need to be checked for, for
instance).

PHP Runtime Issue when Breaking a 10,000 char string into segments

PHP Runtime Issue when Breaking a 10,000 char string into segments

$chapter is a string that stores a chapter of a book with 10,000 - 15,000
characters. I want to break up the string into segments with a minimum of
1000 characters but officially break after the next whitespace, so that I
don't break up a word. The provided code will run successfully about 9
times and then it will run into a run time issue.
"Fatal error: Maximum execution time of 30 seconds exceeded in
D:\htdocs\test.php on line 16"
<?php
$chapter = ("10000 characters")
$len = strlen($chapter);
$i=0;
do{$key="a";
for($k=1000;($key != " ") && ($i <= $len); $k = $k+1) {
$j=$i+$k; echo $j;
$key = substr($chapter,$j,1);
}
$segment = substr ($chapter,$i,$k);
$i=$j;
echo ($segment);
} while($i <= $len);
?>

Add Index to Existing MySQL Table

Add Index to Existing MySQL Table

I have a database in which my tables are currently in use with no index
defined. I'm looking to increase the speed if possible. I have ready up on
indexes, but wondering does that need to be the primary key as well? Also,
the index will be null for the old records in the table. Is that an issue?
I'm wondering what the best approach is.
Here is current table stucture (I was planning on just inserting 'id' as
index)
Field Type Collation Attributes Null
user varchar(255) utf8_general_ci No
pass varchar(255) utf8_general_ci No
ts varchar(255) utf8_general_ci No
lat varchar(255) utf8_general_ci No

Retrieving Column from HTML table

Retrieving Column from HTML table

How to get values from one column of HTML table using JavaScript?
I want to get values of one field i.e one column from the HTML table which
is dynamically created.

Tuesday, 27 August 2013

How to select rows with the same criteria in multiple columns?

How to select rows with the same criteria in multiple columns?

Will there be any other ways instead of writing the same criteria multiple
times?
SELECT * FROM tblEmployees E
WHERE E.CurrentAddress LIKE '%dan%' OR
E.Email1 LIKE '%dan%' OR
E.Email2 LIKE '%dan%' OR
E.LatinName LIKE '%dan%'

Issues with drop down menu only on IE9

Issues with drop down menu only on IE9

I've got a perfectly working css dropdown/popover menu which only has
issues in IE9. Issue with IE9 is that when I hover it fast enough menu
works and I have to be super precise.
Here is my css :
#meta_menu > ul > li > ul {
opacity: 0;
visibility: hidden;
padding: 5px 0px 0px 0px;
background-color: rgb(250,250,250);
text-align: left;
position: absolute;
top: 55px;
left: 50%;
margin-left: -90px;
margin-top: -40px;
width: 180px;
-webkit-transition: all .3s .1s;
-moz-transition: all .3s .1s;
-o-transition: all .3s .1s;
transition: all .3s .1s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
z-index:5000;
}
#meta_menu > ul > li:hover > ul {
opacity: 1;
top: 65px;
visibility: visible;
}
#meta_menu > ul > li > ul:before{
content: '';
display: block;
border-color: rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) #FAFAFA;
border-style: solid;
border-width: 10px;
position: absolute;
top: -20px;
left: 50%;
margin-left: -10px;
}
#meta_menu > ul ul > li {
position: relative;
margin:0px;
z-index: 1;
}
#meta_menu ul ul a{
color: rgb(50,50,50);
font-family: FuturaTT,Georgia,Palatino,Times New Roman,serif;
font-size: 13px;
background-color: rgb(250,250,250);
padding: 5px 8px 7px 16px;
display: block;
-webkit-transition: background-color .1s;
-moz-transition: background-color .1s;
-o-transition: background-color .1s;
transition: background-color .1s;
font-family: 'HelveticaNeue-Light','Helvetica Neue Light','Helvetica
Neue',Arial,Helvetica,sans-serif;
}
#meta_menu ul ul > li:hover > ul { opacity: 1; left: 196px; visibility:
visible;}
#meta_menu ul ul a{
background:none;
}
#meta_menu ul ul a:hover{
color:#888 !Important;
}
My HTML :
<div id="meta_menu">
<ul>
<li><a href="#">NOTIFICATIONS <span
class="notifications badge">0</span></a></li>
<li class="has-sub"><a href="#">RECENT PAGES</a>
<ul>
<li><a href='#'>Page 1</a></li>
<li><a href='#'>Page 2</a></li>
<li><a href='#'>Page 3</a></li>
<li><a href='#'>Page 4</a></li>
</ul>
</li>
<li class="meta_last"><a href="#" class="tips
sign_out">SIGN OUT</a></li>
</ul>
</div>
How does one troubleshoot these kind of issues with IE? Do you have
general guidelines you stick with IE? I've tried tried putting width 100 %
to the li element/tried setting display block/zoom 1 it worked for me in
some cases, not not though. Can anyone recommend where would I get
started?
Here is a fiddle code which replicates the issue :
http://jsfiddle.net/phKsk/2/

Adding module library to android studio via gradle

Adding module library to android studio via gradle

I am trying to add ViewPageIndicator library by Jake Wharton to my
project's module. I know how to do this with a jar file but since this is
a module I am not sure how to add it to the build.gradle file.
This is what my current structure looks like
ExampleProject (Root module) | ------> Example (main module that needs the
library) | ------> PageIndicatorLibrary

Can Process.HasExited be true for the current process?

Can Process.HasExited be true for the current process?

I have recently seen some production code to the effect of:
if (Process.GetCurrentProcess().HasExited)
{
// do something
}
Does this make any sense? Intuitively, if the process has exited then no
code can be running inside it.
If not, what would be a good way to tell if the current process is
terminating?
If it can be of any relevance, the use case for this was to avoid
displaying assertions like objects not disposed when the process is being
killed.

Regex for validating numbers preceding with two dashes (hyphens)

Regex for validating numbers preceding with two dashes (hyphens)

I got stuck with regexp to validate only numbers from 1-10 that could have
two dashes(hyphens) before, for example:
--9
or
--10
or
--1
but not
--11 or not --0
I tried like seems to me everything, example:
/(-\-\[1-10])/
What is wrong?

Start another Fragment on click from a list in listfragment

Start another Fragment on click from a list in listfragment

I am able to start another fragment using on item selected from list
fragment. In second fragment i have a list view which I want only to be
displayed when list item is clicked from first fragment. But I am getting
the list view items in second fragment as soon as I start the activity.
public class MyNewFragment extends ListFragment{
String[] newLists ={
"hey",
"hello Control",
"what",
"3D gone",
"chindiyaa",
"hat sala",
"Heheheheh",
"chal nikal",
};
/*@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// TODO Auto-generated method stub
//return inflater.inflate(R.layout.justatestlayout, container,
false);
View view = inflater.inflate(R.layout.new_fragment_layout,
container, false);
ListView lv2 = (ListView) view.findViewById(R.id.listView3);
lv2.setAdapter(new ArrayAdapter<String>(getActivity(),
android.R.layout.simple_list_item_1, newLists));
return view;
}*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ListAdapter myListAdapter = new ArrayAdapter<String>(
getActivity(),
android.R.layout.simple_list_item_1,
newLists);
setListAdapter(myListAdapter);
}
}

How to understand "typedef int (xxx)(int yyy);=?iso-8859-1?Q?=22=3F_=96_stackoverflow.com?=

How to understand "typedef int (xxx)(int yyy);"? – stackoverflow.com

typedef int (xxx)(int yyy); seems to define a function pointer named xxx
which points to a function with a integer parameter yyy. But I can't
understand that syntax...Could any one give a good ...

Monday, 26 August 2013

Known chatting of users who registered in the app

Known chatting of users who registered in the app

I am creating an app in which the users could chat with the other users
who already registered in the app. From all the contacts present in
mobile, only the registered user contacts should be identified. Is this
possible? If any links available please provide here. Thanks in advance !!

PowerPoint Video Side-by-Side

PowerPoint Video Side-by-Side

I would like to take a video of a lecture and sync it so that it plays
with the powerpoint/pdf slides being discussed in the lecture. Is this
possible?

detecting child of click handler

detecting child of click handler

Suppose I have some HTML that looks like this:
<div id="TheTable">
<div class="TheRow">
<div class="Col Col1">col1</div>
<div class="Col Col2">col2</div>
<div class="Col Col3">col3</div>
</div>
</div>
I'm binding a click handler for rows, something like this:
$(document).ready(function () {
$('#TheTable').on({
click: function () { alert('clicked on row'); }
}, '.TheRow');
});
As you can see, the click on any cell of a row triggers the click function.
I want to change this so that when a click happens, I can get the index or
the class of the Col element that was actually clicked on. So for
instance, if the lick happened on a .Col2 element, I want to get the index
(ie. 1) or the class (ie. Col Col2).
How do I do this?
The jsFiddle is here.

Teaching a 4 year old maths – math.stackexchange.com

Teaching a 4 year old maths – math.stackexchange.com

Im 18 years old and getting to grips with advanced mathematics
(pre-university) and I have a younger brother of 4 years old (quite an age
gap). I want to get him interested in learning (and away from …

Calling a function using a string containing the function's name

Calling a function using a string containing the function's name

I have a class defined as
class modify_field
{
public:
std::string modify(std::string str)
{
return str;
}
};
Is there any way to store this function name inside a string in main
function and then call it. I tried this but it's not working.
int main()
{
modify_field mf;
std::string str,str1,str2;
str = fetch_function_name(); //fetch_function_name() returns string modify
str2 = "check";
cout << str; //prints modify
str1 = str + "(" +str2 + ")";
mf.str1();
}
I know this is wrong. But I just want to know if there is any way to call
a function name using variable.

Organizing webapp2 application

Organizing webapp2 application

Im trying to find the right way to organize my webapp2 application. This
is the file structure:
/my-app
app.yaml
main.app
/views
index.html
/handlers
__init__.py
base.py
home.py
handlers/base.py
import webapp2
from webapp2_extras import jinja2
class BaseHandler(webapp2.RequestHandler):
@webapp2.cached_property
def jinja2(self):
return jinja2.get_jinja2(app=self.app)
def render_response(self, _template, **context):
rendered_template = self.jinja2.render_template(_template +
'.html', **context)
return self.response.write(rendered_template)
All the handlers extends the BaseHandler
handlers/home.py
from base import BaseHandler
# Not sure about importing BaseHandler here
class Name(BaseHandler):
def post(self, name=None):
context = {
'name': name,
}
self.render_response('index', **context)
and this is the main.py file
import os
import webapp2
from webapp2_extras import jinja2
CONFIG = {
'debug': True,
'webapp2_extras.jinja2': {
'autoescape': True,
'template_path': os.path.join(os.path.dirname(__file__), 'views'),
'globals': {
'url_for': webapp2.uri_for,
},
},
}
app = webapp2.WSGIApplication([
webapp2.Route('/<name>', handler='handlers.home.Name', name='name'),
], config = CONFIG, debug = CONFIG['debug'])
Should I put the routes in the same file? Because all the handlers extends
the BaseHandler i´m not sure if that is the right way to do that. Also I´m
importing webapp2 and extras twice.

Sunday, 25 August 2013

Cannot setup wifi hotspot in ubuntu 13.04

Cannot setup wifi hotspot in ubuntu 13.04

I followed instructions on a youtube tutorial, but never saw the icon
shown or got it to work.

1-D Interpolation between any number of points

1-D Interpolation between any number of points

How would I go about finding an interpolated value from any number of
given points? These are one-dimensional values, and not coordinates. This
is why I am asking, because oddly enough all of the interpolation methods
I have seen seem to talk about 2-D interpolation. Hopefully 1-D
interpolation is simpler. Let's say I have three points:
1, 0, 0.5
A percentage controls what the value is. 100% = 1, 50% = 0, 0% = 0.5. So
75% should be perfectly between value A and value B, which means 75% = 0.
This should also work with 4 values, or 2, or 7:
1, 0, 1, 2, 0.5
Would yield 0 at 75% and 1 at 12.5%.
1, 0
Would yield 0.3 at 30%.
What sort of algorithm, if any, can calculate a new value based on a
percentage and a set of ordered values, such as this?

Is there any reason to still use Visual Basic

Is there any reason to still use Visual Basic

Should a big company start developing a project using Visual Basic? Would
you suggest?
Should students be introduced with Visual Basic at an undergraduate course
in Engineering?

Saturday, 24 August 2013

Calculating the average force (mathematical physics)

Calculating the average force (mathematical physics)

I am trying to calculate the average force with regards to this question:
Calculate the average force that USA gold medalist Allyson Felix (mass =
55.3 kg, height = 168 cm) exerted backwards on the track to accelerate
from 0 to 10.2 m/s over 25 m, if she encountered a headwind that exerted
an average force of 10.0 N against her.
The answer is correct but I'm a little stuck. Where is the value 2.08
coming from? How do I get this value?
Working: By v^2 = u^2 + 2as
=>(10.20)^2 = 0 + 2 x a x 25
=>a = 2.08 m/s^2
Thus by F = ma = 55.30 x 2.08 = 115.10 N
F(total) = 115.10 + 10 = 125.10 N

lighting from point light has strange artifacts on my models in three.js

lighting from point light has strange artifacts on my models in three.js

Consider this simplistic house 3d model. It has a simple Cube unwrap
applied with a few tiled textures.

When I add a point light in front of it, the house looks normal, but the
surrounding ground (which is part of a large terrain mesh) is not lit.

Inside the house mesh, the lighting is applied funny, somehow relating to
the vertices instead of calculating and adding color correctly. Notice how
the lighting is not spread evenly, but you can actually see a polygon
there:

I think this is the reason why the huge terrain mesh is ignoring the
light, because the polygons are very huge and there are only a few
vertices. It seems the light needs a vertex nearby in order for it to
show.
Here is a part of the huge terrain mesh without light:
I add a light:
Notice how the light placement is not directly next to a vertex:
When I place the light close to a vertex, the effect suddenly becomes
super intense
When I place the light in the middle there is barely an effect
How can I make my models have even light everywhere, regardless of the
size of the model and the amount of vertices it has?

Do Apps using iOS Social Framework get affected by Rate Limits?

Do Apps using iOS Social Framework get affected by Rate Limits?

I'm making an app that utilizes Apple's Social Framework to access
Twitter. I plan on eventually releasing it on the app store. I know
twitter has rate limits such as 15 requests/15 mins per endpoint per user.
I am also aware that twitter has 100,000 user limit for apps, however I
don't know how this works with Apple Social Framework. I don't explicitly
create an app on twitter's site, and don't have a client id. Since there
is no application id when using Social Framework, do these limits still
apply?

Grammar Question: "have never read"

Grammar Question: "have never read"

I am afraid I have never read Life of Pi, the novel by Yann Martel.
Is this sentence wrong? If not wrong, is it sloppy? To me it seems more
appropriate to say:
I am afraid I never read Life of Pi, the novel by Yann Martel.
If neither is wrong, which is the better way of writing?
If possible, could you also contrast the inclusion/exclusion of "have" in
the "have never" in the sentences below?
I have never read anything so stupid in my entire life.
I have never been to the USA.
I have never eaten at that restaurant.
I never read the books; I only attended the lectures.
I never lied.
I have never lied. [sentence seems wrong]
On a side note, would the sentence be improved if it is made less wordy?
I never read Yann Martel's Life of Pi.

How to solve the integral $\int \frac{1}{e^x}\,dx$ step by step?

How to solve the integral $\int \frac{1}{e^x}\,dx$ step by step?

I'm primitive in integrals and derivatives and I'm trying to solve the
integral $\int \frac{1}{e^x}\,dx$, but especially this integral was hard
to me to solve it.
So I tried:
$$\begin{align} \int\frac{1}{e^x}\,dx&=\int
\frac{1}{\color{Red}{e^x}}\color{Blue}{e^x\,dx}\\&=\int
\frac{1}{\color{Red}{u}}\,\color{Blue}{du}\\&=\ln\left(|u|\right)\\&=\ln
\left(|e^x|\right)+C \end{align}$$
But my solution is wrong while I used the integration by substitution
method ?!



Correct answer:
$$\begin{align} \int\frac{1}{e^x}\,dx&=\left(-e^{-x}\right)+C \end{align}$$

Pagination not working :

Pagination not working :

I am displaying pagination in my application using following
javascript,its working fine for me, but i need to break the pagination
after 5 pages
This is my existing pagination
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
but i need to display the pagination by following
1 2 3 4 5 ......15 16 17 18 19 20
if i click on page number 5 then it should add another 5 pages to current
page
My Javscript like this
<script type="text/javascript">
function Pager(tableName, itemsPerPage) {
this.tableName = tableName;
this.itemsPerPage = itemsPerPage;
this.currentPage = 1;
this.pages = 0;
this.inited = false;
this.showRecords = function(from, to) {
var rows = document.getElementById(tableName).rows;
// i starts from 1 to skip table header row
for (var i = 1; i < rows.length; i++) {
if (i < from || i > to)
rows[i].style.display = 'none';
else
rows[i].style.display = '';
}
}
this.showPage = function(pageNumber) {
if (! this.inited) {
alert("not inited");
return;
}
var oldPageAnchor =
document.getElementById('pg'+this.currentPage);
oldPageAnchor.className = 'pg-normal';
this.currentPage = pageNumber;
var newPageAnchor =
document.getElementById('pg'+this.currentPage);
newPageAnchor.className = 'pg-selected';
var from = (pageNumber - 1) * itemsPerPage + 1;
var to = from + itemsPerPage - 1;
this.showRecords(from, to);
}
this.prev = function() {
if (this.currentPage > 1)
this.showPage(this.currentPage - 1);
}
this.next = function() {
if (this.currentPage < this.pages) {
this.showPage(this.currentPage + 1);
}
}
this.init = function() {
var rows = document.getElementById(tableName).rows;
var records = (rows.length - 1);
this.pages = Math.ceil(records / itemsPerPage);
this.inited = true;
}
this.showPageNav = function(pagerName, positionId) {
if (! this.inited) {
alert("not inited");
return;
}
var element = document.getElementById(positionId);
var pagerHtml = '<span onclick="' + pagerName + '.prev();"
class="pg-normal"> <img src="${ctx}/images/prev.PNG" alt=" « Prev"
height="17px" width="26px" style="vertical-align: middle;"/>&nbsp;
</span> ';
for (var page = 1; page <= this.pages; page++)
pagerHtml += '<span id="pg' + page + '" class="pg-normal" onclick="' +
pagerName + '.showPage(' + page + ');">' + page + '</span> ';
pagerHtml += '<span onclick="'+pagerName+'.next();"
class="pg-normal">&nbsp;<img src="${ctx}/images/nexts.png" alt="Next
»" height="17px" width="26px" style="vertical-align:
middle;"/></span>';
element.innerHTML = pagerHtml;
}
}
</script>
if any suggestion it will be appreciable

Friday, 23 August 2013

How to Hide an Application

How to Hide an Application

I have a Samsung Galaxy S3 Plus and I have one application listed in my
Settings - Manage Apps list that I want hidden from the user. This is not
an icon - it is the application name in the list of apps on the phone
under the setting section. Is there a way to either 1. hide the app (make
it not visible on the app list) or 2. lock the app list so the user cannot
open it to see what apps are listed there. I do not want to password
protect the whole phone or individual icons, just the Manage Applications
section under Settings.
Best solution is to figure out how to make that app name hidden from the
Manage Applications list, but I am not sure that is possible without
either deactivating or removing it. Any help is appreciated.

Overlay Tools mask not working with jQuery 1.9.1 , any ideas?

Overlay Tools mask not working with jQuery 1.9.1 , any ideas?

I downloaded this version jQuery Overlay Tools for jQuery1.9.1 also
jquery-1.9.1.js and jquery-ui.js (I need UI for datepicker). And I made my
overlay. But it seem that mask property for overlay doesn't work with this
version of jQuery. I tried same code witg older version of Overlay and
jQuery and it worked.
The problem is that I need .draggable() function and from what I can say,
is not available in earlier versions. I also noticed some more conflicts,
for now I can't pinpoint them.
Any suggestion, maybe similar experiences with successful fix?

phpDocumentor does not override docs of parent class

phpDocumentor does not override docs of parent class

So, basically I have the following setup:
class A {
/**
* This is some documentation
*/
public function foo() {}
}
class B extends A {
/**
* This documentation is way more specific than in class A
*/
public function foo() {}
}
When I try to document this with phpDocumentor2 it displays at method
foo() for class B "This is some documentation", however I'd like it to say
" This documentation is way more specific than in class A". In
phpDocumenter 1, everything looks like expected. So, what is going on
here? Is this the new default behavior of phpDocumentor2? And if so, is
there a way to change it? Or is this simply a bug?
Note: while doing my research, I bumped frequently into {@inheritDoc}, but
I'd like to have the exact opposite behavior.

jquery selector for all elements except attributes in an array

jquery selector for all elements except attributes in an array

I have a page with an array:
var idlist = ['ID1', 'ID2', 'ID3'];
This array references <div>s in my HTML with those IDs. Each of these
<div>s also has a class .tabPage.
I'm trying to write a selector that targets all div.tabPage elements,
except for the ones with an ID in my array. I found the .not() function in
jQuery documentation, but how can I do this for multiple values?

Can I execute Google Apps Script code from a Chrome extension?

Can I execute Google Apps Script code from a Chrome extension?

I want to write a Chrome extension that allows users to send emails
directly from the omnibox. Is it possible to directly execute Google Apps
Script code, such as the Gmail Services API from within a Chrome
extension?

java swing - JLabel not rotating

java swing - JLabel not rotating

I'm working on my university project ... I have an issue with rotation of
a jlabel. The JLabel I'd like to rotate is a ship. The label should
rotate, depending on the heading of the ship. I have the heading displayed
on a separate jpanel - I'm drawing the analogue control on startup, the
"hand" (or the arrow or whatever) of the control is drawn later with
getGraphics(). Here is some code:
public void drawHeading (int getheading) {
int course = getheading;
int x,y;
double radians;
// appendEvent (" heading " + Integer.toString(course));
if (course != oldHeading){
//HeadingControl is the jpanel where I draw the analogue heading
control
HeadingControl.validate();
HeadingControl.repaint();
}
oldHeading = course;
radians = Math.toRadians(course) - Math.PI/2;
//this puts info in textfield
appendEvent (" course " + Integer.toString(course));
x = 120 + (int)(70*Math.cos(radians));
y = 80 + (int)(70*Math.sin(radians));
//i get the graphics .. then add the "hand"
Graphics2D gfx = (Graphics2D) HeadingControl.getGraphics();
gfx.setColor(Color.red);
gfx.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
gfx.drawLine(x, y, 120, 80);
gfx.drawLine(x, y, 120, 80);
gfx.drawLine(x, y, 120, 80);
AffineTransform tx = new AffineTransform();
tx.rotate(Math.toRadians(90));
//the label is not rotated, tried ship.rotate(radians)
(gfx2.rotate(radians) ... //didn't work
Graphics2D gfx2 = (Graphics2D) ship.getGraphics();
gfx2.transform(tx);
}
IDE = NetBeans 7.2 .. I've read that getGraphics shouldn't be used, but
... I think it's too late for such kind of changes, the project is too big
.. and netbeans puts some limitations when it comes to editing
initComponents() ..
The issue is: The label is not rotating !!! 1st - Why isn't it rotating,
and how to rotate it (I'd like to stay with getGraphics, it will be to
time consuming to rebuild my project all over again with overriding
paintComponent method etc ...

mysqli is not showing in phpinfo, i have added the respective line in php.ini already (in php version 5.2.0)

mysqli is not showing in phpinfo, i have added the respective line in
php.ini already (in php version 5.2.0)

My configuration is
windows xp
running php 5.2.0 in
apache....,
i have enabled mysqli extension in php.ini file...., my line is as follows
extension=php_mysql.dll
but it is not showing in phpinfo()
that is why when i use
mysqli_connect()
it throws the following error
Fatal error: Call to undefined function mysqli_connect() in C:\Program
Files\Apache Software
Foundation\Apache2.2\htdocs\email\phpmaster\test\view_mail.php on line 2
to be noted that i have restarted the apache as well as windows xp, but
unable to load this extension, however other extension works
Thanx in advance:---

Thursday, 22 August 2013

Ruby - undefined method `/' for "90 kilograms":String (NoMethodError)

Ruby - undefined method `/' for "90 kilograms":String (NoMethodError)

I tried to make a simple program that asks the user a few questions.
I wanted the program to assume the user was from America, but to convert
the measures if the user gave answers in the metric system. Here is the
code:
print "How old are you?"
age = gets.chomp()
print "Ok, how tall are you?"
height = gets.chomp()
if height.include? "centimeters"
height = height * 2.54
else
height = height
print "How much do you weigh?"
weight = gets.chomp()
if weight.include? "kilograms"
weight = weight / 2.2
else
weight = weight
puts "So, you're #{age} years old, #{height} tall and #{weight} pounds
heavy."
I ran the code and it was fine. I was able to enter in all my data until I
got to the last bit about the weight. I tested it by entering in 90
kilograms, but got the following error message:
ex11.rb:15:in `<main>': undefined method `/' for "90 kilograms":String
(NoMethodError)
It looks like it's not accepting my division operator. Does anyone know
what's up here?

Retrieve all columns in row with min date?

Retrieve all columns in row with min date?

Is there a way to solve something like this, without using a self join?
Some way to use the min() function?
I want to get the first fruit entry for each group of columns c1 and c2.
(Assume dates cannot be identical)
DROP TABLE IF EXISTS test;
CREATE TABLE test
(
c1 varchar(25),
c2 varchar(25),
fruit varchar(25),
currentTime Datetime
);
INSERT INTO test VALUES
('a','b','pineapple','2013-01-28 20:50:00'),
('a','b','papaya','2013-01-28 20:49:00'),
('a','b','pear','2013-01-28 20:51:00'),
('a','c','peach','2013-01-28 18:12:00'),
('a','c','plum','2013-01-28 20:40:00'),
('a','c','pluot','2013-01-28 16:50:00');
Here is my current query:
SELECT t2.*
FROM (SELECT c1,
c2,
MIN(currentTime) AS ct
FROM test
GROUP BY c1, c2) as t1
JOIN test t2
ON t1.c1 = t2.c1 AND
t1.c2 = t2.c2 AND
t2.currentTime = t1.ct
This yields the earliest entry for each c1/c2 pair, but is there a way to
use min() and avoid the self join?

Dynamic directory shortcuts

Dynamic directory shortcuts

Is it possible to easily create dynamic path shortcuts with Windows 7? By
dynamic shortcut I mean a shortcut that follows the folder or file. So
that when the folder/file is moved, the shortcut is not broken and can
still open the folder/file.
Thank you for sharing your information!

Run upstart after all other init scripts have started

Run upstart after all other init scripts have started

I'm running a CentOS6 instance and have an upstart job that depends on
sshd to already be running. However when I boot up the box that job fails
to start, I'm guessing because sshd isn't actually running yet. Is there a
way I can delay upstart jobs from starting until all normal init scripts
have started?

Workspace feature broken in version 29?

Workspace feature broken in version 29?

I was successfully using the "workspace" feature introduced with the
Chrome canary version 28... After updating to the Version 29.0.1547.57 m I
can't find a way to make the feature to work again.
I mainly use it to edit css files and they won't save the changes like it
did before.
My laptop is affected by the same issue.
Also the "File system folders in source panel" option is gone. As you can
see in a previous version tutorial here.

Capitalized First Letter Not Getting the Correct Answer

Capitalized First Letter Not Getting the Correct Answer

Stemming If you search for something in Google and use a word like
"running", Google is smart enough to match "run" or "runs" as well. That's
because search engines do what's called stemming before matching words.
In English, stemming involves removing common endings from words to
produce a base word. It's hard to come up with a complete set of rules
that work for all words, but this simplified set does a pretty good job:
If the word starts with a capital letter, output it without changes. If
the word ends in 's', 'ed', or 'ing' remove those letters, but if the
resulting stemmed word is only 1 or 2 letters long (e.g. chopping the ing
from sing), use the original word. Your program should read one word of
input and print out the corresponding stemmed word.
So i have made a program but when running it doesn't work if i capitalize
the first letter of the word so if you could rewrite this program so it
can work that would be very nice of you
word = input (" Enter the Word: ")
if word[0].isupper():
word2 = word
elif word.endswith("s"):
word2 = word[:-1]
elif word.endswith("ed"):
word2 = word[:-2]
elif word.endswith("ing"):
word2 = word[:-3]
if len(word2) <=2:
print (word)
else:
print(word2)

Wednesday, 21 August 2013

zooming out from a png deforms it

zooming out from a png deforms it

I have simple png image (http://imgur.com/GAoKEnh) and when I zoom out, to
<10% the image begins to deform and I am missing most of the outline. The
zoom-out is for supporting multiple displays.
This image is actually used as a template for a collage and so it is in
its "final" size, and I wish to keep it like so.
I tried to convert the image into a 9-patch, but it still shows the same
behavior.
I've tried asking Google but without success... could you please advise?
Thanks

Runtime exception when trying to run on UI thread

Runtime exception when trying to run on UI thread

I am trying to create popup (through textview, its ridiculous but its in
my specs) that appears and lasts 5 secs without interrupting the ongoing
activity. Here is how I do it:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.popups);
message = getIntent().getStringExtra("message");
timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
runOnUiThread(new Runnable() {
@Override
public void run() {
Popups.this.finish();
messageView.setText(message);
}
});
}
}, 0, 5000);
This is called through an Intent in a BroadcastReceiver class. However, I
get the error :
08-21 19:32:09.030: E/AndroidRuntime(12505): FATAL EXCEPTION: main
08-21 19:32:09.030: E/AndroidRuntime(12505): java.lang.RuntimeException:
Unable to instantiate activity
ComponentInfo{com.example.[appname]/com.example.[appname].Popups}:
java.lang.NullPointerException
Anyone know what is causing this?

How can I see the type deduced for a template type parameter?

How can I see the type deduced for a template type parameter?

Is there an easy way to force compilers to show me the type deduced for a
template parameter? For example, given
template<typename T>
void f(T&& parameter);
const volatile int * const pInt = nullptr;
f(pInt);
I might want to see what type is deduced for T in the call to f. (I think
it's const volatile int *&, but I'm not sure.) Or given
template<typename T>
void f(T parameter);
int numbers[] = { 5, 4, 3, 2, 1 };
f(numbers);
I might want to find out if my guess that T is deduced to be int* in the
call to f is correct.
If there's a third-party library solution (e.g., from Boost), I'd be
interested to know about it, but I'd also like to know if there's an easy
way to force a compilation diagnostic that would include the deduced type.

How to get File Stream from a custom FileUpload in asp.net?

How to get File Stream from a custom FileUpload in asp.net?

I needed a FileUpload which would look almost same in all browsers i.e
show file input field in chrome as well. So i am using a custom FileUpload
With this code..
CSS
<style type="text/css">
#FileUpload {
position:relative;
top: -4px;
left: 0px;
}
#BrowserVisible {
position: absolute;
top: -15px;
left: 0px;
z-index: 1;
background:url(upload.gif) 100% 0px no-repeat;
height:26px;
width:240px;
}
#FileField {
width:155px;
height:22px;
margin-right:85px;
border:solid 1px #000;
font-size:16px;
}
#BrowserHidden {
position:relative;
width:240px;
height:26px;
text-align: right;
-moz-opacity:0;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}
</style>
Javascript
<script src="zoom/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$('.custom-upload input[type=file]').change(function () {
$(this).next().find('input').val($(this).val());
});
</script>
HTML
<div id="FileUpload">
<input type="file" size="24" id="BrowserHidden" runat="server"
onchange="getElementById('FileField').value =
getElementById('BrowserHidden').value;" />
<div id="BrowserVisible"><input type="text" id="FileField"
runat="server" /></div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Button" style="height: 26px" />
</div>
With asp.net server control it was as simple as
Stream fs = file_upload.PostedFile.InputStream;
BinaryReader br = new BinaryReader(fs);
Byte[] bytes = br.ReadBytes((Int32)fs.Length);

How to detect the accuracy margin of error using Core Location

How to detect the accuracy margin of error using Core Location

I have an app that tracks user location using the following:
locationManager.distanceFilter = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
According to Apple's documentation, Core Location will try to obtain the
best possible reading until I tell it to stop. However, I realize the
reading can be impaired by many uncontrollable things i.e. weather, device
in a building, etc.
For the purposes of my app, I would like to store how accurate the reading
actually was. For example, if I am in a field, I may get a reading that is
accurate up to 10 meters, but if I were in that same field during a
thunderstorm, I may get a reading that is accurate up to 100 meters.
Is there a way to detect how accurate my reading actually is?

Static versus non-static lock object in sychronized block

Static versus non-static lock object in sychronized block

Trying to visualize and understand synchronization.
What are the differences between using a static lock object (code A) and a
non-static lock object (code B) for a synchronized block?
How does it differ in practical applications?
What are the pitfalls one would have that the other wouldn't?
What are the criteria to determine which one to use?
Code A
public class MyClass1 {
private static final Object lock = new Object();
public MyClass1() {
//unsync
synchronized(lock) {
//sync
}
//unsync
}
}
Code B
public class MyClass2 {
private final Object lock = new Object();
public MyClass2() {
//unsync
synchronized(lock) {
//sync
}
//unsync
}
}
Note that the above code shows constructors, but you could talk about how
the behavior is different in a static method and a non-static method too.
Also, would it be advantageous to use a static lock when the synchronized
block is modifying a static member variable?
I already looked at answers in question 8774442, but it's not clear enough
what the different usage scenarios are.

Is taking the address of a local variable a constant expression in C++11?

Is taking the address of a local variable a constant expression in C++11?

The following C++11 program:
int x = 42;
void f()
{
int y = 43;
static_assert(&x < &y, "foo");
}
int main()
{
f();
}
Doesn't compile with gcc 4.7 as it complains:
error: '&y' is not a constant expression
This would agree with my intuition. The address of y potentially changes
with each invocation of f, so of course it cannot be calculated during
translation.
However none of the bullet points in 5.19 [expr.const] seem to preclude it
from being a constant expression.
The only two contenders I see are:
an lvalue-to-rvalue conversion...
but unless I am mistaken (?) there are no lvalue-to-rvalue conversions in
the program.
And
an id-expression that refers to a variable [snip] unless:
it is initialized with a constant expression
which y is - it is initialized with the constant expression 43.
So is this an error in the standard, or am I missing something?

Tuesday, 20 August 2013

Why does Dia interface look blurry on my mac

Why does Dia interface look blurry on my mac

I have installed the latest dia and Quartz X11 on my mac OSX 10.8.3 retina
display. As seen in the screenshot below, why does the items and anything
I draw look blurry and pixelly? What can I do about it? Thanks!

This Javascript is not correctly manipulating the DOM [on hold]

This Javascript is not correctly manipulating the DOM [on hold]

I have been working with this script all day, but it still won't work. Any
ideas? It is supposed to modify the options in a select based on the value
of the previous select.
<script>
var option = getElementById.("select");
if (option.value == "Axiom OA") {
document.write("<option>Magnesium</option>");
document.write("<option>Aluminum</option>");
} else {
document.write("<option>TryAgain!</option>");
}
</script>
p.s. Glenn, thanks so much for the fixing of my sloppy code format. I
apolagize.

Keychain Access is empty

Keychain Access is empty

When I open my keychain access, it is empty. I can't see anything in it.
However, I know that all of my stuff is still working (websites don't
prompt me to log in, I join wifi networks, Xcode still see my developer
certs), etc.
I suspect that this happened when I changed my account password. As I
understand it, if I change the password in the Accounts pref pane, my
keychain passwords should update automatically.
So I suspected that maybe if I locked my keychain items in Keychain
access, and then unlocked them, that 1. I would be prompted for my
password, and 2. I might be able to see my stuff again. Neither one
happened.
Any thoughts on what I might do to rectify this? I have backups of all of
the important stuff (secrets, etc), but I'd really like to try fixing it
if I can.

PSV vs AC Milan Live Stream Free Onlin etv

PSV vs AC Milan Live Stream Free Onlin etv

Watch PSV Eindhoven vs AC Milan Live Stream UEFA Champions League
PSV have doubts over Karim Rekik and Stijn Schaars, who will be assessed
ahead of kick-off.
Zakaria Bakkali and Park Ji-sung also face late fitness tests.
Milan travel to Eindhoven with Andrea Poli in contention to make his debut
in midfield, while striker Mario Balotelli (knee) is expected to be
available.
Robinho, Giampaolo Pazzini and Mattia De Sciglio all miss out for the
visitors, while Antonio Nocerino is a doubt.
PSV coach Phillip Cocu: "We saw them in action a couple of times, but
realise that pre-season friendlies are different from the official
matches. We have been able to assess their style of play and analyse their
players.
Watch PSV Eindhoven vs AC Milan Live Stream UEFA Champions League

Jquery UI and DataTables

Jquery UI and DataTables

over the past few weeks i've been putting together a c# application with
heavy use of Jquery UI coupled with the DataTables.net table
functionality. I have a quick question regarding session detection.
Now, i have detection in my Page_Load to check for session variables being
present etc, but this doesn't prevent an end-user from clicking on tabs,
and entering text client side.
So, my question is what is the best way to handle session variables, when
using client side scripting like that of Jquery etc?

SQL bulk collect and count

SQL bulk collect and count

I have a database that has id's of people inside and money that they owe..
a person can be found in de database several times on diffrent rows.
I need to collect all people who have an amount open higher then 140 and
get all their information in the table (table name is money).
I tried using a select statement using having count(Cashdue) > 140 but he
won't allow that on a bulk collect.
Any idea how I can bulk collect information while at the same time
counting only the people who's total amount of money is above 140?
Thanks in advance.

What does prohibiting value semantics in C++ mean?

What does prohibiting value semantics in C++ mean?

I have the following peace of the code:
template<typename T>
class derClass : public baseClass<column<T>, column<k>>
{
//prohibit value semantics
derClass(const derClass&) = delete;
derClass& operator= (const derClass&) = delete;
public:
...
}
There are many places of this code that I do not understand:
What does these delete mean? I do not see any declaration of the delete
variable.
Why do we need a constructor that takes as argument an object of the same
class?
What does this whole line mean: derClass& operator= (const derClass&) =
delete;

Monday, 19 August 2013

Read and write in c#

Read and write in c#

I want to read a file(image) and another file video in c# and save(write)
all the contents of both files(1 after another) in single txt file.Now i
want to again retrieve the first image file content and second file
content separately. Is it possible to read video and image file for save
in single file.

No pbcopy-pbpaste command

No pbcopy-pbpaste command

I am trying to access the clipboard but there is no pbcopy or pbpaste
command. Is there an alternative to this command? how can i access the
clipboard from the command line?

Is there a service to fetch device images?

Is there a service to fetch device images?

I'm building a web service that handles Android devices. Is there an API
or service where I can put the model in (let's say Galaxy Nexus) and it
returns with an array of one or more images representing that device?
-- bluefirex

Running function of one application from within another application

Running function of one application from within another application

pI've got two standalone applications: First one: /p precode Namespace
FirstApplication Class MainWindow Public Sub New() InitializeComponent()
End Sub Public Function RunBatch(Parameter as String) as Double 'Do some
work Return SomeValue End Function End Class End Namespace /code/pre
pSecond application:/p precode Namespace SecondApplication Class
MainWindow Public Sub New() InitializeComponent() End Sub Public Sub
RunBatch() 'Call RunBatch() from first Application, get show the result
Msgbox(RunBatch) End Function End Class End Namespace /code/pre pBoth are
WPF, .Net 4.0 based. The goal is to have second application call on the
first one and execute a function in it. /p pThe key part is that both
applications are used primarily independently and only occasionally second
calls on the first. Because both applications need to exist as executable,
I don't want to solve the problem by creating a dll of the first
application - I would need to maintain both the executable and dll update
to date with potentially disastrous consequences if they fall out of
sync./p pSo the question is whether it's possible, to create an instance
of first application within AppDomain of the second one and, crucially,
execute functions of that instance./p

JScrollBar customization

JScrollBar customization

I Have a problem. In my app I would like to customize scrollbar by
customizing Nimbus Look and Feel. If I create simple Java app in Netbeans
it's working. But the problem is when I enter the same few lines of code
in Netbeans Platform app customization is only at arrow buttons and the
thumb and track are still the same.
final Color sedaDialog = new Color(55, 55, 55);
final Color bila = new Color(255, 255, 255);
NimbusLookAndFeel laf = null;
try {
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
laf = (NimbusLookAndFeel) UIManager.getLookAndFeel();
} catch (Exception e) {
}
laf.getDefaults()
.put("ScrollBar:\"ScrollBar.button\"[Enabled].foregroundPainter",
new Painter<JButton>() {
@Override
public void paint(Graphics2D gd, JButton t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
gd.setColor(bila);
int[] x = {w - 6, w - 6, 6};
int[] y = {h - 3, 4, h / 2 + 1};
gd.fillPolygon(x, y, 3);
}
});
laf.getDefaults()
.put("ScrollBar:\"ScrollBar.button\"[MouseOver].foregroundPainter",
new Painter<JButton>() {
@Override
public void paint(Graphics2D gd, JButton t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
gd.setColor(bila);
int[] x = {w - 6, w - 6, 6};
int[] y = {h - 3, 4, h / 2 + 1};
gd.fillPolygon(x, y, 3);
}
});
laf.getDefaults()
.put("ScrollBar:\"ScrollBar.button\"[Pressed].foregroundPainter",
new Painter<JButton>() {
@Override
public void paint(Graphics2D gd, JButton t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
gd.setColor(bila);
int[] x = {w - 6, w - 6, 6};
int[] y = {h - 3, 4, h / 2 + 1};
gd.fillPolygon(x, y, 3);
}
});
laf.getDefaults()
.put("ScrollBar:ScrollBarThumb[Enabled].backgroundPainter",
new Painter<JComponent>() {
@Override
public void paint(Graphics2D gd, JComponent t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
gd.setColor(bila);
gd.fillRoundRect(3, 4, w - 5, h - 8, 10, 10);
}
});
laf.getDefaults()
.put("ScrollBar:ScrollBarThumb[MouseOver].backgroundPainter",
new Painter<JComponent>() {
@Override
public void paint(Graphics2D gd, JComponent t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
gd.setColor(bila);
gd.fillRoundRect(3, 4, w - 5, h - 8, 10, 10);
}
});
laf.getDefaults()
.put("ScrollBar:ScrollBarThumb[Pressed].backgroundPainter",
new Painter<JComponent>() {
@Override
public void paint(Graphics2D gd, JComponent t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
gd.setColor(bila);
gd.fillRoundRect(3, 4, w - 5, h - 8, 10, 10);
}
});
laf.getDefaults()
.put("ScrollBar:ScrollBarTrack[Enabled].backgroundPainter",
new Painter<JComponent>() {
@Override
public void paint(Graphics2D gd, JComponent t, int w, int h) {
gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
gd.setColor(sedaDialog);
gd.fillRect(0, 0, w, h);
}
});
laf.getDefaults()
.put(
"ScrollBar:\"ScrollBar.button\".size", 20);
This is code I used and I know it's ok and works. But I have no idea why
it's not working in Netbeans Platform. Thx a lot for every reply. :-)

Sunday, 18 August 2013

Why is PHP used with MySQL and not Oracle?

Why is PHP used with MySQL and not Oracle?

Why is PHP used with MySQL and not Oracle? Everytime we use PHP we use
MySQL as database. There are other databases also such as Oracle. Why PHP
is not used with Oracle?

PHP form encryption & storage

PHP form encryption & storage

I would like to know what we be the best way to go about this problem I have.
I have a client that needs a website from and it will contain information
such as email, phone number, and medical history.
They would like all this information secure and they said they would like
it sent in an email.
Should I do it by an email? What do I need to do to make this information
secure storing it (also making it readable) and also sending the data?
Should i get a SSl certificate?

Can't remove GPT table from hard drive

Can't remove GPT table from hard drive

I have tried everything, but nothing works...
Background: Started out with Windows 7, formated and installed Ubuntu and
later installed Arch linux with a GPT partition table.
Running following commands from Ubuntu 12.04 Live USB.
Starting with: Have Arch Linux installed with four partitions. Using GPT.
/dev/sda1 Root partition
/dev/sda2 BIOS boot partition
/dev/sda3 Swap partition
/dev/sda4 /home partition
Step 1:
sudo parted /dev/sda
mklabel msdos
Get the "GPT signatures found"-error message then I check.
Step 2:
sudo dd bs=4M if=/dev/zero of=/dev/sda
Still get the error message.
Step 3:
sudo dd bs=1M if=/dev/zero of=/dev/sda
Still get the damned error message about GPT signatures found.
Step 4>
sudo parted /dev/sda
mktable msdos
I'm not giving up! Even this doesn't work, and the error message appear.
Output from sudo fdisk -l:
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0004cb5a
Device Boot Start End Blocks Id System
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk
doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2103 MB, 2103443456 bytes
255 heads, 63 sectors/track, 255 cylinders, total 4108288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x71bafca0
Device Boot Start End Blocks Id System
/dev/sdb1 * 0 1607679 803840 0 Empty
/dev/sdb2 1595952 1600495 2272 ef EFI (FAT-12/16/32)
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb1'! The util
fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb1: 823 MB, 823132160 bytes
255 heads, 63 sectors/track, 100 cylinders, total 1607680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x71bafca0
Device Boot Start End Blocks Id System
/dev/sdb1p1 * 0 1607679 803840 0 Empty
/dev/sdb1p2 1595952 1600495 2272 ef EFI (FAT-12/16/32)
Output from sudo parted -l
Model: ATA ST250LT007-9ZV14 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/4096B
Partition table: msdos
Number Start End Size Type File system Flags
[GPT-Signatures-found error message]
What should I do to remove the last fragments of the GPT table? Trying to
reinstall Arch again, but can't use cgdisk to create partitions.

Unfortunately app has stopped working ECLIPSE

Unfortunately app has stopped working ECLIPSE

I'm new to this whole app creation. However I'm getting no errors in
source code and no errors elsewhere, but when my app ran in emulator, it
says " unfortunately app has stopped working".
I am not failure with log cat. Anyone who could assist me as I'm trying to
run a beta test on my app.
08-18 17:37:21.452: I/ActivityManager(294): START u0
{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x10200000
cmp=com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol}
from pid 415
08-18 17:37:21.482: W/WindowManager(294): Failure taking screenshot for
(246x410) to layer 21005
08-18 17:37:21.542: I/ActivityManager(294): START u0
{act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x10200000
cmp=com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol}
from pid 415
08-18 17:37:21.822: E/SurfaceFlinger(37): ro.sf.lcd_density must be
defined as a build property
08-18 17:37:22.022: D/dalvikvm(1433): Not late-enabling CheckJNI (already on)
08-18 17:37:22.033: I/ActivityManager(294): Start proc
com.example.audiovolumecontrol for activity
com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol:
pid=1433 uid=10046 gids={50046, 3003, 1028}
08-18 17:37:22.382: E/Trace(1433): error opening trace file: No such file
or directory (2)
08-18 17:37:22.732: D/AndroidRuntime(1433): Shutting down VM
08-18 17:37:22.732: W/dalvikvm(1433): threadid=1: thread exiting with
uncaught exception (group=0x40a71930)
08-18 17:37:22.822: E/AndroidRuntime(1433): FATAL EXCEPTION: main
08-18 17:37:22.822: E/AndroidRuntime(1433): java.lang.RuntimeException:
Unable to instantiate activity
ComponentInfo{com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol}:
java.lang.ClassNotFoundException: Didn't find class
"com.example.android.location.audiovolumecontrol" on path:
/data/app/com.example.audiovolumecontrol-1.apk
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.ActivityThread.access$600(ActivityThread.java:141)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.os.Looper.loop(Looper.java:137)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.ActivityThread.main(ActivityThread.java:5041)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
java.lang.reflect.Method.invokeNative(Native Method)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
java.lang.reflect.Method.invoke(Method.java:511)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
dalvik.system.NativeStart.main(Native Method)
08-18 17:37:22.822: E/AndroidRuntime(1433): Caused by:
java.lang.ClassNotFoundException: Didn't find class
"com.example.android.location.audiovolumecontrol" on path:
/data/app/com.example.audiovolumecontrol-1.apk
08-18 17:37:22.822: E/AndroidRuntime(1433): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
java.lang.ClassLoader.loadClass(ClassLoader.java:501)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
java.lang.ClassLoader.loadClass(ClassLoader.java:461)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.Instrumentation.newActivity(Instrumentation.java:1054)
08-18 17:37:22.822: E/AndroidRuntime(1433): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
08-18 17:37:22.822: E/AndroidRuntime(1433): ... 11 more
08-18 17:37:23.032: W/ActivityManager(294): Force finishing activity
com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol
08-18 17:37:23.092: W/WindowManager(294): Failure taking screenshot for
(246x410) to layer 21010
08-18 17:37:23.122: I/Choreographer(294): Skipped 30 frames! The
application may be doing too much work on its main thread.
08-18 17:37:23.612: W/ActivityManager(294): Activity pause timeout for
ActivityRecord{40e5a728 u0
com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol}
08-18 17:37:23.643: I/Choreographer(294): Skipped 45 frames! The
application may be doing too much work on its main thread.
08-18 17:37:23.712: E/SurfaceFlinger(37): ro.sf.lcd_density must be
defined as a build property
08-18 17:37:24.103: I/Choreographer(415): Skipped 80 frames! The
application may be doing too much work on its main thread.
08-18 17:37:24.602: I/Choreographer(294): Skipped 36 frames! The
application may be doing too much work on its main thread.
08-18 17:37:24.633: E/SurfaceFlinger(37): ro.sf.lcd_density must be
defined as a build property
08-18 17:37:25.782: I/ActivityManager(294): No longer want
com.android.contacts (pid 554): empty for 1800s
08-18 17:37:35.869: W/ActivityManager(294): Activity destroy timeout for
ActivityRecord{40e5a728 u0
com.example.audiovolumecontrol/com.example.android.location.audiovolumecontrol}
08-18 17:37:59.061: D/ExchangeService(699): Received deviceId from Email
app: null
08-18 17:37:59.061: D/ExchangeService(699): !!! deviceId unknown; stopping
self and retrying
08-18 17:38:00.042: I/ActivityManager(294): No longer want
com.android.defcontainer (pid 499): empty for 1801s
08-18 17:38:00.072: I/ActivityManager(294): No longer want
com.android.settings (pid 733): empty for 1804s
08-18 17:38:04.102: I/ActivityManager(294): No longer want
com.android.calendar (pid 751): empty for 1800s
08-18 17:38:04.162: D/ExchangeService(699): !!! EAS ExchangeService,
onStartCommand, startingUp = false, running = false
08-18 17:38:04.172: W/ActivityManager(294): Unable to start service Intent
{ act=com.android.email.ACCOUNT_INTENT } U=0: not found
08-18 17:38:04.183: D/ExchangeService(699): !!! Email application not
found; stopping self
08-18 17:38:04.202: W/ActivityManager(294): Unable to start service Intent
{ act=com.android.email.ACCOUNT_INTENT } U=0: not found
08-18 17:38:04.222: E/ActivityThread(699): Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cec780 that
was originally bound here
08-18 17:38:04.222: E/ActivityThread(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cec780 that
was originally bound here
08-18 17:38:04.222: E/ActivityThread(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:04.222: E/ActivityThread(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:04.222: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:04.222: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:04.222: E/ActivityThread(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:04.222: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:04.222: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:04.222: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
08-18 17:38:04.222: E/ActivityThread(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
08-18 17:38:04.222: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:04.222: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:04.222: E/ActivityThread(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:04.222: E/ActivityThread(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:04.222: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:04.222: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:04.222: E/ActivityThread(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:04.242: E/StrictMode(699): null
08-18 17:38:04.242: E/StrictMode(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cec780 that
was originally bound here
08-18 17:38:04.242: E/StrictMode(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:04.242: E/StrictMode(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:04.242: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:04.242: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:04.242: E/StrictMode(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:04.242: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:04.242: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:04.242: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
08-18 17:38:04.242: E/StrictMode(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
08-18 17:38:04.242: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:04.242: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:04.242: E/StrictMode(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:04.242: E/StrictMode(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:04.242: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:04.242: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:04.242: E/StrictMode(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:04.242: W/ActivityManager(294): Unbind failed: could not find
connection for android.os.BinderProxy@4104a6b0
08-18 17:38:04.262: E/ActivityThread(699): Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cdc508 that
was originally bound here
08-18 17:38:04.262: E/ActivityThread(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cdc508 that
was originally bound here
08-18 17:38:04.262: E/ActivityThread(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:04.262: E/ActivityThread(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:04.262: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:04.262: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:04.262: E/ActivityThread(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:04.262: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:04.262: E/ActivityThread(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:04.262: E/ActivityThread(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:04.262: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:04.262: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:04.262: E/ActivityThread(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:04.292: E/StrictMode(699): null
08-18 17:38:04.292: E/StrictMode(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cdc508 that
was originally bound here
08-18 17:38:04.292: E/StrictMode(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:04.292: E/StrictMode(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:04.292: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:04.292: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:04.292: E/StrictMode(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:04.292: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:04.292: E/StrictMode(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:04.292: E/StrictMode(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:04.292: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:04.292: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:04.292: E/StrictMode(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:04.302: W/ActivityManager(294): Unbind failed: could not find
connection for android.os.BinderProxy@4111e2c8
08-18 17:38:16.101: I/ActivityManager(294): No longer want
com.android.quicksearchbox (pid 829): empty for 1800s
08-18 17:38:16.112: I/ActivityManager(294): No longer want
android.process.acore (pid 457): empty for 1806s
08-18 17:38:16.151: I/ActivityManager(294): No longer want com.svox.pico
(pid 807): empty for 1806s
08-18 17:38:16.191: I/ActivityManager(294): No longer want
com.android.providers.calendar (pid 718): empty for 1809s
08-18 17:38:16.221: I/ActivityManager(294): No longer want
com.android.keychain (pid 790): empty for 1807s
08-18 17:38:16.241: E/ThrottleService(294): problem during onPollAlarm:
java.lang.IllegalStateException: problem parsing stats:
java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open
failed: ENOENT (No such file or directory)
08-18 17:38:49.249: D/ExchangeService(699): Received deviceId from Email
app: null
08-18 17:38:49.249: D/ExchangeService(699): !!! deviceId unknown; stopping
self and retrying
08-18 17:38:54.311: D/ExchangeService(699): !!! EAS ExchangeService, onCreate
08-18 17:38:54.321: D/ExchangeService(699): !!! EAS ExchangeService,
onStartCommand, startingUp = false, running = false
08-18 17:38:54.341: D/ExchangeService(699): !!! EAS ExchangeService,
onStartCommand, startingUp = true, running = false
08-18 17:38:54.361: W/ActivityManager(294): Unable to start service Intent
{ act=com.android.email.ACCOUNT_INTENT } U=0: not found
08-18 17:38:54.361: D/ExchangeService(699): !!! Email application not
found; stopping self
08-18 17:38:54.391: W/ActivityManager(294): Unable to start service Intent
{ act=com.android.email.ACCOUNT_INTENT } U=0: not found
08-18 17:38:54.411: E/ActivityThread(699): Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1d260 that
was originally bound here
08-18 17:38:54.411: E/ActivityThread(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1d260 that
was originally bound here
08-18 17:38:54.411: E/ActivityThread(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:54.411: E/ActivityThread(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:54.411: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:54.411: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:54.411: E/ActivityThread(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:54.411: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:54.411: E/ActivityThread(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:54.411: E/ActivityThread(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:54.411: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:54.411: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:54.411: E/ActivityThread(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:54.431: E/StrictMode(699): null
08-18 17:38:54.431: E/StrictMode(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1d260 that
was originally bound here
08-18 17:38:54.431: E/StrictMode(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:54.431: E/StrictMode(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:54.431: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:54.431: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:54.431: E/StrictMode(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:54.431: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:54.431: E/StrictMode(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:54.431: E/StrictMode(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:54.431: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:54.431: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:54.431: E/StrictMode(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:54.441: W/ActivityManager(294): Unbind failed: could not find
connection for android.os.BinderProxy@410c23d8
08-18 17:38:54.481: E/ActivityThread(699): Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cdcc20 that
was originally bound here
08-18 17:38:54.481: E/ActivityThread(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cdcc20 that
was originally bound here
08-18 17:38:54.481: E/ActivityThread(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:54.481: E/ActivityThread(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:54.481: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:54.481: E/ActivityThread(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:54.481: E/ActivityThread(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:54.481: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:54.481: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:54.481: E/ActivityThread(699): at
com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
08-18 17:38:54.481: E/ActivityThread(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
08-18 17:38:54.481: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:54.481: E/ActivityThread(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:54.481: E/ActivityThread(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:54.481: E/ActivityThread(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:54.481: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:54.481: E/ActivityThread(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:54.481: E/ActivityThread(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:54.501: E/StrictMode(699): null
08-18 17:38:54.501: E/StrictMode(699):
android.app.ServiceConnectionLeaked: Service
com.android.exchange.ExchangeService has leaked ServiceConnection
com.android.emailcommon.service.ServiceProxy$ProxyConnection@40cdcc20 that
was originally bound here
08-18 17:38:54.501: E/StrictMode(699): at
android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
08-18 17:38:54.501: E/StrictMode(699): at
android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
08-18 17:38:54.501: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1418)
08-18 17:38:54.501: E/StrictMode(699): at
android.app.ContextImpl.bindService(ContextImpl.java:1407)
08-18 17:38:54.501: E/StrictMode(699): at
android.content.ContextWrapper.bindService(ContextWrapper.java:473)
08-18 17:38:54.501: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
08-18 17:38:54.501: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
08-18 17:38:54.501: E/StrictMode(699): at
com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
08-18 17:38:54.501: E/StrictMode(699): at
com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
08-18 17:38:54.501: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
08-18 17:38:54.501: E/StrictMode(699): at
com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
08-18 17:38:54.501: E/StrictMode(699): at
android.os.AsyncTask$2.call(AsyncTask.java:287)
08-18 17:38:54.501: E/StrictMode(699): at
java.util.concurrent.FutureTask.run(FutureTask.java:234)
08-18 17:38:54.501: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
08-18 17:38:54.501: E/StrictMode(699): at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
08-18 17:38:54.501: E/StrictMode(699): at
java.lang.Thread.run(Thread.java:856)
08-18 17:38:54.512: W/ActivityManager(294): Unbind failed: could not find
connection for android.os.BinderProxy@40fddec8
Thanks

Is there an official comprehensive list of E-numbers?

Is there an official comprehensive list of E-numbers?

Does an official comprehensive list of the E-numbers exists?
I'm thinking of something along what the Wikipedia page provides:
Number
Role
Name
Description
Approval
Notes
An example of an entry could be:
E110
Colour
Sunset Yellow FCF
Used to grand a yellow-orange colour
Approved in the European Union, approved in the United States of America,
banned in Norway
Products in the European Union require warnings and its use is being
phased-out
These informations can be found scattered around the internet, but I've
not yet been able to find a single page containing all of them besides the
Wikipedia article (not that I've anything against Wikipedia, but I'd like
an official source instead of a page anyone can edit and whose accuracy
can't be guaranteed), lLooking up the informations through 4/5 documents
every time is impractical.
At the moment I've been able to find these official documents:
Class names and the international numbering system for food additives
Codex general standard for food additives
Current EU approved additives and their E Numbers