|
Hakan you will get spammed posting your email address like that.
I already know your email (it was on the file combinations.js on your website)
I sent you an email message on Monday. Have you seen it?
|
|
|
|
|
The function is expected to return int
public static int Random(int nu)
Any boolean test (== != > >= < <=) will give true/false answer, not the int.
That is your mismatch.
public static int Random(int nu)
{
int see;
final int MAX_DATA = 49;
nu = (int) Math.round(MAX_DATA * Math.random()+1);
for(int j=0; j<MAX_DATA; j++)
{
int[] arr = new int[MAX_DATA];
see = (int) (MAX_DATA != arr[j]);
}
return 0;
}
|
|
|
|
|
did not resolve to problem.. "Cannot cast from boolean to int." Compiler wrong alert give to message. I am thinking to must have a boolean initializier to int
|
|
|
|
|
check your email.
|
|
|
|
|
Most of that code makes no sense at all. I would suggest you spend some time with your Java reference manual.
Use the best guess
|
|
|
|
|
Yeah bit of a problem free time..
|
|
|
|
|
That is real basic Java; you could work through the online tutorial in an hour or two.
Use the best guess
|
|
|
|
|
Hi,
I want to hide specifically two columns in a table using JQuery. I have the following code to do it:
$(".classname").hide();
But the thing is the same class name is used in all other columns in that table. So all the columns are getting hidden when I execute this JQuery.
Is there any other way to hide only those two columns?
Please Help.!!
Thanks in advance
Ashwini
|
|
|
|
|
One way to do it is create another name on your CSS for the columns you want to hide, such as the one below
.classname, .hidecolumns{
}
Use the .hidecolumns class on the tags you want to hide, instead of using .classname. This way, the existing tags using that class would not be affected.
$(".hidecolumns").hide();
Signature construction in progress. Sorry for the inconvenience.
|
|
|
|
|
Thank you for the reply... !!
But i cant edit the css file or the source code...
I have to use ID or classname and execute the code. The second option is not valid anymore. Can u please provide a solution using the ID. Do we have a way for it?
|
|
|
|
|
So what are you allowed to to then, wave a magic wand?
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Hi Manfred,
I am executing this piece of Javascript on a Content Editor web part of Sharepoint 2010.
modified 9-May-13 6:54am.
|
|
|
|
|
AshwiniRS wrote: I have to use ID or classname and execute the code.
You originally said you can't use the classname so that option is out. Since this is a part of table you can't really use an ID because columns are tied to rows which gives the idea of having an unknown count leading to unknown ID's.
you can maybe do a partial ID name search and hide everything that way.
$('td[id*=partialname]').hide();
Maybe if you give some more example of what your problem looks like using http://jsfiddle.net/[^] we can help further.
Best of luck.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
You absolutely must have a way of identifying the columns to hide though. IF there is no identifying characteristic to allow you to separate the columns to hide from the columns to show, you can't do this. Period.
|
|
|
|
|
One could use the index of the TD, then get all the other TD elements at that index, and hide each of them. Sure, that's not a CSS selector to identify the column, but it's a way to identify the column.
|
|
|
|
|
Sure yeah, ANY method of identifying those columns could work. It doesn't have to be a class, but there has to be something.
|
|
|
|
|
|
Hi Friends,
How can i export a html table into excel by client side script
|
|
|
|
|
|
I have function readInt() this need a protocol-buffers[^] library and makes the following:
override public function readInt() : int
{
return decodeZigZag32(this.readRawVarint32());
}
I must translate the function in delphi.
description:
decodeZigZag32(int n)[^]
readRawVarint32()[^]
javacode:
public int readRawVarint32() throws IOException {
byte tmp = readRawByte();
if (tmp >= 0) {
return tmp;
}
int result = tmp & 0x7f;
if ((tmp = readRawByte()) >= 0) {
result |= tmp << 7;
} else {
result |= (tmp & 0x7f) << 7;
if ((tmp = readRawByte()) >= 0) {
result |= tmp << 14;
} else {
result |= (tmp & 0x7f) << 14;
if ((tmp = readRawByte()) >= 0) {
result |= tmp << 21;
} else {
result |= (tmp & 0x7f) << 21;
result |= (tmp = readRawByte()) << 28;
if (tmp < 0) {
for (int i = 0; i < 5; i++) {
if (readRawByte() >= 0) {
return result;
}
}
throw InvalidProtocolBufferException.malformedVarint();
}
}
}
}
return result;
}
ActionScript code:
public function readRawVarint32() : int
{
var _loc_3:int = 0;
var _loc_1:* = this.readByte();
if (_loc_1 >= 0)
{
return _loc_1;
}
var _loc_2:* = _loc_1 & 127;
var _loc_4:* = this.readByte();
_loc_1 = this.readByte();
if (_loc_4 >= 0)
{
_loc_2 = _loc_2 | _loc_1 << 7;
}
else
{
_loc_2 = _loc_2 | (_loc_1 & 127) << 7;
var _loc_4:* = this.readByte();
_loc_1 = this.readByte();
if (_loc_4 >= 0)
{
_loc_2 = _loc_2 | _loc_1 << 14;
}
else
{
_loc_2 = _loc_2 | (_loc_1 & 127) << 14;
var _loc_4:* = this.readByte();
_loc_1 = this.readByte();
if (_loc_4 >= 0)
{
_loc_2 = _loc_2 | _loc_1 << 21;
}
else
{
_loc_2 = _loc_2 | (_loc_1 & 127) << 21;
var _loc_4:* = this.readByte();
_loc_1 = this.readByte();
_loc_2 = _loc_2 | _loc_4 << 28;
if (_loc_1 < 0)
{
_loc_3 = 0;
while (_loc_3 < 5)
{
if (this.readByte() >= 0)
{
return _loc_2;
}
_loc_3++;
}
throw new IllegalArgumentException();
}
}
}
}
return _loc_2;
}
are they identical?
public static function decodeZigZag32(param1:int) : int
{ return param1 >>> 1 ^ -(param1 & 1);
}
who can help me?
|
|
|
|
|
Thanks, I have found the solution
|
|
|
|
|
Hi all,
I am trying to pass the value inside of "this.id" from one function to another function but it's not working. Basically I am trying to grab the id of a thumbnail image which is inside anchor tags, by using "this.id" when they are clicked. Then I would like to display data related to the clicked thumbnail which are stored in an array, using innerHTML. I am using the AddEventListener property inside the script tags to listen for the onclick event thus I do not have the onclick property on my webpage. The following are my functions inside the script tags:
var songTitle =new Array("Title1", "Title2");
function AddListeners()
{
if(window.addEventListener)
{
document.getElementById('A1').AddEventListener("click",Display_Info,false);
document.getElementById('A2').AddEventListener("click",Display_Info,false);
document.getElementById('A3').AddEventListener("click",Display_Info,false);
}
else if(window.attachEvent)
{
document.getElementById('A1').attachEvent("onclick",Display_Info);
document.getElementById('A2').attachEvent("onclick",Display_Info);
document.getElementById('A3').attachEvent("onclick",Display_Info);
}
}
function imgClicked(x)
{
var idClicked = x;
var newID = idClicked.substring(0,1);
var convertedID = ParseInt(newID,10);
return convertedID;
}
function Display_Info()
{
var A= this.id;
var picID = imgClicked(A);
document.getElementById('Title').innerHTML= songName[picID];
}
The following are anchor tags inside the body of my webpage:
<a href="#self"><img src=image1" id="A0"></a>
<a href="#self"><img src=image2" id="A1"></a>
<a href="#self"><img src=image3" id="A2"></a>
Please take a look to see why my script is not working. Any help is greatly appreciated, thanks in advance.
|
|
|
|
|
.id is a property of html element (html DOM), not of a function
this is the pointer of an instance like html element inside of html DOM.
document.getElementById('A1').AddEventListener("click",Display_Info,false);
--> this is the pointer of document.getElementById('A1')
param of Display_Info is not exists like pointer or id-string-value
|
|
|
|
|
Hi, thanks for replying. I understand that id is a property of DOM element but I've seen tutorials where "this.id" is used to get the id of an element that is clicked. Because I am using the AddEventListener property, I did not use the
onclick="Dispay_Info();" in my webpage.
|
|
|
|
|
FYI all your anchor tags src= have no opening double-quotes
|
|
|
|