For a user control panel that features a private message inbox, is it better to serve the private messages via a "real" email server or just store the messages in the database?
Hello guys, I have datetime-row in mysql database. I have to check time between now and that date using php. If the range is bigger then 1 month - do somtething.
I tried something like this:
$dateFromMysql = strtotime($rowData);
$currentDate = date("m/d/y g:i A");
And then comparsion by hands. It's ugly.
Last week I spoke at the Great
Indian Developer Summit in Bangalore, India. This was my second year speaking
at GIDS, so it was great to be back. Before the event Teleriks Team Fantastic Four
set up the booth and then hit McDonalds for a Maharaja Mac. Remember India does not
eat beef, so we HAD to go to McDonalds and check it out! Imagine a McDonalds without
a hamburger. Totally awesome. (Though we all preferred the McAloo,
a potato patty sandwich.)
The event is really 4 conferences in 4 days. One day each on: .NET, Web, Java, and
Seminars.
On the Day 1 (.NET) I spoke on:
Building Data Warehouses
Building Applications with Silverlight and .NET (and sharing the business logic)
What's new in SQL Server 2008 R2
No computer malfunctions like
last year, my sessions went smooth. This is rapid fire presenting: only 50 minute
sessions! With so little time, I had almost ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
Color identifiers make it easier for developers to quickly read and understand the code on screen. One of the many features provided by JustCode is the ability to colorize additional items that Visual Studio does not allow you to colorize by default. The colorization of items such as methods, properties, events, variables, and method parameters can easily be tweaked to your specific needs. Enable / Disable Color Identifiers In the recent release, we turned this option on by default. You can enable/disable code colorization by going to the JustCode menu in Visual Studio, selecting options, then selecting the general section in the left window. When you scroll down on general setting you will see a check box that says Color Identifiers. Check or uncheck this box to enable/disable code colorization. Color identifiers option Adjust Color Identifiers Adjusting the color identifiers in JustCode is done in the same place ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I am installing MongoDB (1.4.1) on Ubuntu (8.04 LTS) and I continuously have a problem where I can be in /usr/local/mongodb/bin and run ./mongo or ./mongod and I am returned "No such file or directory."
Let me be very clear here... the files ARE there!
The obvious go-to solution is that it is because of permission issues but the permissions are fine. I've even tried others out, still without any luck.
I'm really at the end here and any help would be MUCH appreciated.
Thank you!
We have a home-rolled backup stored procedure that uses xp_cmdshell to create and clean up database backups. We have an instance that is 2005 sp3 that we are trying to deploy this script to. I am at a bit of a loss for why it is not working. When I execute the create it runs for about 30 seconds and yields the following error:
Msg 10054, Level 20, State 0, Line 0
A transport-level error has occurred when sending the request to the server. (provider:
TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
In my tinkering I discovered that by removing the cursors that actually do the work it will allow me to create the stored procedure (not very helpful for me though). If I add the cursors back in using an alter the error returns. I would be curious if someone has experienced this problem and knows of a solution or work around. I am not opposed to posting the source, it is just lengthy.
Things I have checked:
Error Logs
No dump files in the log directory
Thanks in advance for the help.
Rapid Virtualization Indexing (RVI) is a hardware virtualization feature that can potentially give significant performance improvement. Intel's equivalent is Extended Page Tables. See http://en.wikipedia.org/wiki/Rapid_Virtualization_Indexing for more details.
My question is: Does RVI require motherboard or chipset support? If yes, what desktop chipsets support it? I've ordered a Phenom II CPU (which supports RVI) but I haven't bought the motherboard. I'll install XenServer or VMware ESXi (which both support RVI) on the new computer.
I have a signedCMS, and would like to know how to use BountyCastle API to remove the signature so I can have clear access to the plain text file underneath?
Thanks
Hello everyone,
I am trying to read my emails using a Python script (Python 2.5 and PyPy)
Some of my results are not in ASCII and i get strings like this:
=?ISO-8859-7?B?0OXm7/Dv8d/hIPP07+0gyuno4enx/u3h?='
Is there any way to decode it and convert to utf-8 so that i can process it?
I tried .decode('ISO-8859-7') but i got the same string
ok it seems like a simple problem, but i am having problem
I have a timer for each data set which resets improperly and as a result my timing gets mixed.
Any ideas to correct it? without losing any data.
Example
timer col ideally should be
timer , mine reads
1 3
2 4
3 5
4 6
5 1
6 2
how do i change the colum 2 or make a new colum which reads like colum 1 without changing the order of ther rows which have data
this is just a example as my file lengths are 86000 long , also i have missing timers which i do not want to miss , this imples no data for that period of time.
thanks
EDIT: I do not want to change the other columns. The coulm 1 is the gps counter and so it does not sync with the comp timer due to some other issues. I just want to change the row one such that it goes from high to low without effecting other rows. also take care of missing pts ( if i did not care for missing pts simple n=1: max would work.
I want to know the differences/similarities between Hibernate and simple persistence in J5EE?
I'm not clear if Hibernate implements J5EE persistence implementation or if it is a totally different approach to data representation over back-end systems.
Also, I want to know other approaches (frameworks) like JPA or Spring...
Thanks
I have a big function defined and executed on an element click. Is there a way to execute again that "big" function later, call it somehow, without writing it again?
$('#element').click(function(big){
some big function
...
...
});
$('#another_element').click(function(){
this should execute the previous "big" function
});
Thanx.
I have been asked to write a simple Reverse Polish Notation calculator in C as part of a homework assignment. I'm having difficulty understanding RPN. Can you please help me understand Reverse Polish Notation? Also, any tips on how to approach this problem would be greatly appreciated.
Hi guys,
I need to delete duplicate users in django (by duplicate I mean two or more users with the same email).
If your instance there are three records like this:
id email
3 [email protected]
56 [email protected]
90 [email protected]
I need to delete records 56 and 90 and leave the oldest record id - 3
Is there a way to quickly do this.
Thanks :)
I want to convince some clients to use MapServer and OpenLayers. Please can anyone suggest attractive websites to show off the possiblities!
The clients will be impressed by:
A density map (otherwise known as a heat map, colour-shaded grid coverage, contour plot...).
The ability for the user to download the underlying data for the density map, restricted to the area being viewed, in some format such as netCDF.
Standard OpenLayers stuff. Zooming, panning, scale bar, overview map...
Different base layers. Could be WMS, Google, Bing...
Searching for a placename, map is panned to display the place.
MapServer.org seems to be down right now :( But from memory their examples didn't have the "wow" factor. The OpenLayers examples demonstrate only one or two features per example - I want something to wow the clients by showing all the capabilities in one example.
PS If you have good examples that use some other open source tools, post them by all means. But just JavaScript please: customer says no rich client.
I have a cookie which stores info in an array.
This is for a classifieds website, and whenever users delete their 'ads' the cookie must also be removed of the ad which was deleted.
So I have this:
if (isset($_COOKIE['watched_ads'])){
$expir = time()+1728000;
$ad_arr = unserialize($_COOKIE['watched_ads']);
foreach($ad_arr as $val){
if($val==$id){ // $id is something like "bmw_m3_10141912"
unset($val);
setcookie('watched_ads', serialize($ad_arr), $expir, '/');
}
}
}
This doesn't work... any idea why? I think its a problem with the unset part...
Also, keep in mind if there is only one value inside the array, what will happen then?
Thanks
I have a DLL that I would like to install into the Global Assembly Cache so that it can be referenced from multiple locations. I have a File declaration with the Assembly attribute set to ".net" but when the installation tries to install the DLL into the GAC, I get the following error (I have tided it up a bit to make it more readable):
MSI (s) (58:38) [19:14:31:031]:
Product: MyProductName
1.01
-- Error 1935. An error occurred during the installation of assembly
'Compass,
version="1.0.0.0",
culture="neutral",
publicKeyToken="392B26B760D48103",
processorArchitecture="MSIL"'.
Please refer to Help and Support for
more information. HRESULT: 0x80131043.
assembly interface:
IAssemblyCacheItem, function:
Commit,
component:
{53AEE63B-F356-4D4F-8D61-EB0640A6E160}
I have hunted around to find out what this means and the error relates to FUSION_E_UNEXPECTED_MODULE_FOUND. This link also includes this information:
/// When installing multi-file assemblies into the GAC, the hash of each module is
/// checked against the hash of that file stored in the manifest. If the
/// hash of one of the files in the multi-file assembly does not match what is recorded
/// in the manifest, FUSION_E_UNEXPECTED_MODULE_FOUND will be returned.
/// The name of the error, and the text description of it, are somewhat confusing.
/// The reason this error code is described this way is that the internally,
/// Fusion/CLR implements installation of assemblies in the GAC, by installing
/// multiple "streams" that are individually committed.
/// Each stream has its hash computed, and all the hashes found
/// are compared against the hashes in the manifest, at the end of the installation.
/// Hence, a file hash mismatch appears as if an "unexpected" module was found.
Unfortunately, this doesn't make much sense to me and I don't see how it relates to my assembly, which isn't fancy or complex from my perspective (it's just a regular .NET 3.5 class library and the current installation test is occurring on my development machine, which is a valid target environment for my project - 32-bit Windows XP SP3).
Can anyone shed some light on why I might be getting this error and how I might hope to fix it?
Hi all,
I'm quite new to flex/actionscript and I was wondering if there is an equivalent for php's (and other languages) FILE and LINE identifiers?
Basicly I want to do some custom error logging and would like to something like:
var mymessage:String = 'Oops, a hiccup occured at ' + __FILE__ + ', line: ' + __LINE__;
Where file and line would ofcourse be substituted for their values at compile time.
Is this possible?
I have a templated class
Vector<class T, int N>
Where T is the type of the components (double for example) and n the number of components (so N=3 for a 3D vector)
Now I want to write a method like
double findStepsize(Vector<double,2> v)
{..}
I want to do this also for three and higher dimensional vectors. Of course I could just introduce further methods for higher dimensions, but the methods would have a lot of redundant code, so I want a more generic solution. Is there a way to create a method which takes a templated class without further specializing it (in this case without specifying T or N)? Like
double findStepsize(Vector<T,N> v)
?
Hello,
I'm using System.Diagnostics.Process to execute an svn command from a windows console application. This is the configuration of the process:
svn.StartInfo.FileName = svnPath;
svn.StartInfo.Arguments = string.Format("copy {0}/trunk/ {0}/tags/{1} -r head -q --username {3} --password {4} -m \"{2}\"", basePathToRepo, tagName, message, svnUserName, svnPassword);
svn.StartInfo.UseShellExecute = false;
svn.Start();
svn.WaitForExit();
My problem is that those arguments, which include the svn credentials, are sent (I suppose) in an unsecure way.
Is there a way to send these arguments in a secure way using the Process class?
Thanks!
hi All,
I am playing a small .wav file using the AudioToolBox.
AudioServicesPlaySystemSound (soundFileObject);
But sometimes it is not playing.
What is the reason ???
Thanks
There are some new integer types in the Windows API to support Win64. They haven't always been suppoprted; e.g. they aren't present in MSVC6.
How can I write an #if condition to detect if these types are supported by <windows.h>?
(My code needs to compile under many different versions of Microsoft Visual C++, including MSVC6. So I need to provide my own definitions of these types, with an #if to disable them in newer compilers).
I am trying to use Java Logger. I get my logger file (name.log) with the content I wish but I also get empty name.log.lck file. Why this file appears and how I can remove this behavior. Thank you in advance.
Is there any way to use PHP code to query a DNSBL (block list) provider and find out if the IP address submitted is a bad actor?
I would like to take an existing IP address out of a registration database, then check whether it's a known block-listed IP address by performing a lookup on it, then if it's a blacklisted, do an action on it (such as, delete entry from registration database).
Most of the instructions I have seen assume you are trying to query the blocklist via a mail server, which I can't do. I tried querying via web browser by typing in queries such as "58.64.xx.xxx.dnsbl.sorbs.net" but that didn't work.
Hi, I have a one-to-many Linq query and I would like to sort on a property within the "many" collection. For example in the pseudo-code below, I am returned a List from the Linq query but I would like to sort / order the Products property based on the SequenceNumber property of the Product class. How can I do this? Any information is appreciated. Thanks.
class Order
{
int OrderId;
List<Product> Products;
}
class Product
{
string name;
int SequenceNumber;
}