即时尝试使用以下配置发送电子邮件
主持人:smtp.office365.com
港口:587
用户:"myemail@domain.com"
传递:"mypassword"
我得到以下异常:
550 5.7.1客户端无权作为此发件人发送
我已经通过许多论坛,告诉我设置发送作为邮箱的权限,但我无法在oulook网络应用程序中找到任何这样的配置...或者我是否需要在其他地方配置它,如果它,那么在哪里..? ?? ....我只使用上面的配置发送邮件,并没有使用outlook网络应用程序进行任何配置...我需要在我的Outlook网络应用程序中更改和配置....
我需要将一个数字截断到2位小数,这基本上意味着要删除多余的数字.
例如:
2.919 -> 2.91
2.91111 -> 2.91
Run Code Online (Sandbox Code Playgroud)
为什么?这是SQL Server在存储多个特定精度时正在执行的操作.例如,如果列是十进制(8,2),并且您尝试插入/更新9.1234的数字,则将切断3和4.
我需要在c#代码中做同样的事情.
我能想到的唯一可能的方法是:
使用stringformatter将其"打印"出两个小数位,然后将其转换为小数,例如:
decimal tooManyDigits = 2.1345
decimal ShorterDigits = Convert.ToDecimal(tooManyDigits.ToString("0.##"));
// ShorterDigits is now 2.13
Run Code Online (Sandbox Code Playgroud)
我对此不满意,因为它涉及到一个字符串,然后是另一个字符串到十进制转换,这看起来有点疯狂.
使用Math.Truncate(只接受一个整数),所以我可以将它乘以100,截断它,然后除以100.例如:
decimal tooLongDecimal = 2.1235;
tooLongDecimal = Math.Truncate(tooLongDecimal * 100) / 100;
Run Code Online (Sandbox Code Playgroud)
我对此也不满意,因为如果tooLongDecimal为0,我将得到除以0的错误.
当然有更好的+更简单的方法!有什么建议?
import java.io.*;
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hpsf.DocumentSummaryInformation;
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.extractor.*;
import org.apache.poi.hwpf.usermodel.HeaderStories;
public class ReadDocFileInJava {
public static void main(String[] args)
{
/**This is the document that you want to read using Java.**/
String fileName = "C:\\Documents and Settings\\kushalp\\Desktop\\Test.doc";
/**Method call to read the document (demonstrate some useage of POI)**/
readMyDocument(fileName);
}
public static void readMyDocument(String fileName)
{
POIFSFileSystem fs = null;
try
{
fs = new POIFSFileSystem(new FileInputStream(fileName));
HWPFDocument doc = new HWPFDocument(fs);
/** Read the content **/
readParagraphs(doc); …
Run Code Online (Sandbox Code Playgroud) 所以我对工资单申请的最终查询是 -
如何为工资单应用程序创建设置?
我只需要知道 -
我已阅读下面的教程,但我没有得到真正的解决方案.
http://msdn.microsoft.com/en-us/library/vstudio/2kt85ked%28v=vs.100%29.aspx
我正在使用kendo ui的web包中的kendo ui菜单小部件.超链接存在问题,k按钮不能使用内部的超链接.
<button class="k-button">
<a href="http://localhost:5724/map.html">
<font color = 'black'>See All Centers
</a></font>
</button>
Run Code Online (Sandbox Code Playgroud)
该按钮甚至没有响应错误:它表现得好像没有附加按钮的超链接.
$(".Personalized").click(function(){
$.ajax({
type:"POST",
url:"personalized.php",
cache:false,
beforeSend: function(){
$('#loading_personalized').show();
$('#triangle-personalized').show();
},
complete: function(){
$('#loading_personalized').hide();
},
success: function(html){
$("#divPersonalized").html(html).show();
}
});
});
Run Code Online (Sandbox Code Playgroud)
当我点击个性化的类divPersoanlized出现,现在我想再次点击个性化隐藏它.我可以这样做...
class mythread implements Runnable {
Thread t1;
String name = "";
public mythread(String thname) {
name = thname;
t1= new Thread(this, name);
System.out.println(t1);
t1.start();
System.out.println(t1.getName());
}
@Override
public void run() {
for (int i=5;i>0;i--){
try {
System.out.println(Thread.currentThread());
System.out.println("child Thread" + i);
Thread.sleep(2000);
} catch(InterruptedException e){
System.out.println("Child Thread Interrupted");
}
}
}
}
public class Mainthread {
public static void main(String[] args) {
mythread m1 = new mythread("Rohan");
mythread m2 = new mythread("Jain");
try {
for(int i=5;i>0;i--){
System.out.println("Main Thread" + i); …
Run Code Online (Sandbox Code Playgroud) 我在c#中的应用程序是在工资管理系统...我想让每个员工的工作时间变量......对于这个我使用双...假设一名员工工作8小时20分钟..然后条目将在文本框中为8.20 ...所以我使用`将一个变量中的小数部分分开
var values = totaldays.ToString(CultureInfo.InvariantCulture).Split('.');
int firstno = int.Parse(values[0]);
int secondno = int.Parse(values[1]);`
Run Code Online (Sandbox Code Playgroud)
所以我准确地得到第一个变量,但如果十进制后的部分包含零,则它不存储在"secondno"变量中.零自动消除,8.20和8.2的结果相同,即8.2.
但由于时间不同,一个是8小时20分钟,另一个是8小时2分钟..我想要一些解决方案来做这个..请帮助我,因为我的整个应用程序依赖于此.
c# ×2
java ×2
apache-poi ×1
buildpath ×1
eclipse ×1
javascript ×1
jquery ×1
kendo-ui ×1
office365 ×1
ubuntu ×1