w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

Postfix - status=bounced (unknown user "myuser")
you have added mydestination = mydomain.com and so the valid users for mydomain.com will be searched in local_recipient_maps. It is very clear from the logline that local delivery agent is selected to deliver the mail, as local domain class matched. See postfix address classes for more help Modify your main.cf like below #/etc/postfix/main.cf mydestination = # set to localhost localhost.$mydomain or remove mydomain.com for now # Ensure that postmap -q mydomain.com mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf is returning mydomain.com and # postmap -q myuser@mydomain.com mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf succeeds

Categories : Linux

HAProxy Comodo SSL
It sounds like you need to install your certificate chain. Comodo (and most other CA's) will have a chain that must be followed by the browser. In your cert file just add the intermediate and root ca certs in addition to your actual cert. My file looks like this: -----BEGIN MY CERTIFICATE----- -----END MY CERTIFICATE----- -----BEGIN INTERMEDIATE CERTIFICATE----- -----END INTERMEDIATE CERTIFICATE----- -----BEGIN INTERMEDIATE CERTIFICATE----- -----END INTERMEDIATE CERTIFICATE----- -----BEGIN ROOT CERTIFICATE----- -----END ROOT CERTIFICATE----- -----BEGIN RSA PRIVATE KEY----- -----END RSA PRIVATE KEY-----

Categories : Ssl

how to get the Root certificates and intermediate certificates for android SSL
Do you mean you will be using a self signed or self issued certificate on the public facing server? (Neither of which I would recommend) If you really want to try and do that then: a self signed certificate sign's itself (it is its own CA) a self issued certificate on windows for example use the mmc certificates tool, you can download the public part of any certificates in the trust chain (but then you'd need to get them on to a device for them to be useful and something owners of the devices would not like since I would bet you do not have proper key management in place). A potentially better way would be to use a properly issued certificate for your production site which would allow you to validate the hostname and trust chain correctly. But for your local dev builds have it igno

Categories : Android

Comodo internet security detect c++ hello world program as a viruses (trojan)
I faced the same problem. Since I know there is no virus in the programs, I excluded my dev c++ folder and program file folders from antivirus software. Steps in comodo antivirus is: 1.Open CIS 2.click Tasks in upper right corner 3.click Advanced tasks 4.select open advanced settings 5.Expand security settings 6.Expand antivirus 7.click Exclusions 8.Click on the arrow or right click anywhere on the screen. 9.select Add->folders 10.Add the dev c++ folders and program files folder in the list. 11.You have excluded the files Now run your program, will surely get the output without any virus.

Categories : C++

JPA on many to many and authority list
You're using CascadeType.ALL which enables insertion. Change your CascadeType to your needs like CascadeType.REFRESH or CascadeType.REMOVE etc. Simple explanation of each Cascade options: http://www.objectdb.com/api/java/jpa/CascadeType

Categories : Java

Spring Security - How to know if Sid is a principal or authority
You could do this: if (acl.getEntries().get(j).getSid() instanceof GrantedAuthoritySid) { GrantedAuthoritySid sid = (GrantedAuthoritySid) acl.getEntries().get(j).getSid(); // it's role } else { PrincipalSid sid = (PrincipalSid) acl.getEntries().get(j).getSid(); // it's user }

Categories : Spring

Programmatically Create Template in Certificate Authority
try the export/import APIs http://blogs.technet.com/b/pki/archive/2009/09/26/introducing-certificate-template-api.aspx?Redirected=true a7la Jaafar

Categories : C#

Spring is returning proper authority/role
I have solved the issue changing target URL <security:form-login login-page="/krams/auth/login" authentication-failure-url="/krams/auth/login?error=true" default-target-url="/krams/main/test"/>

Categories : Spring

A Hadoop DataNode error: host:port authority
I am not sure if it would help, but check this page To quote from there, Even thought I configured the core-site.xml, mapred-site.xml & hdfs-site.xml under /usr/local/hadoop/conf/ folder, by default the system is referring to /etc/hadoop/ *.xml. Once I update the configuration files in /etc/hadoop location everything started working.

Categories : Hadoop

Proper way to determine required authority in spring security access denied handler
I ended up creating a custom access decision manager, similar to the AffirmativeBased access decision manager: public class ConfigAttributesIncludedInExceptionAffirmativeBasedAccessDecisionManager extends AbstractAccessDecisionManager The code within is the same as the AffirmativeBased code (small class anyway) and instead of throwing an AccessDeniedException, I throw a custom AccessDeniedException. throw new AccessDeniedExceptionWithConfigAttributes(messages.getMessage("AbstractAccessDecisionManager.accessDenied", "Access is denied"), configAttributes); The custom access denied exception simply extends the AccessDeniedException class and has a property called configAttributes. public class AccessDeniedExceptionWithConfigAttributes extends AccessDeniedException { private static fina

Categories : Java

"The certificate chain was issued by an authority that is not trusted" when connecting DB in VM Role from Azure website
You likely don't have a CA signed certiticate installed in your SQL VM's trusted root store. If you have Encrypt=True in the connection string, either set that to off (not recommended), or add the following in the connection string: TrustServerCertificate=True SQL Server will create a self-signed certificate if you don't install one for it to use, but it won't be trusted by the caller since it's not CA-signed, unless you tell the connection string to trust any server cert by default. Long term, I'd recommend purchasing a CA signed certificate from a known trusted CA (fairly inexpensive), and install it on the VM. You can read more on this topic in SQL Server books online under the topic of "Encryption Hierarchy", and "Using Encryption Without Validation". HTH

Categories : Misc

Error: Unknown symbols found":" Unknown property type filter, even when everything seems working
filter is non-standard property only for IE, so I guess NetBeans is picking on that wrong syntax and firing an error. Maybe you just need to update your NetBeans as it is a fixed bug: https://netbeans.org/bugzilla/show_bug.cgi?id=168406

Categories : CSS

Web App: Gathering unknown amount of data from user an unknown number of times
Do you mean something like this http://www.labs.mimmin.com/inlineedit/ http://dev.iceburg.net/jquery/tableEditor/example_new.php I found it on google by using 'jquery inline editable table' I know Yii has a nice admin interface specifically fast input, but I sense you wrote the code yourself, transferring to Yii might be a bigger challenge that solving this in a nice way. good luck

Categories : PHP

java.lang.IllegalArgumentException: Illegal character in authority at index 7 while making https request
You have a space at index 7 of your string LOGIN_URL and it is causing the exception. It should be like this. LOGIN_URL = "http://10.0.2.2:80/webservice/login.php"

Categories : Java

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' when accessing sql server from a wcf service with impersonation
The error that you are getting is likely because the IIS Application Pool that your web application is using is running under an account that doesn't have SQL Server privileges. Change the Application Pool Account to one that can access SQL Server and the problem should go away.

Categories : Asp Net

C# retrieve data from database - unknown datatype and unknown column name
You can use reader.GetSchemaTable() to get a table of the schema of the data reader or reader.GetType(n) or reader.GetProviderSpecificType(n) to get the datatype of a particular field. You can then use that information to decide which method to call: if (reader.GetType(n) == typeof(string)) { string value = reader.GetString(n); }

Categories : C#

Notice: Unknown: Skipping numeric key 1 in Unknown on line 0
The PHP session storage mechanism was originally built around "registering" variables, so the keys in $_SESSION must be names that could be treated as variables in their own right. This means that $_SESSION[42] is invalid, because $42 wouldn't be a valid variable name, and since $foo[42] and $foo['42'] refer to the same thing, $_SESSION['42'] is invalid as well. The solution is either to use a prefix on your session variables (e.g. $_SESSION['row_count_' . $x] = $row['Count'];) or make them into an array, which you can then loop over etc later (e.g. $_SESSION['row_counts'] = array(); ... $_SESSION['row_counts'][$x] = $row['Count'];) Note: this limitation is actually part of the "serialization handler" used when writing the session to disk, which is why the errors have no context (they'

Categories : PHP

unknown character / unknown token, json string
This smells like you've got a BOM in the front. Save PHP files without BOM and that should do it. :) See as well: UTF-8 BOM signature in PHP files

Categories : PHP

Javascript audio not working in Firefox (x-unknown/unknown)
Hmm. Based upon my experience with the JS Audio elements, you're missing a line. var audio = new Audio('tune.wav'); audio.load(); audio.play(); I don't think that's causing the error though. Based upon the responses to this question: Firefox won't play .WAV files using the HTML5 <audio> tag? and the back-and-forth in this forum: https://bugzilla.mozilla.org/show_bug.cgi?id=524109 (comment 7) It looks like Firefox simply doesn't support 24-bit WAVE files. 16-bit is probably a safer option.

Categories : Javascript

Exception: conversion from UNKNOWN to UNKNOWN is unsupported
The problem was that sql server is not happy to save a serialization (as done when implementing externalizable). .setObject() fails. The solution is to use setBinaryStream(). // Sql Server can't do an stmt.setObject(4,o) "Conversion from UNKNOWN to UNKNOWN not supported" // Serialize the object to an output stream and then read it in again into the stmt. Object o = ri.getReportModule(); ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutputStream objectOutput = new ObjectOutputStream(bos); objectOutput.writeObject(o); objectOutput.flush(); InputStream objectInput = new ByteArrayInputStream(bos.toByteArray()); stmt.setBinaryStream(4, objectInput); Cheers Christian

Categories : Sql Server

Use of $ in postfix expression
In this case, I am certain the operator is exponentiation. 8 3 4 + - 3 8 2 / + * 2 $ 3 + is: 8 3 4 + - = 1 3 8 2 / + = 7 1 7 * = 7 7 2 $ = 49 49 3 + = 52. Or maybe 7 2 $ = 128 128 3 + = 131. Depends on how your instructor defined the operator.

Categories : Database

Send mail using php and postfix
PHP runs on the server. onClick executes Javascript on the CLIENT machine. You can NOT directly invoke PHP functions via Javascript code, or vice versa. What you're doing can be accomplished with a simple form: <?php if ($_SERVER["REQUEST_METHOD"] == 'POST') { $to = $_POST['to']; $text = $_POST['text']; mail($to, .....); } ?> <form method="POST" action=""> <input type="text" name="to" /> <input type="text" name="text" /> <input type="submit" /> </form> There is no need to use Javascript at all.

Categories : PHP

alias_maps in postfix like GMail does
Postfix and virtualmin both support alias "like" gmail with simple config. Just go to "System Information > Postfix Mail Server > General Options" (http(s)://<yourserver>:<vitualminport>/postfix/general.cgi). Search for "Separator usernames / address extensions" field (press ctl+f and type "address extensions", for quick search) and fill it with "+". Alternatively you can edit /etc/main.cf and place a line like recipient_delimiter = +

Categories : Email

PHP force transport into PostFix
Take a look at php.ini file /etc/php5/apache2/php.ini on debian: [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com Uncomment sendmail_from: and set it to your needs. Make sure you do: service apache2 restart or service httpd restart to change take effect. Hope it helps, Mirko

Categories : PHP

It's possible to read email using ID on Postfix?
Try to grep /var/log/mail.log.1, /var/log/mail.log.2, etc files too. But if the email was not bounced via postfix there are no way to recover it. By default postfix keeps emails in undeliverable state (i.e bounced) within 5 days (parameter maximal_queue_lifetime).

Categories : Email

Postfix with ip address instead domain name
As far as I know there is no way to make postfix send mail to the Internet without FQDN. It can be set up to exchange mail between local users, though, but that's obvoiusly won't help you. The reason behind it is quite simple: vast majority of the mail servers are verifying peer's identity on SMTP connection using reverse DNS lookup. If your IP has no nice DNS name assigned, then your mail is quite likely to be considered a spam. So even you will manage to bypass FQDN requrement your recipients still may not receive your mails. It can be even dangerous, as your IP may get stuck into spam lists after that. I see two options for your here: Wait for the correct domain name to be associated with your IP Or use mailbox on an established public service like gmail or hotmail to send mails from

Categories : PHP

Emails with same domain does not go out from postfix
Check the settings in your /etc/postfix/main.cf file, specifically the setting for virtual_mailbox_domains. If your domain is in this line, but another server is the MX for your domain, then this would explain the problem - i.e. the postfix server thinks it's handling incoming mail for your domain, but the MX records say otherwise.

Categories : Email

Postfix statistics of each user, how do?
Try using postfix-logwatch # Sample Usage perl postfix-logwatch --nosummary --nodetail --limit envelopesenderdomains='2 1:10: 2:8:' /var/log/maillog # Command says Give 2 level output in which give top ten domains in level one( 1:10:) and top 8 users in each domain ie. level two ( 2:8: ) ****** Detail (2) ********************************************************************************** 72488 Envelope sender domains ----------------------------------------------------------------- 14055 intranet.domain1.com 6912 domain1-owner 1203 owner 486 cmowner 370 sysaduser 219 cowner 185 towner 175 autoowner 167 cpanel-owner ... 8867 live.com 8867

Categories : Linux

Overloading postfix operator ++
Non-member overloads also use a dummy int parameter to distinguish them: friend void operator++(Number&); // prefix friend void operator++(Number&, int); // postfix Note that some people might expect these to emulate the behaviour of the built-in operator by returning, respectively, the new and old values: Number& operator++(Number& fst) { fst.number=fst.number+1; return fst; // reference to new value } Number operator++(Number& fst, int) { Number old = fst; ++fst; return old; // copy of old value }

Categories : C++

operator++ postfix is not declared
If vec1 and vec2 are vectors, they don't have increment operators. They're containers. You need to use iterators to traverse them. Something like: auto it1 = vec1.cbegin(), it2 = vec2.cbegin(); while ( prefix_length < 3 and it1!=vec1.cend() and it2!=vec2.cend() and equal(*it1++, *it2++) ) ++prefix_length;

Categories : C++

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=unknown state: unknown protocol
The problem appears to be that your target site, aristo4stu3.bgu.ac.il, is picky about SSL/TLS handshaking. I got two different results with the following OpenSSL command with different versions of OpenSSL: openssl s_client -connect aristo4stu3.bgu.ac.il:443 This does connect with the stock OpenSSL 0.9.8x on OS X 10.7.5. However, it does not connect using OpenSSL 1.0.1e - in that case the server just closes the connection (by sending a Close Notify alert) immediately after receiving the Client Hello. I captured packets with Wireshark, and the difference between what these two versions send is that 0.9.8x is sending an SSLv2 Client Hello advertising support through TLS 1.0, while 1.0.1e is sending a TLSv1 Client Hello advertising support through TLS 1.2. If I tell 1.0.1e not to use T

Categories : Ruby On Rails

Certificates - .cer + .pfx
A pfx file is a keystore, which is a container that holds private keys, public keys, and certificates. It can also be password protected, as it is in this case to protect the private key. The certificate file contains a public key that is bound to an identity and signed. It looks like the app wants the certificate in one file and the private key in another file. It is possible to have both in the pfx, but in this case, the app is looking for 2 different entries. It's not uncommon to have a separate certificate file, since you can give that out freely to others, so they can verify your signatures (created from your private key), or use it to encrypt a message that only your private key can decrypt. In this scenario, you would never give out the pfx file containing the private key, but

Categories : Security

Text Scanning to read in unknown number of variables and unknown number of runs
For any given file, are all the lines equal length? If they are, you could start by reading in the first line and use that to count the number of fields and then use textscan to read in the file. fID = fopen(strcat(pwd,'/',inputFile),'rt'); firstLine = fgetl(fID); numFields = length(strfind(firstLine,' ')) + 1; fclose(fID); formatString = repmat('%s',1,numFields); fID = fopen(strcat(pwd,'/',inputFile),'rt'); vars = textscan(fID, formatString,' '); fclose(fID); Now you will have a cell array where first entry are the var names and all the other entries are the observations. In this case I assumed the delimiter was space even though you said it was a csv file. If it is really commas, you can change the code accordingly.

Categories : Matlab

ubuntu 12 postfix smtpd authentication
I deployed postfix the previous week, so I'm new in this area but as I can see in the logs you provided first you get the warning: postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known which means that you have to add 127.0.0.1 spotCUST.spot.net in your /etc/hosts. The next steps are to configure Postfix to use SASL for SMTP AUTH. Make sure that you have installed the modules: sudo apt-get install libsasl2-2 libsasl2-modules Then edit /etc/default/saslauthd in order to activate saslauthd. Remove # in front of START=yes, add the PWDIR, PARAMS, and PIDFILE lines and edit the OPTIONS line at the end: # This needs to be uncommented before saslauthd will be run automatically START=yes PWDIR="/var/spool/postfix/var/run/

Categories : Email

EC2 Postfix custom email domain
The problem is solved by using the domain name generic mapping. http://www.postfix.org/ADDRESS_REWRITING_README.html#generic The above link describes how to do it. But it is a temporary solution that replaces the lengthy internal domain (ip-xxx-xxx-xx-xxxx.us-west-2.compute.internal) by mydomain.com for every OUTGOING email. For local email, the system still uses the lengthy internal domain name (ip-xxx-xxx-xx-xxxx.us-west-2.compute.internal) The problem is: postfix seems to have bypassed the $mydomain, $myorigin, $myhost variable I set in the /etc/main.cf file. If anyone can solve it, I will greatly appreciate it. Harry

Categories : Amazon

Infix to Postfix Converter with parenthesis
Thre are two minor bugs in the code. First, you are skipping the last character in the expression - which, as it turns out, is a right parenthesis: while(infix.length() > 1){ //should be infix.length() > 0 // .... } Second, your code used 'x' as the multiplication operator, while your expression uses '*'.

Categories : Java

creating tree from postfix expression
You have a local array of mynode pointers, stored in stack: mynode *temp,*stack[100]; These are all uninitialized. You assign temp->right and temp->left each one of the uninitialized mynode *'s, temp->right=stack[--k]; temp->left=stack[--k]; Then you try to dereference the uninitialized pointer's to get to the data element. //printf("%c %c ",temp->left->data,temp->right->data); That's why your code dies.

Categories : C

Why it the F postfix needed here to avoid an error?
Because floating point numbers are by default of type double. To make it a float you append an F. You are getting error in the below assignment: float f = 3.4028235E38; because a double as more precision than a float. So, there is a possible loss of precision. I would have expected just the opposite as floating point literals are by default double and should be more precise. Let's check the binary representation of your number till double precision: 0x47EFFFFFE54DAFF8 = 01000111 11101111 11111111 11111111 11100101 01001101 10101111 11111000 Now since float is a single precision 32-bit floating point value. It can't store all the double values, which are double precision 64-bit floating point values.

Categories : Java

Prefix and postfix operators necessity
POSTFIX and PREFIX are not the same. POSTFIX increments/decrements only after the current statement/instruction is over. Whereas PREFIX increments/decrements and then executes the current step. Example, To run a loop n times, while(n--) { } works perfectly. But, while(--n) { } will run only n-1 times Or for example: x = n--; different then x = --n; (in second form value of x and n will be same). Off-course we can do same thing with binary operator - in multiple steps. Point is suppose if there is only post -- then we have to write x = --n in two steps. There can be other better reasons, But this is one I suppose a benefit to keep both prefix and postfix operator.

Categories : C



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.