Thursday, 3 October 2013

Javascript validation for checkboxes in JQuery DataTable

Javascript validation for checkboxes in JQuery DataTable

I have a table which is binding with JQuery datatable.
<table id="grid1">
<thead>
<tr>
<th>Name</th>
<th>View</th>
<th>Modify</th>
</tr>
</thead>
</table>
Below is the javascript code for binding the table/grid-
function grid1_LoadData() {
grid1.fnDestroy();
grid1.dataTable({
"sScrollY": "200px",
"bStateSave": true,
'bDeferRender': true,
'sAjaxSource': '/controller/GetData,
'aoColumns': [
{ 'mDataProp': 'Name' },
{ 'mDataProp': 'View', "sWidth": "55%", sType:
'bool', bSearchable: false, bSortable: false, mData:
'View',
"mRender": function (data, type, full) {
return "<input class=\"enabledbool\"
name=\"CanView" + full.ID + "\"
type=\"checkbox\" " + (data ? "
checked=\"true\"" : "") + "/>";
}
},
{ 'mDataProp': 'Modify', "sWidth": "65%", sType:
'bool', bSearchable: false, bSortable: false, mData:
'Modify', "mRender": function (data, type, full) {
// console.log(data);
return "<input class=\"enabledbool\"
name=\"CanModify" + full.ID + "\"
type=\"checkbox\" " + (data ? " checked=\"true\""
: "") + "/>";
}
},
]
});
}
Before saving the grid/table data, I want to check at least View or Modify
check box is checked. I need to write a javascript validation function.
This is what I have tried-
function Validate() {
$(grid1.fnGetData()).each(function () {
if ($(.checkbox).is(':checked')) {
return true;
}
else {
return false;
}
});
}
Waiting for the valuable suggestions.

Wednesday, 2 October 2013

vagrant virtualbox cannot make a POST request to a local rails app

vagrant virtualbox cannot make a POST request to a local rails app

I have a rails app running locally on port 3000.
From an app on Vagrant:
Requests::post( 'http://0.0.0.0:3000', $header, $payload );
Response:
'Cannot connect to host'
Note: When I run the same code out of the context of Vagrant, it works
perfectly.

Use values from a column to run a SELECT statement Oracle

Use values from a column to run a SELECT statement Oracle

I need to iterate through column values in a query.
Table1
index value
1, Nice
2, School
3, Day
pseudocode:
FOR all values in Table1
SELECT parent, function(value)
from Table2

C++ Code for Screen Capturing

C++ Code for Screen Capturing

I need to write code which will do screen sharing like WebEx or Team
Viewer for Windows PC. The requirement is I don't have admin access and I
can not Install any application or software for this. I know below
technology but none of them is working for me. I have tried all sample for
this code project URL
http://www.codeproject.com/Articles/5051/Various-methods-for-capturing-the-screen
(1) GetDC(NULL) and BitBlt with SRCCOPY <= This will not capture
Transparent Window and It cause GDI hung (Just try drawing in Paint.. your
pencil stuck for some time when BitBlt operation performerd)
(2) GetDC(NULL) and BitBlt with SRCCOPY and CAPTUREBLT Option <= This will
hide Cursor when I call BitBlt Operation and also GDI Hung when BitBlt
Operation Performed.
(3) I also tried with DirectX using GetFrontBufferData.. This cause
Flicker of my Transparent Window.
(4) I tried with Windows Media API but this require Windows Media Encoder
to be Installed.
(5) I tried with Mirror Driver also but this require Driver to be
Installed with Admin Access.
Can any one please suggest API where without any Installation I can
capture entire screen and No flicker or GDI hung problem.
Thanks in Advance.....

Tuesday, 1 October 2013

undefined method {....}_url when calling create in api controller

undefined method {....}_url when calling create in api controller

I'm working on a rails app that serves some json and I'm having hard time
understanding what is going on in the code below (simplified for the
purpose of understanding the issue).
module Api
class ProjectController < ApplicationController
respond_to :json
def show
x = {"id"=>17, "name"=>"abc", "version"=>1}
respond_with x.to_json, status: 200
end
def create
x = {"id"=>17, "name"=>"abc", "version"=>1}
respond_with x.to_json, status: 200
end
end
end
The show action works fine but when I call the create action I get
NoMethodError (undefined method '{"id":17,"name":"abc","version":1}_url'
for Api::ProjectsController:0x007fbb2294cd18)
Why do I get this error while show works just fine? is it because create
makes a post instead of a get?
How can I solve it?
Thanks for your help and have a nice day.

how to create 2 separate war files

how to create 2 separate war files

I'm working on this huge java maven project that has several components to
it. This project will be delivered to several clients the exact same way
except for 1 small part for 1 of the clients.
This client provided me a single jar file that I should use when logging
information.
Now here's my question - how do I create two war files - 1 with the jar
file that the customer provided me, and 1 without.
I started looking into feature toggling - but feature toggling would
require me to deliver the proprietary jar file to other customers because
the code won't compile since there is still a dependency and I would only
have 1 war file.

I understand a question that was marked as unclear=?iso-8859-1?Q?=2C_but_I_may_be_the_only_one=2C_what_do_I_do=3F_=96_meta.?=stackoverflow.com

I understand a question that was marked as unclear, but I may be the only
one, what do I do? – meta.stackoverflow.com

What do I do if I understand a question that was marked as unclear? I want
to answer it but I am unable to... I flagged it, informing the moderators
that I am able to understand the question and ...

a problem about Inequality zoom

a problem about Inequality zoom


I came across this inequality. Can anyone help me?

Monday, 30 September 2013

Decomposition of exponential random variable – math.stackexchange.com

Decomposition of exponential random variable – math.stackexchange.com

I know that sum of independent Exponential random variables follows Gamma
distribution. But Is it possible to decompose exponential random variate
into independent and identically gamma random ...

How does one prove that $6$ divides ${(3n)!}/{(n!)^3}$=?iso-8859-1?Q?=3F_=96_math.stackexchange.com?=

How does one prove that $6$ divides ${(3n)!}/{(n!)^3}$? –
math.stackexchange.com

How does one prove that $6$ divides the multinomial coefficient
$\displaystyle \frac{(3n)!}{\;(n!)^3}$?

Where to check if record exists?

Where to check if record exists?

Just a coding design related question. Where does it make more sense to
check for a records existence before inserting it into the database. The
service layer or repository?

Xap file in windows phone app

Xap file in windows phone app

I have 2 Xap file in "MyApplication -> Bin -> Release" folder
1)MyHelloWorldSampleApp.xap(3,820KB)
2)MyHelloWorldSampleApp_Release_AnyCPU.xap(4,631KB)
Anybody can explain about whats the difference between this two.
Thank you.

Sunday, 29 September 2013

Scala: Type mismatch, returns BlockList[Any] instead of BlockList[R]

Scala: Type mismatch, returns BlockList[Any] instead of BlockList[R]

Just to get more experience with Scala, and as an experiment, I'm
implementing a class that has a List-like API, but is implemented as a
list of IndexedSeq with an index to the first element; tail just returns a
copy with the index incremented, and prepending Arrays is O(1), while
appending Arrays is O(m), m = length of list <= number of elements.
I'm running into problems with my function return types. Pretty much every
method has the type parameters [R >: T : ClassManifest, A <: R :
ClassManifest], T being the type parameter of BlockList. Sometimes these
methods just return others, but in those situations I get an error from
Eclipse saying that it was looking for type BlockList[R] but found type
BlockList[Any]. Shouldn't R be the lowest common super type of both T and
A? In which case, the second method call should also return BlockList[R],
right? What am I not getting? I reflect ClassManifest a lot to overcome
the problems of type erasure, but I don't know if it's still a problem.
The errors are from the definitions of |: and :|. I also get an error from
new Build[R](block, next :| blk, index), saying that none of the
constructors can be applied to (IndexedSeq[T], BlockList[Any], Int).
import collection.immutable.List
import reflect.ClassManifest
import annotation.tailrec
sealed abstract
class BlockList [+T] extends Seq[T] with Product {
...
}
class Build [T: ClassManifest](
private val block: IndexedSeq[T],
private val next: BlockList[T] = EmptyBlock,
private val index: Int = 0
) extends BlockList[T] {
require(!block.isEmpty && index >= 0 && index < block.length)
def this (blk: Array[T], nxt: BlockList[T] = EmptyBlock, idx: Int = 0) {
this(blk toIndexedSeq, nxt, idx)
}
override def |: [R >: T : ClassManifest, A <: R] (x: A): BlockList[R] =
Array[R](x) |: this
override def |: [R >: T : ClassManifest, A <: R : ClassManifest]
(blk: IndexedSeq[A]): BlockList[R] =
if (blk isEmpty) this
else new Build[R](blk, this)
override def :| [R >: T : ClassManifest, A <: R] (x: A): BlockList[R] =
this :| Array[R](x)
override def :| [R >: T : ClassManifest, A <: R : ClassManifest]
(blk: IndexedSeq[A]): BlockList[R] =
if (blk isEmpty) this
else new Build[R](block, next :| blk, index)
override def :|: [R >: T : ClassManifest, A <: R : ClassManifest]
(prefix: BlockList[A]): BlockList[R] =
prefix match {
case prefix: Build[R] => prefix.block |: (prefix.next :|: this)
case EmptyBlock => this
}
override def apply (n: Int): T =
if (n < 0 || n >= length) throw new IndexOutOfBoundsException(
"Cannot get element "+n+"; not within bounds."
)
else if (n < block.length - index) block(n + index)
else next(n - block.length + index)
override lazy val length: Int = (block length) - index + (next length)
}
object EmptyBlock extends BlockList[Nothing] {
...
}

using fstream style in php

using fstream style in php

I have been using file streams with c++ for years and can load character
strings from a file like this:
char a[30],b[30],c[30];
ofstream fp;
fp.open("file.txt");
fp<<a<<b<<c;
Is there a way to read strings from a file in PHP in the same fashion
without reading a whole line or file?

Facebook PHP seperate array

Facebook PHP seperate array

I am trying to get the name of the person who has posted the post, but I
don't understand how to get the name from the array.
echo "FROM: " . print_r($post['from']);

Saturday, 28 September 2013

Efficiency with very large numpy arrays

Efficiency with very large numpy arrays

I'm working with some very large arrays. An issue that I'm dealing with of
course is running out of RAM to work with, but even before that my code is
running slowly so that, even if I had infinite RAM, it would still take
way too long. I'll give a bit of my code to show what I'm trying to do:
#samplez is a 3 million element 1-D array
#zfit is a 10,000 x 500 2-D array
b = np.arange((len(zfit))
for x in samplez:
a = x-zfit
mask = np.ma.masked_array(a)
mask[a <= 0] = np.ma.masked
index = mask.argmin(axis=1)
# These past 4 lines give me an index array of the smallest positive
number
# in x - zift
d = zfit[b,index]
e = zfit[b,index+1]
f = (x-d)/(e-d)
# f is the calculation I am after
if x == samplez[0]:
g = f
index_stack = index
else:
g = np.vstack((g,f))
index_stack = np.vstack((index_stack,index))
I need to use g and index_stack, each of which are 3million x 10,000 2-D
arrays, in a further calculation. Each iteration of this loop takes almost
1 second, so 3 million seconds total, which is way too long.
Is there anything I can do so that this calculation will run much faster?
I've tried to think how I can do without this for loop, but the only way I
can imagine is making 3 million copies of zfit, which is unfeasible.
And is there someway I can work with these arrays by not keeping
everything in RAM? I'm a beginner and everything I've searched about this
is either irrelevant or something I can't understand. Thanks in advance.

ASP.NET MVC currency / culture issue

ASP.NET MVC currency / culture issue

In a number of places in my code I'm converting values into currency using
the ToString c method: .ToString("c")
On my dev machine this correctly formats values in line with my regional
settings and as a result the currency displays as such: £100.00
However on the production server it is ignoring the windows regional
settings and instead defaulting to a US based setting:
$100.00
I had a similar problem with DateTimes but converted to the ISO 8601 format.
Where is the production server is picking this up from?

recurse xml, howto select elements based on a condition of its children

recurse xml, howto select elements based on a condition of its children

I have an xml file with a structure as indicated below.
Question: How do I select/query those elements with children where the
sum(amount) from its children is unequal to its own amount?
There is no fixed amount of children and there are even elements with no
children, these later elements should not appear in the selection.
File structure arising from a json bubbletree file:
'<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="JSON">
<xs:complexType>
<xs:sequence>
<xs:element ref="label"/>
<xs:element ref="amount"/>
<xs:element ref="color"/>
<xs:element maxOccurs="unbounded" ref="children"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="label" type="xs:string"/>
<xs:element name="amount" type="xs:integer"/>
<xs:element name="color" type="xs:string"/>
<xs:element name="children">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="amount"/>
<xs:element ref="children"/>
<xs:element ref="color"/>
<xs:element ref="label"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>'
arising from a bubblechart json file.

body of email not displaying with attachments in rails2.3.5

body of email not displaying with attachments in rails2.3.5

I am sending an email through my application to other user's gmail id. I
am receiving email and it works fine without attachment. But when I attach
a file, the mail which users receive contain subject and attachments only.
The body part is not displaying in the mail. In the controller I am
passing everything as params to reminder_email method. I am using
rails2.3.5..This is how I have implemented in my mailer.rb file. Please
help.
class ReminderMailer < ActionMailer::Base
def reminder_email(sender,recipients, subject, message,attachments)
recipient_emails = (recipients.class == String) ? recipients.gsub('
','').split(',').compact : recipients.compact
setup_reminder_email(sender, recipient_emails, subject,
message,attachments)
end
protected
def setup_reminder_email(sender, emails, subject, message,files)
@from = sender
@recipients = emails
@subject = subject
@sent_on = Time.now
@body['message'] = message
#content_type = "multipart/alternative"
files.each do |file|
attachment "application/octet-stream" do |a|
a.body = file.read
a.filename = file.original_filename
end unless file.blank?
end
end
end

Friday, 27 September 2013

Can Visual Studio Application Settings have a value which refers to another Setting's value?

Can Visual Studio Application Settings have a value which refers to
another Setting's value?

For example, I've got Properties.Settings.Default.Foo which has some
string as its value, and I'd like to define another setting, let's call it
Bar, to be (some_string + Properties.Settings.Default.Foo).
I cannot find a way to do this with the Visual Studio settings designer.
Is it possible?
Thanks!

Mobile Browser Tap Event

Mobile Browser Tap Event

I am working on a mobile HTML 5 prototype, and I recently added some
animations to my app. I am using Zepto and I am really happy with it.
However whenever I tap something in the app, there is a very quick
blinking effect, as a result of this blinking the animation doesnt look
very smooth. I know I couldn't do a very good job explaining the problem
but maybe this video would make it more clear:
https://www.dropbox.com/s/2kf1l0uhos2fson/IMG_0883.MOV
Basically I am trying to get rid of this blinking.

How to return the link from background url with simple dom html?

How to return the link from background url with simple dom html?

I am trying to get the link of a background
<div class="mine" style="background:
url('http://www.something.com/something.jpg')"></div>
I am using find('div.mine')
$link = find('div.mine');
$link returns the html code containing all the
How do I parse so it returns only the link?

Send POST data on redirect with Javascript/jQuery to a top level iframe?

Send POST data on redirect with Javascript/jQuery to a top level iframe?

This question refers to: Send POST data on redirect with Javascript/jQuery?
The solution for the problem was to generate a hidden form which is then
submitted to handle the POST + redirect - however I will be generating the
page in an iframe and redirecting the parent frame - is this possible with
javascript?

Check checkbox by clicking other button

Check checkbox by clicking other button

I'm trying to check a checkbox by clicking the button next to it.
<p class="label">NSFW?: </p><br />
<p><input id="cb" type="checkbox" name="nsfw" />
<span id="nsfwbtn" class="btn btn-danger" rel="tooltip" title="Not
Safe For Work (18+)" >
This image is not safe for work. </span>
</p>
JSFiddle: http://jsfiddle.net/PGCYX/

How to add OPC tags to a global group in Matlab

How to add OPC tags to a global group in Matlab

I am creating a Matlab Application which connects to an OPC Server and
reads the Tag properties. The Matlab documentation is telling me that I
can add a group, add tag items, and then read the value:
grp = addgroup(da, 'ExRead');
itm = additem(grp, 'Tag.Argument');
The problem is that I don't know the tag argument, in my app the user is
selecting a available tag in a popupmenu and the value is written to a
string, but when I call:
val = get(handles.popupmenu1, 'Value'); % Ask for Value selected item
string_val = get(handles.popupmenu1, 'String'); % Ask for string
stringName = string_val{val}; % Ask for string corresponding to the
specified value
set(handles.text1, 'String', stringName); % Display the selected tag
item1 = additem(Group1, stringName); % Add the selected string to a global
group "Group1"
read1 = read(Group1, item1); % Read the value
set(handles.text11, 'String', read1); % Display the value
But when I run the code it says Group1 is unspecified, while Group1 should
be a global variable?
How do I display tag properties from a global group?
Help is greatly appreciated.

Thursday, 26 September 2013

View Pager in android

View Pager in android

I am searching for sources to learn view pager in android
I could find several sources view pager
But
Are there any good sources to learn view pager to be implemented by JSON,
Where images are obtained from JSON. and parsing them to view pager
Thanks !
i am a newbie so please guide me with proper sources

Wednesday, 25 September 2013

Node.js : Express app.get with multiple query parameters

Node.js : Express app.get with multiple query parameters

I want to query the yelp api, and have the following route:
app.get("/yelp/term/:term/location/:location", yelp.listPlaces)
When I make a GET request to
http://localhost:3000/yelp?term=food&location=austin,
I get the error
Cannot GET /yelp?term=food&amp;location=austin
What am I doing wrong?

Thursday, 19 September 2013

getting newlines right when posting file to grails app

getting newlines right when posting file to grails app

I have to make a massive import to a data base. Lets say around 100k rows.
The user has to be able to handle the file with the rows, like a csv. With
one data per line.
As in the company I have to use rest apis for every thing I want to make
an api in grails that you can post a file into and the api handle the
import job.
So making something like
curl -X POST -d @file http://apiurl/process-file
I'm trying to achieve this in grails.
First I had to add filters in order to get more than one inputstream from
the request, in orther to get the raw content of the file.
The problem that I have now is that it doesn't recognize the newlines in
the file.
I put an app here that reproduce the case.
I wan't to know what's the problem and how to achieve this the simplest
way possible.
I would thank any advice or pointer.

How to call RequireJS functions in other files? How to separate RequireJS files?

How to call RequireJS functions in other files? How to separate RequireJS
files?

Instead of having one giant js file that has a whole bunch of "defines",
how do I call my various "define" functions from other files?
I've been copying these examples, but still cannot get it to work:
example-multipage
example-multipage-shim
example-jquery-shim
Here is what I have so far:
main.js
require.config({
baseUrl: '',
paths: {
jquery: '../libraries/jquery-1.10.2.min',
simControlView: '../javascripts/simControlView'
}
});
require(['jquery','loadPage'], function( $,loadPage)
{
loadPage();
});
define('loadPage', ['jquery'], function($)
{
var simControlView = require(['./simControlView']);
return function()
{
simControlView.showSimControlView(); //having problem here
};
});
simControlView.js
define(['jquery'], function ($) {
return {
showSimControlView: function () {
console.log("Hi!!");
}
}
});
Here is the error that I'm getting:
Uncaught TypeError: Object function d(e,c,h){var
g,k;f.enableBuildCallback&&(c&&H(c))&&(c.__requireJsBuild=!0);if("string"===typeof
e){if(H(c))return v(A("requireargs", "Invalid require
call"),h);if(a&&s(N,e))return Ne;if(j.get)return
j.get(i,e,a,d);g=n(e,a,!1,!0);g=g.id;return!s(r,g)?v(A("notloaded",'Module
name "'+g+'" has not been loaded yet for context: '+b+(a?"":". Use
require([])"))):r[g]}K();i.nextTick(function(){K();k=q(n(null,a));k.skipMap=f.skipMap;k.init(e,c,h,{enabled:!0});C()});return
d} has no method 'showSimControlView'
See anything I'm doing wrong? Any help is appreciated!

How would I get output from system call to textview

How would I get output from system call to textview

Hey guys I am new to the C#/Mono programming side of things, but I would
like to get the output from a system call to be direct to the textview.
How would I do that? Here is what I have for far:
protected void OnButton2Clicked (object sender, EventArgs e)
{
Application.Init ();
Window win = new Window ("System Information");
win.SetDefaultSize (600,400);
TextView view = new Gtk.TextView ();
TextBuffer buffer = view.Buffer;
win.Add (view);
win.ShowAll ();
var info = new ProcessStartInfo("dmidecode","-t system"){
RedirectStandardOutput = true, UseShellExecute = false };
var proc = new Process { StartInfo = info, EnableRaisingEvents = true };
proc.Start ();
Console.WriteLine (proc.StandardOutput.ReadToEnd ().ToString());
buffer.Text = proc.ToString();
}

parallax scrolling in android

parallax scrolling in android

I have a layout which i want to apply parallax scrolling on. My layout is
as follows :

And the relevant XML is :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/top_control_bar"
android:background="@drawable/container_dropshadow">
<RelativeLayout
android:id="@+id/logo_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:background="#ffffff">
<ImageView
android:id="@+id/organiser_logo"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/bottom_layout"
android:layout_below="@+id/top_control_bar">
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="fill_parent"
android:layout_below="@+id/top_control_bar"
android:layout_height="wrap_content"
android:background="@drawable/container_dropshadow"
android:id="@+id/explanation_wrapper">
<TextView
android:text="@string/no_event_header"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/explanation_header"
android:padding="8dip"
android:layout_width="wrap_content"
android:layout_height="fill_parent" />
<TextView
android:text="@string/no_event_text_1st_paragraph"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/explanation_1st_paragraph"
android:paddingTop="8dip"
android:paddingRight="20dip"
android:paddingBottom="10dip"
android:paddingLeft="10dip" />
</LinearLayout>
<ListView
android:id="@+id/album_active_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:choiceMode="singleChoice"
android:background="@drawable/container_dropshadow"
android:layout_below="@+id/explanation_wrapper" />
</RelativeLayout>
</RelativeLayout>
I need to get the middle layer to be scrolled over the bottom layer. And
when there is no space left in the top (middle layer is completely
scrolled over bottom layer), then i need the top layer to be scrolled over
the Middle layer.
How would i achieve this behaviour?

Call a function instead of intent in android tabactivity

Call a function instead of intent in android tabactivity

Sorry for my bad english...
i made a tab bar activity in android application with this code:
TabHost tabHost = (TabHost) findViewById(android.R.id.tabhost);
Intent intent = new Intent(this, Page2.class);
TabHost.TabSpec spec = tabHost.newTabSpec("tab" + labelId);
View tabIndicator =
LayoutInflater.from(this).inflate(R.layout.tab_indicator,
tabHost.getTabWidget(), false);
TextView title = (TextView) tabIndicator.findViewById(R.id.title);
title.setText(labelId);
ImageView icon = (ImageView) tabIndicator.findViewById(R.id.icon);
icon.setImageResource(drawableId);
spec.setIndicator(tabIndicator);
spec.setContent(intent);
tabHost.addTab(spec);
With this code i can create any tab i want and all tabs call an activity.
All works fine, but there is a way to call a function when click (or tap)
on a tab instead of call an activity?

How to parse a Hashmap in java 1.4

How to parse a Hashmap in java 1.4

Hi i'm working with java 1.4 and iwant to implement this :
// protected HashMap droppedFileTarget;
JExpression[] params = new JExpression[2];
for (String extension : droppedFileTarget.keySet()) {
String field = droppedFileTarget.get(extension);
params[1]=VKUtils.toExpression(ref, extension);
params[2]=VKUtils.toExpression(ref, field);
}
but i'm getting this compilation error :
type mismatch : can not convert from Object to String
Even after type cast but the error persists :
for (String extension : (String) droppedFileTarget.keySet())

SciPy: Generic fit function using polynoms

SciPy: Generic fit function using polynoms

I try to generate a generic fit polynom using SciPy's curve_fitmethod. My
current simplified code looks like the following:
import functools
import scipy.optimize
def __fit_polynom_order_6(self, data):
def func(x, c1=None, c2=None, c3=None, c4=None, c5=None, c6=None):
return c1*x + c2*x**2 + c3*x**3 + c4*x**4 + c5*x**5 + c6*x**6
x, y = data[:,0], data[:,1]
popt, pcov = scipy.optimize.curve_fit(func, x, y)
func_fit = functools.partial(func,
c1=popt[0],c2=popt[1],c3=popt[2],c4=popt[3],c5=popt[4],c6=popt[5])
return func_fit
Now I want also to do fits with polynoms of order n and thus generate a
generic function __fit_polynom_order_n(self, n, data) that generates the
polynom automatically and does essentially the same thing as my function
above but with arbitrary polynoms.
My attempts doing this all came to nothing. Can you help? Thanks in advance!

Wednesday, 18 September 2013

create embedded record on existing record

create embedded record on existing record

yo. Thanks to a response here, I figured out how to create embedded child
records along with a newly created parent. However, I've been unable to
add the embedded record to an existing parent.
I've tried using setupcontroller to get the content of my parent model
into the appropriate child route/controller, but i I'm still unable to
retrieve the loaded parent.
this. get controllers . post brings up the record as undefined. How do I
get the content of the parent loaded in order to add child records to it?

Difference between transactional and non-transactional

Difference between transactional and non-transactional

Simply stated: What is the difference between "Transactional" and
"Non-Transactional"?
In my case I came up with this question while reading the following
definition for "MDM":
"In computing, master data management" (MDM) comprises a set of processes
and tools that consistently defines and manages the non-transactional data
entities of an organization (which may include reference data)."

Button click not fired if the div is moving down

Button click not fired if the div is moving down

So, the use case there is a div, one button and one textbox.
On the blur event of the textbox the div expands
and when button is clicked an alert is shown.
So both of these things work. but if my cursor is on the textbox and I try
to click on the button. Then click is not raised. I understand that, since
button has moved click is not getting raised. So, what are my options
Plunker of the code
http://plnkr.co/edit/TYXLeE?p=preview

Rails: js.erb for nested attributes

Rails: js.erb for nested attributes

I'm pretty familiar with ajax now but I'm a little confused as to how I
can render js for a nested attribute. Here's my setup
#Post Model
has_many images
accepts_nested_attributes_for :images, allow_destroy: true
#Image Model
belongs_to :post
#Images/create.js.erb
#alert me
#form for post
<%= f.fields_for :images, Image.new do |m| %>
#some drag & drop fields here
<% end %>

Drupal - Send email to revision editor instead of node author

Drupal - Send email to revision editor instead of node author

I am currently using the Workbench Moderation module to allow pieces of
content to be moderated and go through an approval process before being
published. This all works great. Part of my process is to send an email to
a user when their edited content has been approved/published. I currently
have a Rule setup to where when a node gets published and it's under
Moderation an email gets sent to the author of the node saying that the
node was published. This is fine except for the fact that sometimes we
have people editing someone else's content. In other words "Bob" creates a
basic page and it gets published and he is the author. Now months down the
road, "Susie" is tasked with editing Bobs page. She creates a new draft,
sends it for review and a manager publishes it. The problem is that Bob
gets the email that it was published and Susie has no idea that her edits
were published and are now made live. I was looking in the Tokens in my
Rule for the email that gets sent out when something is published and I
could not find something that made sense as far as sending it to the
Revision author as opposed to the original author. Is this even possible?
Thanks in advance.

CSS: Confusion with selectors, div ~ h1 vs div > h1

CSS: Confusion with selectors, div ~ h1 vs div > h1

I am having a problem understanding the div ~ h1, it appears it selects
all h1 tags that directly follow a div.
But isn't this what div > h1 actually does ?
It selects all h1 that is a direct child of the div ?
I also came across div + h1 and at first i was confused, but this appears
to select only a single element i.e 1 H1 tag that follows a div.
Any ideas anyone has it would be really helpful.
Thanks

Use Perlin noise to render wood

Use Perlin noise to render wood

guys, I'm reading Shaders for Game Programming and Artists. In Chapter 13
"Building Materials from Scratch", the author introduced some render
techniques to simulate complex materials such as marble or wood by using
Perlin noise. But I'm puzzled by the wood rendering. To simulate the wood,
we need a function gives a circular value along a specific plane so that
we can create the rings in the woods. This is what the author said, "take
the dot product of two axes along a plane, creating the circular value on
that plane"
Circle = dot(noisetxr.xy, noisetxr.xy);
noisetxr is a float3, it's a texture coordinate to sample the noise
texture, I can't understand why the dot product will gives a circular
value
Here is the complete code(pixel shader in hlsl):
float persistance;
float4 wood_color; //a predefined value
sampler Texture0; // noise texture
float4 ps_main(float3 txr: TEXCOORD0) : COLOR
{
// Determine two set of coordinates, one for the noise
// and one for the wood rings
float3 noisetxr = txr;
txr = txr/8;
// Combine 3 octaves of noise together.
float final_noise = 0;
for(int i=0;i<2;i++)
final_noise += ((1.0/pow(persistance,i))*
((tex3D(Texture0, txr*pow(2,i))*2)-1));
// The wood is defined by a set of concentric rings in the XY
// plane. Those rings are pertubated by the computed noise.
final_noise = abs(final_noise);
float grain = cos(dot(noisetxr.xy,noisetxr.xy) + final_noise*4);//what
is this ??
return wood_color - pow(grain,8)/2; //raising the cosine to higher power
}
I know that raising the cosine function to higher power will create
sharper rings, but what does the dot product mean ? Why it can create a
circle value ?

Tuesday, 17 September 2013

Cannot pop() more than once from the static stack

Cannot pop() more than once from the static stack

I need to use a static stack in one of my android application. Here's how
i used it:
In the Constants File:
public static Stack<String> st = new Stack<String>();
And in the Activity File, inside the onBackPressed method following logic
is used:
if (!Constants.st.isEmpty()) {
Log.i("CHECK", "Stack is not empty.");
Log.v("CHECK", "PEEK: " + Constants.st.peek());
Constants.st.pop();
if(Constants.st.isEmpty()){
Log.i("CHECK", "Stack is empty.");
}else{
Log.v("CHECK", "PEEK after POP: " + Constants.st.peek());
}
}else{
Log.i("CHECK", "Stack is empty.");
}
Now when i press back button once it works (i mean pop() function works),
then second time it( pop() function ) doesn't. Here is the Log of the
above logic:
: Stack is not empty.
: PEEK: UI_FirstActivity
: Stack is empty.
: Stack is not empty.
: PEEK: UI_SecondActivity
: PEEK after POP: UI_FirstActivity
: Stack is not empty.
: PEEK: UI_FirstActivity
: PEEK after POP: UI_FirstActivity
PS: Another thing is that whenever all these UI.. functions contains
different dynamically created forms shown on the same activity. Now when
we enter/show any method/form its name i.e., UI.. is been pushed in the
stack.

create a global NSMutableArray

create a global NSMutableArray

I have a lot of View Controller and all use the same Class (ViewController).
In ViewController.m I have this code:
- (void)viewDidLoad
{
[super viewDidLoad];
pedidoNomeArray = [[NSMutableArray alloc] init];
pedidoValorArray = [[NSMutableArray alloc] init];
}
and when I go to View Controller number 2 my array pedidoNomeArray and
pedidoValorArray are null.
What I have to do to use the same array in all my View Controllers?
thanks

How can I chain a scope after a class method, or ignore the class method's default sorting?

How can I chain a scope after a class method, or ignore the class method's
default sorting?

I need to find a workaround so I can filter my @events by the .is_near
method then sort them by the .sort_today scope, in that order.
Individually they both work, and I can tack .is_near to the end of the
scope with no problem, but then my results are resorted by the default
sort parameters in .is_near, and I need to them to be sorted by
.sort_today.
Is there a way to ignore how .is_near returns/resorts my results? Or
someway to chain them together like
@events.is_near(session[:city]).sort_today? Currently I get this error
when chaining them like that: undefined method `sort_today' for
#Array:0x007f8ca3c673c0
Here's my models:
class Venue < ActiveRecord::Base
attr_accessible :name, :address, :latitude, :longitude
has_many :events, :dependent => :destroy
geocoded_by :address
def self.is_near(city)
self.near(city, 20, :units => :km).map(&:events).flatten
end
end
class Event < ActiveRecord::Base
attr_accessible :title, :details, :start_time, :end_time, :date, :cost,
:venue_id
belongs_to :venue
scope :is_today, where(:date => Date.today)
scope :sort_today, is_today.order(:start_time)
class << self
def is_near(*args, &block)
Venue.is_near(*args, &block)
end
end
end
So Venue is geocoded by the RubyGeocoder gem and it has all the events.
The .is_near method has to be in Venue because the latitude and longitude
properties are there. The .is_near method at the bottom of Event is
essentially a redirect. (I tried to get delegate to work, but this was the
only way I could do it)
Here's my controllers:
class EventsController < ApplicationController
def index
@events = Event.sort_today.is_near(session[:city]) #returns results
but sorted wrong
#@events = Event.is_near(session[:city]).sort_today #returns undefined
method `sort_today' error
end
end
class ApplicationController < ActionController::Base
before_filter :set_city
def set_city
unless session[:city].present?
session[:city] = request.location.city
end
end
end
The set_city method just gets what city the user enters through a input
field.

is not convertible by 'QueryStringConverter'

is not convertible by 'QueryStringConverter'

I'm still a little new to WCF, I have a service that takes as input an
object that contains a bunch of string properties, but when I try to
consume the service I get the following error:
Operation 'GetHouseholds' in contract 'IHouseholdService' has a query
variable named 'criteria' of type
'RGMPServices.Householding.Contracts.DataTransferObjcets.HouseholdSearch',
but type
'RGMPServices.Householding.Contracts.DataTransferObjcets.HouseholdSearch'
is not convertible by 'QueryStringConverter'. Variables for UriTemplate
query values must have types that can be converted by
'QueryStringConverter'.
how do I go about making an object 'QueryStringConvertable'??
I have contract which looks like this:
[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json)]
HouseholdDto[] GetHouseholds(HouseholdSearch criteria);
And the implementation is this:
public HouseholdDto[] GetHouseholds(HouseholdSearch criteria)
{
IList<Household> households =
_kernel.Get<IHouseholdRepository>().Search(criteria);
IList<HouseholdDto> dtos = Mapper.Map<IList<Household>,
IList<HouseholdDto>>(households);
return dtos.ToArray();
}
And my data contract for the object to be passed in is this:
[DataContract(Namespace = "urn:RGMPServices.Householding.Services", Name =
"HouseholdSearch")]
public class HouseholdSearch : IHouseholdSearch
{
[DataMember(IsRequired = false, Name = "HouseholdNumber")]
public string HouseholdNumber { get; set; }
[DataMember(IsRequired = false, Name = "HouseholdName")]
public string HouseholdName { get; set; }
[DataMember(IsRequired = false, Name = "AccountNumber")]
public string AccountNumber { get; set; }
[DataMember(IsRequired = false, Name = "AccountName")]
public string AccountName { get; set; }
[DataMember(IsRequired = false, Name = "IaCodes")]
public string IaCodes { get; set; }
[DataMember(IsRequired = false, Name = "Category")]
public string Category { get; set; }
}

Meteor bundle ignores folder and file

Meteor bundle ignores folder and file

There exists a app/main/document/temp.bin but this file is missing after I
run meteor bundle.
When I ran meteor bundle --debug the file got put inside
`bundle/programs/client/app/main/document/temp.bin
so how can I make meteor bundle work?

Customer view for Team Foundation Service

Customer view for Team Foundation Service

My team recently migrated from onsite to the cloud Team Foundation Service
2012.
We had also maintained a separate SharePoint portal with extranet
capabilities to list projects/tasks etc. for external customers
Seeing that we're now online, I was wondering if there is a means to
restrict a view to PBIs/Certain properties of tasks [Time Elapsed, Time
Remaining] for certain accounts.
Alternatively, I recall seeing SSRS capabilities in the on site version.
Is there a means to configure reports (scheduled/manual) using the Team
Foundation Service?

Sunday, 15 September 2013

Jsp Project for data selection

Jsp Project for data selection

I will explain with an example.I have a set of 20 question,I randomly
select 5 questions.Once I select these 5 questions I dont want them to
appear in those 20 questions.Similarly next I will have 15 questions
left,if I select 10 random questions I will have just 5 remaining.At last
when I select the last 5 questions.The next time I open the page I need to
get all 20 questions back.Could someone suggest me an idea,this is a jsp
project,I am using mysql as the database.Thank you.

SEO friendly url creation using js, php in html page

SEO friendly url creation using js, php in html page

I am developing a website for a client using html, js and php. For any
database call i am using ajax call
$.ajax({
type: 'POST',
url: "index2.php",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg, status) {
dosomething(msg);
},
error: function (msg, status) {
console.log("failure");
console.log(msg);
}
});
and php pages returns me the output. The problem is that index.html page
url is not getting changed.....I want it to change say index.html?id=23
(creating query string in html page)
Basically my aim to make it SEO friendly url like index.html/helloppl What
is the best method to do this. While googling i found link for
doing....still i need to create query string here...any help is
appreciated.

MySQL error 1462 database.table contains view recursion

MySQL error 1462 database.table contains view recursion

after exporting/importing a table from another database and renaming it as
such:
mysqldump -uroot -p --no-create-db db1 original_table > dump.sql
mysql -uroot -p db2 < dump.sql
mysql -uroot -D db2 -e 'RENAME TABLE original_table TO new_table;'
I try to select from the new table :
mysql -uroot -p
>use db2;
>select * from new_table;
and I get the following error :
ERROR 1462 (HY000): `db2`.`new_table` contains view recursion
I can't find much on google about this one, can anyone help? my mysql
version is 5.1.67-0ubuntu0.10.04.1
Thanks!
Chris

Read a txt file line by line and files from folders, and random line from file, but all results turned out to be the same.

Read a txt file line by line and files from folders, and random line from
file, but all results turned out to be the same.

Read a txt file line by line and files from folders, and random line from
file, but all results turned out to be the same. What is the cause of this
problem? I want to ramdom a template (.html) file from a folder, and
random a line from a file but the value came out the same.
if (comboBox1.SelectedItem.ToString() == "Amazon")
{
affpathname = affcase1;
}
else if (comboBox1.SelectedItem.ToString() == "Clickbank")
{
affpathname = affcase2;
}
int postpermm = Convert.ToInt32(postperm.Text);
this.timer1.Start();
string pfile = textBox1.Text;
DateTime startdatef = dateTimePicker1.Value;
string startdateshorta =
string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("en-US"),
"{0:yyyy-MM-dd-HH-mm-ss}", DateTime.Now);
FileStream FileOut = new FileStream(Application.StartupPath +
@"\" + "wordpress" + @"\" + startdateshorta + ".xml",
FileMode.Create);
StreamWriter sw = new StreamWriter(FileOut);
StreamReader a = new StreamReader(pfile);
string dd = null;
while ((dd = a.ReadLine()) != null)
{
{
var rand = new Random();
IEnumerable<string> lines =
File.ReadLines(@Application.StartupPath + @"\config\" +
affpathname + @"\title_template.txt");
var lineToRead = rand.Next(1, lines.Count());
var line = lines.Skip(lineToRead - 1).First();
sw.Write(line);
sw.Write("\r\n");
}
{
var rr = new Random();
var files = Directory.GetFiles(@Application.StartupPath
+ @"\config\" + affpathname + @"\layout\",
"*.*").Where(s => Regex.Match(s,
@"\.(html|htm)$").Success);
string randFile = files.ToList()[rr.Next(0,
files.Count())];
sw.Write(randFile);
sw.Write("\r\n");
sw.Write("\r\n");
}
if (comboBox1.SelectedItem.ToString() == "Amazon")
{
affpathname = affcase1;
}
else if (comboBox1.SelectedItem.ToString() == "Other Aff")
{
affpathname = affcase9;
}
string startdatelong =
string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("en-US"),
"{0:ddd, dd MMM yyyy HH:mm:ss}", startdatef);
string todaydatelong =
string.Format(System.Globalization.CultureInfo.CreateSpecificCulture("en-US"),
"{0:ddd, dd MMM yyyy HH:mm:ss}", DateTime.Now);
string[] arr1 = dd.Split('@');
{
string productname = arr1[0];
string productimg = arr1[1];
string productlink = null;
if (mutiaff.Checked)
{
productlink = arr1[2];
}
else
{
productlink = singleafflink.Text;
}
}
}
sw.Write("</channel>\r\n");
sw.Write("</rss>\r\n");
sw.Close();
FileOut.Close();
}

Custom ListPreference data not stored

Custom ListPreference data not stored

I have a custom LocationsListPreference class written for multiple section
by extending ListPreference. The data you select via multiple selection in
popup saves if im in the same activity., But if i go back to the main
activity and come back the values i have saved form the multiple selection
are not stored. Any idea why?
LocationsListPreference XML:
<com.gm.settings.LocationsListPreference
android:defaultValue="#ALL#"
android:key="list_locations"
android:title="@string/LocationsListPreference_title"
android:dialogTitle="@string/LocationsListPreference_title"
android:summary="@string/LocationsListPreference_summary"
/>
Here a bit of source code of my LocationsListPreference class for the
above ListPreference:
public class LocationsListPreference extends ListPreference {
//Need to make sure the SEPARATOR is unique and weird enough that it
doesn't match one of the entries.
//Not using any fancy symbols because this is interpreted as a regex
for splitting strings.
private static final String SEPARATOR = CommonConstants.SEPARATOR;
private static String val;
private boolean[] mClickedDialogEntryIndices;
public LocationsListPreference(Context context, AttributeSet attrs) {
super(context, attrs);
mClickedDialogEntryIndices = new
boolean[CommonConstants.LOCATIONS_KEYS.length];
}
@Override
public void setEntries(CharSequence[] entries) {
super.setEntries(entries);
mClickedDialogEntryIndices = new boolean[entries.length];
}
public LocationsListPreference(Context context) {
this(context, null);
}
Here is the "Settings" activity which i use to load PreferenceFragment:
public static void launch(Context context)
{
contxt = context;
Intent prompt = new Intent(contxt, Settings.class);
prompt.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_NO_USER_ACTION);
contxt.startActivity(prompt);
}
public static class SettingsFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_settings);
}
}
Now if i select values from the ListPreference it successfully stores even
if i re-click from within the "Settings" activity. But if i go to another
activity and come back to "Settings" activity and load the ListPreference,
those values are not stored but shows all unchecked. Any ideas as to why
this happens?

Decorating a class to monitor attribute changes

Decorating a class to monitor attribute changes

I want to have classes that automatically send notifications to
subscribers whenever one of their attributes change. So if I would write
this code:
@ChangeMonitor
class ChangingClass(object):
def __init__(self, x):
self.x = x
changer = ChangingClass(5)
print("Going to change x.")
changer.x = 6
print("Going to not change x.)
changer.x = 6
print("End of program")
The output would be:
Going to change x
Old x = 5, new x = 6
Going to not change x.
End of program.
My question is how to implement the ChangeMonitor decorator class. In the
above example I assume it will print a line indicating the changes of an
attribute, but for useful purposes it could send notifications to
subscribed objects.

Android:: socket communication between pc and phone over wifi?

Android:: socket communication between pc and phone over wifi?

I have a working code in which i can exchange data between pc and android
emulator. Now, I want to test this application with a real android device.
i.e i want to exchange text between my pc in which i have a java server
and the android phone. For my emulator i was using the emulator virtual ip
address and it was working fine. But, to test my application in phone I
connected the phone and pc in same network and used the ip address of the
phone in my application. Then I installed the application in phone but the
connection did not established. How other changes is to be done in code to
use this application in phone. Here, is my android code,
try {
client = new Socket("10.0.2.2", 9999);
printwriter = new PrintWriter(client.getOutputStream(), true);
printwriter.println(messsage[0] + "\n");
System.out.println("messsage::"+messsage[0]);
printwriter.flush();
BufferedReader in = new BufferedReader(new
InputStreamReader(client.getInputStream()));
serverMessage = in.readLine();
if (serverMessage.equals("exit")) {
runOnUiThread(new Runnable() {
public void run() {
tv.setText("Thankyu visit again!!" + "\n");
}
}); }
else {
runOnUiThread(new Runnable() {
public void run() {
tv.setText(serverMessage.toString() + "\n");
}
});
}
}
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
Also, i have given this permission in my manifest file:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission
android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
This is my first android app, So please help!!!

Saturday, 14 September 2013

Map edditor 'Tiled' will not export?

Map edditor 'Tiled' will not export?

I am working with Tiled on Fedora 19 64 bit. I installed Tiled via sudo
yum install tiled which installed Tiled version 0.9.1-1.
I have experience with Tiled on windows, so I created a simple map to test
if the install was working, but when I went to export the map (File >
Export as...), it came up with the error:

I have tried forcing a file extension onto the end of the exported name
(such as .txt), but nothing works. Do I need to install/create a file
exporter for Tiled in Linux? Or is there some config file I am missing?

How to find files in ruby which were edited in some time interval?

How to find files in ruby which were edited in some time interval?

How to find files in a directory which were edited in last n minutes?
In unix which is -mmin -60.

CSS background image fails to repeat below viewport

CSS background image fails to repeat below viewport

We repeat a textured background on www.tekiki.com, but anything below the
viewport isn't repeated for some reason. The background renders as white.
Here are the CSS rules for our body element, which contains the repeating
image:
font-family: 'Signika', verdana, tahoma, arial, sans-serif;
font-size: 16px;
line-height: 22px;
color: #5c5c5c;
margin: 0;
padding: 0;
border: 0;
background: #cbe9f1 url(/images/web/main_bg.png) repeat top left;
background-attachment: fixed;
How do we get the background image to tile correctly? Thanks!

Is it possible to assign a new value to an array name?

Is it possible to assign a new value to an array name?

I read that;
Although an array name can be used as a pointer (after decaying into
pointer), it's not possible to assign it a new value. Attempting to make
it point elsewhere is an error:
while (*a != 0) // a is of (int *) type
a++; //wrong
On the other hand, when passed to a function, an array name is always
treated as a pointer. The function call
largest = largest_num(b, n) // b is an array of int
for the function
int find_largest(int a[], int n)
{
....
....
}
causes a pointer to the first element of b to be assigned to a.
Above two statements ( in bold ) seems to me contradictory. I am confused.

Enough permitions to login a created user

Enough permitions to login a created user

Every time Im launching SQL server I always run script that destroys my
little local base,refills it with exaple data, destroys some logins that
was artificially created using this script.
exec sp_addlogin @loginame = 'strong', @passwd ='strong', @defdb
=KornDurnDB_new;
exec sp_adduser @loginame = 'strong', @name_in_db = 'strng';
To this login Im gives ALL grants. But It is not enough to authorize using
this login, when sql management studio launches(sql management studio
returns me error 18456)
What can a add to make a login with that account and password?

How to add items to a List Control in an MFC dialog

How to add items to a List Control in an MFC dialog

In order to have a table like:

in my MFC dialog, I have added a List Control to it. And then with Add
Variable wizard, I have created this variable for the control:
public:
CListCtrl m_lstIDC_LIST1Control;
and then in the OnInitDialog function of my dialog, I have added these
lines of code:
// TODO: Add extra initialization here
m_lstIDC_LIST1Control.SetExtendedStyle(LVS_EX_FULLROWSELECT);
m_lstIDC_LIST1Control.SetExtendedStyle(LVS_EX_GRIDLINES);
//m_lstIDC_LIST1Control.SetExtendedStyle( LVS_SHOWSELALWAYS);
LVITEM lvItem;
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 0;
lvItem.iSubItem = 0;
char* text = "Sandra C. Anschwitz";
wchar_t wtext[50];
mbstowcs(wtext, text, strlen(text)+1);
LPWSTR ptr = wtext;
lvItem.pszText = ptr;
m_lstIDC_LIST1Control.InsertItem(&lvItem);
UpdateData(false);
the result that I get is:

and if I uncomment the line:
//m_lstIDC_LIST1Control.SetExtendedStyle( LVS_SHOWSELALWAYS);
the horizontal grids will not be shown either!
So what's the problem?
Why the item that I have added is not shown? what should I do in order to
create a table like the one shown in the first picture?

html how to make a table scrollable with fixed header

html how to make a table scrollable with fixed header

I tried to copy two tables in my html page but in both cases, the table
headers remain fixed in relation to the whole html page instead of
remaining fixed only respect to the associated tables of belonging. How
can I solve the problem? I would like to continue using only html code if
possible ... thanks
HTML code: [code]
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Menu Principale</title>
<link rel="stylesheet" type="text/css" href="stylemenu3.css" />
</head>
<body>
<div class="main" id="container">
<!-- div id="container" style="width:1024px"-->
<form name="form0" method="post" action="#">
<!-- messaggio iniziale -->
<div class="top" id="header">
<h1>MESSAGGI RICEVUTI</h1></div>
<!-- caselle di testo per filtrare messaggi -->
<table id="ricercaMessaggio" border="1">
<tbody>
<tr>
<td style="width: 354px; height: 100px; text-align: left;
vertical-align: top; background-color: #F0DC82;">
<!--h2><span style="color:#211ed6 ;">RICERCA
MESSAGGIO</span></h2-->
<font size="4" ><b>RICERCA MESSAGGIO</b></font>
<table width="279" border="0" cellpadding="0"
cellspacing="5" class="text" style="MARGIN-LEFT: 10px;
MARGIN-TOP: 18px">
<tr>
<td height="32" align="left" valign="top"><font size="2">
<!--color="#211ed6"--><b>MITTENTE</b></font><br>
<input name="txtMittente" type="text" class="box"
id="txtMittente" size="20">
</td>
<td align="left" valign="top"><font size="2">
<!--color="#211ed6"--><b>OGGETTO</b></font><br>
<input name="txtOggetto" type="text" class="box"
id="txtOggetto" size="20">
</td>
<td align="left" valign="top"><font size="2">
<!--color="#211ed6"--><b>PAROLA CHIAVE</b></font><br>
<input name="txtParolachiave" type="text" class="box"
id="txtParolachiave" size="20">
</td>
</tr>
</table>
<input type="submit" class="bottone" value="Ricerca">
<input type="reset" class="bottone" value="Cancella">
<!-- Trovare il tasto di aggiornamento e metterlo al posto di #### -->
<!--a href="#" class="bottone" target="_self">Aggiorna la pagina!</a>-->
<INPUT TYPE="button" class="bottone" VALUE="Aggiorna" target="_self">
<!--ONCLICK="history.go(0)"-->
<!--input type="######" class="bottone" value="Aggiorna"-->
</tr>
</tbody>
</table>
<!-- Menu a sinistra per filtrare i messaggi e scriverne uno nuovo -->
<div class="colsx">
<font size="4" color="#FFD700"><b>MENU</b></font><br>
<ul id="menu" class="active" background-color:#66CC33>
<li><a href="#">NUOVO MSG 1</a></li>
<li><a href="#">NUOVO MSG 2</a></li>
<li><a href="#">BOZZE</a></li>
<li><a href="#">POSTA INVIATA</a></li>
<li><a href="#">RICEVUTI</a></li>
<li><a href="#">LOGOUT</a></li>
</ul>
<!-- Menu a sinistra contenente persone connesse -->
<font size="4" color="#FFD700"><b> Connesse</b></font><br>
<ul id="pattuglieconnesse" class="active">
<li><a href="#">ALFA</a></li>
<li><a href="#">BRAVO</a></li>
<li><a href="#">CHARLIE</a></li>
<li><a href="#">DELTA</a></li>
<li><a href="#">ECHO</a></li>
</ul>
</div>
<div class="iframePratiche">
<!-- dati da elaborare con sql da qui -->
<table cellpadding="0" cellspacing="0">
<tr id="intestazioneiframepratiche">
<!-- questi 4 saranno i link per inoltrare messaggio, rispondere,
selezionare ecc... -->
<th width="22" height="20" align="left" id="seleziona"
valign="middle"></th> <!--&nbsp; position= "fixed"; -->
<th width="22" height="20" align="left" id="rispondi"
valign="middle"></th> <!--&nbsp; position= "fixed"; -->
<th width="22" height="20" align="left" id="inoltra"
valign="middle"></th> <!--&nbsp; position= "fixed"; -->
<th width="22" height="20" align="left" valign="middle"></th>
<!--&nbsp; position= "fixed"; -->
<th width="150" align="left"><a href="#">MITTENTE</a></th>
<!--poi inserire class="ordine"-->
<th width="170" align="left"><a href="#">OGGETTO</a></th>
<!--poi inserire class="ordine"-->
<th width="20" align="left"><a href="#" >ALLEGATI</a></th>
<!--poi inserire class="ordine"-->
<th width="70" align="left"><a href="#" >DATA</a></th>
<!--poi inserire class="ordine"-->
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"><a
href="selezionaMsg.html"><img src="#.gif" alt="seleziona" width="16"
height="16" border="0"></a></td>
<td width="22" height="20" align="left" id="rispondi"
valign="middle"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" id="inoltra"
valign="middle"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"><a
href="inoltra.html"><img src="#.gif" alt="inoltra" width="16"
height="16" border="0"></a></td>
<td width="150">ALFA</td>
<td width="170">AB4563VH</td>
<td width="20" >allegati</td>
<td width="70" >05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">BRAVO</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">CHARLIE</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">DELTA</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">ECHO</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">FOXTROT</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">GOLF</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">HOTEL</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">INDIA</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">JULIET</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">KILO</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">LIMA</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<tr>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="selezionaMsg.html"><img src="#.gif"
alt="seleziona" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="importante.html"><img src="#.gif"
alt="importante" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="rispondi.html"><img src="#.gif"
alt="rispondi" width="16" height="16" border="0"></a></td>
<td width="22" height="20" align="left" valign="middle"
bgcolor="#F2F2F2"><a href="inoltra.html"><img src="#.gif"
alt="inoltra" width="16" height="16" border="0"></a></td>
<td width="150" bgcolor="#F2F2F2">MIKE</td>
<td width="170" bgcolor="#F2F2F2">AB4563VH</td>
<td width="20" bgcolor="#F2F2F2">allegati</td>
<td width="70" bgcolor="#F2F2F2">05-11-2008</td>
</tr>
<!-- dati da elaborare con sql fino a qui -->
</table>
</div>
<div class="article">
<table cellspacing="0" cellpadding="0">
<tr class="testata">
<th width="52" class="colonna" scope="col">test</th>
<th width="62" class="colonna" scope="col">co1 1</th>
<th width="122" class="colonna" scope="col">col 2</th>
<th width="102" class="colonna" scope="col">col 3</th>
<th width="102" class="colonna" scope="col">col4</th>
</tr>
<tr class="primariga">
<th width="52" class="primariga" scope="row">aaa
<td width="62" class="primariga">124</td>
<td width="122" class="primariga">23555</td>
<td width="102" class="primariga">346</td>
<td width="102" class="primariga">4575</td>
</tr>
<tr>
<th scope="row">bbb</th>
<td>51</td>
<td>984</td>
<td>98456</td>
<td>984</td>
</tr>
<tr>
<th scope="row">ccc</th>
<td>651</td>
<td>651</td>
<td>65</td>
<td>5</td>
</tr>
<tr>
<th scope="row">ddd</th>
<td>51</td>
<td>23434</td>
<td>5456</td>
<td>1651</td>
</tr>
<tr>
<th scope="row">eee</th>
<td>18</td>
<td>835</td>
<td>51</td>
<td>651</td>
</tr>
<tr>
<th scope="row">fff</th>
<td>1</td>
<td>6513535</td>
<td>833</td>
<td>&nbsp;</td>
</tr>
<tr>
<th scope="row">ggg</th>
<td>19</td>
<td>8135</td>
<td>854</td>
<td>81</td>
</tr>
<tr>
<th scope="row">hhh</th>
<td>51</td>
<td>651</td>
<td>33456</td>
<td>21</td>
</tr>
<tr>
<th scope="row">iii</th>
<td>15</td>
<td>1535</td>
<td>1456456</td>
<td>55</td>
</tr>
<tr>
<th scope="row">lll</th>
<td>651</td>
<td>650651</td>
<td>06501</td>
<td>560</td>
</tr>
<tr>
<th scope="row">mmm</th>
<td>51</td>
<td>984</td>
<td>984</td>
<td>984</td>
</tr>
<tr>
<th scope="row">nnn</th>
<td>651</td>
<td>6513</td>
<td>65</td>
<td>5</td>
</tr>
<tr>
<th scope="row">ooo</th>
<td>51</td>
<td>651</td>
<td>54545</td>
<td>1651</td>
</tr>
<tr>
<th scope="row">ppp</th>
<td>18</td>
<td>84545</td>
<td>51</td>
<td>651</td>
</tr>
<tr>
<th scope="row">qqq</th>
<td>1</td>
<td>651</td>
<td>8545</td>
<td>&nbsp;</td>
</tr>
<tr>
<th scope="row">rrr</th>
<td>19</td>
<td>81</td>
<td>8</td>
<td>81</td>
</tr>
<tr>
<th scope="row">sss</th>
<td>51</td>
<td>651</td>
<td>3</td>
<td>21</td>
</tr>
<tr>
<th scope="row">ttt</th>
<td>15</td>
<td>15</td>
<td>1</td>
<td>55</td>
</tr>
<tr>
<th scope="row">uuu</th>
<td>651</td>
<td>650651</td>
<td>06501</td>
<td>560</td>
</tr>
<tr>
<th scope="row">vvv</th>
<td>51</td>
<td>984</td>
<td>984</td>
<td>984</td>
</tr>
<tr>
<th scope="row">zzz</th>
<td>651</td>
<td>651</td>
<td>65</td>
<td>5</td>
</tr>
</table>
</div>
<div class="clearer"></div>
<!-- inserire un metodo PER CVONTEGGIARE PAGINE -->
<!-- width="960" border="0" cellpadding="0" cellspacing="0" -->
<table class="text" style="MARGIN-LEFT: 10px; MARGIN-TOP: 10px">
<tr>
<td width="376" align="right"><a href="#"
class="link">$PagPrec;</a></td>
<td width="225" align="center">(
<strong>$ConteggioPagine;</strong> )</td>
<td width="206" align="left"><a href="#"
class="link">$PagSucc;</a></td>
<td width="153">Risultati per pagina
<select name="selNumRis" class="combo">
<option value="100">100
<option value="200">200
<option value="300">300
</select>
</td>
</tr>
</table>
<div class="bottom" id="footer" >
Giacomo</div>
</form>
<!--/div-->
</div>
</body>
</html>
[/code]
CSS code: [code]
body {
font-family: font_name, Verdana, sans-serif;
font-size: 11px;
margin: 0px;
padding: 0px;
height: 100%;
background-color: #111;
background-image: url("Sfondi/EI1.jpg");
background-repeat: repeat;
overflow: auto;
}
.main {
height: 100%;
width:1024px;
}
.top {
height: 20%;
border-bottom: 1px solid #555;
padding: 4px;
/*background-color:#FFA500;*/
}
/* Stili per i menu della colonna sx */
.colsx {
float: left;
width: 150px;
border-right: 1px solid #555;
height: 80%;
padding: 4px;
}
/* Stili per la parte dx */
.content {
width: 852px;
letter-spacing: 2px;
line-height: 16px;
text-align: justify;
padding: 4px;
float: left;
}
.bottom {}
.clearer{
float: none;
clear: left
}
/* Stili per tabella */
.iframePratiche {
width: 852px;
height: 220px;
overflow: auto;
background-color:#F2F2F2;
border: 1px solid #D3D3D3;
MARGIN-TOP: 30px;
MARGIN-LEFT: 10px;
float:left;
font-family: Arial, sans-serif;
font-size: 11px;
font-weight: normal;
color: #000;
text-decoration: none;
}
.text {}
.ordine {
bgcolor="#1da220"
}
.bottone {
MARGIN-TOP: 10px;
MARGIN-LEFT: 15px;
}
#intestazioneiframepratiche{
background-color:#7BA05B;
position: fixed;
width: 852px;
height: 22px;
border: 1px solid black;
MARGIN-TOP: -26px;
MARGIN-LEFT: 0px;
float:left;
font-family: Arial, sans-serif;
font-size: 11px;
font-weight: normal;
color: #000;
text-decoration: none;
}
#header {
margin-bottom:0;
color: #F0E68C;
font-weight: bold;
text-align: center;
vertical-align: middle;
}
#ricercaMessaggio{
background-image: url("Sfondi/logo.png"); /* Stili per immagine sfondo
ricerca messaggio ma non funzxiona */
width: 1024px;
height: 172px;
}
#ricevuti{
background-color:#EEEEEE
width: 852px;
}
#footer {
background-color:#F0E68C;
clear:both;
text-align:center;
}
#seleziona { background: #1C1C1C url('Sfondi/seleziona.jpg') no-repeat 1px; }
#rispondi { background: #1C1C1C url('Sfondi/rispondi.jpg') no-repeat 1px; }
#inoltra { background: #1C1C1C url('Sfondi/inoltra.jpg') no-repeat 1px; }
/* Stili per il primo menu della colonna sx */
ul#menu {
font-family: Verdana, sans-serif;
font-size: 12px;
margin: 0;
padding: 0;
list-style: none;
}
ul#menu li {
background-color: #918151;
border-left: 5px solid #D3D3D3;
display: block;
width: 150px;
height: 30px;
margin: 2px 0;
border-radius: 10px;
}
ul#menu li a {
color: #fff;
display: block;
font-weight: bold;
line-height: 30px;
padding-left: 15px;
text-decoration: none;
width: 135px; /* 150px - 15px (padding) */
height: 30px;
}
/* Stili per evidenziare elemento quando lo seleziono */
ul#menu li.active,
ul#menu li:hover {
background-color: #D3D3D3;
border-left: 5px solid #918151;
}
/* Stili per il secondo menu della colonna sx */
ul#pattuglieconnesse {
font-family: Verdana, sans-serif;
font-size: 12px;
margin: 0;
padding: 0;
list-style: none;
}
ul#pattuglieconnesse li {
background-color: #D3D3D3;
border-left: 5px solid #918151;
display: block;
width: 150px;
height: 30px;
margin: 2px 0;
border-radius: 10px;
}
ul#pattuglieconnesse li a {
/*color: #fff;*/
display: block;
font-weight: bold;
line-height: 30px;
padding-left: 15px;
text-decoration: none;
width: 135px; /* 150px - 15px (padding) */
height: 30px;
}
/* Stili per evidenziare elemento quando lo seleziono */
ul#pattuglieconnesse li.active,
ul#pattuglieconnesse li:hover {
background-color: #918151;
border-left: 5px solid #D3D3D3;
}
/*il div che contiene lo scroll*/
.article {
height: 355px;
width: 462px;
overflow-y:auto;
overflow-x:hidden;
}
/*la tabella*/
.article table {
border-collapse:collapse;
}
/*tutte le righe*/
.article table tr {
height:30px;
}
/*tutte le celle*/
.article table tr td {
border:1px solid #EBD13F;
color: #C60;
background: #F3F4D0;
text-align:center;
}
/*la colonna di sinistra*/
.article table tr th {
border: 1px solid #039;
color:#069;
background: #D7EBEE;
}
/*la testata riga fissa*/
.article table .testata {
position: fixed;
}
/*le celle della riga fissa*/
.article table .colonna {
background-color: green;
color: white;
border:1px solid #0C0;
}
/*correggo la prima riga della tabella*/
.article table .primariga {
padding-top:30px;
}
[/code]