Posts

javamail - how to build a mail server in java -

Greetings Everyone has an app with me (Spring + hibernate), which needs to send thousands of emails at once and I It was told that the best solution here is a mail server, I have no idea where to start or if there is any structure or service better, please give me some information from where to start, thanks. You do not create a mail server to send email to you to access the mail server (SMTP server) To use the JavaMail API.

linker - centos: linking lib that doesn't have a .pc file for pkg-config -

I'm trying to compile svg2pdf on centos. I think I have been successful in getting the dependencies established using the required yum: sudo yum install librsvg2 sudo yum install cairo in Makefile Includes: MYCFLAGS = 'pkg-config - cflags librsvg-2.0 caro-PDF' -Wall-Wpointer-arith-legal-prototype -demission-prototype -demption-announcements-contained-extensions After typing the hard-line 'Make', the first two lines of output are: cc `pkg-config -cflags librsvg-2.0 caro-pdf '-Wall-Wpointer-arith- Video prototype -Vimosing-prototype -demption-announcements -different-externs -fno-strict-aliasing` pkg-config -libs librsvg-2.0 cairo-pdf` svg2pdf.c -o svg2pdf package librsvg-2.0 pkg-config not found in the search path Was there. You might add the directory to the PKG_ CONFIG_PATH environment variable with 'librsvg-2.0.pc'. No package found 'librsvg-2.0' There is no librsvg-2.0.pc on this system ( But when I installed it using my Mac...

xml rpc - Gravatar XML-RPC request problem in Objective-C -

I'm writing in an iPhone app trying to incorporate some Gravatar functionality into my XML-RPC API I caught the Coco XML-RPC framework by Eric Sejari () and when I tested it with some WordPress methods it works well, however, when I try to use the Gravatar API, I'm always " Error code: -9 copy of "authentication error" Get simple. I think I am making a proper request, but I am spoiling my mind and I am not able to understand it. Perhaps someone has some experience with this API or I can see what I'm doing wrong. Here's the call: & lt ;? Xml version = "1.0" & gt; & Lt; MethodCall & gt; & Lt; MethodName & gt; Grav.addresses & lt; / MethodName & gt; & Lt; Parameter & gt; & Lt; Param & gt; & Lt; Value & gt; & Lt; String & gt; PASSWORD_HERE & lt; / String & gt; & Lt; / Value & gt; & Lt; / Param & gt; & Lt; / Parameters & gt; & Lt; / MethodCall ...

Getting file extension in C language -

Say that the file is named 12345.jpg. In C, how can I get the file extension so that I can compare it to some file extensions? If there is any inbuilt functions, please let me know. A function to do this, together with a test harness: #include & lt; Stdio.h & gt; #include & lt; String.h & gt; Const char * getExt (const char * fspec) {char * e = strrchr (fspec, '.'); If (E == faucet) E = ""; // fast method, can use more (FSPEC [Stellen (FSPEC)]). Return e; } Int main (int argc, char * argv []) {int i; For (i = 1; i & lt; argc; i ++) {printf ("[% s] -> [% s] \ n", argv [i], getExt (argv [i])); } Return 0; } is running with: ./program abc abc. Abc.1 .xyz abc.def abc.def.ghi gives you: [abc] - & gt; [] [ABC.] - & gt; [.] [ABC.1] - & gt; [.1] [.xyz] - & gt; [.xyz] [abc.def] - & gt; [.def] [abc.def.ghi] - & gt; [.ghi]

wpf - Bank angle from up vector and look at vector? -

I think that although I know the formula for calculating the angle of the bank (roll) above and see It can not be assumed that this angle should be measured in the plan normally for the vector it takes. Any indication is appreciated that FII is using WPF. I have posted, which is the same problem, but only expressed using mathematics. This is the last code to determine the bank Note that I want to determine the angle signal Required: // Vector 3D ViProject = New Vector 3D for Vertical Plan on Project Y (- (Direction Y * See Direction.x), 1 - (LookDirection.Y * LookDirection.Y), - (lookDirection.Y * lookDirection.Z)); Yproj.Normalize (); // Get the full angle between the projected Y and the double Apangal = Vector3D.AngleBetween (upDirection, Yproj); // magic formula Vector3D cross = Vector3D.CrossProduct (upDirection, Yproj); Double dot = vector 3D Dot product (see direction, cross); // Actual signed angle BDeg = set (dot> = 0)? AbsAngle: -absAngle;

jquery - How to serialize entire XML document into JavaScript array? -

I have an HTML document that loads an XML document using jQuery jquery.ajax {type: "gET", url: example.xml, etc ... When that XML loads, I will copy the entire XML document to a JavaScript array I want to sort in How do I do this? something like that? jQuery.ajax ({type: "GET", url: "example.xml", success: function (data) {var results = []; // this bit on your XML structure Depending on it, you get the idea $ (data) .find ('your_element'). Each (function () {results.push ($ (this)}}}}}}}})

proxy - Java abstract visitor - guarantueed to succeed? If so, why? -

post I was working with hibernate, using the visitor method, run-time class behind proxy instances by this address Trying to apply I then came with a abstract welcome approach, but I wonder if this will always give the right results. Consider The following code: interface look (public void accept (Visitor v);} interface Visitor {public void Visit (Visitor visual host);} abstract class essence implements Visitable {@Override public void accept (visitor v) {v.visit (this);}} class Kankritvijet Aebstivetiv (public static void main) (string [] expand Arges) (last Vijitla visual = new Kankritvijetibl) Last Rshniy proxyVisitable = (city) Proxy.newProxyInstance (Thread.currentThread () getContextClassLoader (), a new class of & lt ;? & Gt; [] {Visitable.class}, New InvocationHandler () {@Override public Object invoke (Object proxy , method, object [] Arges) throws Throniy (return Methodkinvoke (visits, Arges);}}); proxyVisitable.accept (new comer () {public void visit (lo...