Where can i find good practice python problems with solutions?
I'm looking for detailed practice problems that are designed with a coding purpose in mind.
Does anyone know of a good way to calculate the "semantic distance" between two words?
Immediately an algorithm that counts the steps between words in a thesaurus springs to mind.
Is it possible that someone here could explain how to use this code. Please keep in mind i am a complete amateur, so simplifications may be needed.
Private Const cPGM = "C:\VB Forum\startup\Example.exe"
Dim oShell As IWshShell_Class
Set oShell = New IWshShell_Class
oShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\MyVBApp", _
cPGM, "REG_SZ"
How exactly is this code used? Is it saved as an .exe file and ran or what? Thanks for your prompt reply and informational feedback.
I'm working on a site at the moment that loads all of its browser popups by using page methods. This approach works but it's starting to get messy. I also view page methods as ways to perform small tasks, username availability comes to mind.
What other options are there besides page methods and the update panel?
I'm required to create a newsletter php application that would send template emails to all subscribed to the system users.
We're currently using PostgreSQL so PhpList will not work for us if it's not capable to work with PostgreSQL.
What's the appropriate way of handling this task ? Also keep in mind that there will be big amounts of subscribers.
Edit: I'm opened to java applications that could do the trick..
Thanks in advance.
The documentation describes the class as a helper object to create, open, and/or manage a database. Having that in mind wouldn't you say that the name is a little misleading?
Ok I have a string...
$a_string = "Product";
and I want to use this string in a call to a object like this:
$this->$a_string->some_function();
How the dickens do I dynamically call that object?
(don't think Im on php 5 mind)
Which is a better practice, generally speaking, and why? Under what circumstances would you change your mind?
function foo1(int x) {
int result;
if (x > 5) {
result = 2;
} else {
result = 7;
}
return result;
}
OR
function foo2(int x) {
if (x > 5) {
return 2;
} else {
return 7;
}
}
Hi Guys,
I've written a kind of navigation system for pedestrians. The only thing is, that I need a criterion to finish the navigation.
My values are gives as lat/long pairs.
What would you assume would be a good value to say, both positions are equal/near enough to tell the user that he has reached the goal?
Please keep also in mind, that it's idfficult to say "directly equal", because GPS modules may have variances...
greetz from europe,
poeschlorn
Given an instance of a class, we can obviously return its name:
trait MixedInClassDiscovery {
val className = this.getClass.getName
}
class AClass extends MixedInClassDiscovery {
...
this.className // returns "AClass"
...
}
But this way uses reflection, once for every instance of AClass. Can the same be done once for every class, instead?
One solution which comes to mind is to mix it into companion objects instead of classes themselves.
I have a few questions about CoreLocation and GPS.
First, what method in core location is used to continually get the users current coordinates? And at what interval should these be retrieved?
Second, should these coordinates be pushed into a NSMutableArray each time they are received, so that the array of coordinates will represent the users path?
Thanks, just wanting to get started getting me mind around this.
Here is a scenario in my mind and I have googled, Binged it a lot but got the answer like
"Abstract class has not implemented method so, we cant create the object"
"The word 'Abstract' instruct the clr that not to create object of the class"
But in a simple class where we have all virtual method, able to create an object???
Also, we can define different access modified to Abstract class constructor like private, protected or public.
My search terminated to this question ;
Why we can't create object of an Abstract class?
I have a string of text that contains html, and I need to extract each url (most likely in img or a tags) to create a generic list of string objects. Is there an easy way to do this or will I have to resort to regular expressions?
If I have to resort to regular expressions, would you mind helping me out with that as well? :)
Hi all
I'm currently investigating MEF to know the feasibility of some kind of plugin subsystem for a software we are writing at my company. One of the first questions that came to my mind is to know the influence of MEF components in the application load time.
Moreover, if that's something of significant weight, is it possible to load those components completely at runtime?
Thanks in advance
Roman
Dear Friends
What all things we should keep in mind for creating website? What are the standards everyone follows? I want to know in & out of the websites. I want to create by my own. Please guide me some useful steps.
Thanks in advance
Ey guys, I have been searching for some sample code on how to store an NSArray in Core Data for awhile now, but haven't had any luck. Would anyone mind pointing me to some tutorial or example, or better yet write a simple sample as an answer to this question? I have read this but it doesn't show an example of how to go about implementing a transformable attribute that is an NSArray. Thanks in advance!
So we have a GridView asp control and one of my coworkers doesn't like to use an DataSource to fill the GridView.
I wasn't sure if/what the pros and cons are of using one.
I don't mind using going through the wizard to set the type, and the select/update methods.
Besides using the wizard are there pros and cons?
I have a special content-type that I have created, and one of the fields is a radio button list. The last element is named 'Other' and I would like to have a textbox appear and allow the user to enter in a non-defined value.
Is this sort of capability provided by any sort of module, or is this something that needs to be coded by hand? (If so, would you mind pointing me in the correct direction?)
Hello. I just wanted to ask about the best C# book you've ever read and is a must for every C# programmer.
But please keep in mind:
- Only one book per answer.
- Check for duplicates before posting.
I guess my mind is so engaged in IIS and web applications that I can't think of a reason to go through the trouble of using a self-hosted WCF service. I have always had the availability of IIS so creating a self-hosted WCF service seems like more work than I would want to do. Why would I want to do this?
Hey,
I'm trying to get the GUID of a given sharepoint URL. I don't mind using the API or the webservices or Sharepoint's database.
if i were to write a function, it's signature would be:
//get a GUID from path.
string GetGuidFromPath(string path){}
I had a lead: SPContentMapProvider but it doesn't seem to get the right info.
Thank you!
I was looking at the ImageConverter class, trying to figure out how to convert a BufferedImage to 8-bit color, but I have no idea how I would do this. I was also searching around the internet and I could find no simple answer, they were all talking about 8 bit grayscale images. I simply want to convert the colors of an image to 8 bit... nothing else, no resizing no nothing. Does anyone mind telling me how to do this.
Hello!
In MS Exam 70-536 .Net Foundation, Chapter 3 "Searching, Modifying, and Encoding Text" in Case Scenario 1 related to regex there is a question:
How can you constrain the input before you write any code?
I thought it's maybe a in-mind design of regex pattern but it will not really constrain the input, will it? I am not so good in psychokinesis yet!
Or maybe the is some other way?
Thanks for your time!
If you want to some code to execute based on two or more conditions which is the best way to format that if statement ?
first example:-
if(ConditionOne && ConditionTwo && ConditionThree)
{
Code to execute
}
Second example:-
if(ConditionOne)
{
if(ConditionTwo )
{
if(ConditionThree)
{
Code to execute
}
}
}
which is easiest to understand and read bearing in mind that each condition may be a long function name or something.
I have a problem as I'm conditionally including the Prototype-based Lightbox script for IE6 as it works better than the jQuery plugin.
Of course the two libraries conflict but the official solution is not really feasible for me as i would have to replace tons of $ with the alternative no-conflict syntax.
Is there any other solution for me, keeping in mind that in my case it would be easier to have Prototype work nicely with jQuery than the other way around?