What is the VB Equivalent of the following C# boolean expression?
data.GetType() == typeof(System.Data.DataView)
Note: The variable data is declared as IEnumerable.
Hi,
I wrote a python module. Running python filename.py, only checks for syntax errors. Is there a tool, which checks for runtime errors also, like concatenating int with string etc..
Thank you
Bala
HTML:
<ul class="clients">
<li>
<div class="over left">Description</div>
<div class="inner">Image</div>
</li>
</ul>
CSS:
.clients { margin-right: -20px; }
.clients li {
float: left;
width: 128px;
height: 120px;
margin: 0 20px 20px 0;
border: 1px solid #c2c2c2;
}
.clients .over {
display: none;
position: absolute;
width: 250px;
font-size: 11px;
line-height: 16px;
background: #ecf5fb;
margin: 3px 0 0 3px;
padding: 18px;
z-index: 25;
}
.clients .right { margin: 3px 0 0 -161px; }
.clients .inner { width: 128px; height: 120px; overflow: hidden; }
So, we have a list of floated squares and a popup blocks in each, which have absolute position.
JS:
jQuery(function($) {
$('input[title!=""]').hint();
$(".clients li").bind('mouseover mouseout',function(){$(this).find("div.over").toggle()});
});
If over - show, else - hide. Quite ok, but it must be more advanced, we should catch an offset and give a class to .over block:
if offset from right (corner of browser window) less than 150px, then add class "right" for a .over block.
if offset from right more than 150px - add class "left" for a .over block.
How can we do it?
I need to be able to select multiple options on a web form, but those options are hierarchical. For example:
Option 1
Option 1 a
Option 1 b
Option 2
The user should be able to select Option 1, or Option 1a, etc. Selecting Option 1 a should automatically select Option 1.
Any controls/solutions out there that fit the bill? (I'm not looking to spend $)
Hi,
I have After Insert/Update trigger on Table T1 which get the referential data for Col1 from T2 and does some work and insert it into another table.
The col1 is FK to Table T2.
When user insert the incorrect or non existing value into the Col1 and if trigger is disabled I am getting constraint error that is fine.
But when trigger is enabled and user insert the wrong value in Col1 trigger is getting fired and shows the 'no data found' error message.
Actually I am expecting the table to throw constraint error, but trigger is throwing it.
Please let me know your comments about this trigger behaviour.
Hi All,
I'm working in xmldataprovider and we have configuration value "source" this value may be local file or url
like
c:\data\test.xml --absolute
data\test.xml --relative
or url
http:\mysite\test.xml
how I can determine all this cases in code
I'm working c#
I'm using a Odbc connection to a mysql server, and was wondering how I would go about checking if a table exists within my database, and if not, create it.
Hi
I have a table like this:
UID(int) NUMBERS(blob)
----------------------
1 1,13,15,20
2 3,10,15,20
3 3,15
And I would like to test if 3 and 15 are in the blob called NUMBERS. And can see the LIKE %% cannot be used
Only row with ID 2 and three scoulb be selected...
The authlogic rails gem is doing a LOWER in the sql query.
SELECT * FROM `users` WHERE (LOWER(`users`.email) = '[email protected]') LIMIT 1
I want to get rid of the LOWER part since it seems to be slowing down the query by quite a bit.
I'd prefer to just lower the case in the code since this query seems to be expensive.
I'm not sure where to change this behavior in authlogic.
Thanks!
I'm kinda newbie to perl and looking for a script that will handle file moving.
#!/usr/bin/perl -w
$filename = 'DUMBFILE';
$destination = '/some/location/';
if (-e $destination + $filename) {
print "File Exists ! Renaming ..";
move ('/tmp/' + $filename, $destination + $filename + '.1');
} else {
move ('/tmp/' + $filename, $destination + $filename);
}
I'm able to rename it to 1, but i want to be renamed incrementally, like if file.1 exists, rename to .2, and .3 if .2 exists.
That should be easy to do, but i'm kinda lost ..
Hello,
I have a link inside a label. The problem is, when user clicks 'back' after having read the terms, the checkbox is unchecked, because when they clicked on the link they also unchecked the box at the same time, since the link is inside a label.
<input type="checkbox" id="terms" name="terms" checked="checked" />
<label for="terms">I agree to be bound by the <a href="/terms">Terms</a></label>
How can I prevent the checkbox from being checked when link is clicked? Tried doing event.preventDefault() on label click, but that doesn't prevent checkbox from being checked/unchecked.
I could just take out the link from inside a label (which means more CSS styling). But now I'm curious whether the above is possible.
Rails defines a bunch of magic with named routes that make helpers for your routes. Sometimes, especially with nested routes, it can get a little confusing to keep track of what URL you'll get for a given route helper method call. Is it possible to, using the Ruby console, see what link a given helper function will generate? For example, given a named helper like post_path(post) I want to see what URL is generated.
I have multiple language packs in my NSIS installer, using the MUI2 interface. Now I try to select the language pack, which is installed by the "Typical" installation type according to the user's chosen setup language. My problem is, that I can't figure out, how to get the user's language selection.
I already tried to access the variables $LANGUAGE and $mui.LangDLL.RegistryLanguage, as well as trying to compare a defined language string to a specific translation string, but without success.
[[somestring substringtoindex:0] is equaltostring:@"""]; 'makes red' the rest of the code. actually i can't put quotation marks inside quotation marks. still, this is the character i want to reffer. how should I do it in the correct way?
thanks
I am trying to make a macro in Outlook that will scan the To: list for a certain text string, and spit out a message if all but one (or two, etc) addresses have it. Is there a simple way to do this?
Essentially, I am trying to write something that'll avoid being able to send a restricted message to a bunch of people with the string 'xyz' in the address, if one or more do not have it. AutoComplete makes this difficult, without checking through one-by-one.
I'm trying to use the Vectorlight spell checker for Silverlight. The demo code comes with the en-US.dic file, but I'm trying to find a compatible one for British English.
I have found one here but it doesn't work. The format seems similar to the en-US one, but it just doesn't work (i.e. it doesn't suggest any words).
Hi,
Given a filename in C, I want to determine whether this file exists and has execute permission on it. All I've got currently is:
if( access( filename, X_OK) != 0 ) {
But this wont search the PATH for files and will also match directories (which I don't want). Could anyone please help?
I've got an Asp.net MVC app and before being able to go live, the IT have requested for us to comply with their password policy. The flexibility of AspnetSqlMembershipProvider doesn’t quite satisfy the requirement.
The password strength and length rules are as follows:
one lowercase
one Uppercase
one number and or special character
8 characters in length
so far, aspnetsqlmembershipprovider is good...
Not allowed to use:
Dictionary words Names, real or
fictional Plain language phrases
Dates
Telephone numbers
Car registration numbers
User IDs
Postal codes
Organization name
Only the first 4 criteria are satisfied by the aspnetsqlmembershipprovider. Do you know of any third party products that offers this functionality (preferably in the form of a custom membership provider)?
Hi,
If I have some xml like:
<root>
<customers>
<customer firstname="Joe" lastname="Bloggs" description="Member of the Bloggs family"/>
<customer firstname="Joe" lastname="Soap" description="Member of the Soap family"/>
<customer firstname="Fred" lastname="Bloggs" description="Member of the Bloggs family"/>
<customer firstname="Jane" lastname="Bloggs" description="Is a member of the Bloggs family"/>
</customers>
</root>
How do I get, in pure XPath - not XSLT - an xpath expression that detects rows where lastname is the same, but has a different description? So it would pull the last node above?
Thanks a mill if you can help, been scratching at it for ages, and I can't find it by searching (apologies if it is)
Cheers,
J
I have to find recursively if there is any repeated element in an integer array v.
The method must have the following signature:
boolean hasRepeatedElements(int[] v)
I can't see any way of doing that recursively without having to define another method or at least another overload to this method (one that takes for example the element to go after or something). At first I thought about checking for the current v if there is some element equal to the first element, then creating a new array with L-1 elements etc but that seems rather inefficient. Is it the only way?
Am I missing here something?
Hey all, i am in need of some help with trying to figure out how to go about checking the users session and seeing if they are still logged in or not. The problem being is because i have a static page that pretty much loads everything into "tabs" using jquery. So when they use navigates the page, it really never leaves that same page they started out on. Hints my problem in trying to determine if they are still logged in or not when they click on update their information on their profile or whatnot.
Any suggestions/help would be great! :o)
David
I want to have different process for English word and Japanese word in this function
function process_word($word)
{
if($word is english)
{
/////////
}else if($word is japanese)
{
////////
}
}
thank you
c.Open()
r = x.ExecuteReader
If Not r("filename").IsDbnull Then
imagepath = "<img src='images/'" & getimage(r("filename")) & " border='0' align='absmiddle'"
End If
c.Close()
r.Close()
I have also tried;
If r("filename") Is DBNull.Value Then
imagepath = String.Empty
Else
imagepath = "<img src='images/'" & getimage(r("filename")) & " border='0' align='absmiddle'"
End If
c.Close()
r.Close()
The error is: Invalid attempt to read when no data is present.
The idea of my code is to build an img src string only when data is available.
Help greatly appreciated.
Thanks