lwuit.html.CSSEngine.applyStyleToUIElement 的 NullPointerException(来源未知)

2023-12-29

我正在执行以下 LinkedIn 登录过程,但不幸的是,在加载 LinkedIn 登录窗口时,“授予 Yokeapp 访问您的 LinkedIn 帐户的权限”
它没有显示任何内容并引发错误。

我在 Eclipse pulsar 中使用 LWuit-1.5 版本,并安装了 S60 SDk 5th。

public class Login {
   Form form = new Form();
            String authorizeUrl = "";
            public Form Login() {
                Display.init(this);
                HttpRequestHandler  handler = new HttpRequestHandler();
                HTMLComponent htmlC = new HTMLComponent(handler);
                user = new LinkedInUser(Const.consumerKey, Const.consumerSecret);
                user.fetchNewRequestToken();

                if (user.requestToken != null) {
                    authorizeUrl = "https://www.linkedin.com/uas/oauth/authorize?oauth_token="
                                        + user.requestToken.getToken();

                    htmlC.setPage(authorizeUrl);
                    FlowLayout flow = new FlowLayout(Component.TOP);
                    form.setLayout(flow);
                    form.addComponent(htmlC);            
                }

                return form;
            }
        }

我在我的 MIDlet 类 startApp() 中按以下方式调用此方法

Login login=new Login();
login.Login().show();

我收到以下错误

     Uncaught exception!                               
     java.lang.NullPointerException
            at com.sun.lwuit.html.CSSEngine.applyStyleToUIElement(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyStyle(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.checkSelector(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.CSSEngine.applyCSS(Unknown Source)
            at com.sun.lwuit.html.HTMLComponent.applyAllCSS(Unknown Source)
            at com.sun.lwuit.html.ResourceThreadQueue.threadFinished(Unknown Source)
            at com.sun.lwuit.html.ResourceThreadQueue$ResourceThread.streamReady(Unknown Source)
            at com.sun.lwuit.html.ResourceThreadQueue$ResourceThread.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
        -VM verbose connection exited

HttpRequestHandler文件代码是

 /*
     *  Copyright � 2008, 2010, Oracle and/or its affiliates. All rights reserved
     */
    package com.yoke.symbian;

    import com.sun.lwuit.html.DocumentInfo;
    import com.sun.lwuit.html.DocumentRequestHandler;
    import com.yoke.helper.Storage;

    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.Vector;
    import javax.microedition.io.Connector;
    import javax.microedition.io.HttpConnection;

        /**
         * An implementation of DocumentRequestHandler that handles fetching HTML documents both from HTTP and from the JAR.
         * This request handler takes care of cookies, redirects and handles both GET and POST requests
         *
         * @author Ofir Leitner
         */
        public class HttpRequestHandler implements DocumentRequestHandler {

            //Hashtable connections = new Hashtable();
            /**
             * A hastable containing all cookies - the table keys are domain names, while the value is another hashtbale containing a pair of cookie name and value.
             */
            static Hashtable cookies = Storage.getCookies();

            /**
             * A hastable containing all history - the table keys are domain names, while the value is a vector containing the visited links.
             */
            static Hashtable visitedLinks = Storage.getHistory();

            /**
             * If true will cache HTML pages, this also means that they will be buffered and read fully and only then passed to HTMLComponent - this can have memory implications.
             * Also note that for the cached HTMLs to be written Storage.RMS_ENABLED[TYPE_CACHE] should be true
             */
            static boolean CACHE_HTML=false;

            /**
             * If true will cache images, this also means that they will be buffered and read fully and only then passed to HTMLComponent - this can have memory implications.
             * Also note that for the cached images to be written Storage.RMS_ENABLED[TYPE_CACHE] should be true
             */
            static boolean CACHE_IMAGES=true;

            /**
             * If true will cache CSS files, this also means that they will be buffered and read fully and only then passed to HTMLComponent - this can have memory implications.
             * Also note that for the cached CSS files to be written Storage.RMS_ENABLED[TYPE_CACHE] should be true
             */
            static boolean CACHE_CSS=false;

            /**
             * Returns the domain string we use to identify visited link.
             * Note that this may be different than the domain name returned by HttpConnection.getHost
             * 
             * @param url The link URL
             * @return The link's domain
             */
            static String getDomainForLinks(String url) {
                String domain=null;
                if (url.startsWith("file:")) {
                    return "localhost"; // Just a common name to store local files under
                } 
                int index=-1;
                if (url.startsWith("http://")) {
                    index=7;
                } else if (url.startsWith("https://")) {
                    index=8;
                }
                if (index!=-1) {
                    domain=url.substring(index);
                    index=domain.indexOf('/');
                    if (index!=-1) {
                        domain=domain.substring(0,index);
                    }
                }
                return domain;
            }

            /**
             * {@inheritDoc}
             */
            public InputStream resourceRequested(DocumentInfo docInfo) {
                InputStream is=null;
                String url=docInfo.getUrl();

                String linkDomain=getDomainForLinks(url);

                // Visited links
                if (docInfo.getExpectedContentType()==DocumentInfo.TYPE_HTML) { // Only mark base documents as visited links

                    if (linkDomain!=null) {
                        Vector hostVisitedLinks=(Vector)visitedLinks.get(linkDomain);
                        if (hostVisitedLinks==null) {
                            hostVisitedLinks=new Vector();
                            visitedLinks.put(linkDomain,hostVisitedLinks);
                        }
                        if (!hostVisitedLinks.contains(url)) {
                            hostVisitedLinks.addElement(url);
                            Storage.addHistory(linkDomain, url);
                        }
                    } else {
                        System.out.println("Link domain null for "+url);
                    }
                } 

                String params=docInfo.getParams();
                if ((!docInfo.isPostRequest()) && (params !=null) && (!params.equals(""))) {
                    url=url+"?"+params;
                }

                // See if page/image is in the cache
                // caching will be used only if there are no parameters and no cookies (Since if they are this is probably dynamic content)
                boolean useCache=false;
                if (((docInfo.getExpectedContentType()==DocumentInfo.TYPE_HTML) && (CACHE_HTML) && ((params==null) || (params.equals(""))) && (!cookiesExistForDomain(linkDomain) )) ||
                    ((docInfo.getExpectedContentType()==DocumentInfo.TYPE_IMAGE) && (CACHE_IMAGES)) ||
                    ((docInfo.getExpectedContentType()==DocumentInfo.TYPE_CSS) && (CACHE_CSS)))
                {
                    useCache=true;
                    InputStream imageIS=Storage.getResourcefromCache(url);
                    if (imageIS!=null) {
                        return imageIS;
                    }
                }

                // Handle the file protocol
                if (url.startsWith("file://")) {
                    return getFileStream(docInfo);
                }

                try {
                    HttpConnection hc = (HttpConnection)Connector.open(url);
                    String encoding=null;
                    if (docInfo.isPostRequest()) {
                        encoding="application/x-www-form-urlencoded";
                    }
                    if (!docInfo.getEncoding().equals(DocumentInfo.ENCODING_ISO)) {
                        encoding=docInfo.getEncoding();
                    }
                    //hc.setRequestProperty("Accept_Language","en-US");

                    //String domain=hc.getHost(); // sub.domain.com / sub.domain.co.il
                    String domain=linkDomain; // will return one of the following formats: sub.domain.com / sub.domain.co.il

                    sendCookies(domain, hc);
                    domain=domain.substring(domain.indexOf('.')); // .domain.com / .domain.co.il
                    if (domain.indexOf('.',1)!=-1) { // Make sure that we didn't get just .com - TODO - however note that if the domain was domain.co.il - it can be here .co.il
                        sendCookies(domain, hc);
                    }

                    if (encoding!=null) {
                       hc.setRequestProperty("Content-Type", encoding);
                    }

                    if (docInfo.isPostRequest()) {
                       hc.setRequestMethod(HttpConnection.POST);
                       if (params==null) {
                           params="";
                       }
                       byte[] paramBuf=params.getBytes();
                       hc.setRequestProperty("Content-Length", ""+paramBuf.length);
                       OutputStream os=hc.openOutputStream();
                       os.write(paramBuf);
                       os.close();

                       //os.flush(); // flush is said to be problematic in some devices, uncomment if it is necessary for your device
                    }

                    String contentTypeStr=hc.getHeaderField("content-type");
                    if (contentTypeStr!=null) {
                        contentTypeStr=contentTypeStr.toLowerCase();
                        if (docInfo.getExpectedContentType()==DocumentInfo.TYPE_HTML) { //We perform these checks only for text (i.e. main page), for images/css we just send what the server sends 

        and "hope for the best"
                                if (contentTypeStr!=null) {
                                    if ((contentTypeStr.startsWith("text/")) || (contentTypeStr.startsWith("application/xhtml")) || (contentTypeStr.startsWith("application/vnd.wap"))) {
                                        docInfo.setExpectedContentType(DocumentInfo.TYPE_HTML);
                                    } else if (contentTypeStr.startsWith("image/")) {
                                        docInfo.setExpectedContentType(DocumentInfo.TYPE_IMAGE);
                                        hc.close();
                                        return getStream("<img src=\""+url+"\">",null);
                                    } else {
                                        hc.close();
                                        return getStream("Content type "+contentTypeStr+" is not supported.","Error");
                                    }
                                }
                            }

                            if ((docInfo.getExpectedContentType()==DocumentInfo.TYPE_HTML) ||
                                (docInfo.getExpectedContentType()==DocumentInfo.TYPE_CSS)) { // Charset is relevant for HTML and CSS only
                                int charsetIndex = contentTypeStr.indexOf("charset=");
                                if (charsetIndex!=-1) {
                                    String charset=contentTypeStr.substring(charsetIndex+8);
                                    docInfo.setEncoding(charset.trim());
                //                    if ((charset.startsWith("utf-8")) || (charset.startsWith("utf8"))) { //startwith to allow trailing white spaces
                //                        docInfo.setEncoding(DocumentInfo.ENCODING_UTF8);
                //                    }
                                }

                            }
                        }

                        int i=0;
                        while (hc.getHeaderFieldKey(i)!=null) {
                            if (hc.getHeaderFieldKey(i).equalsIgnoreCase("set-cookie")) {
                                addCookie(hc.getHeaderField(i), url);
                            }


                            i++;
                        }

                        int response=hc.getResponseCode();
                        if (response/100==3) { // 30x code is redirect
                            String newURL=hc.getHeaderField("Location");
                            if (newURL!=null) {
                                hc.close();
                                docInfo.setUrl(newURL);
                                if ((response==302) || (response==303)) { // The "302 Found" and "303 See Other" change the request method to GET
                                    docInfo.setPostRequest(false);
                                    docInfo.setParams(null); //reset params
                                }
                                return resourceRequested(docInfo);
                            }
                        }
                        is = hc.openInputStream();

                        if (useCache) {
                            byte[] buf=getBuffer(is);
                            Storage.addResourceToCache(url, buf,false);
                            ByteArrayInputStream bais=new ByteArrayInputStream(buf);
                            is.close();
                            hc.close(); //all the data is in the buffer
                            return bais;
                        }

                    } catch (SecurityException e) {
                        return getStream("Network access was disallowed for this session. Only local and cached pages can be viewed.<br><br> To browse external sites please exit the application and when asked for network access allow it.", "Security error");
                    } catch (IOException e) {
                        System.out.println("HttpRequestHandler->IOException: "+e.getMessage());
                        return getStream("The page could not be loaded due to an I/O error.", "Error");
                    } catch (IllegalArgumentException e) { // For malformed URL
                        System.out.println("HttpRequestHandler->IllegalArgumentException: "+e.getMessage());
                        return getStream("The requested URL is not valid.", "Malformed URL");
                    }

                    return is;

                }

                /**
                 * Checks if there are cookies stored on the client for the specified domain
                 *
                 * @param domain The domain to check for cookies
                 * @return true if cookies for the specified domain exists, false otherwise
                 */
                private boolean cookiesExistForDomain(String domain) {
                    Object obj=cookies.get(domain);
                    //System.out.println("Cookies for domain "+domain+": "+obj);
                    if (obj==null) {
                        int index=domain.indexOf('.');
                        if (index!=-1) {
                            domain=domain.substring(index); // .domain.com / .domain.co.il
                            if (domain.indexOf('.',1)!=-1) { // Make sure that we didn't get just .com - TODO - however note that if the domain was domain.co.il - it can be here .co.il
                                obj=cookies.get(domain);
                                //System.out.println("Cookies for domain "+domain+": "+obj);
                            }
                        }

                    }

                    return (obj!=null);
                }

                /**
                 * Sends the avaiable cookies for the given domain
                 * 
                 * @param domain The cookies domain
                 * @param hc The HTTPConnection
                 * @throws IOException
                 */
                private void sendCookies(String domain,HttpConnection hc) throws IOException {
                    //System.out.println("Sending cookies for "+domain);
                    Hashtable hostCookies=(Hashtable)cookies.get(domain);
                    String cookieStr="";
                    if (hostCookies!=null) {
                        for (Enumeration e=hostCookies.keys();e.hasMoreElements();) {
                            String name = (String)e.nextElement();
                            String value = (String)hostCookies.get(name);
                            String cookie=name+"="+value;
                            if (cookieStr.length()!=0) {
                                cookieStr+="; ";
                            }
                            cookieStr+=cookie;
                        }
                    }

                    if (cookieStr.length()!=0) {
                        //System.out.println("Cookies for domain "+domain+": "+cookieStr);
                        hc.setRequestProperty("cookie", cookieStr);
                    }

                }

                /**
                 * Returns an Inputstream of the specified HTML text
                 *
                 * @param htmlText The text to get the stream from
                 * @param title The page's title
                 * @return an Inputstream of the specified HTML text
                 */
                private InputStream getStream(String htmlText,String title) {
                    String titleStr="";
                    if (title!=null) {
                        titleStr="<head><title>"+title+"</title></head>";
                    }
                    htmlText="<html>"+titleStr+"<body>"+htmlText+"</body></html>";
                    ByteArrayInputStream bais = new ByteArrayInputStream(htmlText.getBytes());
                    return bais;

                }

                /**
                 * Adds the given cookie to the cookie collection
                 * 
                 * @param setCookie The cookie to add
                 * @param hc The HttpConnection
                 */
                private void addCookie(String setCookie,String url/*HttpConnection hc*/) {
                    //System.out.println("Adding cookie: "+setCookie);
                    String urlDomain=getDomainForLinks(url);

                    // Determine cookie domain
                    String domain=null;
                    int index=setCookie.indexOf("domain=");
                    if (index!=-1) {
                        domain=setCookie.substring(index+7);
                        index=domain.indexOf(';');
                        if (index!=-1) {
                            domain=domain.substring(0, index);
                        }

                        if (!urlDomain.endsWith(domain)) { //if (!hc.getHost().endsWith(domain)) {
                            System.out.println("Warning: Cookie tried to set to another domain");
                            domain=null;
                        }
                    }
                    if (domain==null) {
                        domain=urlDomain; //domain=hc.getHost();
                    }

                    // Check cookie expiry
                    boolean save=false;
                    index=setCookie.indexOf("expires=");
                    if (index!=-1) { // Cookies without the expires= property are valid only for the current session and as such are not saved to RMS
                        String expire=setCookie.substring(index+8);
                        index=expire.indexOf(';');
                        if (index!=-1) {
                            expire=expire.substring(0, index);
                        }
                        save=true;
                    }

                    // Get cookie name and value
                    index=setCookie.indexOf(';');
                    if (index!=-1) {
                        setCookie=setCookie.substring(0, index);
                    }
                    index=setCookie.indexOf('=');
                    String name=setCookie;
                    String value="";
                    if (index!=-1) {
                        name=setCookie.substring(0, index);
                        value=setCookie.substring(index+1);
                    }

                    Hashtable hostCookies=(Hashtable)cookies.get(domain);
                    if (hostCookies==null) {
                        hostCookies=new Hashtable();
                        cookies.put(domain,hostCookies);
                    }
                    hostCookies.put(name,value);

                    if (save) { // Note that we save all cookies with expiry specified, while not checking the specific expiry date
                        Storage.addCookie(domain, name, value);
                    }

                }

                /**
                 * This method is used when the requested document is a file in the JAR
                 *
                 * @param url The URL of the file
                 * @return An InputStream of the specified file
                 */
                private InputStream getFileStream(DocumentInfo docInfo) {
                    String url=docInfo.getUrl();

                    // If a from was submitted on a local file, just display the parameters
                    if ((docInfo.getParams()!=null) && (!docInfo.getParams().equals(""))) {
                        String method="GET";
                        if (docInfo.isPostRequest()) {
                            method="POST";
                        }
                        String params=docInfo.getParams();
                        String newParams="";
                        if (params!=null) {
                            for(int i=0;i<params.length();i++) {
                                char c=params.charAt(i);
                                if (c=='&') {
                                    newParams+=", ";
                                } else {
                                    newParams+=c;
                                }
                            }
                        }
                        return getStream("<h2>Form submitted locally.</h2><b>Method:</b> "+method+"<br><br><b>Parameters:</b><br>"+newParams+"<hr><a href=\""+docInfo.getUrl()+"\">Continue to local URL</a>","Form Results");
                    }

                    url=url.substring(7); // Cut the file://

                    int hash=url.indexOf('#'); //trim anchors
                    if (hash!=-1) {
                       url=url.substring(0,hash);
                    }

                    int param=url.indexOf('?'); //trim parameters, not relvant for files
                    if (param!=-1) {
                        url=url.substring(0, param);
                    }

                    // Use the following commented segment for loading HTML files saved with the UTF8 header added by some utils - 0xEF, 0xBB, 0xBF
                    // This is a simple code to skip automatically 3 chars on a certain file suffix (.htm isntead of .html)
                    // A better solution is to detect these bytes, but that requires buffering of the stream (to "unread" if these are not the right chars)
                    /*
                    if (url.endsWith(".htm")) {
                        System.out.println("Notepad UTF - Skipping 3 chars");
                        docInfo.setEncoding(DocumentInfo.ENCODING_UTF8); 
                        // If the UTF8 encoding string doesn't work on your device, try the following instead of the line above:
                        //docInfo.setEncoding("UTF-8");
                        InputStream is= getClass().getResourceAsStream(url);
                        try {
                            is.read();
                            is.read();
                            is.read();
                            return is; 
                        } catch (IOException ex) {
                            ex.printStackTrace();
                        }
                    }
                     */

                    return getClass().getResourceAsStream(url);
                }

                /**
                 * Reads an inputstream completely and places it into a buffer
                 * 
                 * @param is The InputStream to read
                 * @return A buffer containing the stream's contents
                 * @throws IOException
                 */
                static byte[] getBuffer(InputStream is) throws IOException {
                        int chunk = 50000;
                        byte[] buf = new byte[chunk];
                        int i=0;
                        int b = is.read();
                        while (b!=-1) {
                            if (i>=buf.length) {
                                byte[] tempbuf=new byte[buf.length+chunk];
                                for (int j=0;j<buf.length;j++) {
                                    tempbuf[j]=buf[j];
                                }
                                buf=tempbuf;
                            }
                            buf[i]=(byte)b;
                            i++;
                            b = is.read();
                        }
                        byte[] tempbuf=new byte[i];
                        for (int j=0;j<tempbuf.length;j++) {
                            tempbuf[j]=buf[j];

LWUIT 中有许多与 OAuth 相关的错误,我们已修复代号一 http://www.codenameone.com/。不幸的是,有太多问题,我很难判断您正在触发哪一个,但是您可以查看我们的问题跟踪器,看看是否可以找到特定的问题。我们仍然有一些是开放的,但 OAuth 的效果要好得多。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

lwuit.html.CSSEngine.applyStyleToUIElement 的 NullPointerException(来源未知) 的相关文章

随机推荐

  • 如何在 NextJS 中从 /api 创建文件?

    我目前正在尝试创建一个临时文件 api sendEmail js with fs mkdirSync fs mkdirSync path join dirname public 但在 Vercel 部署平台 上 所有文件夹都是只读的 我无法
  • JavaFx-14 resizeColumnToFitContent 方法

    JavaFx 14 将此方法放在 TableColumnHeader 中 而不是放在 Skin 中 如何从 TableColumn 和 TableView 中找到 TableColumnHeader 不知道你是否还需要这个 但如果其他人感兴
  • 使用高斯混合模型和 scikit learn 进行多类分类

    我正在尝试使用sklearn mixture GaussianMixture用于高光谱图像中的像素分类 有 15 个班级 1 15 我尝试使用该方法http scikit learn org stable auto examples mix
  • 如何为使用“create-react-app CLI”创建的现有React应用程序生成bundle.js

    这个问题与this https stackoverflow com questions 46564182 how to convert a react app to phonegap app所以帖子 我在用着create react app
  • BindingExpression 的源发生更改时发出通知?

    测试场景 我有一个带有 DependencyProperty A 的控件 我有一个带有属性 A 的 ViewModel 我使用 OneWayToSource 绑定将其绑定到控件的 A 属性 绑定由控件显式更新 我在运行时切换了绑定的 Vie
  • UICollectionView 的每个部分独立滚动?

    是否可以使用UICollectionView构建一个布局 其中每个section可以独立滚动吗 例如 假设有 20 行图像 其中每行都可以独立水平滚动以在屏幕外显示更多图像 在此过程中无需滚动其他行 并且整个视图可以垂直滚动以显示更多行 我
  • 使用until 参数调用Facebook News feed (me/home),每次连续调用返回limit/2

    这是我的代码的精简版本 没有初始化调用 一切都很完美 除了我每次连续调用都会传递一个until值转化为FB api 返回极限 2 我曾尝试使用不同的 Facebook 帐户在两次通话之间等待长达 1 分钟 但这对解决问题没有帮助 我检查了n
  • 如何从c++运行c++代码?

    如果我有一些 C 代码作为 C 程序中的字符串量 数据 我可以执行该字符串的内容吗 如在 C 中使用 CodeDOM 或 perl python 等中存在的 eval 函数 简短回答 你不能 稍微长一点的答案 c 没有反射 而且一般都是编译
  • Sublime Text 构建系统与选项

    我有一个项目的各种 shell 构建脚本 并且希望创建一个集中式构建系统 其中包含允许运行哪个 shell 脚本的选项 例如 用户按 Cmd B 然后用户会看到以下选项 1 shellscript1 sh2 shellscript2 sh3
  • 创建 XML 的最快且最有效的方法

    在 Java 中创建 XML 文档最快 最有效的方法是什么 那里有大量的库 woodstox xom xstream 只是想知道是否有人有任何输入 我应该采用代码生成方法 因为 xml 模式众所周知 吗 或者运行时的反射方法 编辑附加信息
  • 是否可以分层标记 matplotlib (pyplot) 条形图?

    我已经成功使用 matplotlib pyplot 绘制了以下条形图 该图来自聚合的 PANDAS DataFrame 如下所示 请注意 条形图中的每个条对应于mean柱子 另请注意 这些值是not零 但 PANDAS 输出0 and 0当
  • Python 3.6+ 格式化解包字典中缺少键的字符串

    在Python3 4中你可以做以下事情 class MyDict dict def missing self key return s key 然后是这样的 d MyDict d first name Richard print I am
  • Castle ActiveRecord 表名称冲突

    当你在 NHibernate 中遇到像 User 这样的保留字时 你只需在有问题的文本周围加上单引号 nHibernate 就会用方括号将文本括起来以进行查询 我的问题是如何使用 Castle ActiveRecord 做同样的事情 实际上
  • 发送包含自定义数据的 SNMP 陷阱

    客户要求我们将 SNMP 陷阱发送到他们的 Nagios 服务器 而不是电子邮件警报 昨天之前我对 SNMP 唯一的了解是它听起来像一个缩写词 所以请原谅 并纠正我 我对它可能有的任何误解 陷阱中需要发送的唯一信息与我们向客户端发出警报的事
  • 在 EC2 实例上启用 OpenSSL

    我目前正在尝试在我的 ec2 服务器上安装 openssl 以便我可以摆脱这个特定的错误 stream socket client SSL operation failed with code 1 OpenSSL Error message
  • 从第一个重定向到 HTTPS 的请求中删除 Azure Web App 上的响应服务器标头

    我正在尝试从 Azure Web 应用程序 使用 ASP Net core 应用程序 删除响应服务器标头 经过多次尝试改变网络配置并使用中间件删除应用程序代码中的标头 微软不会放弃并将响应标头设置为服务器 Microsoft IIS 10
  • 如何在 sqlproj (SQL Server 2012) 脚本中使用 msbuild 属性

    我刚刚将现有的 SQL Server 2008 r2 dbproj 升级到 SQL Server 2012 sqlproj 使用 SQL Server Data Tools 以前 我能够在项目中定义 SQLCMD 变量 然后通过添加以下元素
  • 查找列表元素的所有组合,包括重复元素

    我正在 python 中寻找一种算法 该算法将返回数字列表的所有可能组合 允许重复元素并加起来达到某个数字 例如 给定目标数字 7 以及列表 2 3 4 我希望能够生成以下组合 2 2 3 2 3 2 3 2 2 3 4 4 3 我了解如何
  • Ruby/Rails - 如何将秒转换为时间?

    我需要执行以下转换 0 gt 12 00AM 1800 gt 12 30AM 3600 gt 01 00AM 82800 gt 11 00PM 84600 gt 11 30PM 我想出了这个 0 84600 step 1800 n puts
  • lwuit.html.CSSEngine.applyStyleToUIElement 的 NullPointerException(来源未知)

    我正在执行以下 LinkedIn 登录过程 但不幸的是 在加载 LinkedIn 登录窗口时 授予 Yokeapp 访问您的 LinkedIn 帐户的权限 它没有显示任何内容并引发错误 我在 Eclipse pulsar 中使用 LWuit