Thursday, 3 October 2013

Getting client host or other related info in Play

Getting client host or other related info in Play

Can anyone tell me how to get the client host (the IP address) in or any
other this kind of data in Play Framework (2.1.x)?

Wednesday, 2 October 2013

Excel VBA ODBC connection failed

Excel VBA ODBC connection failed

I'm using Excel 2010 VBA to retrieve data from MS Access 2010 with ODBC
connection to SQL Server R2 Express, in my previous machine there is no
issue (32bit platform) but when I got new machine it's always said "ODBC
connection to (odbc name) failed -2147467259".
From Access 2010 to SQL there is no issue, but when I retrieve data from
Excel always trigger this error.
I have check the permission for the user (DBO), all the app in the same
machine, all the services are on, ODBC setting is correct. During the
execution of the script all OK except when the line is opening the table.
Function RetrieveProjectList()
Dim strConn As String
Dim conn As New ADODB.Connection
Dim rec As New ADODB.Recordset
Dim intColCount As Integer
Dim strName As String
Dim strSQL As String
On Error GoTo Error_Trap
strName = ThisWorkbook.path & "\DBSource V0.1.accdb"
Set conn = New ADODB.Connection
strConn = "Provider=microsoft.ACE.oledb.12.0;"
strConn = strConn & "Data Source=" & strName & ";"
conn.Open ConnectionString:=strConn
Set rec = New ADODB.Recordset
strSQL = "SELECT qryProjectList.* " & _
"FROM qryProjectList ORDER BY tblArea.AreaName,tblProject.ProjectName;"
rec.Open strSQL, conn, adOpenDynamic, adLockOptimistic
'Retrieve data from Access
rec.MoveFirst
If rec.Fields.count <> 0 Then
After syntax "rec.open ...." the error pop up. In other machince are OK.
Question:
Is this related to OS version 64bit? What did I miss out here? Any advice
will be highly appreciated.
Thanks, seageath

For each loop returns blank

For each loop returns blank

I have a for each loop in the final step of my asp:Wizard that is supposed
to list all of the text in each textbox that is not null. The textboxes
are in the second step of the asp:Wizard and they are placed in asp:Panel
controls that are made visible or not visible with the use of checkboxes
on the same step. Here is the event with the loop:
protected void Wizard1_FinishButtonClick(object sender,
WizardNavigationEventArgs e)
{
var requested = this.Controls.OfType<TextBox>()
.Where(txt => !string.IsNullOrWhiteSpace(txt.Text));
var sb = new StringBuilder();
foreach (var textBox in requested)
{
sb.Append(textBox.Text); //Add the text not the textbox
sb.Append("</br>"); //Add a line break to make it look pretty
}
Label1.Text = sb.ToString();
}
If I run the application with the loop my label will return blank, no
matter what I fill out. The label is currently in the 3rd step
<asp:WizardStep ID="WizardStep3" runat="server" AllowReturn="false"
Title="Step 3" StepType="Complete">
<asp:Label ID="Label1" runat="server" Text="This text will display
when I run the application without the foreach loop"></asp:Label>
</asp:WizardStep>

How do I make POST request in FRAME

How do I make POST request in FRAME

I've following piece of code
<html>
<head>
<script language="JavaScript">
function redirect() {
window.moveBy(0, 0);
self.focus();
}
</script>
<title>POST request</title>
</HEAD>
<%
String unsaferequest =
request.getQueryString()+"&id="+System.currentTimeMillis()+session.getId();
String saferequest = ESAPI.encoder().encodeForHTMLAttribute(
unsaferequest );
%>
<frameset name="frameset" frameborder="no" cols="*,230px,30px"
onload='javascript:redirect()'>
<frame name="statement" scrolling="auto" src='/test/jsp/download_msg.jsp?
<%=saferequest%>'>
<frameset name="frameset" frameborder="no" rows="20px,*">
<frame name="" scrolling="no" src="/test/html/blank.html">
<frame name="enclosure" style="" scrolling="no"
src='/test/DownloadDisclaimer?
<%=saferequest%>'>
</frameset>
<frame name="hide" scrolling="auto" src="/test/html/hidingFrame.html">
</frameset>
</html>
Now I've to change the src in frame to make it a post request. I found
there is no straight forward way to do this. Could you please give some
sample code to do this?

#EANF#

#EANF#

I have this custom adapter for my listview that is getting filled with a
ArrayList of a custom rowItem class where I put data in.
rowItem.getImage() will return this byte array: I have put the long string
under this in a byte[] variable with getBytes()
R0lGODlhZAAvAPcAAAAAAAAAMwAAZgAAmQAAzAAA/wArAAArMwArZgArmQArzAAr/wBVAABVMwBVZgBVmQBVzABV/wCAAACAMwCAZgCAmQCAzACA/wCqAACqMwCqZgCqmQCqzACq/wDVAADVMwDVZgDVmQDVzADV/wD/AAD/MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMrADMrMzMrZjMrmTMrzDMr/zNVADNVMzNVZjNVmTNVzDNV/zOAADOAM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0xuNRBcj/UQ3Q8HTsrxSHcX0JFiDQqtvRESRpihNQE85WkHwBFWVdAlhjg4P3a5El+6g+biBiczRsmM9vj7ar572TG4sEiS+EkZpnq0Nqv6SEOrmCEHXcxfWQFtju1imJm8cEdaCmmrBjNY0rcVNofWq1JqNdkw0W3VPRVKVz7xLYKiDCdUgU5AIr3pLuMbzmQTIEuHAZT8IfNhqsqLCx+yIQ5Me2ZXS1i3yiqcgAQEAOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
Now I have this code:
byte[] imageData = rowItem.getImage();
Drawable logoDrawable = null;
if (imageData != null) {
Bitmap logoBitmap = BitmapFactory.decodeByteArray(imageData, 0,
imageData.length);
logoDrawable = new BitmapDrawable(context.getResources(),
logoBitmap);
}
holder.imageView.setImageDrawable(logoDrawable);
But it won't display a image, if I set a image out of my drawable map it
will show so it reconizes the imageview.

Tuesday, 1 October 2013

Highcharts multi line graphs

Highcharts multi line graphs

This is my fiddle
http://jsfiddle.net/a4UQf/
Code:
$(function () {
$('#container').highcharts({
title: {
text: 'Monthly Average Temperature',
x: -20 //center
},
subtitle: {
text: 'Source: WorldClimate.com',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'Temperature (°C)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3,
18.3, 13.9, 9.6]
}, {
name: 'New York',
data: [-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1,
14.1, 8.6, 2.5]
}, {
name: 'Berlin',
data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0,
3.9, 1.0]
}, {
name: 'London',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3,
6.6, 4.8]
}]
});
});
Here I want to implement in php mysql. Some suggestions would be grateful.
Before that the lines showing there, there must be a check then the graph
should show, for example if i click on tokyo checkbox then tokyo line
graph should show and so on, this should be used in an array, how to do
that please help.

How can i make my square button and spinner the same height?

How can i make my square button and spinner the same height?

usecase:
I want a spinner with a clickable, squared image-button to the right of
it, on the same row, with the button the same height as the spinner.
There was first a problem getting an imagebutton to be square, which i
solved reading this thread: How do I keep the aspect ratio on image
buttons in android?
I now have them on the same row and with the icon square and resized, but
not quite to the size of the spinner, the 9-patch (i think) of the spinner
creates some sort of padding around it and my image uses that to set its
height, so that it looks like this:
If someone can help me out here it would be greatly appreciated.
Layout-xml below:
<LinearLayout android:layout_weight="1" android:id="@+id/spinnerRow"
android:orientation="horizontal"
style="@style/horizontalLayout" android:gravity="top"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:paddingTop="5dp">
<LinearLayout android:id="@+id/spinLayout"
style="@style/spinLayout" android:layout_weight="1">
<Spinner android:id="@+id/locSelect"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:prompt="@string/loc_prompt"></Spinner>
</LinearLayout>
<com.karpet.nuba.util.SquareButton
android:id="@+id/info" android:orientation="horizontal"
android:gravity="top" android:layout_height="fill_parent"
android:layout_width="wrap_content" android:layout_weight="0.5">
<ImageView
android:id="@+id/info"
android:src="@drawable/info"
android:adjustViewBounds="true"
android:scaleType="centerInside"
android:layout_height="wrap_content"
android:layout_width="wrap_content"/>
</com.karpet.nuba.util.SquareButton>
</LinearLayout>

Fresh install on Dell Laptop

Fresh install on Dell Laptop

I have a Dell Inspiron 14R laptop that came with Ubuntu 11.1
pre-installed. I upgraded it to Ubuntu 12.04 -thorugh the Update Manager-
and everything seems to work fine including my touchpad and it advanced
features (scrolling, tapping).
For things of life I have to format my Hard Drive, and I did a fresh
install using the installer available at Ubuntu Site. Everything seems to
work fine except that now my touchpad works only as a regular one (not
advanced features, and I can't disable either), and if I run xinput list I
don't see the Touchpad at all.
That makes me think that the out-of the-box install has some pre-installed
packages that gets everything working smoothly, and now that I formatted
my drive I lost them. Are there any required packages to install on a Dell
Inspiron Laptop?

How can "a

How can "a

Here is the code i have to figure it out how is it possible. I have a clue
but i do not know how to do it. I think it is about negative and positive
numbers and maybe the variable modifiers as well. I …

Monday, 30 September 2013

Using the definition of the derivative to prove a constant function – math.stackexchange.com

Using the definition of the derivative to prove a constant function –
math.stackexchange.com

I am presented with the following task: "Let $f$ be a function defined on
the interval $I$. All we know about $f$ is that there is a constant $K$
such that $$|f(a) - f(b)| \leq K|a-b|^2$$ for all …

which statement best describes the linear correlation

which statement best describes the linear correlation

Over the course of a given week, 39 members of a reading club went to the
library
The table below shoes the ages of these 39 members and the number of time
they visited the library that week

Which one of the following statements best describes the linear
correlation between the ages of the members and the number of library
visits?
a) the correlation is positive and high
b) the correlation is positive and low
c) the correlation is negative and high
d) the correlation is negative and low
I don't understand how to solve this question just by looking at the
table. Do i draw a scatter plot? but we don't have ordered pairs (x,y)

Start with MySQL and change to MongoDB in the future?

Start with MySQL and change to MongoDB in the future?

I'm new to node.js I have plan to use database other than MySQL (lets say
MongoDB), but I'm only familiar with MySQL.
DO you think better to use MySQL first and change to MongoDB in the
future? or learn MongoDB quickly and use MongoDB from beginning?

EasyMock partial mock private methods

EasyMock partial mock private methods

I have the following scenario:
public class ClassA {
public void methodA(){
try {
int result=methodB();
} catch (IOException e) {
//Some code here
}
}
private int methodB() throws IOException{
//Some code here
return 1;
}
}
I want to cover the catch block of the public method methodA() in my test.
I don't want to change the visibility of the private method. Is there any
way to achieve partial mock of private method using EasyMock? Or is there
any way to change the behaviour of private method in my Junit class to
throw exception without using mocking?
Thanks in advance.

Sunday, 29 September 2013

scatter-gather list in Linux kernel device driver

scatter-gather list in Linux kernel device driver

I am working on a device driver that has access to a scatter-gather list
(sg) element. I am able to extract the data out of it and store it in an
allocated buffer using sg_copy_to_buffer. Now, my idea is to create a new
scatterlist and copy from this buffer into the new scatterlist I create
(ofcourse this is done later) and return this new scatterlist back to the
kernel. (This is for performance metrics, etc.) I tried searching online
for documentation to use scatterlist, etc. but to no avail. What I
typically am doing:
char *buffer = kmalloc (***);
struct scatterlist *sglist = kmalloc (sizeof (struct scatterlist)...);
sg_init_one(sglist, buffer, BUFFER_SIZE);
sg_copy_to_buffer (inp_sglist, inp_sglist_len, buffer);
*** Later ***
sg_copy_from_buffer (sglist, 1, buffer);
Is there a good documentation to help me map my scatterlist to a virtual
buffer? I tried looking at http://lwn.net/Articles/256368/
http://www.linuxjournal.com/article/7104 etc.
Any help or pointers would be appreciated!

Where does gdb get function names from?

Where does gdb get function names from?

I'm looking at a live python process using GDB and see the following frames:
...
#5 call_function (oparg=<optimized out>, pp_stack=0x7fffb1b2ffa0) at
Python/ceval.c:4084
#6 PyEval_EvalFrameEx (f=f@entry=0x1a03850, throwflag=throwflag@entry=0)
at Python/ceval.c:2679
...
I'm confused about where does the call_function come from though. It
doesn't seem to be a symbol in either the python executable or the binary:
~ &#5125; objdump -x /usr/lib/libpython3.3m.so.1.0 | grep call_function
000000000005f0e0 l F .text 0000000000000094
call_function_tail
If it's not a known symbol, how does GDB know about it... and what is it
exactly (apart of course that it's a normal function)?

MySQL - Update field statement query/error

MySQL - Update field statement query/error

The below statement returns the results I want to change perfectly
"Showing rows 0 - 29 ( 2,018 total, Query took 0.0781 sec)" :
SELECT * FROM wp_posts WHERE ID IN
(SELECT post_id FROM wp_postmeta WHERE (meta_key = 'expires') AND
(meta_value <= NOW() - INTERVAL 1 DAY) AND (meta_value IS NOT NULL));
However the below returns an error "#1292 - Truncated incorrect datetime
value: ''", when I try and update that result sets 'post_status' field ...
Where is the error in my 2nd statements syntax please (below) ?
UPDATE wp_posts SET post_status='draft' WHERE ID IN
(SELECT post_id FROM wp_postmeta WHERE (meta_key = 'expires') AND
(meta_value <= NOW() - INTERVAL 1 DAY) AND (meta_value IS NOT NULL));
Thanks.

MVC Paging Display issue with page numbers

MVC Paging Display issue with page numbers

In my View i have implemented a paging and everything looks good. However
the format of page numbers is not what i expected. Its showing the pages
index like this :
««
«

3
4
5
6
7
8
9
10
11
12

»
»»
clicking this links works, but it should have displayed things in a
straight row
here is the code for my view
<table>
<tr>
<th>
Account Type
</th>
<th>
Account #1
</th>
<th>
Account #2
</th>
<th>
Amount
</th>
<th>
Comment
</th>
<th>
Date
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.TransactionType)
</td>
<td>
@Html.DisplayFor(modelItem => item.AccountNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.DestAccount)
</td>
<td>
@Html.DisplayFor(modelItem => item.Amount)
</td>
<td>
@Html.DisplayFor(modelItem => item.Comment)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModifiedDate)
</td>
</tr>
}
</table>
@Html.PagedListPager(Model, page => Url.Action("Index",new {page}))

Saturday, 28 September 2013

Secondary keyboard is not functioning as it should [migrated]

Secondary keyboard is not functioning as it should [migrated]

I plugged USB keyboard and it doesn't function fully when I start working
in Visual Studio. I can type and mostly everything works except F12.Click
on top of Method or Class and press F12 it should take me to the
definition, but when I press from my laptops keyboard it works fine.
Anyone know why it is not working from secondary keyboard?
Thanks,

Hiding settings.py passwords for Heroku Django deployment

Hiding settings.py passwords for Heroku Django deployment

I have sensitive data (database passwords) in settings.py and I was
advised to upload my Django project to a github repository before pushing
it to Heroku on their "Getting Started with Django on Heroku". If I put
settings.py in .gitignore, then presumably it won't get deployed with my
project. How can I prevent settings.py from being exposed but still get it
deployed with my project ?

Increase Div height when checkmark is checked

Increase Div height when checkmark is checked

I currently have a fadein/out of a hidden div when a checkmark is checked.
I would like to also increase the appropriate div height as well and then
remove the same height after the check mark is unchecked. This some
snippets of my current code:
<script type="text/javascript">
$('.checkTax').change(function() {
if ($(this).attr("checked")) {
$('.prorateTax').fadeIn();
return;
}
$('.prorateTax').fadeOut();
});
</script>
The div whos height needs to be adjusted is: .article.prorate . I've tried
a few suggestions online and so far nothing is working. If other
information is needed to provide a adequate response please let me know.