当前位置:  开发笔记 > 编程语言 > 正文

有关hadoop的问题"java.lang.RuntimeException:java.lang.ClassNotFoundException:"

如何解决《有关hadoop的问题"java.lang.RuntimeException:java.lang.ClassNotFoundException:"》经验,为你挑选了1个好方法。

这是我的源代码

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;

public class PageRank {

public static final String MAGIC_STRING = ">>>>";
boolean overwrite = true;

PageRank(boolean overwrite){
    this.overwrite = overwrite;
}
public static class TextPair implements WritableComparable{
    Text x;
    int ordering;

    public TextPair(){
        x = new Text();
        ordering = 1;
    }

    public void setText(Text t, int o){
        x = t;
        ordering = o;
    }

    public void setText(String t, int o){
        x.set(t);
        ordering = o;
    }


    public void readFields(DataInput in) throws IOException {
        x.readFields(in);
        ordering = in.readInt();
    }


    public void write(DataOutput out) throws IOException {
        x.write(out);
        out.writeInt(ordering);
    }


    public int hashCode() {
        return x.hashCode();
    }


    public int compareTo(TextPair o) {
        int x = this.x.compareTo(o.x);
        if(x==0)
            return ordering-o.ordering;
        else
            return x;
    }
}

public static class MapperA extends Mapper {

private Text word = new Text();
Text title = new Text();
Text link = new Text();
TextPair textpair = new TextPair();

boolean start=false;
String currentTitle="";
private Pattern linkPattern = Pattern.compile("\\[\\[\\s*(.+?)\\s*\\]\\]");
private Pattern titlePattern = Pattern.compile("\\s*(.+?)\\s*");
private Pattern pagePattern = Pattern.compile("<page>\\s*(.+?)\\s*</page>");


public void map(LongWritable key, Text value,  Context context) throws IOException, InterruptedException {
    String line = value.toString();
    int startPage=line.lastIndexOf("");  

    if(startPage<0)
    {           
        Matcher matcher = linkPattern.matcher(line);                
        int n = 0;
        title.set(currentTitle);
        while(matcher.find()){
            textpair.setText(matcher.group(1), 1);
            context.write(textpair, title);
        }
        link.set(MAGIC_STRING);     
        textpair.setText(title.toString(), 0);
        context.write(textpair, link);
    } 
    else
    {           
        String result=line.trim();
        Matcher titleMatcher = titlePattern.matcher(result);            
        if(titleMatcher.find()){
            currentTitle = titleMatcher.group(1);
        }
        else
        {
            currentTitle=result;
        }               
        }    
   }
    } 

   public static class ReducerA extends Reducer<TextPair, Text, Text, Text>{
    Text aw = new Text();
    boolean valid = false;
    String last = "";

    public void run(Context context) throws IOException, InterruptedException {
        setup(context);
        while (context.nextKeyValue()) {
            TextPair key = context.getCurrentKey();
            Text value = context.getCurrentValue();
            if(key.ordering==0){
                last = key.x.toString();
            }
            else if(key.x.toString().equals(last)){
                context.write(key.x, value);
            }
        }
        cleanup(context);
         }
               }

  public static class MapperB extends Mapper<Text, Text, Text, Text>{
Text t = new Text();        
public void map(Text key, Text value, Context context) throws InterruptedException, IOException{
    context.write(value, key);
}
 }

   public static class ReducerB extends Reducer<Text, Text, Text, PageRankRecord>{
    ArrayList<String> q = new ArrayList<String>();

    public void reduce(Text key, Iterable<Text> values, Context context)throws InterruptedException, IOException{
        q.clear();
        for(Text value:values){
            q.add(value.toString());
        }

        PageRankRecord prr = new PageRankRecord();
        prr.setPageRank(1.0);

        if(q.size()>0){
            String[] a = new String[q.size()];
            q.toArray(a);

            prr.setlinks(a);
        }
        context.write(key, prr);
    }
}

public boolean roundA(Configuration conf, String inputPath, String outputPath, boolean overwrite) throws IOException, InterruptedException, ClassNotFoundException{
    if(FileSystem.get(conf).exists(new Path(outputPath))){
        if(overwrite){
            FileSystem.get(conf).delete(new Path(outputPath), true);
            System.err.println("The target file is dirty, overwriting!");
        }
        else
            return true;
    }

    Job job = new Job(conf, "closure graph build round A");

    //job.setJarByClass(GraphBuilder.class);
    job.setMapperClass(MapperA.class);
    //job.setCombinerClass(RankCombiner.class);
    job.setReducerClass(ReducerA.class);

    job.setMapOutputKeyClass(TextPair.class);
    job.setMapOutputValueClass(Text.class);

    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(Text.class);

    job.setOutputFormatClass(SequenceFileOutputFormat.class);

    job.setNumReduceTasks(30);

    FileInputFormat.addInputPath(job, new Path(inputPath));
    SequenceFileOutputFormat.setOutputPath(job, new Path(outputPath));
    return job.waitForCompletion(true);
}

public boolean roundB(Configuration conf, String inputPath, String outputPath) throws IOException, InterruptedException, ClassNotFoundException{
    if(FileSystem.get(conf).exists(new Path(outputPath))){
        if(overwrite){
            FileSystem.get(conf).delete(new Path(outputPath), true);
            System.err.println("The target file is dirty, overwriting!");
        }
        else
            return true;
    }

    Job job = new Job(conf, "closure graph build round B");

    //job.setJarByClass(PageRank.class);
    job.setMapperClass(MapperB.class);
    //job.setCombinerClass(RankCombiner.class);
    job.setReducerClass(ReducerB.class);

    job.setMapOutputKeyClass(Text.class);
    job.setMapOutputValueClass(Text.class);

    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(PageRankRecord.class);

    job.setInputFormatClass(SequenceFileInputFormat.class);
    job.setOutputFormatClass(SequenceFileOutputFormat.class);

    job.setNumReduceTasks(30);

    SequenceFileInputFormat.addInputPath(job, new Path(inputPath));
    SequenceFileOutputFormat.setOutputPath(job, new Path(outputPath));
    return job.waitForCompletion(true);
}

public boolean build(Configuration conf, String inputPath, String outputPath) throws IOException, InterruptedException, ClassNotFoundException{

    System.err.println(inputPath);
    if(roundA(conf, inputPath, "cgb", true)){           
        return roundB(conf, "cgb", outputPath);
    }
    else
        return false;
}   

public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException{
    Configuration conf = new Configuration();       
            //PageRanking.banner("ClosureGraphBuilder");
    PageRank cgb = new PageRank(true);
    cgb.build(conf, args[0], args[1]);
}


 }
</pre>

<p>这是我编译和运行的方式</p>

<pre class="brush:bash;">javac -classpath hadoop-0.20.1-core.jar -d pagerank_classes PageRank.java PageRankRecord.java

jar -cvf pagerank.jar -C pagerank_classes/ .

bin/hadoop jar pagerank.jar PageRank pagerank result
</pre>

<p>但我收到以下错误:</p>

<pre class="brush:bash;"> INFO mapred.JobClient: Task Id : attempt_201001012025_0009_m_000001_0, Status : FAILED
java.lang.RuntimeException: java.lang.ClassNotFoundException: PageRank$MapperA
</pre>

<p>谁能告诉我什么是错的</p>

<p>谢谢</p><br><br><b>1> Sami A. Haij..:</b><hr><p>如果您使用的是0.2.0 hadoop(想要使用未弃用的类),您可以:</p>

<pre class="brush:bash;">public int run(String[] args) throws Exception {
    Job job = new Job();
    job.setJarByClass(YourMapReduceClass.class);  // <-- omitting this causes above error

    job.setMapperClass(MyMapper.class);
    FileInputFormat.setInputPaths(job, new Path(args[0]));
    FileOutputFormat.setOutputPath(job, new Path(args[1]));
    job.waitForCompletion(true);
    return 0;
}
</pre></p>
            </div>

    <div class="article_ab" style="width: 720px;height: 100px;margin: 0 auto;margin-top: 15px;">

    </div>

    <div class="article_recommend">
        <div class="list_top">推荐阅读</div>
        <div class="ListItems">
            <ul class="NewsList">
                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/C--11_RuHeZai_at_e4c6498a.html" target="_blank" title="C++ 11如何在atomic :: store和atomic :: load中观察内存顺序">C++ 11如何在atomic :: store和atomic :: load中观察内存顺序</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《C++11如何在atomic::store和atomic::load中观察内存顺序》经验,为你挑选了0个好方法。 ...
                        <a href="https://devbox.cn/p/C--11_RuHeZai_at_e4c6498a.html" target="_blank" title="C++ 11如何在atomic :: store和atomic :: load中观察内存顺序">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Zai_flavor_Zhong_d03a74e6.html" target="_blank" title="在flavor中使用不同的applicationID时的数据绑定错误">在flavor中使用不同的applicationID时的数据绑定错误</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《在flavor中使用不同的applicationID时的数据绑定错误》经验,为你挑选了0个好方法。 ...
                        <a href="https://devbox.cn/p/Zai_flavor_Zhong_d03a74e6.html" target="_blank" title="在flavor中使用不同的applicationID时的数据绑定错误">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Swift_SanYuanYun_1d3b58ac.html" target="_blank" title="Swift三元运算符函数调用?">Swift三元运算符函数调用?</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《Swift三元运算符函数调用?》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/Swift_SanYuanYun_1d3b58ac.html" target="_blank" title="Swift三元运算符函数调用?">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Zai_Symfony2-8_H_77181800.html" target="_blank" title="在Symfony 2.8和3.0中找不到资产">在Symfony 2.8和3.0中找不到资产</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《在Symfony2.8和3.0中找不到资产》经验,为你挑选了2个好方法。 ...
                        <a href="https://devbox.cn/p/Zai_Symfony2-8_H_77181800.html" target="_blank" title="在Symfony 2.8和3.0中找不到资产">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Zai_R-studio_Zho_43398b33.html" target="_blank" title="在R-studio中使用Git:无法修改代码文件">在R-studio中使用Git:无法修改代码文件</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《在R-studio中使用Git:无法修改代码文件》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/Zai_R-studio_Zho_43398b33.html" target="_blank" title="在R-studio中使用Git:无法修改代码文件">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Zai_Meteor_DeYiG_322a8c8b.html" target="_blank" title="在Meteor的一个函数中使用.find().fetch()">在Meteor的一个函数中使用.find().fetch()</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《在Meteor的一个函数中使用.find().fetch()》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/Zai_Meteor_DeYiG_322a8c8b.html" target="_blank" title="在Meteor的一个函数中使用.find().fetch()">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/WeiBoHuoDe_Synta_9d66518d.html" target="_blank" title="未捕获的SyntaxError:nodejs中的意外标记<">未捕获的SyntaxError:nodejs中的意外标记<</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《未捕获的SyntaxError:nodejs中的意外标记<》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/WeiBoHuoDe_Synta_9d66518d.html" target="_blank" title="未捕获的SyntaxError:nodejs中的意外标记<">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/RuHeZai_Makefile_35f4e5d1.html" target="_blank" title="如何在Makefile中创建模式规则依赖项可选?">如何在Makefile中创建模式规则依赖项可选?</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《如何在Makefile中创建模式规则依赖项可选?》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/RuHeZai_Makefile_35f4e5d1.html" target="_blank" title="如何在Makefile中创建模式规则依赖项可选?">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/WeiMeiGeChuLiQiX_c1b54213.html" target="_blank" title="为每个处理器虚拟机设置最佳处理器/核心数(VMware)">为每个处理器虚拟机设置最佳处理器/核心数(VMware)</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《为每个处理器虚拟机设置最佳处理器/核心数(VMware)》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/WeiMeiGeChuLiQiX_c1b54213.html" target="_blank" title="为每个处理器虚拟机设置最佳处理器/核心数(VMware)">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/RuHeHuoQuJuYouJi_cdfc8dbd.html" target="_blank" title="如何获取具有继承宽度的元素的宽度?">如何获取具有继承宽度的元素的宽度?</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《如何获取具有继承宽度的元素的宽度?》经验,为你挑选了0个好方法。 ...
                        <a href="https://devbox.cn/p/RuHeHuoQuJuYouJi_cdfc8dbd.html" target="_blank" title="如何获取具有继承宽度的元素的宽度?">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/android-hardware_e6c1345f.html" target="_blank" title="android.hardware.Camera $ EventHandler.handleMessage">android.hardware.Camera $ EventHandler.handleMessage</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《android.hardware.Camera$EventHandler.handleMessage》经验,为你挑选了2个好方法。 ...
                        <a href="https://devbox.cn/p/android-hardware_e6c1345f.html" target="_blank" title="android.hardware.Camera $ EventHandler.handleMessage">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Google_DiTuDeKua_b4765610.html" target="_blank" title="Google地图的宽度和高度">Google地图的宽度和高度</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《Google地图的宽度和高度》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/Google_DiTuDeKua_b4765610.html" target="_blank" title="Google地图的宽度和高度">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/DaiYou_Gradle_He_755fde33.html" target="_blank" title="带有Gradle和Webpack的Spring Boot">带有Gradle和Webpack的Spring Boot</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《带有Gradle和Webpack的SpringBoot》经验,为你挑选了0个好方法。 ...
                        <a href="https://devbox.cn/p/DaiYou_Gradle_He_755fde33.html" target="_blank" title="带有Gradle和Webpack的Spring Boot">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/Tableview_ShouXi_cb2400a7.html" target="_blank" title="Tableview首先重用单元格并显示错误数据">Tableview首先重用单元格并显示错误数据</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《Tableview首先重用单元格并显示错误数据》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/Tableview_ShouXi_cb2400a7.html" target="_blank" title="Tableview首先重用单元格并显示错误数据">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/ChuangJianYiXiLi_8ca97420.html" target="_blank" title="创建一系列不同长度的序列">创建一系列不同长度的序列</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《创建一系列不同长度的序列》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/ChuangJianYiXiLi_8ca97420.html" target="_blank" title="创建一系列不同长度的序列">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/KuaiSuPingGuDaLi_243b671c.html" target="_blank" title="快速评估大量输入值的数学表达式(函数)">快速评估大量输入值的数学表达式(函数)</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《快速评估大量输入值的数学表达式(函数)》经验,为你挑选了0个好方法。 ...
                        <a href="https://devbox.cn/p/KuaiSuPingGuDaLi_243b671c.html" target="_blank" title="快速评估大量输入值的数学表达式(函数)">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/BaoZhuangShiYong_94dee8b1.html" target="_blank" title="包装使用基于事件的异步模式的库,用于Async/Await">包装使用基于事件的异步模式的库,用于Async/Await</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《包装使用基于事件的异步模式的库,用于Async/Await》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/BaoZhuangShiYong_94dee8b1.html" target="_blank" title="包装使用基于事件的异步模式的库,用于Async/Await">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/YouMeiYouBanFaJi_1382b726.html" target="_blank" title="有没有办法简单地将JSON数组值转换为javascript中的字符串">有没有办法简单地将JSON数组值转换为javascript中的字符串</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《有没有办法简单地将JSON数组值转换为javascript中的字符串》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/YouMeiYouBanFaJi_1382b726.html" target="_blank" title="有没有办法简单地将JSON数组值转换为javascript中的字符串">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/x-_BangDingSheJi_27fdc79b.html" target="_blank" title="x:绑定设计时间问题">x:绑定设计时间问题</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《x:绑定设计时间问题》经验,为你挑选了0个好方法。 ...
                        <a href="https://devbox.cn/p/x-_BangDingSheJi_27fdc79b.html" target="_blank" title="x:绑定设计时间问题">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                                <li>
                    <div class="NewTitle">
                        <a class="cat" href="/tag/程序员" title="程序员" target="_blank">程序员<i></i></a>
                        <h2><a href="https://devbox.cn/p/RuHeZai_chocolat_d2ea9aca.html" target="_blank" title="如何在chocolatey'.config'文件中使用自定义参数?">如何在chocolatey'.config'文件中使用自定义参数?</a></h2>
                    </div>

                    <div class="NewsInfo">
                                                <div class="NewsDesc" >
                        如何解决《如何在chocolatey'.config'文件中使用自定义参数?》经验,为你挑选了1个好方法。 ...
                        <a href="https://devbox.cn/p/RuHeZai_chocolat_d2ea9aca.html" target="_blank" title="如何在chocolatey'.config'文件中使用自定义参数?">[详细]</a>
                    </div>
                    <div style="clear:both"></div>

                </li>


                

            </ul>
        </div>
    </div>

    <div class="article_cmnt" style="display: none;">
        <div class="cmnt_title">吐了个 "CAO" !</div>
        <form action="" method="post">
            <div class="cmnt_text">
                <textarea class="ping-txt" onfocus="ck_txt(this);" onblur="ck_txt2(this);" id="ping-txt" name="ping-txt" >吐个槽吧,看都看了</textarea>
            </div>
            <div class="cmnt_cmt">
                <div class="cmnt_login_box">
                                        <a href="https://www.php1.cn/?s=user/login/index&from=">会员登录</a> | <a href="http://www.php1.cn/?s=user/reg/index">用户注册</a>
                                    </div>
                <div class="post_cmnt"><input type="button" value="吐  槽" onclick="post_ping();" /></div>
            </div>
        </form>

        
    </div>
</div>

<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushBash.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushCpp.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushCSharp.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushCss.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushDelphi.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushDiff.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushGroovy.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushJava.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushPhp.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushPlain.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushPython.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushRuby.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushScala.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushSql.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushVb.js"></script>
<script type="text/javascript" src="/style/SyntaxHighlighter/scripts/shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" href="/style/SyntaxHighlighter/styles/shCore.css"/>
<link type="text/css" rel="stylesheet" href="/style/SyntaxHighlighter/styles/shThemeLiuQing.css"/>
<style>
    .syntaxhighlighter{
        width: 740px;
        padding-top:40px;padding-bottom:20px;
        border: 1px solid #333;
        background: url("/style/SyntaxHighlighter/top_bg.svg");
        background-size: 43px;
        background-repeat: no-repeat;
        margin-bottom: -7px;
        border-radius: 15px;
        background-position: 16px 12px;
        padding-left: 10px;
    }
    .gutter{
        display: none;
    }
</style>
<script type="text/javascript">
    SyntaxHighlighter.all();
</script>    <div class="article_right">

    <div class="profile">
        <div class="author">
            <!-- 未登录 -->
            <div class="author-avatar">
                <a href="/u/yiran_-_henxingfu">
                    <img src="https://img.devbox.cn/3cdc5/64c2/cd5/f53c066002fa970f.png" class="lazy-img" data-url="" alt="devbox">
                </a>
            </div>

            <div class="author-name">
                依然-狠幸福            </div>

            <div class="author-intro">
                这个屌丝很懒,什么也没留下!            </div>
            
            <div class="author-bt">

                                <a href="javascript:;" id="follow_bt" onclick="follow();" class="skins-btn" title="关注作者">
                    <svg class="icon" style="width: 15px;height: 15px;margin-top:-3px;margin-right:5px;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1428"><path d="M1024 409.6H614.4V0H409.6v409.6H0v204.8h409.6v409.6h204.8V614.4h409.6z" fill="#ffffff" p-id="1429"></path></svg>
                    关注作者</a>
                            </div>

        </div>
    </div>


    <div class="tools">
        <div class="tools_top">Tags | 热门标签</div>
        <div class="tools_box">
            <ul>
                                <li>
                    <a href="/tag/actionscrip" target="_blank" title="actionscrip">actionscrip</a>
                </li>
                                <li>
                    <a href="/tag/bash" target="_blank" title="bash">bash</a>
                </li>
                                <li>
                    <a href="/tag/c#" target="_blank" title="c#">c#</a>
                </li>
                                <li>
                    <a href="/tag/c++" target="_blank" title="c++">c++</a>
                </li>
                                <li>
                    <a href="/tag/c语言" target="_blank" title="c语言">c语言</a>
                </li>
                                <li>
                    <a href="/tag/erlang" target="_blank" title="erlang">erlang</a>
                </li>
                                <li>
                    <a href="/tag/flutter" target="_blank" title="flutter">flutter</a>
                </li>
                                <li>
                    <a href="/tag/go" target="_blank" title="go">go</a>
                </li>
                                <li>
                    <a href="/tag/golang" target="_blank" title="golang">golang</a>
                </li>
                                <li>
                    <a href="/tag/java" target="_blank" title="java">java</a>
                </li>
                                <li>
                    <a href="/tag/javascript" target="_blank" title="javascript">javascript</a>
                </li>
                                <li>
                    <a href="/tag/lua" target="_blank" title="lua">lua</a>
                </li>
                                <li>
                    <a href="/tag/node.js" target="_blank" title="node.js">node.js</a>
                </li>
                                <li>
                    <a href="/tag/perl" target="_blank" title="perl">perl</a>
                </li>
                                <li>
                    <a href="/tag/php" target="_blank" title="php">php</a>
                </li>
                                <li>
                    <a href="/tag/python" target="_blank" title="python">python</a>
                </li>
                                <li>
                    <a href="/tag/scala" target="_blank" title="scala">scala</a>
                </li>
                                <li>
                    <a href="/tag/typescript" target="_blank" title="typescript">typescript</a>
                </li>
                                <div style="clear: both"></div>
            </ul>
        </div>
    </div>


    <div class="rank">
        <div class="rank_top">RankList | 热门文章</div>
        <div class="rank_box">
            <ul>
                                <li>
                    <b >1</b><a href="https://devbox.cn/p/SparkSQL-_ShiYon_f7310d6d.html" title="Spark SQL  - 使用SQL语句而不是表名来使用JDBC加载数据" target="_blank">Spark SQL  - 使用SQL语句而不是表名来使用JDBC加载数据</a>
                </li>
                                <li>
                    <b >2</b><a href="https://devbox.cn/p/ShiYong_AMPHTML__190e188f.html" title="使用AMP HTML搜索可能吗?" target="_blank">使用AMP HTML搜索可能吗?</a>
                </li>
                                <li>
                    <b >3</b><a href="https://devbox.cn/p/CongShuZuZhongSh_af1ca68a.html" title="从数组中删除对象 - 两种不同的方法,在查询每个数组的长度时有两种不同的结果" target="_blank">从数组中删除对象 - 两种不同的方法,在查询每个数组的长度时有两种不同的结果</a>
                </li>
                                <li>
                    <b >4</b><a href="https://devbox.cn/p/RuHeZaiHuiTuDeWe_89e1cbd1.html" title="如何在绘图的文本注释(ggplot2)中放置+/-加减运算符?" target="_blank">如何在绘图的文本注释(ggplot2)中放置+/-加减运算符?</a>
                </li>
                                <li>
                    <b >5</b><a href="https://devbox.cn/p/VisualStudio_Sou_c4a02e8d.html" title="Visual Studio搜索和替换行结尾" target="_blank">Visual Studio搜索和替换行结尾</a>
                </li>
                                <li>
                    <b class="black">6</b><a href="https://devbox.cn/p/Silverstripe3-2__4d1e4355.html" title="Silverstripe 3.2可重复使用的块" target="_blank">Silverstripe 3.2可重复使用的块</a>
                </li>
                                <li>
                    <b class="black">7</b><a href="https://devbox.cn/p/JiShiZaiDaKuoHao_b8652e91.html" title="即使在大括号中也显示strace中的完整参数" target="_blank">即使在大括号中也显示strace中的完整参数</a>
                </li>
                                <li>
                    <b class="black">8</b><a href="https://devbox.cn/p/YouMeiYouBanFaZa_97fe31ca.html" title="有没有办法在这里省略特征的生命周期?" target="_blank">有没有办法在这里省略特征的生命周期?</a>
                </li>
                                <li>
                    <b class="black">9</b><a href="https://devbox.cn/p/YiBu_-_DengDaiBu_ffef58eb.html" title="异步/等待不等待" target="_blank">异步/等待不等待</a>
                </li>
                                <li>
                    <b class="black">10</b><a href="https://devbox.cn/p/CSS_LeiHuiFuWeiF_813a42f9.html" title="CSS类恢复为非活动状态" target="_blank">CSS类恢复为非活动状态</a>
                </li>
                                <li>
                    <b class="black">11</b><a href="https://devbox.cn/p/RuHeFanHuiBian_L_748d697e.html" title="如何反汇编LLVM MCJIT编译的结果?" target="_blank">如何反汇编LLVM MCJIT编译的结果?</a>
                </li>
                                <li>
                    <b class="black">12</b><a href="https://devbox.cn/p/Elasticsearch_Ji_317d990c.html" title="Elasticsearch集群配置未发现单播和多播下的任何节点" target="_blank">Elasticsearch集群配置未发现单播和多播下的任何节点</a>
                </li>
                                <li>
                    <b class="black">13</b><a href="https://devbox.cn/p/YouMeiYouLiYouBu_f4eb6bbf.html" title="有没有理由不使用lombok与android studio" target="_blank">有没有理由不使用lombok与android studio</a>
                </li>
                                <li>
                    <b class="black">14</b><a href="https://devbox.cn/p/YunXing_gulp_BuC_2e860e27.html" title="运行gulp不产生任何输出" target="_blank">运行gulp不产生任何输出</a>
                </li>
                                <li>
                    <b class="black">15</b><a href="https://devbox.cn/p/Pythontkinterrow_77519d67.html" title="Python tkinter rowspan没有正确调整元素大小" target="_blank">Python tkinter rowspan没有正确调整元素大小</a>
                </li>
                                <li>
                    <b class="black">16</b><a href="https://devbox.cn/p/_SecTrustEvaluat_27cebe3e.html" title="_SecTrustEvaluate链接错误与Google Cardboard Unity3d SDK" target="_blank">_SecTrustEvaluate链接错误与Google Cardboard Unity3d SDK</a>
                </li>
                                <li>
                    <b class="black">17</b><a href="https://devbox.cn/p/ShiYong_picture-_39109816.html" title="使用picture,source和srcset时如何检查加载了哪个src?(img.src为空)" target="_blank">使用picture,source和srcset时如何检查加载了哪个src?(img.src为空)</a>
                </li>
                                <li>
                    <b class="black">18</b><a href="https://devbox.cn/p/RuHeZai_R_ZhongZ_1612c20a.html" title="如何在R中转换角色中的任何对象?" target="_blank">如何在R中转换角色中的任何对象?</a>
                </li>
                                <li>
                    <b class="black">19</b><a href="https://devbox.cn/p/std--bind_ShiFou_05caa59e.html" title="std :: bind是否在C++ 11中丢弃了参数的类型信息?" target="_blank">std :: bind是否在C++ 11中丢弃了参数的类型信息?</a>
                </li>
                                <li>
                    <b class="black">20</b><a href="https://devbox.cn/p/RuHeZai_vim_Zhon_6b3af898.html" title="如何在vim中默认设置行号?" target="_blank">如何在vim中默认设置行号?</a>
                </li>
                            </ul>
        </div>
    </div>


</div>    <div style="clear: both;"></div>
</div>

<script type="application/javascript">

    function follow(uid) {

        var myDate = new Date();
        $.get("/user/follow/post?uid="+uid+"&stime="+myDate.getMilliseconds(),null,function(response){
            if(response=="1"){
                tips('关注成功!')
                $("#follow_bt").html('<svg class="icon" style="width: 15px;height: 15px;margin-top:-3px;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1912"><path d="M984.554971 729.818319L757.2752 1001.934666c-23.431608 29.784785-63.349596 27.462118-91.084969 0l-148.309102-117.727323a34.156864 34.156864 0 0 1 34.156863-59.159688L711.732715 956.392181l224.524451-274.871667a34.156864 34.156864 0 1 1 48.297805 48.297805zM506.791534 592.052303c-6.284863 6.968-12.569726 0-22.771243 0-171.103115 0-386.928951 164.066802-386.928951 358.396584 0 18.740733-15.347817 33.951922-34.316262 33.951922a34.156864 34.156864 0 0 1-34.361805-33.951922c0-160.582801 134.122618-342.616113 323.283329-400.181814C261.271998 499.783228 210.765382 406.011252 210.765382 296.026151 210.765382 133.530566 342.428706 0 506.791534 0s296.026151 133.530566 296.026151 296.026151c0 161.630279-132.892971 294.614334-296.026151 296.026152z m0-523.738576c-126.243768 0-227.712424 102.903244-227.712424 227.712424s101.468656 227.712424 227.712424 227.712424 227.712424-102.903244 227.712424-227.712424S633.035302 68.313727 506.791534 68.313727z" p-id="1913"></path></svg>\n'
                    +"已关注")
            }else if(response=="0"){
                tips('已取消关注!')
                $("#follow_bt").html('<svg class="icon" style="width: 15px;height: 15px;margin-top:-3px;margin-right:5px;vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1428"><path d="M1024 409.6H614.4V0H409.6v409.6H0v204.8h409.6v409.6h204.8V614.4h409.6z" fill="#ffffff" p-id="1429"></path></svg>\n' +
                    "关注作者")
            }else if(response=="-2"){
                tips("请先登录!")
            }else{
                tips("关注失败!")
            }
        });
        
    }

    function like(sid) {

        var myDate = new Date();
        $.get("/blog/article/like?sid="+sid+"&stime="+myDate.getMilliseconds(),null,function(response){
            if(response!="-1"){
                $("#like_num").html(response+"赞")
            }else{
                tips("关注失败!")
            }
        });

    }

</script>


<div class="bottom-bar">
    DevBox开发工具箱 | 专业的在线开发工具网站    <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802040832" style="color:#444;"><img src="https://img.json1.cn/3cd4a/21981/c5a/4df0b47476da9030.png"/>京公网安备 11010802040832号</a>  |  <a href="https://beian.miit.gov.cn/" target="_blank" >京ICP备19059560号-6</a> <BR />
    Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved  devBox.cn 开发工具箱  版权所有 <BR />
</div></body>
</html>