I'm looking for a list of built in PHP functions that a programmer could use to send an email.
The obvious answer here is mail(), but I'm also looking for a list of functions someone might use to manually open a connection to an MTA, or spawn a process on the local machine which might in turn send an email using sendmail, postfix, etc.
The context here is I want to scan a large, unknown codebase for code that's sending out email (because we already located a call to mail(), and that's not doing it)
When I open Developer Tools in Google Chrome, I see all kinds useless crap like Profiles, Timelines, not to mentions Audits but basic functionality like being able to set breakpoint both in js files and within html javascript code is missing!. I tried to use javascript Console which itself is buggy ( like when once it encounter JS error, cannot get out of it unless refresh the whole page useless when ajax is involved). I am surprised google engineers still have not figured this out if these features still not available. If they are and there is some twisted way to do this, can some one help?
Hi,
I have a Visual Studio (2008) project where I have some files added as links (through Add Existing Item-Add As Link). Suppose I want to copy this project somewhere else (give it to another developer, release source code, etc.) and I would like to "convert" all these links to actual copies of these files. Is this possible? How can I do this in VS or is there some 3rd party utility to do that?
Thanks.
if i have the code
int getA(){
return a;
}
and then do something like
int b = obj.a();
instead of
int b = obj.a;
will that mean that the stack will have to be pushed and popped ultimately slowing down my code?
Hi,
I have written the following jquery sitting in the head tags of my HTML
It is supposed to bring the image that is being hovered over to full opacity and slide another image over it from the right, then return when un-hovered.
<script type="text/javascript">
$(function() {
$('ul#img-nav li').css({
"opacity": .5
});
$('ul#img-nav li').hover(function() {
$(this).stop(true).animate({"opacity":1});
$(this).children('.overlay').stop(true).animate({"left" : "18px" });
}, function() {
$(this).stop(true).animate({"opacity":.5});
$(this).children('.overlay').stop(true).animate({"left" : "180px" });
});
});
This works fine in Safari, Chrome, IE (7,8) but not in FF 3.6.
Any suggestions why this might be?
Many thanks
I'm already a professional J2EE developer by day, and Rails developer by night. I'm planning on adding Python to my list of skills. I'm already convinced a language is just a tool, so I'm not interested in a religious war. I agree with the Pragmatic Programmers that learning one language/year is a good thing for your professional development
So, in your considered opinion, what kinds of applications does Python hit the sweet spot? And why? What advantages does it have, and why do these advantages outweigh the costs in adopting Python?
ADD: I also plan on learning a pure functional language like Scheme.
I have a weird issue (weird because it is specific to one component) with applicationComplete in a fairly simple application. All the UI components are declared in MXML. I can access them all in applicationComplete, but not a spark.components.TextArea component, named taStatus here; it is null in the handler.
MXML looks sort of like this (there are lots of other components, but nothing special)
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="710" minHeight="640" applicationComplete="onApplicationComplete(event)" width="710" height="640">
<mx:TabNavigator left="15" right="15" top="15" bottom="340" paddingTop="0">
<s:NavigatorContent label="General" width="100%" height="100%">
<s:Label x="93" y="71" text="Label" id="lblTest"/>
</s:NavigatorContent>
<s:NavigatorContent label="Status" width="100%" height="100%">
<s:TextArea id="taStatus" width="100%" height="100%" text="Startup." editable="false"/>
</s:NavigatorContent>
</mx:TabNavigator>
<fx:Script source="main.as" />
</s:Application>
Here is the handler in main.as
protected function onApplicationComplete(event: FlexEvent) : void
{
lblTest.text = 'abc789'; // OK
taStatus.text = 'abc789'; // Fail
}
TypeError: Error #1009: Cannot access a property or method of a null object reference. So taStatus is null... What is so special about this TextArea?
Running a webserver 2003 SP2 (x86) with IIS 6 and asp.net 2. The box is running mostly dynamic asp pages connecting to a sql 2008 server.
At any given time there is over 1 gig of memory available out of the 2 gig in the box. It seems like there would be a way for it to make better use of the free memory. It is using a default machine.config file and default http.sys.
I would like to maximize incoming internet connections and database connections. Is there something I can do to make better use of the available memory?
Is it possible to use Xcode using iPhone 3.1.3 SDK to compile a standard C program that will work on the iphone? I'm trying to use xcode to compile a basic 'hello world' but to no avail. Do I need to obtain an additional application template or am I just missing something?
I'm working my way through Pickaxe 1.9, and I'm a bit confused by constant-lookup in instance/class_eval blocks. I'm using 1.9.2.
It seems that Ruby handles constant-lookup in *_eval blocks the same way it does method-lookup:
look for a definition in receiver.singleton_class (plus mixins);
then in receiver.singleton_class.superclass (plus mixins);
then continue up the eigenchain until you get to #<Class:BasicObject>;
whose superclass is Class;
and then up the rest of the ancestor chain (including Object, which stores all the constants you define at the top-level), checking for mixins along the way
Is this correct? The Pickaxe discussion is a bit terse.
Some examples:
class Foo
CONST = 'Foo::CONST'
class << self
CONST = 'EigenFoo::CONST'
end
end
Foo.instance_eval { CONST } # => 'EigenFoo::CONST'
Foo.class_eval { CONST } # => 'EigenFoo::CONST', not 'Foo::CONST'!
Foo.new.instance_eval { CONST } # => 'Foo::CONST'
In the class_eval example, Foo-the-class isn't a stop along Foo-the-object's ancestor chain!
And an example with mixins:
module M
CONST = "M::CONST"
end
module N
CONST = "N::CONST"
end
class A
include M
extend N
end
A.instance_eval { CONST } # => "N::CONST", because N is mixed into A's eigenclass
A.class_eval { CONST } # => "N::CONST", ditto
A.new.instance_eval { CONST } # => "M::CONST", because A.new.class, A, mixes in M
I just deployed an application to a new server, and although I'm using virtualenv, I had to install a new environment on the production server, which has a different architecture.
Anyway, I received no TemplateSytaxErrors in development, but on the production server, I get:
Exception Type: TemplateSyntaxError
Exception Value: Caught SyntaxError while rendering: invalid syntax (views.py, line 25)
The offending line is:
{% url admin:password_change as password_change_url %}
Upon removing that line, the TemplateSyntaxError hops to the next line that has a colon in it (and lets other template tags work fine).
So my question is this: is there some discrepancy in versions of Python/Django that would allow or disallow the namespacing syntax?
The template tags are in django-grappelli (http://code.google.com/p/django-grappelli/), so I'd rather not go through their code and rewrite all the template tags.
Development server:
32-bit Debian
Python 2.5.5
Django 1.2.1
Production server:
64-bit CentOS
Python 2.4.3
Django 1.2.1
Any ideas?
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
Please email me at [email protected]
I'm trying to prove the following in Coq:
Goal (forall x:X, P(x) /\ Q(x)) - ((forall x:X, P (x)) /\ (forall x:X, Q (x))).
Can someone please help? I'm not sure whether to split, make an assumption etc.
My apologies for being a complete noob
I am trying to reproduce a SQL query using a LINQ to Entities query. The following SQL works fine, I just don't see how to do it in LINQ. I have tried for a few hours today but I'm just missing something.
SELECT
h.ReqID,
rs.RoutingSection
FROM ReqHeader h
JOIN ReqRoutings rr ON rr.ReqRoutingID = (SELECT TOP 1 r1.ReqRoutingID
FROM ReqRoutings r1
WHERE r1.ReqID = h.ReqID
ORDER BY r1.ReqRoutingID desc)
JOIN ReqRoutingSections rs ON rs.RoutingSectionID = rr.RoutingSectionID
Edit***
Here is my table scema-
Requisitions:
ReqID PK string
ReqDate datetime
etc...
ReqRoutings:
ID PK int
ReqID FK
RoutingSection FK int
RoutingDate
ReqRoutingSections:
Id PK int
RoutingSection string
The idea is that each Requisition can be routed many times, for my query I need the last RoutingSection to be returned along with the Requisition info.
Sample data:
Requisitions: - 1 record
ReqID 123456
ReqDate '12/1/2012'
ReqRoutings: -- 3 records
id 1
ReqID 123456
RoutingSection 3
RoutingDate '12/2/2012'
id 2
ReqID 123456
RoutingSection 2
RoutingDate '12/3/2012'
id 3
ReqID 123456
RoutingSection 4
RoutingDate '12/4/2012'
ReqRoutingSections: -- 3 records
id 2
Supervision
id 3
Safety
id 4
Qaulity Control
The results of the query would be
ReqID = '123456'
RoutingSection = 'QualityControl' -- Last RoutingSection requisition was routed to
I was wondering if anyone can tell me if MongoDB or CouchDB are ready for a production environment.
I'm now looking at these storage solutions (I'm favouring MongoDB at the moment), however these projects are quite young and so I foresee that I'm going to have to work quite hard to convince my manager that we should adopt this new technology.
What I'd like to know is:
1) Who is using MongoDB or CouchDB today in a production environment?
2) How are you using MongoDB/CouchDB?
3) What problems (if any) did you come across when you adopted this new storage mechanism (and how did you overcome them)?
4) How did you deal with any migration issues that you had to deal with?
5) Do you have any good/bad experiences with either of these solutions that you'd like to share?
Thanks.
What's the story behind the ::'s sometimes token name
T_PAAMAYIM_NEKUDOTAYIM
I'm mainly interested in knowing if
This is an abbreviation for something else
This is a phrase in a language other than English, and if so what's the language and what's a rough translation
This is some obscure-to-me programming term
Drunk Developers
Thanks!
What I'm trying to do is create a layout like this:
+--------+
Search |EditText| [Button]
+--------+
+---------+
|Tab 1 |---------+
| |Tab 2 |
|---------+---------+-----------------+
| ListView Item 1 |
| ListView Item 2 |
| ListView Item 3 |
| ListView Item 4 |
| ListView Item 5 |
| ListView Item 6 |
| ListView Item 7 |
| ListView Item 8 |
| ListView Item 9 |
| ListView Item 10 |
+-------------------------------------+
So that's a TextView saying 'Search', an EditText and a button.
Then below it the tabs - Tab 1 has a ListView, Tab 2 some other stuff. I can get a simple TabHost setup with two tabs working fine but can't get the above to lay out properly. Any hints ?
I'd create the UI in the Eclipse designer and check the XML from that, except the designer doesn't work with TabHost. And DroidDraw doesn't seem to know about TabHost.
I'm working my way through the NotePad tutorial, and that's all fine - I'm not a Java programmer but it's close enough to C# (or vice versa) to make it easy to pick up. I'm surprised that there aren't any RAD tools for Android apart from Mobiforms. Is there anyone out there with experience of Mobiforms ?
Is there a place where I can add code that will be executed before unit initialization?
The reason I want to do this is I need to change the DecimalSeparator, this has to be done before the initialization of some units. I have put it in the project source, before Application.Initialize but it is too late by then.
As I see it the only choice I have is to put it in the initialization of the unit that needs the DecimalSeparator to be changed, is this the case?
Thanks in advance for any advice.
say I have the following code:
char[5][5] array;
for(int i =0; i < 5; ++i)
{
for(int j = 0; j < 5; ++i)
{
array[i][j] = 'X';
}
}
Would there be a benefit for initializing each row in this array in a separate thread?
Imagine instead of a 5 by 5 array, we have a 10 by 10?
n x n?
Also, this is done once, during application startup.
A bit of background. I would like to be able to process text for the line that the caret is on in a WPF RichTextBox. Please see my earlier question about the TextPointer class: http://stackoverflow.com/questions/3046162/how-to-keep-track-of-textpointer-in-wpf-richtextbox.
I know how to get the TextPointer at the start of the current line by using GetLineStartPosition with 0 as the argument but would now like to get the TextPointer at the end of the line. It was suggested in my previous question that this is possible using the GetLineStartPosition method.
I would appreciate it if someone can explain a bit about how the GetLineStartPosition works with regard to end of line pointers.
Thanks in advance for any help.
Hi,
I'm writing a light remoting app to assist in debugging a problem with remoting communication. This app mimics much of what a larger application does:
Periodically sends a heartbeat to
another peer application, and
periodically verifies that a heartbeat
has been received within some time
threshold.
What we're seeing is in our big application, the heartbeats seem to get dropped. One peer will go for long periods of time without seeing heartbeats from another peer, until the peer that is "dead" is restarted. The big application is responsive in all other ways. We believe it has something to do with the network setup. We were able to repro the problem locally, and fixed it by making some configuration changes to our test environment.
To help our customer diagnose the issue, the mini-remoting app needs to log as much information as possible.
So, is there a way to get the underlying socket for the remoting connection? I'm aware that I could write a custom sink for this, but I'd like to keep the actual remoting process as close to what is implemented in the big app as possible.
Also as an aside, any ideas why the big-app might be "dropping" heartbeats?
For a database I'm building, I've decided to use natural numbers as the primary key. I'm aware of the advantages that GUID's allow, but looking at the data, the bulk of row's data were GUID keys.
I want to generate XML records from the database data, and one problem with natural numbers is that I don't want to expose my database key's to the outside world, and allow users to guess "keys." I believe GUID's solve this problem.
So, I think the solution is to generate a sparse, unique iD derived from the natural ID (hopefully it would be 2-way), or just add an extra column in the database and store a guid (or some other multibyte id)
The derived value is nicer because there is no storage penalty, but it would be easier to reverse and guess compared to a GUID.
I'm (buy) curious as to what others on SO have done, and what insights they have.
We are doing a migration of our Sybase database that has a utf8 encoding to a server with iso 1 encoding. We are just using char and Varchar for our strings. Will doing backup and restore not truncate any strings? I was thinking that Char and Varchar are just single byte characters.