Hi guys, any solution to this problem - given a list of numbers [1,2,3,4,5] write a Prolog program to sum up all the odd-positioned in this list ?
odd([1,2,3,4,5],Sum)
Sum = 9. (1+3+5)
I have a user control called adminMenu and I use it in my index.aspx and all is fine, but I need to access a MenuItem in adminMenu and need to change NavigateUrl on the MenuItem. Tried this code with no luck:
MenuItem MaintenanceReports = this.adminMenu.FindItem("MaintenanceReports");
Not sure if I should be accessing adminMenu properties from controls code behind, but when I try from controls code behind was not able to access it either, any ideas would be appreciated.
Delete every 't'th (t1) node of a single linked list. In the resultant linked list, again delete 't'th node. Repeat this till only t-1 nodes remains.
For this i have come up with:
Traverse until you reach 't'th node, delete all the nodes till the end.
Is there any efficient way other than this?. Can any one please help me out. Thanks.
Hello,
i try to add a generated SPFieldLookup to a List. That works fine, but the Field only added to the default ContentType. How can I add the LookupField to all ContentTypes from the List?
Hi,
I have a hashmap having four values a,b,c,d and list having only a i want to see if the hashmap has the value a and print it.
hashmap.get('data') results a,b,c,d
list l is having a
how will i print only the value a
hi,
I'm using imageField and videoField into each node of my website and I'm using multiple files option, so that I have 2 ordered lists.
This works great, however I would like to have only 1 ordered list instead of 2, so that my customer can arrange video and images in the same list and ordered them
i.e.
video1
image1
video2
video3
image2
...
etc
thanks
hey guys,
someone already helped me solving the following problem: i wanted to iterate with my up and down arrows through list-items. http://jsfiddle.net/zBjrS/1/
in this example i only had one UL and wanted to navigate through its list-items.
meannwhile i have multiple ul's underneath each other and want to navigate seemlessly through all of them as if there were only one UL. http://jsfiddle.net/zBjrS/2/
any idea how i could do that?
thank you
By best I mean most efficient.
So don't go on about subjectiveness.
I have a list of websites and I want to store the list on the iphone locally, there must be an URL, title and a small image (like 32x32 max image size). I don't think I should be using CoreData for this. Should I be using a plist?
I am trying to detect a postback from Radiobutton list.
I am trying to use following code:
If Page.Request.Params.Get("__EVENTTARGET") = optDownload.UniqueID.ToString Then
But Page.Request.Params.Get("__EVENTTARGET") returns
"ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload$4"
And = optDownload.UniqueID.ToString returns
"ctl00$ContentPlaceHolder1$pnlBarAccounts$i0$i2$i0$CHChecking$Acct1$optDownload"
There is a difference in last 2 characters, how do I detect a postback from Radiobutton list?
I have a list of strings where by each string is a url to a pdf document. All I want to do is cycle through this list and display each url as a hyperlink on my page. I've seen this done before in MVC where the collection is made avaliable to the view and you can just do a foreach etc etc but I don't know how to do it on a normal asp.net page...
Any help appreciated, cheers!
Hello all ,
I have a string like "SAB_bARGS_D" . What I want is that the string gets divided into list of characters but whenever there is a _ sign the next character gets appended to the previous one.
So the answer to above should be ['S','A','B_b','A','R','G','S_D']
It can be done by using a for loop traversing through the list but is there an inbuilt function that I can use.....
Thanks a lot
How would I print the multiples of a list of given numbers in a merged, sorted list?
I.e.
take 10 (multiples [4,5])
gives
4,5,8,10,12,15,16,20,24,25
I've got it working for lists of size 2 or 1 but I need a more general solution :)
I need to get a list of all tables that are published for replication from MS-SQL 2005/2008 databases. Is there a system stored procedure or a query I could run to generate such a list?
Thank you,
Is there a way to append elements to a list randomly, built in function
ex:
def random_append():
lst = ['a']
lst.append('b')
lst.append('c')
lst.append('d')
lst.append('e')
return print lst
this will out put ['a', 'b', 'c', 'd', 'e']
But I want it to add elements randomly and out put something like this:
['b', 'd', 'b', 'e', 'c']
And yes there's a function random.shuffle() but it shuffles a list at once which I don't require, I just want to perform random inserts only.
How do I order images in a list in an inline style with css? I have tried puting inline style in the list tag but it is showing it in block form. Any help will be greatly appreciated
Suppose I have a list as follows
bar=c()
bar["1997-10-14"]=1
bar["2001-10-14"]=2
bar["2007-10-14"]=1
How can I select from this list all values for which the index is within a specific date range? So, if I look for all values between "1995-01-01" and "2000-06-01", I should get 1. And similarly for the period "2001-09-01" and "2007-11-04", I should get 2 an 1.
I have a simple slideshow (jQuery Cycle) that displays an image every ten seconds (7 total images). In an adjacent div, I have a list with 7 bullet points. What's the easiest way to script a method in which the css/style of the appropriate bullet point changes as its accompanying image. The idea is to have all list items displayed, but 1 highlighted every 10 seconds?
How would I print the multiples of a list of given numbers in a merged, sorted list?
I.e.
take 10 (multiples [4,5])
gives
4,5,8,10,12,15,16,20,24,25
I've got it working for lists of size 2 or 1 but I need a more general solution :)
function test(custId){
List<Account> list=accountDelegate.findAccountEntityByGroupId((long)%>
custId<%)%>;
<script>
}
Here my question is how to send custId to java method as parameter from java script.where java method takes long argument.
We have Microsoft's DirectAccess VPN set up on Server 2008 R2 with end-to-edge security, and we're having trouble with the manage-out tunnel.
The DirectAccess client has DC/DNS and intranet connectivity, it can ping/rdp/etc to intranet hosts. However connections originating from those same intranet hosts can only intermittently reach the client. At times it works fine, other times it doesn't.
When an inbound (intranet to client) connection is attempted there's an IPSec Main Mode failure logged: Event 4653 with a failure reason of "No Policy Configured".
I think that it may be related to the state of the intranet (corp) access tunnel, and an overlap in the configured subnets for those polices. I haven't figured out exactly what's different in the scenario where the connection works and where it does not.
I'm experiencing a problem on a new PC using Outlook Web Access in Internet Explorer 8. When OWA plays a sound, a message box appears: the about box for Ulead MP3 codec. When I click OK to dismiss the box, I get a message that IE has stopped responding and Windows eventually has to force the browser window closed.
This is apparently not an isolated incident, occurring on computers from different manufacturers and on other websites that play sound (such as AOL's Webmail).
The only "fix" I've found on discussion boards is to prevent the website from playing sound in the first place. That's not a fix, that's just avoiding the trigger. I'd like to know what's causing this and uninstall it or repair it, so the computer can work like it's supposed to.
Since Super User users are smarter than the average bear, I thought I'd have better luck here.
I'm having an odd problem with my wireless network. Here is the background information:
Server (Windows Server 2008)
1 to 10 end user machines connecting to the network
Layer 3 Access Point (Asus WL-330 gE) connected to ethernet of Server and all machines connect to the network via the AP
The end user machines get a connection to the server with no problems initially. But then connections are randomly lost throughout the day to the server/network. The wireless NICs of the machines still see the wireless network but are unable to connect to it. Then after some time the connection is regained automatically.
I initially thought there was a problem with this particular AP, but then I took the same make/model AP out of storage and still ran into the problem.
Any ideas what could be causing this??? Very confusing that the wireless nics on the end user machines can still see the network but not connect, and that the connections are randomly lost/gained.
Thanks in advance!
We are sending routes to Mappoint 2013 from our application using an access database. It seems to happen with Mappoint 2010 and 2011 also. It doesn't happen on all of our clients either and it happens randomly on those who it does happen.
This is the message:
Problem signature:
Problem Event Name: BEX
Application Name: MapPoint.exe
Application Version: 19.0.18.1100
Application Timestamp: 4fd664bb
Fault Module Name: StackHash_94b0
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 00000000
Exception Offset: 7f82c94f
Exception Code: c0000005
Exception Data: 00000008
OS Version: 6.0.6002.2.2.0.18.10
Locale ID: 1033
Additional Information 1: 94b0
Additional Information 2: 30950b6006304277980cdff17dfbd104
Additional Information 3: 098a
Additional Information 4: 31c80150ac0b74b2dcb7884aa8fa1dac
Does anyone know where I'd find out more information on this or how to resolve it?
If this is not the correct exchange, pls point me to the right one and I'll delete and respost it.
Thanks!
I need to protect a certain folder within a web application of mine from access from outside of an defined IP range.
With O'Reilly's Tomcat Tips I figured that:
<Context path="/path/to/secret_files" ...>
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127.0.0.1" deny=""/>
</Context>
Is the way to go?
I'm not that much into tomcat configuration so I'm dazzled a little as to where to put these restrictions. Do I put this Within my web.xml or is this a thing I need to add to some general tomcat conf file?
In Windows Server 2008, I have a shared folder.
For my username:
NTFS permission (read/modify)
Share Permissions (read/modify)
Result when trying to access the share:
I can traverse directory and read files, but I cannot write files. When I try to examine my effective permissions, it says "Windows can't calculate the effective permissions for [My Username]".
The folder is owned by the Administrators group (the default), and NTFS read/write permissions are granted to my username, which is a member of the Administrators group.
I notice that to make any changes to the folder locally require me to acknowledge a UAC prompt. Why does that prompt appear?
I also tried creating a new group, giving it full NTFS permissions, and full control in the shared permissions, and added my username to the group. The result is even worse... I cannot even traverse the shared folder directories or read anything at all.