Wednesday, 4 September 2013

Original Values changes are not reflecting in reference types varaiable in C#

Original Values changes are not reflecting in reference types varaiable in C#

please help on this
object a = "1411";
object b = a;
Console.WriteLine("Before Value of a " + a);
Console.WriteLine("Before Value of b " + b);
a = "5555";
Console.WriteLine("After Value of a " + a);
Console.WriteLine("After Value of b " + b);
Console.ReadKey();
output :
Before Value of a 1411
Before Value of b 1411
After Value of a 5555
After Value of b 1411
After Value of b also should changed to 5555 right ? since b is reference
types varaiable.

Tuesday, 3 September 2013

Adding Comments and displaying in Sharepoint 2007

Adding Comments and displaying in Sharepoint 2007

How to add codes or function to Sharepoint 2007 in a way where users can
comment and the comment will be shown under the atticle . Please define
step by step since i am new to Sharepoint.

SPARQL Calculating the difference between two date

SPARQL Calculating the difference between two date

What is the function to calculate difference between two SPARQL
xsd:dateTime ?
I have found a reference to datediff, but this is not working. Does such a
built in function exist in SPARQL as it does with most other query
languages?

Google crawl error with HTTP_ACCEPT_LANGUAGE

Google crawl error with HTTP_ACCEPT_LANGUAGE

in my codeigniter app I use $_SERVER['HTTP_ACCEPT_LANGUAGE'] to determine
the users browser language to set the app language based on that, like
that:
public function __construct()
{
parent::__construct();
/* set session language if not set. "hu" if browser language "hu", else
"en" */
if(!($this->session->userdata("lang")))
{
$browserlang = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2);
if ($browserlang == "hu")
{
$this->config->set_item("language", "hu");
$this->session->set_userdata("lang", "hu");
$this->lang->load("bh_hu", "hungarian");
}
else
{
$this->config->set_item("language", "en");
$this->session->set_userdata("lang", "en");
$this->lang->load("bh_en", "english");
}
}
else
{
switch ($this->session->userdata("lang"))
{
case "hu": $this->lang->load("bh_hu", "hungarian"); break;
case "en": $this->lang->load("bh_en", "english"); break;
}
}
....
}
Everything's working fine, but as the google crawler does not send any
HTTP_ACCEPT_LANGUAGE, it returns a php error Undefined index:
HTTP_ACCEPT_LANGUAGE when crawling all my pages. This is really nasty,
because the php error even fills up my entire google search snippet. Is
there a way to just let the google bot ignore the HTTP_ACCEPT_LANGUAGE
action? Thanks in advance!

Getting auto margin to work for center aligning div

Getting auto margin to work for center aligning div

I've overlooked something obvious and simple for sure here but I'm going
to have to admit defeat and ask on SO for now.
I've made a JSfiddle.
A simple one. Simply trying to center align the div class ratings inside
it's parent container. I haven't managed to get any auto margins to work
at all after numerous faffing with it.
The code below:-
CSS
.caption {
padding: 9px;
width: 100%;
display: block;
}
.ratings {
width: 100%;
overflow: hidden;
margin: 3px auto;
display: block;
}
Markup
<div class="caption">
<h2 class="product-name"><a href="#">Product Title</a></h2>
<div class="ratings">
<div class="rating-bar">
<div class="rating-box"></div>
<div class="rating" style="width:100%"></div>
<div class="rating-fill"></div>
</div>
<span class="amount"><a href="#">(2)</a></span>
</div>
</div>

Oracle SELECT FOR UPDATE

Oracle SELECT FOR UPDATE

Just like to know the result in the below scenario.
When we select a record using FOR UPDATE OF table.column_name.
What would be result set when another simple SELECT query runs to fetch
the particular record which was locked by FOR UPDATE OF ?

Monday, 2 September 2013

I am beginner.. Wants to start working with Flash.. Can someone tell me what is exactly required software to start with?

I am beginner.. Wants to start working with Flash.. Can someone tell me
what is exactly required software to start with?

I am beginner.. Wants to start working with Flash.. Can someone tell me
what is exactly required software to start with? and how to start
programming Flash . and What is the major difference between flash and
JAVA Applet