text:
Q: WCF - Serialize abstact class and keep it abstract I am new to WCF; I have an abstract class that in my WCF service.
I am referencing that WCF service from another application that invokes it: I have it added as a Service Reference in my Visual Studio project.
I managed to serialize the derived classes using the ServiceKnownType attribute, but I cannot manage to make the base class automatically abstract in the service reference code.
Any ideas?

A: I'm not sure whether this is something that will work in your case, but you can't (with the normal Add Service Reference tool) directly generate abstract classes.
However, all generated classes are partial, so if you know the namespace, all that's required to make it abstract is a new file with;
namespace whatever.the.service.reference.namespace.is {
    abstract partial class MyClass { }
}

...and the class will be marked abstract.


text:
Q: Why iframe is bigger than body? iframe adds vertical scrollbar when 100vh Suppose I have very simple markup. I want iframe to take 100% of screen height but setting 100vh still adding scrollbar.

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

iframe {
  width: 100%;
  height: 100vh;
}

But I see vertical scrollbar. Why is it showing and how to get rid of it?

A: You can simply fix this issue , Just add a float:left or display:block to the iframe

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

iframe {
  width: 100%;
  height: 100vh;
  padding:0;
  display:block;
}

A: iframe has default display: inline so changing display property to something like display: block fixes this issue.
Also if iframe is flex item (child of flex-container, adding display: flex for body in current case will make iframe a flex-item) it will also help because it will be implicitly blockified.

A: Assuming you want it to be full screen:

*

*Add display:block;

*Add the 'allowfullscreen' attribute.

Change to:

A: Please check this.

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

iframe {
  width: 100%;
}

A: You cannot control the height of a cross domain content. If you try to upload an outsource html page into your html page, you cannot control the content size, only if you have access to the source content or server. Then you can add some JS and you'll not have extra scrolling.
https://github.com/davidjbradshaw/iframe-resizer

redpajama_set_name: RedPajamaStackExchange


text:
Q: Should I use iframes to change the contains of a div when clicking on menu? Ok, this is a beginner's question.
I have a main page with a header (with a menu), a right column and a footer. I want these elements to be always present on my site, only the container div to change upon clicking different links in the menu. Until now I have used iframes. Is there any other way to do this without iframes?
Thank you!

A: Yes of course. But not with only HTML.
If you are using php it is common to do something of the sort:
inc/header.php:

 ...

   ...

inc/footer.php:

   ...

index.php:
<?php
 include('inc/header.php');
?>

Hello World!

<?php
 include('inc/footer.php');
?>

A: Yes but it depends on what language you are using.
iFrames are a bad way to do this since your pages won't be indexed properly by search engines.  People will arrive on you iframe page and miss the context of your header and menu.
If you are using PHP you can create includes for the header, footer and right column as separate files.  So your page might look something like this:
<?php
include 'header.php';
?>

Page content here

<?php
include 'right_column.php';
include 'footer.php';
?>


text:
Q: memoir endnote: remove Notes chapters, reset endnote numbering for each chapter Like many of you I've used memoir's endnote features to generate notes at the end of a document without using the endnote package directly (i.e., without loading the endnote package). But now I'm having problems trying to generate notes at the end of each chapter, without generating a new page and a separate Notes chapter.
I want endnotes at the end of each chapter, but the Notes section should start just after the final text of a chapter. Any following chapter should also have its Notes section follow the final text, with its reset notes.
The MWE demonstrates the problem I'm having. The endnotes are generated after the final text in the chapter, there is no break to another page, and there is a Notes section -- all good. But the endnote numbers are not reset! Can anyone help? I think I need to access the pagenote counter, trigger it when the chapter changes, and thus avoid starting a new ``Notes chapter''.

\documentclass[openany]{memoir}
\makepagenote
%\notepageref % issues label that refers back to page on which note occurs. nice
\renewcommand*{\notenumintext}[1]{\,[#1]} % thinspace[num] -- bracket instead of superscript
\renewcommand\notesname{Notes} % change Notes to References, etc.
%\renewcommand*{\notedivision}{\chapter{\notesname}} % newpage, notesname, resets endnote nums
\renewcommand*{\notedivision}{\section*{\notesname}} % notesname, cont. nums
\setsecheadstyle{\Large}
\renewcommand*{\pagenotesubhead}[3]{} % #1-chapname, #2-chapnum, #3-chaptitle removed
\renewcommand*{\pagenotesubheadstarred}[3]{} % chapname, chaptitle removed

\begin{document}
\tableofcontents*
\chapter{Numbered chapter}
Test note for a numbered chapter.\pagenote{numbered test.}
Second test note for a numbered chapter.\pagenote{numbered test two.}. Notice there are no superscripts.
\printpagenotes*

\chapter*{Starred chapter}
Another test note, but from a starred chapter.\pagenote{starred test}
\printpagenotes*

\chapter{Numbered chapter without note}
No notes for a numbered chapter.
\end{document}

This is what I get. But the endnote number should restart at (1) in the starred and succeeding chapters that have endnotes.

A: The problem is that the pagenote counter is bonded to changes in the chapter counter, and \chapter* does not touch the chapter counter.
Either use
\newcommand\resetPagenotes{
  \setcounter{pagenote}{0}
}

and
\chapter*{...}
\resetPagenotes

or somehow hook into starred chapters to add it automatically.


text:
Q: Nginx: resolve lists from environment variables into configuration file I'm using Nginx open source Docker image, and I'd like to have a method to pass, with environment variables, a list of servers.
These servers have to be passed to an upstream entry, but here is my question: exists a method for don't have to pre-determinate the number of servers?
I'd like a way for build a generic image, so that if I want to load balance my upstream to two, three, or any other number of servers, I only need to update my environment variables in docker compose with something like this:
    environment:
      - Nginx_UpstreamServers_0=myhost0
      - Nginx_UpstreamServers_1=myhost1
      - Nginx_UpstreamServers_2=myhost2
      # Add more if needed

Is this possible in some way?


text:
Q: SVC client proxy and WSDL hosted on remote server I have one wsdl and xsd then I generated a SVC client proxy from a wsdl, wsdl is hosted on  windows server 2003 (outside local domain), somewhere on internet. XSD is also located at same place. I can see them in web browser, no issue there.
Then I made a simple console application client, when I run the client, I see in fiddler that correct soap response is there but in console application response is null, i.e. SVC client can not deserialize  it.
I am sure that xsd + wsdl are correct and response too(I see in fiddler).
When I put wsdl and xsd's on local domain server(intranet), it's all good, I see response in application properly deserialized.
If I compare both situation in fiddler, I don't see any difference in raw response.
Few more points: I am not hosting WCF service in IIS. I have got a different service running remotely. Let me know if I clarify more things.
Thank you.
Edit/ Update:Cleaned post. Problem seems not to be IIS6 or IIS7, it's remote server creating trouble with schema location. In SVC proxy client MessagContract namespace if pointed to a outside server, problem occurs else on intranet server it runs just fine.
Example:
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped = false)]
public partial class responseTypeOfMethod1
{

[System.ServiceModel.MessageBodyMemberAttribute( Namespace = "http://testserver.xxxxx/yyyy.wsdl", Order = 0)]
public RAT_type RAT;
................
....
..

}

if http://testserver.xxxxx points to local server, all fine, if points to an internet server , response is null

A: There are 2 things that could be happening here:

*

*The response is not being returned from the remote server

*The client is not able to deserialize the response

Use wireshark or some other network sniffer to see what response in coming back.
If the problem is due to inability to deserialize, it is probably a difference in the namespace.

A: Problem solved. It was namespace problem of-course, took a long time to find out a nasty place in server code, a tool we use internally. Thank you all who replied for your time.


text:
Q: How can we keep the iOS and Android projects isolated to their own repos, but maintain a React-native repo? Background
We have an existing native app implemented on both iOS and Android that we would like to add a new feature with shared code written in React-Native. From what I've researched, React-native requires the iOS and Android projects to be subdirectories of the main React-native directory.
As the development of our iOS and Android application can be at different paces, migrating both repos to a single React-Native repo would not work with our current development flow.
Researched
I have seen that this question asks a similar question in one of its many questions, "Also, how to organize the VCS ? Is moving the 4 code bases (iOS, Android, Web and the RN bundle) in a mono-repository a necessary move ?"
How to migrate a multi-platform app in React Native?,
That question remains unanswered. Our question is limited in scope in comparison as we would only like an answer to the management of the repos.
Question
How can we keep the iOS and Android projects isolated to their own repos, but maintain a React-native repo with a shared codebase for features that are shared by both platforms?

A: Ultimately, my team decided on using a mono repo to avoid the complexity of manually updating each git submodule in the react-native repo.
That being said, git submodules would allow managing the iOS and Android repos separately. However, the drawback to this approach would be that updates made to the Android and iOS repos would have to be pulled into the react-native repo each time the individual repos are updated.


text:
Q: executing DynamoDB, jetty exception error so i Installed the local version of dynamoDB
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html .
And after that, executed the command is mentioned in the same link
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

the thing is i get this error every time
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/handler/AbstractHandler
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.server.handler.AbstractHandler
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

how do i get rid of this problem ?
Using Ubuntu 16.04, trying to make dynamoDB work for nodeJS

A: If you are using this for local development, I'd highly suggest using a docker image for dynamoDB - this will ensure that you don't need specific configuration on your linux flavor and it should work out of the box.
For me, https://hub.docker.com/r/dwmkerr/dynamodb/ does work quite well for my use case. If you don't have docker yet, here's a handy guide on how to install it for Ubuntu 16.04 - https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04


text:
Q: Micro CAP Error: Internal time step too small in transient analysis i try make simple VCO in Micro-cap 12. But when i but when i try to run transient analysis and i get an error.
X1 and X2 is a mcp6001 and Q1 is a BC548B(from standard library)

how can this be fixed?


text:
Q: crystal reports asking for database password when i have not set any Crystal reports is asking for database user and password when i try to view a report but i have not set any for my local *.sdf file.
My conection string only contains the dataset parameter and the passsword if i chose one but no user.

A: It can happen when there is a mismatch between report parameters and the data provided to the report.

A: you can use this code :
ReportDocument1.DataSourceConnections.Item(0).SetConnection(strLocationOfDatabase, "", "UserName", "Password")

or if you dont have username and password :
ReportDocument1.DataSourceConnections.Item(0).SetConnection(strLocationOfDatabase, "", False)

A: don't refresh the report-
CrystalReportViewer1.RefreshReport()
it worked for me I just deleted that line.


text:
Q: what is the difference between Oracle coherence and Hadoop HDFS What is the difference between Oracle Coherence and Hadoop HDFS, have read about HDFS and coherence (but nothing was clear) sounds both doing the same.
Whether these are different technologies addressing different problems or same Technology but different products?
Need to know the difference and similarity between them technology wise i.e. implementation perspective, in broader way, Where these two fit in?
Note: I am not asking for a product comparison(So no gorilla vs Shark).

A: This two system are implementing two concepts.
HDFS - is distributed file system, optimized for massive sequential IO.
Oracle Coherence is caching solution, capable of using disk for part of its data. It is optimized for random IO
Technologically :
HDFS do not do any caching relaying on underlying OS for doing so. Its services (Datanode) should be considered as block device.
Usual Cache solutions provide KeyValue abstraction, some expiration functionality and primarily use memory as a storage.
Distributed cache is usually built using consistent hashing, while HDFS maintain centralized directory (NameNode).
In the same time File System and Cache has a lot in common (if we look on file path as a key).
From the above : these to systems somewhat interchangeable but built for different scenarios and built completely different internally.


text:
Q: ManyToOne reference with encrypted fields gives doesn't exist error using Jasypt I have a problem on the following situation:
In my Spring, Hibernate application I got a User Entity and a UserCategory Entity. The table of the user entity got a username as identifier. This indentifierfield can't be encrypted because this table is also used by an older program without the possibility to do this.
To make a ManyToOne reference from UserCategory to User I need a field in the UserCategory table with the unique username of a User. What I want to do is to encrypt the username in the UserCategory table using Jasypt. And of course this work:
    @Type(type="encryptedString")
    @ManyToOne
    @JoinColumn(name = "username", insertable=false, updatable=false)
    @ForeignKey(name = "none")
    public User getUser(){
            return this.user;
    }
    public void setUser(User user ){
            this.user = user;
    }

But after putting the username encrypted in the UserCategory table I can't use this record because Hibernate can't make a reference to the User on encrypted field:
You will get the following error:
"No row with the given identifier exists: com.foo.bar.models.User#M9LgndiyCsVGqfVRVblb3A=="

This is a logical error, but do you know a good solution. In think the code need something to first decrypt and then try to make the reference. But I'm stuck on how to do this.

A: I think you misunderstood how to use a custom user type and, as I commented in my previous answer, you are NOT supposed to declare the custom type at the association level here, you are supposed to use it at the attribute level i.e. on the username attribute of the User entity.
This is actually explained in the documentation (pasted from Google Cache as the Jasypt site seems to be currently down):

Integrating Jasypt with Hibernate 3
Jasypt provides an integration package
  (org.jasypt.hibernate.type) which
  provides several Hibernate UserType
  implementations to allow one or
  several of the properties in a mapped
  Hibernate entity to be declared as
  being of an encrypted type. Types
  allowed to be stored encrypted include
  strings, binaries (byte arrays),
  numeric types, booleans and dates.
Persistence of those properties will
  be done in an encrypted manner, but in
  a completely transparent way for the
  application.
This can be useful for encrypting
  personal data, private messages, etc,
  so that it is avoided that anyone with
  read access to the "critical" tables
  can read all of its contents.
For encryption at Hibernate, jasypt
  uses its password-based encryption
  capabilities, and any encryptor object
  implementing PBEStringEncryptor,
  PBEByteEncryptor,
  PBEBigIntegerEncryptor or
  PBEBigDecimalEncryptor can be used to
  encrypt data, even encryptors created
  by the user.
But encryption sets a limitation on
  your Hibernate usage: security
  standards establish that two different
  encryption operations on the same data
  should not return the same value (due
  to the use of a random salt). Because
  of this, none of the fields that are
  set to be encrypted when persisted can
  be a part of a WHERE clause in your
  search queries for the entity they
  belong to.

So, to sum up, 1) the @Type annotation should be applied to the username and 2) you won't be able to use the username as primary key (since it can't be part of a join as mentioned in the last paragraph above).
This means that you'll need something like this (assuming you declared the appropriate @TypeDef):
@Entity
public class User {

    @Id @GeneratedValue
    private Long id;

    @Type(type="encryptedString")
    private String username;

    ...
}

And modify the ManyToOne association accordingly.


text:
Q: Flutter firestore fetch nested collections all data im building an reporting app,
when a report sent to database its saves like
events(collection) -> New York(doc) -> Manhattan(col) -> Central Park(doc) -> event(col) -> saved documents
its basically saves, events to city to district to street to event
i fetch data of user with no problem
Stream<QuerySnapshot> tasks = FirebaseFirestore.instance
        .collection('events')
        .doc(StoredData.getCity()) //current users city information
        .collection(StoredData.getDistrict().toString()) //current users district information
        .doc(StoredData.getStreet()) //current users street information
        .collection('events')
        .where('uid', isEqualTo: FirebaseAuth.instance.currentUser?.uid) //query uid in documents uid field
        .snapshots();

here is my problem
i want to fetch all data of city but i cant figure out how to do that.
i want to see all records of new york

A: Firestore can only return data from a single collection at a time, or from multiple collections with the same name by using a collection group query. You can use the latter to get for example all documents from the event (singular) collections across all of your database, or under a specific path.
You can't however get the New York document and all data under it. That is simply not how the database/data model works.


text:
Q: Mass Mail Plugin to Email Specified User Roles I'm not looking to spam anyone, but I am looking for a mass mail plugin so I can select the User Roles (whether core or custom) by check box or comma separated entries of the roles, then type my message and send.
The reason: I have a multi-author website with active contributors, authors and editors. I am looking for a simple way to email these groups.
I don't care if it is a free or premium plugin.
UPDATE
I tried the solution provided below, Emu2 - Email Users 2, but after using it for a few days, I found there is a conflict with the WordPress media uploader, causing http errors on upload with the new WordPress uploader and timeouts using the classic WordPress uploader.

A: Here you go, exactly what you are looking for : http://wordpress.org/extend/plugins/emu2-email-users-2/

A: WordPress Plugin Directory - Email Users

A plugin for wordpress which allows you to send an email to the
  registered blog users. Users can send personal emails to each other.
  Power users can email groups of users and even notify group of users
  of posts.

I also use the Admin Menu Editor plugin to hide Email Users from lower level user roles.


text:
Q: android virtual keyboard remove white space button I want to stop user from entering white space into the edittext, easiest way is to do not have button in keyboard appearing on click.
how to hide white space button from keyboard ?
or is there any other way to stop user entering white space into the edit text field.

A: The best way would be to do it programatically... the only thing you have to do is setting a listener to the EditText and remove all the "spaces" while the user is writing. I think this is the best choice because there are some handsets that have a real keyboard that you can't obviously modify.

A: following link solved the issue
http://thedevelopersinfo.com/2009/11/15/filtering-data-in-edittext-component-in-android/


text:
Q: Getting the current logged user in Symfony ParamConverter annotation expression? Symfony ParamConverter allow to pass an expression which uses the expression language feature:
/**
 * @ParamConverter("order", class=Order::class, options={
 *     "expr": "repository.findByUser(user)"
 * })
 */
public function getOneAction()
{
}

However, this wil throw an error about the user variable not being available:

Error parsing expression -- "repository.findByUser(user)" -- (Variable "user" is not valid around position 23 for expression repository.findByUser(user).).

Does anyone knows how to access it?


text:
Q: Sample size for out of specification probability? I have a product batch that contains 100000 units. These units are supposed to have the same weight (their specification is Target value (in kg) +/- 10%). I would like to conduct a statistical test in order to inspect the conformity of this batch, in terms of weight (For example I want to make sure only 1% of this batch's products are out of the specifications). Since I cannot weigh all the 100000 units, how many units should I take in order to have a proper estimation of the out-of-specification probability?
NB1: Normally the weight of the products should follow a Normal distribution. However, since I suspect that there is a problem in my batch (which can impact the weight of some or all the units), I am not sure if can use the Normal distribution in this case. If not, what are the alternatives and solutions?

A: It sounds like you are interested in doing a hypothesis test comparing a sample proportion (the proportion of your batch that is out of specification) to some reference proportion (in your example, 0.01). In particular, it seems you want to do a one-sided hypothesis test, since presumably you are only concerned if the proportion out of specification exceeds some desired value. To figure out the sample size you need, you can use a sample size calculator like this one.
In the calculator linked above, the quantity $p_0$ is the proportion you wish to compare your estimated proportion to (from your example, 0.01). The quantity $p_1$ should be selected so that $|p_0-p_1|$ is the smallest difference you want to be able to detect. For instance, if you are interested in whether your estimated proportion out of specification is less than 0.01 or not, what level of error would you find acceptable? Would it be okay if the test result states that your estimated proportion is less than 0.01, but in reality it is 0.011? Or 0.0105? The smaller the level of error needs to be, the larger the sample size will be.
The other two quantities, $\alpha$ and power, also govern uncertainty in the statistical results. The former represents the probability that the test will state that your estimated proportion is greater than $p_0$ when in reality it is not (i.e. a mistake). The latter is the probability that the test will state your estimated proportion is greater than $p_0$ when it really is (i.e. what you would want). Setting the former smaller, or the latter larger, will both increase the sample size needed.
Finally, make sure you select one-sided instead of two-sided, and you should be good to go with this calculator!


text:
Q: parsing json data with quotation I have produced an android app for parsing data from a URL. The application works fine as long as there are no quotation marks in the json data returnedL. Is there a way to parse json data with Java, when data has marks like this:
{
 "cate":
 [
   {
    "title": "this is the "title" like ",
    "EdId": "445",
    "date": "Sep 25, 2014"
   }
 ]
}

Here is the code I am working with:
public class Guys extends Activity {
    ListView list;
    TextView title;
    TextView EdId;
    TextView date;
    Button Btngetdata;
    //Button nextac;
    ArrayList<HashMap<String, String>> oslist = new ArrayList<HashMap<String, String>>();

    //URL to get JSON Array
    private static String url = "http://10.10.10.2/test/ff.php";

    //JSON Node Names
    //private static final String ca
    private static final String TAG_CAT = "cate";
    private static final String TAG_TITLE = "title";
    private static final String TAG_EDID = "EdId";
    private static final String TAG_DATE = "date";

    JSONArray cate = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.test_main);
        oslist = new ArrayList<HashMap<String, String>>();

        new JSONParse().execute();

    }

    private class JSONParse extends AsyncTask<String, String, JSONObject> {
         private ProgressDialog pDialog;
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
             title = (TextView)findViewById(R.id.title);
             EdId = (TextView)findViewById(R.id.edid);
             date = (TextView)findViewById(R.id.date);
            pDialog = new ProgressDialog(Guys.this);
            pDialog.setMessage("Getting Data ...");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(true);
            pDialog.show();

        }

        @Override
        protected JSONObject doInBackground(String... args) {
            String jn="ff'f'd";
            JSONParser jParser = new JSONParser();

            // Getting JSON from URL
            JSONObject json = jParser.getJSONFromUrl(url);
                    json.toString();

            return json;
        }
         @Override
         protected void onPostExecute(JSONObject json) {
             pDialog.dismiss();
             try {

                //json = json.substring(7);

                    // Getting JSON Array from URL
                    cate = json.getJSONArray(TAG_CAT);
                    for(int i = 0; i < cate.length(); i++){
                    JSONObject c = cate.getJSONObject(i);

                    // Storing  JSON item in a Variable
                    String title = c.getString(TAG_TITLE);
                    String EdId = c.getString(TAG_EDID);
                    //String date = c.getString(TAG_API);

                    // Adding value HashMap key => value

                    HashMap<String, String> map = new HashMap<String, String>();

                    map.put(TAG_TITLE, title);
                    map.put(TAG_EDID, EdId);
                    //map.put(TAG_API, date);

                    oslist.add(map);
                    list=(ListView)findViewById(R.id.list);

                    ListAdapter adapter = new SimpleAdapter(Guys.this, oslist,
                            R.layout.list_v,
                            new String[] { TAG_TITLE}, new int[] {
                                    R.id.title});

                    list.setAdapter(adapter);
                    list.setOnItemClickListener(new AdapterView.OnItemClickListener() {

                        @Override
                        public void onItemClick(AdapterView<?> parent, View view,
                                                int position, long id) {
                           Toast.makeText(Guys.this, "You Clicked at "+oslist.get(+position).get("EdId"), Toast.LENGTH_SHORT).show();
                            Intent myIntent = new Intent(Guys.this, SimpleBrowser.class);

                            String idurl = oslist.get(+position).get("EdId");
                            String idsend = idurl;

                            myIntent.putExtra("id",idurl.toString());
                            Guys.this.startActivity(myIntent);
                        }
                    });

                    }
            } catch (JSONException e) {
                e.printStackTrace();

            }

         }
    }

}

A: I think the problem is with the system producing the json string, in the producer system, you either need to escape " character replacing it with \" or use ' charachter instead.

A: You can use gson class to parse json response.
You need to create one class
class Data{

    ArrayList<Data> cate;
    getCateList(){
        return cate;
    }
    String title;
    String EdId;
    String date;
}

InputStream source = retrieveStream(url);
Gson gson = new Gson();
Reader reader = new InputStreamReader(source);
Data response = gson.fromJson(reader, Data.class);

Read following tutorial : http://www.javacodegeeks.com/2011/01/android-json-parsing-gson-tutorial.html


text:
Q: Positional problems with vuetify speed dial I am wanting to use the vuetify speeddial component in my app, but I am getting wierd positioning errors, what I am wanting is the button to be clicked and then the additional options slide to the left of it,
As you can see from the image above they are positioned on the left but far to far from the original "parent" button, I have attemped to make a codesandbox but the results are inconclusive.
https://codesandbox.io/s/vuetify-playground-forked-gwtkc?file=/src/components/SpeedDial.vue
And finally here is my component code,
<template>
    <v-speed-dial
        v-model="fab"
        direction="left"
        transition="slide-x-reverse-transition"
      >
        <template v-slot:activator>
          <v-btn
            v-model="fab"
            color="blue darken-2"
            dark
            fab
          >
            <v-icon v-if="fab">mdi-close</v-icon>
            <v-icon v-else>mdi-account-circle</v-icon>
          </v-btn>
        </template>

        <v-btn fab dark small color="green">
            <v-icon>mdi-pencil</v-icon>
        </v-btn>
        <v-btn fab dark small color="indigo">
            <v-icon>mdi-plus</v-icon>
        </v-btn>
        <v-btn fab dark small color="red">
            <v-icon>mdi-delete</v-icon>
        </v-btn>

      </v-speed-dial>
</template>

<script>
export default {
    name: 'QuickSpeedDial',
    data() {
        return {
            fab: false,
            tabs: null
        }
    },
    computed: {
        activeFab () {
            switch (this.tabs) {
                case 'one': return { class: 'purple', icon: 'account_circle' }
                case 'two': return { class: 'red', icon: 'edit' }
                case 'three': return { class: 'green', icon: 'keyboard_arrow_up' }
                default: return {}
            }
        },
    }
}
</script>

A: You need to add a style as it says on the official website.
...

<style>
.v-speed-dial {
  position: absolute;
}
.v-btn--floating {
  position: relative;
}
</style>

...


text:
Q: Error Registering Dynamics CRM Plugin I have a plugin project built in C# that contains all of my plugins for Microsoft Dynamics CRM. The existing plugins are working correctly and appear to be updating correctly. However, when I attempt to register a new plugin, I am getting the below error.
The event I'm trying to register is on an entity that already has a Create & Update event attached.  I've seen some other questions about the Unable to load plugin type error, but none of them seem to indicate a specific plugin that can't be loaded. What am I missing here for registering a new plugin?
Step Registration Settings

Existing Registered Steps

Error
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load the plugin type: CCSEQ.Plugins.OpportunityPlugins
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ActivityId>f9958fce-2da6-44ce-855e-532e4e8deeac</ActivityId>
  <ErrorCode>-2147204720</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Unable to load the plugin type: CCSEQ.Plugins.OpportunityPlugins</Message>
  <Timestamp>2018-06-06T20:31:33.3462414Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ActivityId>f9958fce-2da6-44ce-855e-532e4e8deeac</ActivityId>
    <ErrorCode>-2147204720</ErrorCode>
    <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Unable to load the plugin type: CCSEQ.Plugins.OpportunityPlugins</Message>
    <Timestamp>2018-06-06T20:31:33.3462414Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault>
      <ActivityId>f9958fce-2da6-44ce-855e-532e4e8deeac</ActivityId>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>System.IO.FileLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #0DE0CBC1</Message>
      <Timestamp>2018-06-06T20:31:33.3462414Z</Timestamp>
      <ExceptionRetriable>false</ExceptionRetriable>
      <ExceptionSource i:nil="true" />
      <InnerFault i:nil="true" />
      <OriginalException i:nil="true" />
      <TraceText i:nil="true" />
    </InnerFault>
    <OriginalException i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterStep(CrmOrganization org, CrmPluginStep step)
   at Microsoft.Crm.Tools.PluginRegistration.StepRegistrationViewModel.btnRegister_Click(Object sender, EventArgs e)

Update 1
Based on Arun's input, I changed the namespace & dll build name for my C# project and rebuilt the project.  I did this so I wouldn't have to unregister my existing plugins and rebuild them from the ground up.  I registered this new assembly using the plugin registration tool.  When I tried to register a new step, I receive the same error as before.  This occurs for all registered Plugins. The example below is one I tried with Activities (specifically appointments), although I also tried this for Opportunities
Step Registration Settings

Error Message
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load the plugin type: COHEN.Plugins.ActivityPlugins
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ActivityId>1bf82d05-04d0-4bd0-a3db-87c480cc3c6e</ActivityId>
  <ErrorCode>-2147204720</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Unable to load the plugin type: COHEN.Plugins.ActivityPlugins</Message>
  <Timestamp>2018-06-07T13:57:24.8030045Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ActivityId>1bf82d05-04d0-4bd0-a3db-87c480cc3c6e</ActivityId>
    <ErrorCode>-2147204720</ErrorCode>
    <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Unable to load the plugin type: COHEN.Plugins.ActivityPlugins</Message>
    <Timestamp>2018-06-07T13:57:24.8030045Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault>
      <ActivityId>1bf82d05-04d0-4bd0-a3db-87c480cc3c6e</ActivityId>
      <ErrorCode>-2147220970</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>System.IO.FileLoadException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #FB840294</Message>
      <Timestamp>2018-06-07T13:57:24.8030045Z</Timestamp>
      <ExceptionRetriable>false</ExceptionRetriable>
      <ExceptionSource i:nil="true" />
      <InnerFault i:nil="true" />
      <OriginalException i:nil="true" />
      <TraceText i:nil="true" />
    </InnerFault>
    <OriginalException i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <OriginalException i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at Microsoft.Crm.Tools.Libraries.RegistrationHelper.RegisterStep(CrmOrganization org, CrmPluginStep step)
   at Microsoft.Crm.Tools.PluginRegistration.StepRegistrationViewModel.btnRegister_Click(Object sender, EventArgs e)

Update 2
I noticed that we have a post-build step that runs the command:
mkdir $(TargetDir)merged $(SolutionDir)packages\ILMerge.2.14.1208\tools\ilmerge.exe /out:$(TargetDir)merged\CCSEQ.Plugins.dll /keyfile:$(ProjectDir)customdevelopment.snk $(TargetDir)CCSEQ.Plugins.dll $(TargetDir)Microsoft.SharePoint.Client.dll $(TargetDir)Microsoft.SharePoint.Client.Runtime.dll

This appears to create a new directory in our output folder called merged which contains a version of the dll.  I have tried updating the assembly with this version of the dll, but it errors the same way.  I have tried doing this with both the debug & release versions of our build.
One other thing I tried is I imported the dll as a reference into my project to try to look at the classes/functions provided by the dll. It appears that there aren't any classes/functions in the dll, but I'm not sure if that means anything or not as I'm not that familiar with dlls.

A: We discovered that version 9.0.2.3 of the Microsoft.CrmSdk.CoreAssemblies was not compatible with our plugins.  We aren't yet sure why this didn't work, but rolling back to version 8.2.0.2 resolved the issue.

A: This will happen when you have a mismatching plugin assembly version. Build the latest code, register the assembly (dll), select all the plugins & then try to register a new step.
I see the plugin name changed from CCSEQ.Plugins.OpportunityPlugins to Opportunity when you register the step under Event Handler value.
Also you mentioned other steps as create & delete but I see create & update. Are you sure you are updating the right plugin?
Verify the plugin project for class files which are plugins listed under assembly, against which you can register steps.


text:
Q: Pip not finding most recent versions Pip is not finding the most recent versions of some Python packages available.
When I try pip install cachetools==4.1.0, it gives me the error

ERROR: Could not find a version that satisfies the requirement cachetools==4.1.0 (from versions: 0.0.0, 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 0.5.0,
  0.5.1, 0.6.0, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 2.0.0, 2.0.1, 2.1.0,
  3.0.0, 3.1.0, 3.1.1)
  ERROR: No matching distribution found for cachetools==4.1.0

when it is available (https://pypi.org/project/cachetools/)
What can i do to get around this?

A: cachetools support Python 2.7 only up to version 3. Version 4 requires Python 3.5+


text:
Q: How to avoid java.lang.IllegalStateException: Could not execute method of the activity In My project I am interacting with data bases, I has a button when pressed adds three items from three different edittexts such as name(string), idcardno(int of maximum 4nos), phoneno(int of max 10nos). On pressing Add button it makes exeception as below..
09-19 01:28:31.491: E/AndroidRuntime(1160): FATAL EXCEPTION: main
09-19 01:28:31.491: E/AndroidRuntime(1160): java.lang.IllegalStateException: Could not execute method of the activity
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.view.View$1.onClick(View.java:3633)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.view.View.performClick(View.java:4240)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.view.View$PerformClick.run(View.java:17721)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.os.Handler.handleCallback(Handler.java:730)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.os.Handler.dispatchMessage(Handler.java:92)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.os.Looper.loop(Looper.java:137)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.app.ActivityThread.main(ActivityThread.java:5103)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.reflect.Method.invokeNative(Native Method)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.reflect.Method.invoke(Method.java:525)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at dalvik.system.NativeStart.main(Native Method)
09-19 01:28:31.491: E/AndroidRuntime(1160): Caused by: java.lang.reflect.InvocationTargetException
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.reflect.Method.invokeNative(Native Method)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.reflect.Method.invoke(Method.java:525)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at android.view.View$1.onClick(View.java:3628)
09-19 01:28:31.491: E/AndroidRuntime(1160):     ... 11 more
09-19 01:28:31.491: E/AndroidRuntime(1160): Caused by: java.lang.NumberFormatException: Invalid int: "4233494398"
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.Integer.invalidInt(Integer.java:138)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.Integer.parse(Integer.java:378)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.Integer.parseInt(Integer.java:366)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at java.lang.Integer.parseInt(Integer.java:332)
09-19 01:28:31.491: E/AndroidRuntime(1160):     at com.wordpress.smdaudhilbe.database.MainActivity.addData(MainActivity.java:59)
09-19 01:28:31.491: E/AndroidRuntime(1160):     ... 14 more
09-19 01:28:34.340: I/Process(1160): Sending signal. PID: 1160 SIG: 9

Here is my complete code,
package com.wordpress.smdaudhilbe.database;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.os.Bundle;

import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

public class MainActivity extends Activity {

    public EditText nameField,idCardField,phoneField;
    public Button add,del,update;
    public Spinner spN;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initViews();

        spN.setOnItemSelectedListener(new OnItemSelectedListener()
        {
            @Override
            public void onItemSelected(AdapterView<?> parent, View view,int position, long id) {
                nameField.setText(parent.getItemAtPosition(position - 1).toString());
                idCardField.setText(parent.getItemAtPosition(position).toString());
                phoneField.setText(parent.getItemAtPosition(position+1).toString());
            }

            @Override
            public void onNothingSelected(AdapterView<?> arg0) {

            }
        });
    }

    public void addData(View v) {
        initViews();

        DataBaseHelper dbH = new DataBaseHelper(getApplicationContext());

                        dbH.insertContact(nameField.getText().toString(),Integer.parseInt(idCardField.getText().toString()),Integer.parseInt(phoneField.getText().toString()));

    loadSpinner();

    return;
}

private void loadSpinner() {
    initViews();

    DataBaseHelper dbH = new DataBaseHelper(getApplicationContext());

    List<String> label = dbH.getIds();

    ArrayAdapter<String> adpt = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item,label);

    spN.setAdapter(adpt);
}

    public void deleteData(View v) {
        initViews();

        DataBaseHelper dbH = new DataBaseHelper(getApplicationContext());

        dbH.deleteContact(Integer.parseInt(idCardField.getText().toString()));
    }

    private void initViews(){
        nameField = (EditText)findViewById(R.id.editText1name);
        idCardField = (EditText)findViewById(R.id.editText2idcard);
        phoneField = (EditText)findViewById(R.id.editText3phone);

        add = (Button)findViewById(R.id.button1);
        del = (Button)findViewById(R.id.button2);
        update = (Button)findViewById(R.id.button3);

        spN = (Spinner)findViewById(R.id.spinner1);
    }
}

class DataBaseHelper extends SQLiteOpenHelper{

        public DataBaseHelper(Context context) {
            super(context,"MyDataBase", null, 1);
        }

        @Override
        public void onCreate(SQLiteDatabase db) {
            db.execSQL("create table contacts(name text not null,idCard integer,phoneNumber integer(10));");
        }

        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
            db.execSQL("drop table if exists contacts;");
        }

        public void insertContact(String name,int idcard,int phone) {
            SQLiteDatabase db = this.getWritableDatabase();

            ContentValues vals = new ContentValues();

            vals.put("name",name);
            vals.put("idCard", idcard);
            vals.put("phoneNumber", phone);

            db.insert("contacts", null, vals);
            db.close();
        }

        public void deleteContact(long idcard) {
            SQLiteDatabase db = this.getWritableDatabase();

            db.delete("contacts", "idCard=?",new String[] {String.valueOf(idcard)});

            db.close();
        }

        public List<String> getIds() {
            SQLiteDatabase db = this.getReadableDatabase();

            List<String> lst = new ArrayList<String>();

            Cursor cursor = db.rawQuery("select * from contacts;",null);

            if(cursor.moveToFirst()){
                do{
                    lst.add(cursor.getString(2));
                }while(cursor.moveToNext());
            }

            cursor.close();

            db.close();

            return lst;
        }
}

How to solve this...? Kindly help, I read many are pointing to null pointer exception for this kind of problem.
for your information my main_activity.xml is
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <EditText
        android:id="@+id/editText1name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ems="10" >

        <requestFocus />
    </EditText>

    <EditText
        android:id="@+id/editText2idcard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="number"
        android:ems="10"
        android:digits="0123456789"
        android:maxLength="4" />

    <EditText
        android:id="@+id/editText3phone"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:inputType="phone"
        android:ems="10"
        android:digits="0123456789"
        android:maxLength="10" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content" >

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="add"
            android:onClick="addData" />

        <Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="del"
            android:onClick="deleteData"/>

        <Button
            android:id="@+id/button3"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="update"
            android:onClick="updateData"/>

    </LinearLayout>

    <Spinner
        android:id="@+id/spinner1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

</LinearLayout>

UPDATE:
When I put try - catch around
try{
        dbH.insertContact(nameField.getText().toString(),Integer.parseInt(idCardField.getText().toString()),Integer.parseInt(phoneField.getText().toString()));
        }catch (Exception e){e.printStackTrace();}

of addData() method,
I got this,
09-19 02:33:39.485: E/AndroidRuntime(933): FATAL EXCEPTION: main
09-19 02:33:39.485: E/AndroidRuntime(933): java.lang.NullPointerException
09-19 02:33:39.485: E/AndroidRuntime(933):  at com.wordpress.smdaudhilbe.database.MainActivity$1.onItemSelected(MainActivity.java:41)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.widget.AdapterView.fireOnSelected(AdapterView.java:892)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.widget.AdapterView.access$200(AdapterView.java:49)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.widget.AdapterView$SelectionNotifier.run(AdapterView.java:860)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.os.Handler.handleCallback(Handler.java:730)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.os.Handler.dispatchMessage(Handler.java:92)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.os.Looper.loop(Looper.java:137)
09-19 02:33:39.485: E/AndroidRuntime(933):  at android.app.ActivityThread.main(ActivityThread.java:5103)
09-19 02:33:39.485: E/AndroidRuntime(933):  at java.lang.reflect.Method.invokeNative(Native Method)
09-19 02:33:39.485: E/AndroidRuntime(933):  at java.lang.reflect.Method.invoke(Method.java:525)
09-19 02:33:39.485: E/AndroidRuntime(933):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-19 02:33:39.485: E/AndroidRuntime(933):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-19 02:33:39.485: E/AndroidRuntime(933):  at dalvik.system.NativeStart.main(Native Method)
09-19 02:33:42.555: I/Process(933): Sending signal. PID: 933 SIG: 9

I don't think, I made any error. using initViews() method,
private void initViews(){
        nameField = (EditText)findViewById(R.id.editText1name);
        idCardField = (EditText)findViewById(R.id.editText2idcard);
        phoneField = (EditText)findViewById(R.id.editText3phone);

        add = (Button)findViewById(R.id.button1);
        del = (Button)findViewById(R.id.button2);
        update = (Button)findViewById(R.id.button3);

        spN = (Spinner)findViewById(R.id.spinner1);
    }

I had already initialised all fields
and also I made every field as public.
public EditText nameField,idCardField,phoneField;
    public Button add,del,update;
    public Spinner spN;

Please help in this to trace the reason.


text:
Q: Do actual Sudoku puzzles have a unique rational solution? Here is a question in the intersection of mathematics and sociology.  There is a standard way to encode a Sudoku puzzle as an integer programming problem.  The problem has a 0-1-valued variable $a_{i,j,k}$ for each triple $1 \le i,j,k \le 9$, expressing that the entry in position $(i,j)$ has value $k$.  The Sudoku rules say that four types of 9-sets of the variables sum to 1, to express that each cell is filled with exactly one number, and that each number appears exactly once in each row, column, and $3 \times 3$ box.  And in a Sudoku puzzle, some of these variables (traditionally 27 of them) are preset to 1.
It is known that generalized Sudoku, like general integer programming, is NP-hard.  However, is that the right model for Sudoku in practice?  I noticed that many human Sudokus can all be solved by certain standard tricks, many of which imply a unique rational solution to the integer programming problem.  You can find rational solutions with linear programming, and if the rational solution is unique, that type of integer programming problem is not NP-hard, it's in P.  Traditionally Sudoku puzzles have a unique solution.  All that is meant is a unique integer solution, but maybe the Sudoku community has not explored reasons for uniqueness that would not also imply a unique rational solution.
Are there published human Sudoku puzzles with a unique solution, but more than one rational solution?  Is there a practical way to find out?  I guess one experiment would be to make such a Sudoku (although I don't know how difficult that is), and then see what happens when you give it to people.

A: Towards a weak proof of existence, I would go through Gordon Royle's database of Sudoku with a minimum number of givens, and (program a computer to) check for multiple rational solutions on any of the puzzles.  If all of them had unique rational solutions, I would
take that as strong evidence that all proper Sudoku have unique rational solutions.  If
one had multiple rational solutions, add some givens until you have a maximal desired
puzzle, and publish it (or send it to Nick Baxter et. al. for the sociological answer).
Gerhard "Ask Me About System Design" Paseman, 2010.06.08

A: Not an answer, just wanted to point to some references. David Eppstein has an arXiv piece on a clever "human-type" trick, I imagine he will post something for this question. He also produced random puzzles and counted the effect of his method on ability to solve, and there were still enough unsolvable when including his method. Eppstein's method made it into the puzzle book "Mensa Guide to solving Sudoku" by Peter Gordon and Frank Longo, one of the few books I found with any difficult puzzles at all. The method I am curious about, though, and I saved the issue, is in the April 2009 A.M.S. Notices, J. F. Crook, "A pencil-and-paper algorithm for solving sudoku puzzles," pages 460-468, pdf at http://www.ams.org/notices/200904/index.html

A: I wasn't planning on answering here but since someone mentioned my paper in the long comment thread above maybe I should anyway.
When I'm solving problems by hand one of the sets of patterns I frequently use involve uniqueness: something can't happen because it would lead to a puzzle with more than one solution, but a well-posed Sudoku puzzle has only one solution, so it's safe to assume that whatever it is doesn't happen. For instance, it's not possible to have four initially-empty cells in a rectangle of the same two rows, the same two columns, and the same two 3x3 squares, and also for these four cells to all contain one of the same two values, because then the two values they contain could be placed in two different ways and the rest of the puzzle wouldn't notice the change. So if there's only one way to prevent a rectangle like this from forming then the solution has to use that one way.
I have the sense (though I could be wrong) that this sort of inference does not imply a unique rational solution. But of course a puzzle could have a unique rational solution anyway — my computer solver knows these rules too, but uses them less frequently than I do by hand.
ETA: It does indeed seem to be true that these rules don't imply unique rational solutions. With them, my solver easily solves the following puzzle, which has a unique integer solution but does not have a unique fractional solution. Without them, my solver can still solve the same puzzle, but only by using rules that are (in my experience) much more difficult to apply by hand.
 -----------------------------------
| 3   7   8 | 6   4   5 | 1   2   9 |
|           |           |           |
| 6   9   . | .   7   . | 4   8   5 |
|           |           |           |
| 4   .   5 | 9   .   8 | 3   7   6 |
|-----------------------------------|
| 7   .   9 | 5   3   . | 8   6   4 |
|           |           |           |
| 8   4   . | 7   .   . | 5   9   3 |
|           |           |           |
| 5   3   6 | 8   9   4 | 2   1   7 |
|-----------------------------------|
| 1   6   3 | 2   5   7 | 9   4   8 |
|           |           |           |
| 9   8   4 | .   .   . | 7   5   2 |
|           |           |           |
| 2   5   7 | 4   8   9 | 6   3   1 |
 -----------------------------------

Or if you want something that looks like the puzzles that get published, here's another one that uses the same mechanism:
 -----------------------------------
| 1   .   . | 8   .   7 | 5   .   . |
|           |           |           |
| .   5   . | 6   .   . | 9   7   . |
|           |           |           |
| .   6   . | .   4   . | .   .   . |
|-----------------------------------|
| .   .   2 | .   .   . | .   6   . |
|           |           |           |
| 6   .   . | 4   .   3 | .   .   . |
|           |           |           |
| .   4   . | .   .   . | 1   .   . |
|-----------------------------------|
| .   .   . | .   1   . | .   5   . |
|           |           |           |
| .   1   3 | .   .   6 | .   9   . |
|           |           |           |
| .   .   7 | 5   .   4 | .   .   1 |
 -----------------------------------

A: A good explanation of how humans solve sudoku is here -
http://onigame.livejournal.com/20626.html


text:
Q: Unable to on or off Green/BLUE LED STM32F429ZI - Nucleo board? I am trying to write a bare metal program to blink green led.
In fact, I am unable to turn any LEDs on or off. This is an off-the-shelf board.
The board name is  NUCLEO F429ZI.
Board Image
I have gone through the schematics and I am sure that the pin is PA5 i.e. Port A and pin number 5. However, the led isn't blinking at all. I can see that my code is loaded onto STM32 board using uVision IDE.
I have tried setting blue LED i.e. PB7 but that also didn't work at all.
void delayMs(int delay);

int main(void)
{
    //enable clock access to A
    RCC->AHB1ENR |= 1;  //enable GPIO A clock
    GPIOA->MODER |= 0x400; //       PA-5 01   0000 - PA0
    while(1)
    {
          GPIOA->ODR |= 0x20;
         //delay
          delayMs(100);
          GPIOA->ODR &=~ 0x20;
          delayMs(100);
    }

}

void delayMs(int delay)
{
    int i = 0;
    for(; delay >0; delay--)
    {
     for(i=0; i<3195; i++)
        {
        }
    }
}

The green LED in the STM32F429ZI should blink.
Next, I tried turning on the blue LED that is also not working.
As per my understanding by looking at schematics - PB7 should be turned on for
blue LED. But this is also not working.
#include "stm32f4xx.h"
int main(void)
{
    RCC->AHB1ENR |= 1;
    // ob 01 00 00 00 00 00 00 00 // PB7
    GPIOB->MODER = 0x4000;
    for(;;)
    {
        GPIOB->ODR = 0x80;
    }
}

A: Rather unhelpfully the Nucleo F429ZI UM1974 user manual download link at https://www.st.com/en/evaluation-tools/nucleo-f429zi.html#resource appears to be broken (at time of writing), but I have found a copy elsewhere, and the pin assignments of the three user LEDs is described thus:

The schematic suggests that the factory state of solder-bridges SB120 and SB119 are set for LD1 on PB0 rather then PA5.  The problem with your attempt to set LD2 (blue) is that you did not enable GPIOB in the RCC - it enables GPIOA as in the LD1(green) attempt.
Another issue is that your setting of GPIO MODER assumes that the reset state for the port is zero.  That is not the case (although it is for the specific pins in question - so you "get away with it" in this case):

It is a good idea to define all the port/pin specific constants in one place so you can switch or add outputs easily and with less chance of error:
#define LED_PORT              GPIOB
#define LED_PORT_RCC_EN       0x2u
#define GPIO_MODE_MASK       ~0x3u
#define GPIO_MODE_OUTPUT      0x1u

#define GREEN_LED_PIN         0u
#define BLUE_LED_PIN          7u
#define RED_LED_PIN           14u
#define FLASH_LED             GREEN_LED_PIN

int main(void)
{
    RCC->AHB1ENR |= LED_PORT_RCC_EN ;
    LED_PORT->MODER &= GPIO_MODE_MASK << (FLASH_LED << 1) ;
    LED_PORT->MODER |= GPIO_MODE_OUTPUT << (FLASH_LED << 1) ;

    for(;;)
    {
          LED_PORT->ODR |= 0x1 << FLASH_LED ;
          delayMs( 100 ) ;
          LED_PORT->ODR &= ~(0x1 << FLASH_LED) ;
          delayMs( 100 ) ;
    }

    return 0 ;
}

Your delay function is seriously flawed, and likely to be optimised out to "do nothing".  Your loop counter needs to be declared volatile to avoid being optimised out.  If that happens, the indicator will not visibly blink but will be pulsed at a very high frequency and be on but not at full brightness.
The following will prevent the loops being optimised out.
void delayMs( unsigned delay )
{
    for( volatile unsigned d = delay; d > 0; d--)
    {
        for( volatile int i = 0; i < 3195; i++ )
        {
        }
    }
}

However it is a 180MHz part; if you are running it at full-speed 3195 iterations it will probably not take 1ms.  More like a few tens of microseconds.  Even if running at the start-up HSI frequency of 16MHz, it is likely to of the order of a few 100s of microseconds, and will in any case vary with optimisation settings and time spent in any interrupt handlers running.  Much better to use the Cortex-M SYSTICK counter as follows:
static volatile uint32_t ms_tick = 0 ;

void SysTick_Init(void)
{
    SysTick_Config( SystemCoreClock / 1000 ) ;
}

void SysTick_Handler(void)
{
    ms_tick++;
}

void delayMs( uint32_t delay)
{
    uint32_t start_tick = ms_tick ;
    while( (ms_tick - start_tick) < delay );
}

Then the delay will be accurate regardless of the clock speed you run your processor at or interrupt load.

A: You should not modify ODR directly as it does a read/write on the entire port. Instead you should use the BSRR register where you can affect one bit only. Note that some STM32 part uses a single 32-bit BSRR register to set and clear the bits (one operation is shifted 16 bit left) whereas others use two 16-bit registers so consult the reference manual or header file for details.
Your MODER setting is incorrect. You need to clear the 2 bits for PA5 first, before OR'ing 01 in, e.g.
GOPIOA->MODER &= ~0b1100000000;
GPIOA->MODER |= 0b0100000000;

A: This is complete solution for Nucleo 144 - STM32F429ZI.

#include "stm32f4xx.h"

#define LED_PORT              GPIOB
#define LED_PORT_RCC_EN       0x2u
#define GPIO_MODE_MASK       ~0x3u
#define GPIO_MODE_OUTPUT      0x1u

#define GREEN_LED_PIN         0u
#define BLUE_LED_PIN          7u
#define RED_LED_PIN           14u
#define FLASH_LED             BLUE_LED_PIN

void delayMs( unsigned delay );

int main(void)
{
    RCC->AHB1ENR |= LED_PORT_RCC_EN ; // enable for PORT B
    //LED_PORT->MODER &= GPIO_MODE_MASK << FLASH_LED ;
    //LED_PORT->MODER |= GPIO_MODE_OUTPUT << FLASH_LED ;
      GPIOB->MODER |= 0x4000;  // blue LED PB7
      GPIOB->MODER |= 0x1;  // green LED PB0
      GPIOB->ODR |= 0x1; // green LED ODR
      GPIOB->MODER |=  0x1 << 28; // red LED PB14
      GPIOB->ODR |= 0x1 <<14; // RED LED ODR
      //GPIOB->BSRR |= 0x4000; // 7th pin
    // connected to pull up resistor -- when we press button , it goes low
        //B1 user button is connected to PC13 - i.e. blue button
      // Enable clock to PC13 i.e. Port C
      RCC->AHB1ENR |=  0x1 << 2;
      //GPIOC->MODER |=     //Input mode PC13- 13th pin 0
       // by default pins are input only
      GPIOC->MODER |=  0;
    for(;;)
    {
               // pressed blue button
               if( (GPIOC->IDR & (1<<13)) ) // PC13
                 {
                      LED_PORT->ODR |= 0x1 << FLASH_LED ;

                 }
                 else
                 {
            LED_PORT->ODR &= ~(0x1 << FLASH_LED) ;

                 }
    }

    return 0 ;
}

void delayMs( unsigned delay )
{
    for( volatile unsigned d = delay; d > 0; d--)
    {
        for( volatile int i = 0; i < 3195; i++ )
        {
        }
    }
}


text:
Q: How can I efficiently unit test when using dependency resolution via BuildConfig.groovy in Grails? I want to follow TDD, but the command grails test-app CUT needs almost a minute to run due to Resolving dependencies... and Resolving new plugins. Please wait... ...
Each of those two stages takes about 20 seconds to complete while the tests only take up some seconds.
(I am unsure if this has any effect on the performance, but I am using dependency resolution via BuildConfig.groovy - and want to stick with it.)

*

*How can I have grails only execute the tests any maybe skip the process of resolving?

*How else could I speed up the process? (Note that grails interactive is unable to influence the speed of resolving.)

A: Ideas:

*

*Try removing (or to be safe moving) the directory /.ivy2/cache. The next time you do a 'run-app' all the dependencies will be downloaded again from scratch. After doing this I got my 'Resolving Dependencies...' time down by about 5 seconds.

*There are some more tips on how to fully clean your directories here A full clean may help if you have some inconsistent files etc.

*Try turning the logging on in BuildConfig.groovy by setting log to "info" in the grails.project.dependency.resolution section. This can give you a better idea of which dependencies are taking the longest.

*Make sure your .ivy2 directory is on your local machine. See here for more info

A: I had a similar issue and solved it by not using *-SNAPHOT versions of any plugins. I downgraded to the latest non-SNAPSHOT release and cut "resolving dependencies" from 10 seconds to 1 second.

A: In Grails 2 there's a new variant of the old (now deprecated) 'interactive' command. In order to start it, one must start grails without any arguments (i.e. grails <ENTER>).
Running test-app from there seems to skip dependecy resolution which ultimately makes tests run much faster now (~40 seconds less in the case mentioned).

A: You should write your unit tests in a way that you can run them directly from the IDE. I like looking at the green bar. For example in STS/Eclipse, just do "Run As->Junit Test". If the test requires Grails to be running, it's not an unit test anymore (it's an integration test).

A: I am going to have to back up FlareCoder on this.  Too many Grails developers get lazy using Grails specific unit tests or worse, make everything an integration test.  This is fine if your project is relatively small and your team does not mind Grails to start up every time but it does kind of fly in the face of true TDD.
Once you understand the full power of Groovy outside of Grails, you should try to write unit tests without depending on Grails.  The true spirit of a unit test is not requiring a framework.  Groovy on its own has many ways to stub/mock classes that don't require a long startup time.  Then your unit tests can run individually and as a whole very fast.  I do TDD this way in IntelliJ IDEA on a method level that is very fast.
It is NOT true that mocking in Grails requires Grails mocking ALL the time.  Sometimes it is harder than other times to achieve this but remember, Grails is simply an abstraction of many cool technologies using some Groovy metaprogramming that allow quick development.  If they aren't running like you expect, dig in and understand them so you can remove anything Grails is doing that you don't need.


text:
Q: Issuing JWT token myself versus using IdentityServer4(OIDC) for Web API https://identityserver4.readthedocs.io/en/release/intro/support.html
I currently issue tokens myself in my web api with JwtSecurityToken and I use standard ASP.NET Core middleware calling AddJwtBearer to verify the tokens. It works fine.
What advantage will give me using OpenID Connect (through IdentityServer4) over the approach described above? How to answer myself question "Do I need OpenID Connect?"
From my basic understanding about OpenID Connect, it is used to allow third parties to access your API. But I make API for myself and not for third parties and I don't know why should I favor IdentityServer/OpenIddict over my simple approach.
I read that if I want Single sign-on I should use this, but JWTs itself aren't bound to any specific domain and I can use single sign-on with just pure JWTs(they're self-contained)
I understand it implements some kind of standard for issuing tokens. (protocol). It might be good if I ever wish to expose some API to third parties. But for internal APIs? Is it worth using it?
This is my current auth flow (from https://jonhilton.net/2017/10/11/secure-your-asp.net-core-2.0-api-part-1---issuing-a-jwt/)

What I really want to implement to secure my Web API:

*

*Login

*Logout (invalidate token?)

*No consent screen (want to have API only for myself), auth happens in the background in my native desktop, mobile, web app (no redirection)

*Remember me feature (refresh tokens?)

Could someone clear out the fuzzy picture of OIDC/OAuth2 for me? i.e. give me some disadvantages going my own way (implementing my own flow) and advantages of using OIDC in place of my own flow.
What will it save me from doing later on (on the client-side for example), and what will not. And most particularly, is it good to start every project using standard flows like OIDC? Will it somehow benefit me in the future?

A: In any case you will implement OAuth2. Think of Oidc as an extension of OAuth2. The most important thing to keep in mind is seperation of concerns.
Forget Oidc, Identity Server 4 is all about authentication: "who is the user"? Consider Google login. When a user logs in for the first time, the application doesn't know the user, it only knows that Google does.
Authorization takes place on a different level and isn't really a concern of IdentityServer. For that you could take a look at PolicyServer.
So you'll need to keep the user database seperated from the application database. This doesn't mean you need another database, just don't mix contexts. If you have a relation from the "business context" to e.g. the user table in the "Identity context" then you are going to have a problem eventually.
In your setup your web api is both the resource and the identity provider. This means that every new web api you create has to be implemented as both resource and identity provider. For maintainability you could create a seperate web api that acts as an identity provider, while the web api is a resource only. You can implement something like that as long as all apps can read the token.
The same counts for the front. Why should the front have anything to do with the user? All it needs to do is pass the token in order to get the user authorized. In case of IdentityServer, the app contacts it to verify the user and receives a token. It knows nothing about credentials. This is more secure. The client app can be compromised. The credentials can be intercepted.
Having single apps with a specific concern makes things more maintainable. And it is quite easy to add a new resource without having to code when you use IdentityServer. Just add the configuration. It also allows you to add other flows in the future that are not needed at this time. And as a side note, the consent screen is optional.
The bonus is that you can implement SSO, where in your setup that could be harder, if not impossible.
So you don't have to use IdentityServer, nor Oidc. Your setup may be just fine. But if you build something, keep seperation of concerns in mind.


text:
Q: How would you turn jinja2 templates into static html I have a flask application using the jinja2 template engine. The content is dynamic, pulling particular bits from a database.
I'd like to turn a particular page static with all the dynamic data etc. intact. However, I'd like this to run every hour or so as the database will continue to have new data, hench why I'm not just using an existing static generator or building the static page manually - I will cron the job to run automatically.
Any thoughts on how this might be done? I can't provide code examples as I simply don't have a clue on how I might tackle this.
Any help to get me started would be much appreciated.

A: You can use Frozen-Flask to convert a dynamic Flask app to a static site.  It can discover most pages on it's own, assuming each page is linked from another page, such as a list of blog posts linking to individual posts.  There are also ways to tell it about other pages if they are not discovered automatically.  You could run this periodically with a cron job to update the static site regularly.
freeze_app.py:
from flask_frozen import Freezer
from myapp import app

freezer = Freezer(app)
freezer.freeze()


text:
Q: Unable to drag and drop into PictureBox I am having issues Dragging and Dropping into a Picturebox in my Winforms Application.  I am getting an icon that looks like this when I try to drag and drop a picture.  It appears that it is not taking the AllowDrop I am applying to the picture box.  All methods are initialized in the designer.
This is the code in my form:
   private void Overlay_Load(object sender, EventArgs e)
    {
        pbx_OverlayImage.AllowDrop = true;
    }

    private void pbx_OverlayImage_DragDrop(object sender, DragEventArgs e)
    {
        MessageBox.Show("YAY");
        pbx_OverlayImage.Image = (Bitmap)e.Data.GetData(DataFormats.Bitmap, true);
    }

    private void pbx_OverlayImage_DragEnter(object sender, DragEventArgs e)
    {
        // See if this is a copy and the data includes an image.
        if (e.Data.GetDataPresent(DataFormats.Bitmap) &&
            (e.AllowedEffect & DragDropEffects.Copy) != 0)
        {
            // Allow this.
            e.Effect = DragDropEffects.Copy;
        }
        else
        {
            // Don't allow any other drop.
            e.Effect = DragDropEffects.None;
        }
    }

    private void pbx_OverlayImage_MouseDown(object sender, MouseEventArgs e)
    {
        var img = pbx_OverlayImage.Image;
        if (img == null) return;
        if (DoDragDrop(img, DragDropEffects.Move) == DragDropEffects.Move)
        {
            pbx_OverlayImage.Image = null;
            return;
        }
        pbx_OverlayImage.DoDragDrop(pbx_OverlayImage.Image,
        DragDropEffects.Copy);
    }

This is the code I use to call the Form:
        var form = new Overlay {lbl_Title = {Text = txbx_OverlayName.Text}, pbx_OverlayImage = {AllowDrop = true}};
        //var form = new test();
        form.Show();

Thank you very much for your time.


text:
Q: How to copy paste pivot table values? My macro is supposed to copy paste all visible rows of data into Outlook mail. It works for another sheet but it's not working when I try it on a pivot table.
These are my codes and my current output in Outlook.
It works for another sheet in my Excel file which copy pastes all visible data into Outlook directly.

Option Base 1
Private i As Integer, LastRowI As Integer, LastRowII As Integer, t As Integer
Private MCells As Range, CCells As Range
Private rng As Range
Private count As Integer
Private Arr() As String

Sub ExportMail()

count = 0

Dim myOutApp As Object
Dim myOutmail As Object
Dim rng As Range
Dim text, address, addressCC, subject, Name As String
Dim lastrow, vArrayLength, i, counter, t, x As Integer

'Create array using CBF values
    lastrow = Worksheets(2).Cells(Rows.count, 2).End(xlUp).Row
    Sheets.Add After:=ActiveSheet
    ActiveSheet.Name = "Temp"
    Worksheets(2).Activate
        ThisWorkbook.ActiveSheet.Range(Cells(2, 2), Cells(lastrow, 2)).Copy
        ThisWorkbook.Worksheets("Temp").Cells(1, 1).PasteSpecial xlValues

    ThisWorkbook.Worksheets("Temp").Rows(1).Delete Shift:=x1Up
    ThisWorkbook.Worksheets("Temp").Range("$A$1:$A$" & ThisWorkbook.Worksheets("Temp").Cells(Rows.count, 1).End(xlUp).Row).RemoveDuplicates Columns:=1, Header:=xlNo
    lastrow = ThisWorkbook.Worksheets("Temp").Cells(Rows.count, 1).End(xlUp).Row

    ReDim Arr(0 To lastrow)
        For i = 1 To UBound(Arr)
            Arr(i) = ThisWorkbook.Worksheets("Temp").Cells(i, 1)
            Debug.Print "The value " & ThisWorkbook.Worksheets("Temp").Cells(i, 1) & " has been assigned to the " & i & ". element of the array"
        Next i

    Application.DisplayAlerts = False
    ThisWorkbook.Worksheets("Temp").Delete
    Application.DisplayAlerts = True

    lastrow = ThisWorkbook.ActiveSheet.Cells(Rows.count, 2).End(xlUp).Row

    Set CCells = ThisWorkbook.ActiveSheet.Range(ThisWorkbook.ActiveSheet.Cells(2, 1), ThisWorkbook.ActiveSheet.Cells(lastrow, 7)).SpecialCells(xlCellTypeVisible).EntireRow

 For i = 1 To UBound(Arr)
    Set MCells = Nothing
    Set MCells = ThisWorkbook.ActiveSheet.Range(ThisWorkbook.ActiveSheet.Cells(2, 1), ThisWorkbook.ActiveSheet.Cells(2, 7)).SpecialCells(xlCellTypeVisible)

        For Each rng In CCells
            If ThisWorkbook.ActiveSheet.Cells(rng.Row, 7) = Arr(i) Then
                Set MCells = Union(MCells, ThisWorkbook.ActiveSheet.Range(ThisWorkbook.ActiveSheet.Cells(rng.Row, 1), ThisWorkbook.ActiveSheet.Cells(rng.Row, 7)).SpecialCells(xlCellTypeVisible))
            End If
        Next rng
        Debug.Print MCells.address

        Set findcell = ThisWorkbook.Worksheets(4).Columns("D").Find(Arr(i))
        If Not findcell Is Nothing Then
        address = ThisWorkbook.Worksheets("Sheet1").Cells(findcell.Row, 5)
        If LCase(Left(address, 10)) = "fixed-term" Then
            Name = Right(address, Len(ThisWorkbook.Worksheets("EMail").Cells(2, 2)) - InStr(1, address, "."))
            Name = Left(Name, InStr(1, Name, ".") - 1)
            Name = UCase(Left(Name, 1)) & Right(Name, Len(Name) - 1)
                Else
            Name = Left(address, InStr(1, address, ".") - 1)
            Name = UCase(Left(Name, 1)) & Right(Name, Len(Name) - 1)
        End If
        Else
        MsgBox "There is no Match for " & Arr(i)
        End If

        subject = Left(SheetValue, 4) & ThisWorkbook.Worksheets("EMail").Cells(4, 2)
        addressCC = ThisWorkbook.Worksheets("EMail").Cells(3, 2)
        lastrow = ThisWorkbook.ActiveSheet.Cells(Rows.count, 1).End(xlUp).Row
        Set rng = ThisWorkbook.ActiveSheet.Range("$A$2:$Z" & lastrow).SpecialCells(xlCellTypeVisible)
        Debug.Print rng.address

        Header = RangetoHTML(MCells)

        text = "" & _
         ThisWorkbook.Worksheets("EMail").Cells(1, 2) & "" & vbNewLine

        text = Replace(text, "NAME", Name)

        text = Replace(text, "_PartNumbers_", Header)

        Set myOutApp = CreateObject("Outlook.Application")
        Set MyMessage = myOutApp.CreateItem(0)
        With MyMessage
            .GetInspector.Display
            .To = address
            .CC = addressCC
            .subject = subject
            Signature = MyMessage.htmlbody
            .htmlbody = text & Signature
        End With
        Set myOutApp = Nothing
        Set MyMessage = Nothing
    Next i

End Sub

Function RangetoHTML(MCells As Range)

    Dim fso As Object
    Dim ts As Object
    Dim TempFile As String
    Dim TempWB As Workbook

    TempFile = Environ$("temp") & "/" & Format(Now, "dd-mm-yy h-mm-ss") & ".htm"

    MCells.Copy

    Set TempWB = Workbooks.Add(1)
    With TempWB.Sheets(1)
        .Cells(1).PasteSpecial Paste:=8
        .Cells(1).PasteSpecial xlPasteValues, , False, False
        .Cells(1).PasteSpecial xlPasteFormats, , False, False

        .Cells(1).Select
        Application.CutCopyMode = False
        On Error Resume Next
        .DrawingObjects.Visible = True
        .DrawingObjects.Delete
        On Error GoTo 0
    End With

    TempWB.Sheets(1).Activate

 With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With

    With TempWB.PublishObjects.Add( _
         SourceType:=xlSourceRange, _
         Filename:=TempFile, _
         Sheet:=TempWB.Sheets(1).Name, _
         Source:=TempWB.Sheets(1).UsedRange.address, _
         HtmlType:=xlHtmlStatic)
        .Publish (True)
    End With

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.GetFile(TempFile).OpenAsTextStream(1, -2)
    RangetoHTML = ts.ReadAll
    ts.Close
    RangetoHTML = Replace(RangetoHTML, "align=center x:publishsource=", _
                          "align=left x:publishsource=")
    TempWB.Close savechanges:=False

    Kill TempFile

    Set ts = Nothing
    Set fso = Nothing
    Set TempWB = Nothing

End Function


text:
Q: formal completion When I study formal completion and formal schemes, on p.194 of Hartshorne's "Algebraic Geometry", he said "However, one should note that the local rings of $\hat{X}$ are in general not complete."
But I can't see the reason for that the local rings of $\hat{X}$ are in general not complete.
Could someone explains this for me, thanks.

A: Consider the completion of $\mathrm{Spec}(\mathbb Q[U,V])$ along $U=0$, i.e., $\hat X=\mathrm{Spf}(\mathbb Q[[U]]\{V\})$, and let $x$ be the point $V=0$. Then $U^k/(V-k)$ for $k=1,2,\dots$ is a sequence in $\mathcal O_{\hat X,x}$ converging $U$-adically to $0$, but the corresponding series does not converge. Each element in $\mathcal O_{\hat X,x}$ comes from an open subset of $\hat X$, so is regular outside a finite subset.


text:
Q: Is possible use 'div id' as name of array? Please view this jsfiddle jsfiddle.net/rflfn/uS4jd/
This is other try jsfiddle.net/rflfn/T3ZT6/
I'm using SMOF to developper Wordpress theme, I need make one function to change some values when link is clicked, but when I make array with name of div, the array returns null value...
HTML:
Some Link

Another Link

Link 3

jQuery:
$(document).ready(function(){
    // var col_settext1 = new Array(); // <-- I need make this array with name of DIV cliked
    col_settext1['field_id1']='#FF0000';
    col_settext1['field_id2']='#00FFFF';

    // var txt_settext1 = new Array(); // <-- I need make this array with name of DIV cliked
    txt_settext1['field_id3']='Some Text Here';
    txt_settext1['field_id4']='Another Text Here';

    // var txt_settext2 = new Array(); // <-- I need make this array with name of DIV cliked
    txt_settext2['field_id5']='Some Text Here';

    // var col_settext2 = new Array(); // <-- I need make this array with name of DIV cliked
    col_settext2['field_id6']='Another Text Here';

    // var chk_settext2 = new Array(); // <-- I need make this array with name of DIV cliked
    chk_settext2['field_id7']="checked";
});

$('.button').click(function(){
    $myclass = this.id;

    $col = 'col_' + $myclass;
    $txt = 'txt_' + $myclass;
    $chk = 'chk_' + $myclass;

    // Based I clicked on the link 'settext1', Here I have this:
    // col_settext1
    // txt_settext1
    // chk_settext1

    // THE PROBLEM ARE HERE!
    $col = new Array(); // <--- Here I use name of DIV as Array, but the value is lost...
    $txt = new Array();
    $chk = new Array();

    // Test...
    alert($col); // <--- Here no have any value :(
    alert($col[1]); // <--- Here no have any value :(

    for (id in $col) { // 'id' is value of array --> col_settext1['field_id1']='#FF0000';
        // do function based on array values...
        // just example:
        alert(id);
    }
    for (id in $txt) { // 'id' is value of array --> txt_settext1['field_id1']='#FF0000';
        // do function based on array values...
    }
    for (id in $chk) { // 'id' is value of array --> chk_settext1['field_id1']='#FF0000';
        // do function based on array values...
    }

});

Is possible use name of the div as array name?
Any suggestion or any other method to solve this problem is welcome.

A: If I understand your question correctly (i.e. you want to create dynamic variable names based on certain parameters), you should be using below code instead of "$col = new Array();"
window[$col] = new Array();
window[$txt] = new Array();

etc..

A: Your problem is that you are not actually setting the variable name to the new array, if I'm interpreting what you're asking correctly.
At this stage:
$myclass = this.id;

$col = 'col_' + $myclass;
$txt = 'txt_' + $myclass;
$chk = 'chk_' + $myclass;

You'd have
    $col = "col_id",
    $txt = "txt_id",
    $chk = "chk_id".
Basically, each of these three variables is bound to a string.
Now you do:
$col = new Array();
$txt = new Array();
$chk = new Array();

So now each of these three variables is bound to a brand new array, with no entries in it.
What you want to do is this:
$col = new Array();
$col[0] = "col_" + $myclass;

And the same for the others. This will create a new array with a single entry, "col_id", bound to the variable name $col.
This will give you arrays named $col, $txt, and $chk containing the id name.
If, instead, you want to actually create dynamic variable names (not sure if you actually need this, but sure), you need to use Window.

A: Looks like something simple, my knowledge in jquery is minimal, I'm two full days trying to make this work and nothing. For who knows this thing is five minutes. I created another code, what I need is just to get the alert returns the desired value, then I can put my original code to work.
By clicking the button1, I should see the alert "text 1", but nothing happens.
http://jsfiddle.net/rflfn/N4a2h/
html
Button1
Button2
Button3

Jquery
$('.button').click(function () {

    var window[myvar] = this.id;
    window[myvar] = new Array(); // I need use ID as array name

    // Code for button1
    arr1['value1'] = 'text 1';
    arr1['value2'] = 'text 2';

    // Code for button2
    arr2['value3'] = 'text 3';
    arr2['value4'] = 'text 4';

    // Code for button3
    arr2['value5'] = 'text 5';
    arr2['value6'] = 'text 6';

    // Click on Button1, the alert below need show "text 1"
    alert(window[myvar['value1']]); // "text 1"

    // alert(myvar['value1']);
});

I found this
http://www.sitepoi...post5174213 but I can't make it work too.
I try use this other Dynamic jQuery variable names but I can't make it work too.

A: I ask on jQuery forum and finally get the solution
https://forum.jquery.com/topic/is-possible-use-div-id-as-name-of-array-that-already-have-value
http://jsfiddle.net/L4CDd/
HTML
Button1 |
Button2 |
Button3

jQuery
var arr = {
    arr1: {value1:"test 1", value2:"test 2"},
    arr2:{value3:"test 3", value4:"test 4"},
    arr3:{value5:"test 5", value6:"test 6"}
}
$('.button').click(function () {
    var call_array = arr[$(this).data("arr")]
    $.each(call_array, function (index, value) {
        alert('Array Value: ' + index + '        Array Content: ' + value);
    });
});

Thanks for help.


text:
Q: Show a picture when mousemove over a text with jquery? do you know any tutorial or script that shows a picture when mousemove over a html text?

A: A basic example using jQuery would be something like this:
CSS
#myImage {
    display:none;
}

HTML
some text

jQuery
$(function() {  // Makes sure DOM loads before code is run

    $('.pictureTrigger').hover(   // Assign event handlers for mouseenter/mouseleave

        function() { $('#myImage').show(); },  // Find myImage and show it on mouseenter
        function() { $('#myImage').hide(); }   // Find myImage and hide it on mouseleave
    );

});

It's hard to give a better answer without more specifics in the question.
The basic idea is that the text is contained in a span, which has a class called pictureTrigger. Could be named anything, though.
A hover event (which is actually shorthand for two events, mouseenter and mouseleave) is added to all elements with the pictureTrigger class.
The two functions represent the mouseenter and mouseleave events respectively. The event handler functions find the img with the ID myImage, and show/hide it.

Relevant jQuery docs:

*

*.show() - http://api.jquery.com/show/

*.hide() - http://api.jquery.com/hide/

*.hover() - http://api.jquery.com/hover/

A: Google for tooltip plugin. There's a lot of them.


text:
Q: Two questions about Netbeans I'm migrating from Eclipse to Netbeans, and two problems are happening:

*

*I created my own file template, but how can I set a default for the "Created file name" field?
I always name my files as Class_Name.class.php and Netbeans doesn't allow me to edit the field to add the ".class".

*Sometimes, the mouse cursor change from the default text pointer to arrow pointer and I have to close and re-open Netbeans to go back to normal. Anyone had the same problem?

I'm running a Mac OS X 10.6.5 and Netbeans 6.9.1

A: *

*Go to Tools|Templates, and in the template manager find the template in question. (Unintuitively) Right-Click on the template and select Properties. You can change the File Name property here, but in NB 6.9.1 it seems a bit quirky to me. For example, I changed the File Name for the PHP Class template from PHPClass to PHPCLass.class. It certainly put the .class on to the filename, but gave me PHPCLass.class in the File Name field on the New PHP Class dialog (File|New File...|etc., or any of the number of other ways to get to a new file dialog). I had to deselect the .class part manually to give the file a name that still included the .class. More annoying, however, was that if the value of the File Name property contains an extension-looking piece, then the automatic generation of the .php was surpressed!  I had to go back and change the File Name property to "PHPClass.class.php" and deal with retaining both the .class and the .php.
I tried going a different route, by attempting to add a new extension in Tools|Options|Miscellaneous|Files, but that would not let me create an extension that contained a period.
I have not found a property, yet, that controls the created name directly.

*I've never seen that, ever. I'm not on a Mac, so that might be something quirky/localized to the Mac look and feel (try a different one--Napkin is always entertaining for about 90 seconds, :-) until you realize not all controls are accounted for), or maybe (and more scary) a quirk/bug in the native-end of Mac's implementation of Swing components.


text:
Q: Creating custom package group for yum repository gives "comps file is empty/damaged" I am having trouble setting up a custom package group for my custom yum repository in RHEL7.6.
First, here are the steps I am taking to create the custom yum repository.

*

*Create a directory that will contain all the RPMs and copy over the relevant ones:
$ mkdir MyRepo
$ cp /path/to/some/*.rpm MyRepo/

*Generate metadata for the repository:
$ cd MyRepo
$ createrepo .

Now that the custom repository is made, I move onto creating the package group as follows.

*Create a comps.xml file in MyRepo/repodata/:

$ touch repodata/comps.xml

that contains metadata of the following form:

<comps>
<!--  <meta> -->
<!-- Meta information will go here eventually... -->
<!--  </meta> -->
  <group>
    <id>myrepo</id>
    <name>MyRepo</name>
    <default>true</default>
    <description>My custom repository</description>
    <uservisible>true</uservisible>
    <packagelist>
      <packagereq type="mandatory">octave</packagereq>
      <packagereq type="mandatory">octave-devel</packagereq>
      etc...
    </packagelist>
  </group>
</comps>

*I then update the metadata previously created to account for the group data:

createrepo -g repodata/comps.xml .

*Finally I create myrepo.repo to the /etc/yum.repos.d/ directory and put the following in it:

[myrepo]
name=MyRepo
baseurl=file:///path/to/MyRepo
enabled=1

Once all that is complete I yum clean all which works without complaining. But then when I go to test things via yum --noplugins groupinfo MyRepo things go badly. I get the following error:
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Failed to add groups file for repository: MyRepo - comps file is empty/damaged
Warning: group/environment MyRepo does not exist.

My comps file is not empty and its hash matches what is found in repodata/repomd.xml. I am pretty lost as to how to go about debugging this. What am I doing wrong? Would a mistyped package name cause this big of an error?
Thank you in advance for your help.

A: I got the same messages, "here is no installed groups file.", and "Failed to add groups file for repository: base - comps file is empty/damaged".
I was working on a default install from the official repository.
It turned out to be a cache problem.
sudo yum rm -rf /var/cache/yum
cleared it all up


text:
Q: Analysis of longest run of heads when flipping a fair coin. Consider a sequence of $n$ unbiased coin flips. Consider the length of the
longest contiguous sequence of heads.
(a) Show that you are unlikely to see a sequence of length $c + \log_2(n)$ for $c > 1$ (give a decreasing bound as a function of c).
(b) Show that with high probability you will see a sequence of length $\log_2 n − O(\log_2 \log_2 n)$.
For (a) I want to use Markov's inequality to get a bound. For that, I need to find $\mathbb{E}[X]$ where $X$ is the longest run of heads after $n$ flips. I'm not sure how to get $\mathbb{E}[X]$.

A: To obtain $E[X]$ is not easy.
A simpler way: let $g(n,m)$ be the number of coins sequences with length $n$ that have some subsequence of at least $m$ heads.
Then $$g(n,m) \le 2^{n-m} (n+1-m) \tag 1$$
This is obtained by fixing one of the $(n+1-m)$ possible positions of the $m-$run inside the $n$ coins, and noting that the other coins might take any value. This is an upper bound, because it counts more than once some possibilities.
Because the coins are fair, all occurences are equiprobable. Then the probability of having some subsequence of at least $m$ heads is bounded by
$$p \le \frac{2^{n-m} (n+1-m)}{2^n}=\frac{(n+1-m)}{2^m} \tag 2$$
Setting $m=c+\log_2(n)$
$$p \le \frac{1}{2^c}\left(1 - \frac{c-1+\log_2n}{n}\right) \tag3$$
Update: this could be obtained a little easier. Let $A_k$ be the event "there is a run of $m$ consecutive zeroes starting at position $k$ inside the $n-$ sequence". Then the probability that there is at least one such run is
$$\begin{align}
p &=P(A_1 \cup A_2 \cup \cdots A_{n+1-m}) \\
  & \le P(A_1) + P(A_2) + \cdots P(A_{n+1-m}) \\
  & = (n+1-m) P(A_i) \\
  & = (n+1-m) 2^{-m} \\
\end{align}
$$
which agrees with $(2)$.