I trying to find out how to get the mail server information on the server I connect to with Javamail. I know in the debug statements when you connect you will get something like "S: +OK [MAIL_SERVER_NAME] ready.". Is there an easier way to get this information (and hopefully more information) than just parsing the debug output?
Dunno why it is...heres the coding for it.
http://pastebin.org/301343
I know theres a lot of repetitiveness in the coding...but its because the arrays were retuning null so I got tired of messing with them.
Everything works until it reaches line 224, which returns null values.
I maintain an application where users are able to store images, and then share them. The system is powered by MongoDB at the back end. Most of the image depiction pages are cached as flat HTML files, but I can run some code just before loading the file.
I've decided to implement a view count for the system. I am wondering what is the best storage…
My database consists of some entries which are NULL (so they don't affect max, min, etc..). When I pull all of the data from the database, I need to repopulate form fields with the values. Using .val(value) where value = NULL seems to work without any problems, but I'm not sure if this is a valid way to go about this. It doesn't say anything in…
Huge thanks for the help in this thread - Click td, select radio button in jQuery
But now I'm having trouble that it won't change the class of the cell, even though I have binded the 'change' trigger in jQuery like so:
$("td input[type=radio]").bind('change click', function () {
$('td').removeClass('selected');
…
I'm a front-end developer and really enjoy jQuery and JavaScript. I've built a lot a websites, done some good jQuery work and built a few JavaScript based applications and would really like to get in UI development. Or so I thought.
I guessed it would be pretty similar to what I already do except maybe a little more…
I have an application that runs a process and I only want one process to run at a time. Some options are:
Use an object lock to prevent subsequent processes running.
This would be fine, but I want the calling session to return immediately and not wait for the running session to complete.
Use a custom Y/N to set…
I'm using ASP.NET 3.5 with AJAX and have enabled history on the Script Manager. I have 2 pages, Default.aspx and Default2.aspx. I'm using the AJAX History on the Default.aspx page and saving history points on the server-side. There are some dropdowns on Default.aspx that I don't want to save a history point for…
I want to change css visibility and display attributes using jQuery on click when the state of another div's visibility attribute changes. (Many apologies for the obfuscated markup, but needing to manipulate someone else's construction):
There are four instances of [data-label="Checkbox"] [data-label="Checked"]…
I instantiate the HttpWebRequest object:
HttpWebRequest httpWebRequest =
WebRequest.Create("http://game.stop.com/webservice/services/gameup")
as HttpWebRequest;
When I "post" the data to this service, how does the service know which web method to submit the data to?
I do not have the code to this…
I'm new to programming in C and have been given the task of creating a 2D array that stores random letters from A-Z using the random () function. I know how to do random numbers.
nextvalue = random ( ) % 10001;
but am unsure on how exactly to create a random character. I know that you can use ASCII to…
Hello all,
I have an XNA question for those with more experience in these matters than myself (maths).
Background: I have a game that implements a boundary class, this simply hosts 2 Vector2 objects, a start and an end point. The current implementation crudely handles collision detection by assuming…
What is the best way to resolve the following circular dependency in typedef-ing these structs?
Note the C language tag - I'm looking for a solution in standard gcc C.
typedef struct {
char* name;
int age;
int lefthanded;
People* friends;
} Person;
typedef struct {
int count;
…
If you have a header file named ThisIsAHeaderFile.h, the following will still locate the file in Visual Studio:
#include <ThisIsAheaderFile.h>
Is there a way to enforce case sensitivity so that the #include will result in an error?
Instead of The ELEMENTS being 25 is there a way to randomly generate a large array of elements....10000, 100000, or even 1000000 elements and then use my insertion sort algorithms. I am trying to have a large array of elements and use insertion sort to put them in order and then also in reverse…
Okay I use this script here to make a backup of my database:
mysqldump -u root -h localhost -pPASSWORD forums | gzip -9 > backup-$(date +%Y-%m-%d).sql.gz
This is used in a cron daily.
But I need to download this remotely or through a ftp program every day as well so I have a physical…
I am not sure how this works.
I am using Visual Studio 2008 and I created a Class Library (say the name is Test). I also selected the option to create a folder for the solution.
Following is the directory structure I get:
Test
- Test
- bin
- Debug
- obj
- Debug
-…
Hello.
I was wondering if there is the best practice on where to store global settings in a rails app. What I mean by that is i.e: I have a few globals defined that may change, but not likely and it seems inappropriate to store them in DB since they are used so much. For instance I have…
I have a treeview control where I am dynamically selecting a node depending on user interaction. when a node is selected I want to be able to have the scrollbar go to the location of that selected node in the tree. The scrollbar is simply made by overflow:auto in the div tag where the…
Hi everyone,
I'm doing a theatrical performance, and I need a program that can read images from a folder and display them full screen on one of the computer's VGA outputs, in a predetermined order. All it needs to do is start with the first image, and when a key is pressed (space…
The following code works:
$(".valClear").each(function () {
if ($(this).val().indexOf(".png") == -1) {
$(this).val('');
}
});
However this doesn't (the value is removed even if it contains .png or .jpeg), what am I doing wrong?
…
I am implementing a method that when given Sum and a List. It will check to see that if you add the elements in the list, their sum is equal to the Sum given. Here is what I am trying to do thus far, but I am pretty sure it is wrong... I'm not really sure how to…