qid
int64
1
74.6M
question
stringlengths
45
24.2k
date
stringlengths
10
10
metadata
stringlengths
101
178
response_j
stringlengths
32
23.2k
response_k
stringlengths
21
13.2k
40,390,491
``` for(int i = 0; i < n; i++) { for(int j = 0; j < i; j++) { //Code } } ``` I know the first for-loop is O(n), but what about the second one?
2016/11/02
['https://Stackoverflow.com/questions/40390491', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6442096/']
This problem happened because the angular version I am using is 1.5. changing the executable from npm to npm.cmd solved the problem! ``` <execution> <id>exec-npm-update</id> <phase>generate-sources</phase> <configuration> <workingDirectory>${uiResource...
I faced the same issue, as answered you need to provide npm.cmd instead just npm
40,390,491
``` for(int i = 0; i < n; i++) { for(int j = 0; j < i; j++) { //Code } } ``` I know the first for-loop is O(n), but what about the second one?
2016/11/02
['https://Stackoverflow.com/questions/40390491', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6442096/']
This problem happened because the angular version I am using is 1.5. changing the executable from npm to npm.cmd solved the problem! ``` <execution> <id>exec-npm-update</id> <phase>generate-sources</phase> <configuration> <workingDirectory>${uiResource...
If you like to run the shell or command prompt commands irrespective of environment. I am talking about npm.cmd (windows), npm.sh (linux) parts. **Downgrade the maven-exec-plugin to Version 1.4.0** so that you can just mention (For e.g.) ``` <executable>npm</executable> <executable>ng</executable> ```
46,905,636
I need some condition on insert statement to prevent unauthorized insertions. I wrote something like this: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' WHERE 12 IN (SELECT id FROM users WHERE allow_add=1) ``` Where 12 is the id of current user. But mysql process stopped unexpect...
2017/10/24
['https://Stackoverflow.com/questions/46905636', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5259185/']
From users and Where exists work so maybe a bug with in? ``` MariaDB [sandbox]> delete from t where att = 3; Query OK, 2 rows affected (0.04 sec) MariaDB [sandbox]> MariaDB [sandbox]> select * from t; +------+------+ | id | att | +------+------+ | 1 | 1 | | 1 | 2 | | 2 | 0 | +------+------+ 3 row...
Add semicolon(;) to your query, and what `desc` is doing in query. It will describe the table structure and its attributes.
46,905,636
I need some condition on insert statement to prevent unauthorized insertions. I wrote something like this: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' WHERE 12 IN (SELECT id FROM users WHERE allow_add=1) ``` Where 12 is the id of current user. But mysql process stopped unexpect...
2017/10/24
['https://Stackoverflow.com/questions/46905636', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5259185/']
With thanks to [P.Salmon answer](https://stackoverflow.com/a/46906663/5259185), I found the solution. It seems that MySQL needs FROM statement in conditional SELECT, unlike the SQL Server. So, I add a temporary table name as below: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' FROM (SELECT...
Add semicolon(;) to your query, and what `desc` is doing in query. It will describe the table structure and its attributes.
46,905,636
I need some condition on insert statement to prevent unauthorized insertions. I wrote something like this: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' WHERE 12 IN (SELECT id FROM users WHERE allow_add=1) ``` Where 12 is the id of current user. But mysql process stopped unexpect...
2017/10/24
['https://Stackoverflow.com/questions/46905636', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5259185/']
From users and Where exists work so maybe a bug with in? ``` MariaDB [sandbox]> delete from t where att = 3; Query OK, 2 rows affected (0.04 sec) MariaDB [sandbox]> MariaDB [sandbox]> select * from t; +------+------+ | id | att | +------+------+ | 1 | 1 | | 1 | 2 | | 2 | 0 | +------+------+ 3 row...
It is not a proper way to authorize insertions in database. Instead, you can use programming based solution for this problem. In PHP, a proper solution could be:- ``` if ($user->allow_add == 1){ //where $user is the User instance for current user $sql->query("INSERT INTO `fund` (amount,desc) VALUES(1000,'Some des...
46,905,636
I need some condition on insert statement to prevent unauthorized insertions. I wrote something like this: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' WHERE 12 IN (SELECT id FROM users WHERE allow_add=1) ``` Where 12 is the id of current user. But mysql process stopped unexpect...
2017/10/24
['https://Stackoverflow.com/questions/46905636', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5259185/']
With thanks to [P.Salmon answer](https://stackoverflow.com/a/46906663/5259185), I found the solution. It seems that MySQL needs FROM statement in conditional SELECT, unlike the SQL Server. So, I add a temporary table name as below: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' FROM (SELECT...
It is not a proper way to authorize insertions in database. Instead, you can use programming based solution for this problem. In PHP, a proper solution could be:- ``` if ($user->allow_add == 1){ //where $user is the User instance for current user $sql->query("INSERT INTO `fund` (amount,desc) VALUES(1000,'Some des...
46,905,636
I need some condition on insert statement to prevent unauthorized insertions. I wrote something like this: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' WHERE 12 IN (SELECT id FROM users WHERE allow_add=1) ``` Where 12 is the id of current user. But mysql process stopped unexpect...
2017/10/24
['https://Stackoverflow.com/questions/46905636', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5259185/']
From users and Where exists work so maybe a bug with in? ``` MariaDB [sandbox]> delete from t where att = 3; Query OK, 2 rows affected (0.04 sec) MariaDB [sandbox]> MariaDB [sandbox]> select * from t; +------+------+ | id | att | +------+------+ | 1 | 1 | | 1 | 2 | | 2 | 0 | +------+------+ 3 row...
Try This: ``` INSERT INTO `fund` (amount,desc) SELECT 1000 as amt,'Some desc' as des FROM users WHERE allow_add=1 LIMIT 12 ```
46,905,636
I need some condition on insert statement to prevent unauthorized insertions. I wrote something like this: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' WHERE 12 IN (SELECT id FROM users WHERE allow_add=1) ``` Where 12 is the id of current user. But mysql process stopped unexpect...
2017/10/24
['https://Stackoverflow.com/questions/46905636', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5259185/']
With thanks to [P.Salmon answer](https://stackoverflow.com/a/46906663/5259185), I found the solution. It seems that MySQL needs FROM statement in conditional SELECT, unlike the SQL Server. So, I add a temporary table name as below: ``` INSERT INTO `fund` (amount,description) SELECT 1000,'Some description' FROM (SELECT...
Try This: ``` INSERT INTO `fund` (amount,desc) SELECT 1000 as amt,'Some desc' as des FROM users WHERE allow_add=1 LIMIT 12 ```
45,023,388
how to convert .txt to .csv using shell script ?? Input ``` A B 10 C d e f g H I 88 J k l m n O P 3 Q r s t u ``` Expected Output - After 4 blank, don't change to ',' ``` A,B,10,C,d e f g H,I,88,J,k l m n O,P,3,Q,r s t u ``` I was trying but can't handle "d e f g" ``` $ cat input.txt | tr -s '[:blank:]' ','...
2017/07/11
['https://Stackoverflow.com/questions/45023388', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5088324/']
The `np.nonzero` command will give you the indices of all non-zero elements. So if you just want to exclude the last column, I'd do: ``` import numpy as np x_orig = np.array([(1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0), (1, 5, 9, 10, 2, 0, 0, 0, 0, 0, 1)]) row, col = np.nonzero(x_orig[:,:-1]) # these are the ind...
Example data: ``` train_data = [1,5,9,10,2,0,0,0,0,0,1] ``` If you're looking for a one-liner: ``` max([i for i, x in enumerate(train_data[:-1]) if x != 0]) ``` If you're looking for efficiency, you can start from the front or end (depending on if you're expecting more or less zeros than other values) and see whe...
44,387
In terms of the future of the trust network where there will be an increasing number of fit-for-purpose blockchains such as ones for proof of asset, proof of identity, proof of ownership etc., will there be a wallet to store all of an individual's blockchain needs? Much like our conventional wallet now storing our cas...
2016/05/26
['https://bitcoin.stackexchange.com/questions/44387', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/36005/']
There is no technological reason preventing the creation of a single application that communicates with several peer-to-peer blockchain networks, and manages private keys for all of them. If a blockchain-based future is eminent, then there will be a need for both personal wallets and point-of-sale systems that handle m...
Probably need a domain addressing scheme. Where domains are like: * Bitcoin * Amazon digital media library * Apple iTunes media library * Joe Blog's digital art library * Government digital cryptocurrency Where each domain implements their own blockchain. Allowing us the ability to store all our rights in a wallet or...
44,387
In terms of the future of the trust network where there will be an increasing number of fit-for-purpose blockchains such as ones for proof of asset, proof of identity, proof of ownership etc., will there be a wallet to store all of an individual's blockchain needs? Much like our conventional wallet now storing our cas...
2016/05/26
['https://bitcoin.stackexchange.com/questions/44387', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/36005/']
The Exodus Project might be of interest: <http://www.exodus.io> It's a multi-currency desktop wallet with shapeshift (altcoin exchange) already built-in. You can already download a beta version of it, official launch is going to be this summer according to the projects homepage. I can't find an example better than <ht...
There is no technological reason preventing the creation of a single application that communicates with several peer-to-peer blockchain networks, and manages private keys for all of them. If a blockchain-based future is eminent, then there will be a need for both personal wallets and point-of-sale systems that handle m...
44,387
In terms of the future of the trust network where there will be an increasing number of fit-for-purpose blockchains such as ones for proof of asset, proof of identity, proof of ownership etc., will there be a wallet to store all of an individual's blockchain needs? Much like our conventional wallet now storing our cas...
2016/05/26
['https://bitcoin.stackexchange.com/questions/44387', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/36005/']
The Exodus Project might be of interest: <http://www.exodus.io> It's a multi-currency desktop wallet with shapeshift (altcoin exchange) already built-in. You can already download a beta version of it, official launch is going to be this summer according to the projects homepage. I can't find an example better than <ht...
Probably need a domain addressing scheme. Where domains are like: * Bitcoin * Amazon digital media library * Apple iTunes media library * Joe Blog's digital art library * Government digital cryptocurrency Where each domain implements their own blockchain. Allowing us the ability to store all our rights in a wallet or...
35,315,756
Im trying to prevent keyboard from open when showing search view using mSearchItem.expandActionView() Clearing focus from the search view doesn't work: ``` mSearchItem.getActionView().clearFocus(); ``` Any help would be appreciated
2016/02/10
['https://Stackoverflow.com/questions/35315756', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1039477/']
**Update:** The `pull` process will now automatically resume based on which layers have already been downloaded. This was implemented with <https://github.com/moby/moby/pull/18353>. **Old:** There is no `resume` feature yet. However there are [discussions](https://github.com/docker/docker/issues/6928) around this f...
Try this `ps -ef | grep docker` Get PID of all the `docker pull` command and do a `kill -9` on them. Once killed, re-issue the `docker pull <image>:<tag>` command. This worked for me!
35,315,756
Im trying to prevent keyboard from open when showing search view using mSearchItem.expandActionView() Clearing focus from the search view doesn't work: ``` mSearchItem.getActionView().clearFocus(); ``` Any help would be appreciated
2016/02/10
['https://Stackoverflow.com/questions/35315756', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1039477/']
**Update:** The `pull` process will now automatically resume based on which layers have already been downloaded. This was implemented with <https://github.com/moby/moby/pull/18353>. **Old:** There is no `resume` feature yet. However there are [discussions](https://github.com/docker/docker/issues/6928) around this f...
Docker's code isn't as updated as the moby in development repository on github. People have been having issues for several years relating to this. I had tried to manually use several patches which aren't in the upstream yet, and none worked decent. The github repository for moby (docker's development repo) has a scrip...
35,315,756
Im trying to prevent keyboard from open when showing search view using mSearchItem.expandActionView() Clearing focus from the search view doesn't work: ``` mSearchItem.getActionView().clearFocus(); ``` Any help would be appreciated
2016/02/10
['https://Stackoverflow.com/questions/35315756', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1039477/']
Docker's code isn't as updated as the moby in development repository on github. People have been having issues for several years relating to this. I had tried to manually use several patches which aren't in the upstream yet, and none worked decent. The github repository for moby (docker's development repo) has a scrip...
Try this `ps -ef | grep docker` Get PID of all the `docker pull` command and do a `kill -9` on them. Once killed, re-issue the `docker pull <image>:<tag>` command. This worked for me!
46,187,201
This is a homotopy of the json file I always used to read through `boost::property_tree::json_parser::read_json` And it was always working. ``` /**********************************************/ /* the title */ /**********************************************/ { "garden": { ...
2017/09/13
['https://Stackoverflow.com/questions/46187201', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4623526/']
Comments are not JSON. The old parser did have them, but didn't properly support unicode. Here's the message in [the release notes for Boost 1.59.0](http://www.boost.org/users/history/version_1_59_0.html): > > Property Tree: > > > * A new JSON parser with full Unicode support. > * **Breaking > change:** The new p...
The [official JSON standard](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) does not define a syntax for comments ([here's the reason why](http://youtu.be/-C-JoyNuQJs?t=48m53s)). Support for comments is implemented (or not) on a per-parser basis. It was probably something that Boost once su...
1,862,965
I am writing a web service client in C# and do not want to create and serialize/deserialize objects, but rather send and receive raw XML. Is this possible in C#?
2009/12/07
['https://Stackoverflow.com/questions/1862965', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/226682/']
Yes - you can simply declare the inputs and outputs as `XmlNode`'s ``` [WebMethod] public XmlNode MyMethod(XmlNode input); ```
You can have your web service method return a string containing the xml, but do heed the comment above about making things more error-prone.
1,862,965
I am writing a web service client in C# and do not want to create and serialize/deserialize objects, but rather send and receive raw XML. Is this possible in C#?
2009/12/07
['https://Stackoverflow.com/questions/1862965', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/226682/']
You can use the System.Net classes, such as HttpWebRequest and HttpWebResponse to read and write directly to an HTTP connection. Here's a basic (off-the-cuff, not compiled, non-error-checking, grossly oversimplified) example. May not be 100% correct, but at least will give you an idea of how it works: ``` HttpWebRequ...
You can have your web service method return a string containing the xml, but do heed the comment above about making things more error-prone.
1,862,965
I am writing a web service client in C# and do not want to create and serialize/deserialize objects, but rather send and receive raw XML. Is this possible in C#?
2009/12/07
['https://Stackoverflow.com/questions/1862965', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/226682/']
Here is part of an implementation I just got running based on John M Gant's example. It is important to set the content type request header. Plus my request needed credentials. ``` protected virtual WebRequest CreateRequest(ISoapMessage soapMessage) { var wr = WebRequest.Create(soapMessage.Uri); wr.ContentType...
You can have your web service method return a string containing the xml, but do heed the comment above about making things more error-prone.
53,200,172
I am learning Hibernate (beginner here). I wanted to know how the saveOrUpdate method does a comparison of records in the table and data hold in object which is in transient state. Example code snippet: ``` package com.crudoperations; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hi...
2018/11/08
['https://Stackoverflow.com/questions/53200172', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5281658/']
You have a local dependency that you are trying to install. `"internal-edge-render": "file:/root/.m2/repository/pl/chilldev/internal/internal-edge-render/0.1.2/internal-edge-render-0.1.2.tar.gz"` Docker is unaware of it's path. Either install the dependency from npm or mount the directory into docker. Assuming the la...
Setting the docker network to "host" fixed this and other issues for me. ``` docker build . --network host ```
159,052
As described in answers to this [question](https://tex.stackexchange.com/questions/35240/special-arrangement-of-subfigures/35243?noredirect=1#comment363076_35243), the following code: ``` \documentclass{memoir} \newsubfloat{figure} \begin{document} \begin{figure}[H] \centering% \begin{tabular}{lr} \begin{tabular}{c}% ...
2014/02/07
['https://tex.stackexchange.com/questions/159052', 'https://tex.stackexchange.com', 'https://tex.stackexchange.com/users/512/']
Use `b` for the optional argument in the inner tabular: ``` \documentclass{memoir} \newsubfloat{figure} \begin{document} \begin{figure}[H] \centering% \begin{tabular}{@{}lr@{}} \begin{tabular}[b]{c}% \subbottom[A]{\rule{0.3\linewidth}{100pt}} \\ \subbottom[B]{\rule{0.3\linewidth}{100pt}} \end{tabular} & \subbottom[C]{...
Just for fun. For some reason, the first subbottom has a 5pt smaller top margin than all subsequent subbottoms. ``` \documentclass{memoir} \usepackage{tikz} \newsubfloat{figure} \begin{document} \begin{figure}[H] \centering% \begin{tikzpicture} \path (0,0) node(C){\subbottom[C]{\rule{0.6\linewidth}{230pt}}} (C.north ...
34,129,459
i'm asking for parsers, On the server side (cloud code), is there a way to call a function defined in other function ? Function should not be called on the client ``` Parse.Cloud.define("getProfiles", function(request, response) {..}) Parse.Cloud.define("otherFunction', function(request){ //call to getProfiles }) `...
2015/12/07
['https://Stackoverflow.com/questions/34129459', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2420289/']
This can be solved with dev policy. I keep in the habit of using `Parse.Cloud.define` as the means of wrapping a function for external invocation, always building and naming them as follows... ``` // this is just a "wrapper" for the simple JS function Parse.Cloud.define("getProfiles", function(request, response) { ...
[Cloud code documentation](https://parse.com/docs/cloudcode/guide) recommends to call defined functions as follows: You can use `Parse.Cloud.run`. ``` Parse.Cloud.run("getProfiles ", { //here you can pass the function request parameters userId: user.id }).then(function(result) { //here you will handle the...
14,309,502
In auto-fill-mode, I want emacs to auto-fill paragraph with hanging indentation, like this: ``` This is an example of hanging indented paragraph. The first line is indented less than the following lines in a paragraph. Another paragraph starts from here, and lines are broken. ``` How to do this?
2013/01/13
['https://Stackoverflow.com/questions/14309502', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1261870/']
You can achieve the effect you want automatically by putting the following lines into you .emacs file: ```lisp (setq adaptive-fill-function '(lambda () " ")) ``` The string at the end of the line is the width of the hanging indent.
Simply indent the second line manually. Then when you hit `M-q` the whole paragraph will be indented the way you want.
14,309,502
In auto-fill-mode, I want emacs to auto-fill paragraph with hanging indentation, like this: ``` This is an example of hanging indented paragraph. The first line is indented less than the following lines in a paragraph. Another paragraph starts from here, and lines are broken. ``` How to do this?
2013/01/13
['https://Stackoverflow.com/questions/14309502', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1261870/']
Simply indent the second line manually. Then when you hit `M-q` the whole paragraph will be indented the way you want.
You can do this interactively using `M-x set-fill-prefix`, bound by default to `C-x .` (that's a period, or full-stop, after the C-x). Manually, *only once*, indent the second line of a single paragraph, and while your cursor (point) is at that position, press `C-x .`. All auto-fills from now on will indent anything p...
14,309,502
In auto-fill-mode, I want emacs to auto-fill paragraph with hanging indentation, like this: ``` This is an example of hanging indented paragraph. The first line is indented less than the following lines in a paragraph. Another paragraph starts from here, and lines are broken. ``` How to do this?
2013/01/13
['https://Stackoverflow.com/questions/14309502', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1261870/']
You can achieve the effect you want automatically by putting the following lines into you .emacs file: ```lisp (setq adaptive-fill-function '(lambda () " ")) ``` The string at the end of the line is the width of the hanging indent.
You can do this interactively using `M-x set-fill-prefix`, bound by default to `C-x .` (that's a period, or full-stop, after the C-x). Manually, *only once*, indent the second line of a single paragraph, and while your cursor (point) is at that position, press `C-x .`. All auto-fills from now on will indent anything p...
70,045
I'm making a Time card app that keeps track of employee hours. What I would like to know, and this is an etiquette question concerning overtime hours, is: If an employee works past midnight on the last day of the work week, and the employee has worked over 40 hours, should the extra hours worked past midnight be calcu...
2016/06/18
['https://workplace.stackexchange.com/questions/70045', 'https://workplace.stackexchange.com', 'https://workplace.stackexchange.com/users/52936/']
**Ask a potential customer** We cannot safely answer this question for you for a number of reasons. As such the best place to go for this type of information is to ask multiple potential customers (preferably in different types of industries, and at least one that does government contracts) and ask them how they handl...
This is a good question because it doesn't just impact software development. It means that you will have to understand the labor laws for the jurisdictions involved. It isn't just the end of the pay period. If there are night and weekend pay differentials and an employee reports for work at 11:00 PM which pay rate are...
13,346,165
I'd like to know what is the best way to add overall height to the accordion example in the link below. I would like to make the `ul` sub-menu class taller, I would want the extra space to show as just empty with no list elements. <http://vtimbuc.net/gallery/pure-css3-accordion-menu-tutorial/> I think it is possible...
2012/11/12
['https://Stackoverflow.com/questions/13346165', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/359958/']
``` .accordion li:target > .sub-menu { min-height: 908px; //add your height here background: red; //add a background color what you would like } ``` i made this ``` min-height: 908px; ``` just for an example
You wouldn't increase the size of the `ul` sub-menu class, rather each individual `a` tag. Like so: ``` .accordion li > a { height: 64px; // was 32px; } ``` This would double the height of each `a` tag, in turn increasing the height of `li` and ultimately the `ul`
19,243,275
I have been trying to update an iOS client app now for the past 2 weeks, unfortunately it has been rejected twice as Apple say that it crashes on iOS7. Apple have sent me the following crash report. ``` Incident Identifier: C213974C-73E2-42C4-A2AA-E4C2A454319E CrashReporter Key: 2c5d5176cc4387265bd86c427bf138d2b0acf...
2013/10/08
['https://Stackoverflow.com/questions/19243275', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2857808/']
The information you posted is very limited, however I'd start with the following steps: 1. You xxx'ed the hardware model, but the crash may be hardware specific and it may happen only on the hardware you did not test. 2. Same with the os, you may have tested on 7.0.1 or 7.0.2, but according to the crash report it happ...
I faced similar problem where app was working fine in my device but rejected by apple. It was saying some file in a package was corrupted. When I set the permission for read, write and execute for all users and submitted the app again, it was approved. It might be one of the reason in your case. Please try by setting p...
19,243,275
I have been trying to update an iOS client app now for the past 2 weeks, unfortunately it has been rejected twice as Apple say that it crashes on iOS7. Apple have sent me the following crash report. ``` Incident Identifier: C213974C-73E2-42C4-A2AA-E4C2A454319E CrashReporter Key: 2c5d5176cc4387265bd86c427bf138d2b0acf...
2013/10/08
['https://Stackoverflow.com/questions/19243275', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2857808/']
You can examine your app binary with `otool` before re-submitting to know whether or not it links `SenTestingKit`. `otool -L` will list the linked libraries for a Mach-O binary. For example, Xcode links: ``` % otool -L /Applications/Xcode.app/Contents/MacOS/Xcode ...
I faced similar problem where app was working fine in my device but rejected by apple. It was saying some file in a package was corrupted. When I set the permission for read, write and execute for all users and submitted the app again, it was approved. It might be one of the reason in your case. Please try by setting p...
19,243,275
I have been trying to update an iOS client app now for the past 2 weeks, unfortunately it has been rejected twice as Apple say that it crashes on iOS7. Apple have sent me the following crash report. ``` Incident Identifier: C213974C-73E2-42C4-A2AA-E4C2A454319E CrashReporter Key: 2c5d5176cc4387265bd86c427bf138d2b0acf...
2013/10/08
['https://Stackoverflow.com/questions/19243275', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2857808/']
Well..... To fix the issue I basically had to remove CocoaPods from my workspace, Remove the test target and test scheme, I resubmited the app last Thursday and it has just been accepted today. It was a pretty desperate attempt at a fix and I think the culprit was the fact that Apple was running the test scheme on my...
I faced similar problem where app was working fine in my device but rejected by apple. It was saying some file in a package was corrupted. When I set the permission for read, write and execute for all users and submitted the app again, it was approved. It might be one of the reason in your case. Please try by setting p...
19,243,275
I have been trying to update an iOS client app now for the past 2 weeks, unfortunately it has been rejected twice as Apple say that it crashes on iOS7. Apple have sent me the following crash report. ``` Incident Identifier: C213974C-73E2-42C4-A2AA-E4C2A454319E CrashReporter Key: 2c5d5176cc4387265bd86c427bf138d2b0acf...
2013/10/08
['https://Stackoverflow.com/questions/19243275', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2857808/']
You can examine your app binary with `otool` before re-submitting to know whether or not it links `SenTestingKit`. `otool -L` will list the linked libraries for a Mach-O binary. For example, Xcode links: ``` % otool -L /Applications/Xcode.app/Contents/MacOS/Xcode ...
The information you posted is very limited, however I'd start with the following steps: 1. You xxx'ed the hardware model, but the crash may be hardware specific and it may happen only on the hardware you did not test. 2. Same with the os, you may have tested on 7.0.1 or 7.0.2, but according to the crash report it happ...
19,243,275
I have been trying to update an iOS client app now for the past 2 weeks, unfortunately it has been rejected twice as Apple say that it crashes on iOS7. Apple have sent me the following crash report. ``` Incident Identifier: C213974C-73E2-42C4-A2AA-E4C2A454319E CrashReporter Key: 2c5d5176cc4387265bd86c427bf138d2b0acf...
2013/10/08
['https://Stackoverflow.com/questions/19243275', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2857808/']
You can examine your app binary with `otool` before re-submitting to know whether or not it links `SenTestingKit`. `otool -L` will list the linked libraries for a Mach-O binary. For example, Xcode links: ``` % otool -L /Applications/Xcode.app/Contents/MacOS/Xcode ...
Well..... To fix the issue I basically had to remove CocoaPods from my workspace, Remove the test target and test scheme, I resubmited the app last Thursday and it has just been accepted today. It was a pretty desperate attempt at a fix and I think the culprit was the fact that Apple was running the test scheme on my...
10,452,173
I'm a beginner in SQL and I have the following problem in SQL. I need an SQL query that would calculate the difference between two continuous rows having the same value in field [idpersone] and regroupe them into a single row. For example I need to transform my table to the desired data as shown below: ``` Table dat...
2012/05/04
['https://Stackoverflow.com/questions/10452173', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1374633/']
The niaive solution is this... I'm not sure what you want to do if there are three records for the same `idperson`. Or what to do if to sequential records have different idperson. ``` WITH sequenced_data AS ( SELECT ROW_NUMBER() OVER (PARTITION BY idperson ORDER BY idLigne) AS sequence_id, * FROM my...
I cannot exactly infer the intent of your query. But here it goes: ``` with a as ( select *, (row_number() over(order by idLigne, idperson) - 1) / 2 as pair_number from tbl ) select max(idligne) + '-' + min(idligne) as idLigne, min(idperson) as idpersonne, min(idLigne) as firstlighe, max(idLign...
10,452,173
I'm a beginner in SQL and I have the following problem in SQL. I need an SQL query that would calculate the difference between two continuous rows having the same value in field [idpersone] and regroupe them into a single row. For example I need to transform my table to the desired data as shown below: ``` Table dat...
2012/05/04
['https://Stackoverflow.com/questions/10452173', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1374633/']
You might try something like this: ``` DECLARE @MyTable TABLE(idLigne VARCHAR(2), idperson INT, statut CHAR(1)); INSERT INTO @MyTable VALUES ('L1',1,'A') , ('L2',1,'B') , ('L3',1,'A') , ('L4',1,'B') , ('L5',2,'A') , ('L6',2,'B') , ('L7',3,'A') , ('L8',3,'B') ; WITH a AS ( SELECT idLigne=t2.idLigne+'-'+t1.idLigne...
I cannot exactly infer the intent of your query. But here it goes: ``` with a as ( select *, (row_number() over(order by idLigne, idperson) - 1) / 2 as pair_number from tbl ) select max(idligne) + '-' + min(idligne) as idLigne, min(idperson) as idpersonne, min(idLigne) as firstlighe, max(idLign...
31,409,868
I am trying to write some c# code to interact with Outlook 2010. I am currently using [this example from Microsoft](https://msdn.microsoft.com/en-us/library/office/ff184617.aspx). My code follows: ``` using System; using System.Text; // StringBuilder using System.Diagnostics; // Debug using System.Linq; u...
2015/07/14
['https://Stackoverflow.com/questions/31409868', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2683104/']
You can create a new `Application` object: ``` var appOutlook = new Microsoft.Office.Interop.Outlook.Application(); ``` And then use it as: ``` Outlook.AddressEntry currentUser = appOutlook.Session.CurrentUser.AddressEntry; ```
You are using the wrong project. When you create a new project in Visual studio, use The Outlook Add-in template. (Templates -> Visual C# -> Office -> Outlook). In this code they Application.Session wil work like you expect. Or you should create a new application object like this. var outlook = new Microsoft.Office.I...
31,409,868
I am trying to write some c# code to interact with Outlook 2010. I am currently using [this example from Microsoft](https://msdn.microsoft.com/en-us/library/office/ff184617.aspx). My code follows: ``` using System; using System.Text; // StringBuilder using System.Diagnostics; // Debug using System.Linq; u...
2015/07/14
['https://Stackoverflow.com/questions/31409868', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2683104/']
You can create a new `Application` object: ``` var appOutlook = new Microsoft.Office.Interop.Outlook.Application(); ``` And then use it as: ``` Outlook.AddressEntry currentUser = appOutlook.Session.CurrentUser.AddressEntry; ```
Add the following line at the beginning of the file: ``` using Microsoft.Office.Interop.Outlook; ``` Or just prepend any Outlook object declaration with the Outlook alias. You may find the [C# app automates Outlook (CSAutomateOutlook)](https://code.msdn.microsoft.com/office/CSAutomateOutlook-a3b7bdc9) sample proje...
31,409,868
I am trying to write some c# code to interact with Outlook 2010. I am currently using [this example from Microsoft](https://msdn.microsoft.com/en-us/library/office/ff184617.aspx). My code follows: ``` using System; using System.Text; // StringBuilder using System.Diagnostics; // Debug using System.Linq; u...
2015/07/14
['https://Stackoverflow.com/questions/31409868', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2683104/']
You are using the wrong project. When you create a new project in Visual studio, use The Outlook Add-in template. (Templates -> Visual C# -> Office -> Outlook). In this code they Application.Session wil work like you expect. Or you should create a new application object like this. var outlook = new Microsoft.Office.I...
Add the following line at the beginning of the file: ``` using Microsoft.Office.Interop.Outlook; ``` Or just prepend any Outlook object declaration with the Outlook alias. You may find the [C# app automates Outlook (CSAutomateOutlook)](https://code.msdn.microsoft.com/office/CSAutomateOutlook-a3b7bdc9) sample proje...
158,578
I am attempting to solve two differential equations. The solution gives equations that have branch cuts. I need to choose appropriate branch cuts for my boundary conditions. How do I find the correct ones? The differential equations and the boundary conditions are ``` ClearAll[a, b, x, ω, ν, U]; eqns = { ω b...
2017/10/25
['https://mathematica.stackexchange.com/questions/158578', 'https://mathematica.stackexchange.com', 'https://mathematica.stackexchange.com/users/12558/']
This problem can be solved with the help of Fourier sine transform. Notice Fourier sine transform has the following property: $$ \mathcal{F}\_t^{(s)}\left[f''(t)\right](\omega)=-\omega^2 \mathcal{F}\_t^{(s)}[f(t)](\omega)+\sqrt{\frac{2}{\pi }} \omega f(0) $$ as long as $f(\infty)=0$ and $f'(\infty)=0$. So we first t...
I'm not really sure I understood your question right. Do you mean something like this? Your solutions: ``` eq = {U (1 + 1/4 E^((1/2 + I/2) \[Eta]) (-1 + (1 - I) c[2] - (1 + I) c[4]) + 1/4 E^((1/2 - I/2) \[Eta]) (-1 + (1 + I) c[2] - (1 - I) c[4]) + 1/4 E^((-(1/2) + I/2) \[Eta]) (-1 - (1 + I) c[2] + (1 - I) c[4])...
88,406
Im studying Complexity Theory and i have a question. What principle establishes that every NP problem can be solved by a deterministic turing machine in a exponential time ?
2018/02/21
['https://cs.stackexchange.com/questions/88406', 'https://cs.stackexchange.com', 'https://cs.stackexchange.com/users/84677/']
Excellent question! Nondeterminism first appears (so it seems) in a classical paper of Rabin and Scott, [Finite automata and their decision problems](http://www.cse.chalmers.se/~coquand/AUTOMATA/rs.pdf), in which the authors first describe finite automata as a better abstract model for digital computers than Turing mac...
Nondeterministic systems aren't unrealistic at all: 1. *Computer science* should actually be called *computing science*: it deals with computation, not with computers. (To study computers, study electrical engineering.) Most computational systems we need to describe and analyze in computer science aren't computers. E....
88,406
Im studying Complexity Theory and i have a question. What principle establishes that every NP problem can be solved by a deterministic turing machine in a exponential time ?
2018/02/21
['https://cs.stackexchange.com/questions/88406', 'https://cs.stackexchange.com', 'https://cs.stackexchange.com/users/84677/']
Excellent question! Nondeterminism first appears (so it seems) in a classical paper of Rabin and Scott, [Finite automata and their decision problems](http://www.cse.chalmers.se/~coquand/AUTOMATA/rs.pdf), in which the authors first describe finite automata as a better abstract model for digital computers than Turing mac...
A complexity class is a set of problems (or languages) that can be solved on a given computational model with constraints on the use of resources (such as time and/or space for sequential computations). Therefore, it's pretty easy do define a complexity class. However, it's hard instead to define a *meaningful* complex...
25,645,859
I want to index each element of a list using an array. For example, I want to use `list[arr] = 1`, where `arr` is an array instead of `list[ind] = 1` where `ind` is a number index. Using Dictionary data structure does the job, but creation of the dictionary is time consuming. Is there any other way I can do the above?
2014/09/03
['https://Stackoverflow.com/questions/25645859', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2445465/']
Using [Feature Context](https://github.com/techtalk/SpecFlow/wiki/FeatureContext), you could probably have each sentence start with something like this... ``` Given Previous tests did not fail ``` In that sentence, you verify the current feature context doesn't have a false value. That might look something like this...
I don't know if stopping the entire feature run is possible, after all really all that specflow does is generate tests in the framework of your choice which are then run by some test runner. No unit test runner I know will allow a complete abort of all other tests if one fails. But that doesn't mean that what you want ...
52,118,492
After a user has been authenticated i need to call 2 functions (`AsyncStorage.setItem` and `setAPIAuthorization`) followed by 2 redux actions (`LOAD_USER` and `SET_SESSION_USER`). How would I achieve this based off the attempt below? Or should I create redux actions for both functions also? ``` const loginUserEpic = (...
2018/08/31
['https://Stackoverflow.com/questions/52118492', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7909095/']
Setting the session storage is a side effect. So better to do it in a [tap](https://www.learnrxjs.io/operators/utility/do.html), Your epic should only return actions as output (actions In, actions Out). If you do it that way, redux will complain that you're not returning plain actions. I will still create action cre...
another simple way is to use `switchMap` ``` switchMap(() => [ { type: 'LOAD_USER', }, { type: 'SET_SESSION_USER', user: response.data.user, } ]) ``` It automatically wrap result into observables as long as it's an array. So you no longer need to `of()` it. I use it quite a lot in m...
974,151
If I have a Windows 10 workstation, I can use something like `wmic qfe list` or `Get-Hotfix` to show all the installed updates on that system. How can I prove, that the list of updates installed, are really all that is a available to be installed? I'm running into questions from compliance about how do I know Windows h...
2019/07/05
['https://serverfault.com/questions/974151', 'https://serverfault.com', 'https://serverfault.com/users/530533/']
The [Microsoft Security Update Guide](https://portal.msrc.microsoft.com/en-us/security-guidance) can be used to acquire a list of security KB articles indicating security updates for a specific windows build. Almost all security updates installed on the system are part of a Latest Cumulative Update (LCU). By searchin...
You can refer to the offical product documentation: <https://docs.microsoft.com/en-us/windows/release-information>. Unfortunately, it seems to be quite difficult to find a list of all minor updates apart from major product releases; however, there are several unofficial pages which track them, such as this one: <https...
63,925,843
Say, I have a dataframe with three columns: ``` Year Sales Income 1 100 30 2 200 20 3 NA 10 4 300 50 5 NA -20 ``` I want to get all the 'Year' that has a particular value in 'Sales', ignoring other columns. For example, if I ask for NA, I...
2020/09/16
['https://Stackoverflow.com/questions/63925843', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13434461/']
We can use `base R` with `subset` ``` subset(df, is.na(Sales), select = c('Year', 'Sales')) # Year Sales #3 3 NA #5 5 NA ``` ### data ``` df <-structure(list(Year = 1:5, Sales = c(100L, 200L, NA, 300L, NA ), Income = c(30L, 20L, 10L, 50L, -20L)), class = "data.frame", row.names = c(NA, -5L)) ```
You can try with `base R`. In a dataframe you can index by rows (left to `,`) and by columns (right to `,`) inside the brackets. So, you can specify the conditions, in this case `NA` in `Sales` and then select the variables like `Year` and `Sales`. Here the code: ``` #Code df[is.na(df$Sales),c('Year','Sales')] ``` O...
63,925,843
Say, I have a dataframe with three columns: ``` Year Sales Income 1 100 30 2 200 20 3 NA 10 4 300 50 5 NA -20 ``` I want to get all the 'Year' that has a particular value in 'Sales', ignoring other columns. For example, if I ask for NA, I...
2020/09/16
['https://Stackoverflow.com/questions/63925843', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13434461/']
We can use `base R` with `subset` ``` subset(df, is.na(Sales), select = c('Year', 'Sales')) # Year Sales #3 3 NA #5 5 NA ``` ### data ``` df <-structure(list(Year = 1:5, Sales = c(100L, 200L, NA, 300L, NA ), Income = c(30L, 20L, 10L, 50L, -20L)), class = "data.frame", row.names = c(NA, -5L)) ```
you can use the %in% subsetting which has to be declared before. I usually use these in ggplot directly. hope they work independently too. For example: ``` col11 <- c("c11", "c12") typecol2 <- c("c22", "c24") data_new <- subset(data old, (col1 %in% col11) & (col2 %in% typecol2)) ```
101,775
I'm working on a software development project that requires me to send signals to a device via an RS-232 port. Sadly the included utilities for transferring to and from the device would not work for mass distribution, so I'm left to writing my own. The included documentation doesn't really give any examples of the devi...
2010/01/28
['https://superuser.com/questions/101775', 'https://superuser.com', 'https://superuser.com/users/-1/']
[**Portmon**](http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx), from Sysinternals, will do what you need: > > Portmon is a utility that monitors and > displays all serial and parallel port > activity on a system. It has advanced > filtering and search capabilities that > make it a powerful tool for ...
<http://www.kmint21.com/serial-port-monitor/> or <https://iftools.com/start/index.de.php>
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
If you have 2 widgets within your target, comment out the widget(s) you arent currently testing ``` @main struct Widgets: WidgetBundle { @WidgetBundleBuilder var body: some Widget { Widget1() // Widget2() } } ```
I ran into the exact same issue. For me it happens when I ran an extension widget from an M1 computer. Turns out the issue was I was running Xcode with Rosetta, turning that off fixed it for me. To enable / disable rosetta: 1. Right click on the Xcode app 2. Click on `Get Info` 3. Untick `Open using Rosetta` 4. Cle...
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
For me it was that my device was on iOS 14.1 and the Deployment Target was set to 14.3 for the widget target. The solution was to update the Deployment Target to match your device or lower. The Deployment Target setting is in the General tab and under Deployment Info (in my case I set it to 14.0).
Try to go to Setting -> General -> Profiles & Device Management -> Trust your cert, and then rebuild and rerun app.
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
This happened to me after moving my entitlements file from the root directory into the widget's directory. I tried [this answer](https://stackoverflow.com/a/62669069/467209) but the problem persisted. I had to manually install the widget on the Home Screen. After that running from Xcode worked again.
As mentioned here <https://developer.apple.com/forums/thread/651611>, setting *New Build System* in *File -> Workspace/Project settings* (for both *Shared* and *Per User* settings) seems to do the trick. You won't get rid of the warning, but the widget **might** (see notes) run. Note 1 - even after this change, there ...
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
**If the extension target you added was for a Widget...** I did follow some of the suggestions here and restarted my phone to some success but the error kept happening over and over, and restarting my phone is intrusive and takes kind of a long time. For me, the workaround when I get this popup error is to.. **1. On ...
I ran into the exact same issue. For me it happens when I ran an extension widget from an M1 computer. Turns out the issue was I was running Xcode with Rosetta, turning that off fixed it for me. To enable / disable rosetta: 1. Right click on the Xcode app 2. Click on `Get Info` 3. Untick `Open using Rosetta` 4. Cle...
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
For me the problem was the excluded `arm64` architecture for `any iOS simulator` on the widget target build settings (Added because of my M1 development device). When removing this excluded architecture, the widget is running without any problem.
Try to go to Setting -> General -> Profiles & Device Management -> Trust your cert, and then rebuild and rerun app.
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
For me the problem was the excluded `arm64` architecture for `any iOS simulator` on the widget target build settings (Added because of my M1 development device). When removing this excluded architecture, the widget is running without any problem.
This happened to me after moving my entitlements file from the root directory into the widget's directory. I tried [this answer](https://stackoverflow.com/a/62669069/467209) but the problem persisted. I had to manually install the widget on the Home Screen. After that running from Xcode worked again.
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
I ran into the exact same issue. For me it happens when I ran an extension widget from an M1 computer. Turns out the issue was I was running Xcode with Rosetta, turning that off fixed it for me. To enable / disable rosetta: 1. Right click on the Xcode app 2. Click on `Get Info` 3. Untick `Open using Rosetta` 4. Cle...
As mentioned here <https://developer.apple.com/forums/thread/651611>, setting *New Build System* in *File -> Workspace/Project settings* (for both *Shared* and *Per User* settings) seems to do the trick. You won't get rid of the warning, but the widget **might** (see notes) run. Note 1 - even after this change, there ...
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
**If the extension target you added was for a Widget...** I did follow some of the suggestions here and restarted my phone to some success but the error kept happening over and over, and restarting my phone is intrusive and takes kind of a long time. For me, the workaround when I get this popup error is to.. **1. On ...
This happened to me after moving my entitlements file from the root directory into the widget's directory. I tried [this answer](https://stackoverflow.com/a/62669069/467209) but the problem persisted. I had to manually install the widget on the Home Screen. After that running from Xcode worked again.
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
For me it was that my device was on iOS 14.1 and the Deployment Target was set to 14.3 for the widget target. The solution was to update the Deployment Target to match your device or lower. The Deployment Target setting is in the General tab and under Deployment Info (in my case I set it to 14.0).
I ran into the exact same issue. For me it happens when I ran an extension widget from an M1 computer. Turns out the issue was I was running Xcode with Rosetta, turning that off fixed it for me. To enable / disable rosetta: 1. Right click on the Xcode app 2. Click on `Get Info` 3. Untick `Open using Rosetta` 4. Cle...
62,625,506
After adding an extension target to Xcode project and trying to run it on iOS 14, I'm getting an error: `SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget '***' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Fai...
2020/06/28
['https://Stackoverflow.com/questions/62625506', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4083045/']
For me it was that my device was on iOS 14.1 and the Deployment Target was set to 14.3 for the widget target. The solution was to update the Deployment Target to match your device or lower. The Deployment Target setting is in the General tab and under Deployment Info (in my case I set it to 14.0).
As mentioned here <https://developer.apple.com/forums/thread/651611>, setting *New Build System* in *File -> Workspace/Project settings* (for both *Shared* and *Per User* settings) seems to do the trick. You won't get rid of the warning, but the widget **might** (see notes) run. Note 1 - even after this change, there ...
938,470
I am writing an optimization expression and in the constraints part, I want to limit the number of non-zero entries of the vector to a certain number R. Suppose if the vector is M dimensional, then I would like to have R entries to be non-zero and (M-R) entries to be zero. I want to have a vector expression or multip...
2014/09/20
['https://math.stackexchange.com/questions/938470', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/176651/']
You are looking for the 0-norm, which is exactly the number of non-zero elements in a vector. So your constraint looks like $$ \| x\|\_0 \leq R $$ However, the term norm here is used loosely, since the 0-norm is not really a norm (it does not satisfy triangle inequality). In fact, the constraint above is non-convex, ...
It is a bit problematic to say that exactly $R$ should be non-zero, because then you have to define first what constitutes non-zero in your model (is $10^{-15}$ nonzero? If so, you will have massive problems to express this as it is essentially numerical noise to a numerical solver) If you mean *at most* $R$ elements ...
83,838
Why is ntfs-3g not included anymore in Ubuntu 11.10? Now I can't write to my NTFS partition. Just curiosity, why the change?
2011/11/29
['https://askubuntu.com/questions/83838', 'https://askubuntu.com', 'https://askubuntu.com/users/11928/']
AFAIK `ntfs-3g` is included in the default Ubuntu installation, because the virtual `ubuntu-standard` package depends on it. You've probably uninstalled it by mistake. Check the output of ``` dpkg -l ntfs* ``` If you see something like **rc** for the package, you've uninstalled it. EDIT: From your comments it loo...
[NTFS-3G](http://en.wikipedia.org/wiki/NTFS-3G) ***is*** still included in Ubuntu 11.10. (See information about `ntfs-3g` in Oneiric [here](http://packages.ubuntu.com/oneiric/ntfs-3g) and [here](https://launchpad.net/ubuntu/+source/ntfs-3g).) I am using it on two Ubuntu 11.10 machines at this very moment! While the NT...
83,838
Why is ntfs-3g not included anymore in Ubuntu 11.10? Now I can't write to my NTFS partition. Just curiosity, why the change?
2011/11/29
['https://askubuntu.com/questions/83838', 'https://askubuntu.com', 'https://askubuntu.com/users/11928/']
[NTFS-3G](http://en.wikipedia.org/wiki/NTFS-3G) ***is*** still included in Ubuntu 11.10. (See information about `ntfs-3g` in Oneiric [here](http://packages.ubuntu.com/oneiric/ntfs-3g) and [here](https://launchpad.net/ubuntu/+source/ntfs-3g).) I am using it on two Ubuntu 11.10 machines at this very moment! While the NT...
I found out that ntfsprogs has write support for NTFS. And thus it replaces ntfs-3g. But this package is still a bit buggy and sometimes it doesn't work so you can't create new folders and files on the NTFS filesystems. So it is working on a random base xD. In Ubuntu things should be tested more properly. Because th...
83,838
Why is ntfs-3g not included anymore in Ubuntu 11.10? Now I can't write to my NTFS partition. Just curiosity, why the change?
2011/11/29
['https://askubuntu.com/questions/83838', 'https://askubuntu.com', 'https://askubuntu.com/users/11928/']
AFAIK `ntfs-3g` is included in the default Ubuntu installation, because the virtual `ubuntu-standard` package depends on it. You've probably uninstalled it by mistake. Check the output of ``` dpkg -l ntfs* ``` If you see something like **rc** for the package, you've uninstalled it. EDIT: From your comments it loo...
I found out that ntfsprogs has write support for NTFS. And thus it replaces ntfs-3g. But this package is still a bit buggy and sometimes it doesn't work so you can't create new folders and files on the NTFS filesystems. So it is working on a random base xD. In Ubuntu things should be tested more properly. Because th...
43,408,454
In Primefaces I would like to expand a `<p:treeNode>`, when i click on its label, not when i click on the little triangle. Cant find any .xhtml document, but found that nodes are created this way: ``` ... final TreeNode parentNode = this.addNode(false, "Parent", this.root, targetView1); //first parameter means start ...
2017/04/14
['https://Stackoverflow.com/questions/43408454', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4419468/']
Just in case anyone is interested in a solution that I believe @Kukeltje is referring to here is my interpretation: XHTML: ``` <p:tree value="#{Bean.rootNode}" var="node" style="width: 100%" id="tree" selectionMode="single"> <p:treeNode id="node"> <h:outputTex...
Add [selection](https://www.primefaces.org/showcase/ui/data/tree/selection.xhtml) to your viewer: ``` [(selection)]="selectedTreeNode" (onNodeSelect)="onNodeSelect($event)" ``` Define your value in your controller: `selectedTreeNode: TreeNode;` Handle `onNodeSelect()`: ``` onNodeSelect(event: any) { this.sele...
43,408,454
In Primefaces I would like to expand a `<p:treeNode>`, when i click on its label, not when i click on the little triangle. Cant find any .xhtml document, but found that nodes are created this way: ``` ... final TreeNode parentNode = this.addNode(false, "Parent", this.root, targetView1); //first parameter means start ...
2017/04/14
['https://Stackoverflow.com/questions/43408454', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4419468/']
Just in case anyone is interested in a solution that I believe @Kukeltje is referring to here is my interpretation: XHTML: ``` <p:tree value="#{Bean.rootNode}" var="node" style="width: 100%" id="tree" selectionMode="single"> <p:treeNode id="node"> <h:outputTex...
The easiest way is to add some JavaScript to trigger the triangle on node click: ``` <p:tree onNodeClick="$(node).find('.ui-tree-toggler').click();" ... ``` You may also want to apply the following style to get a hand symbol while hovering: ``` .ui-tree-toggler ~ .ui-treenode-label { cursor:pointer; } ```
43,408,454
In Primefaces I would like to expand a `<p:treeNode>`, when i click on its label, not when i click on the little triangle. Cant find any .xhtml document, but found that nodes are created this way: ``` ... final TreeNode parentNode = this.addNode(false, "Parent", this.root, targetView1); //first parameter means start ...
2017/04/14
['https://Stackoverflow.com/questions/43408454', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4419468/']
The easiest way is to add some JavaScript to trigger the triangle on node click: ``` <p:tree onNodeClick="$(node).find('.ui-tree-toggler').click();" ... ``` You may also want to apply the following style to get a hand symbol while hovering: ``` .ui-tree-toggler ~ .ui-treenode-label { cursor:pointer; } ```
Add [selection](https://www.primefaces.org/showcase/ui/data/tree/selection.xhtml) to your viewer: ``` [(selection)]="selectedTreeNode" (onNodeSelect)="onNodeSelect($event)" ``` Define your value in your controller: `selectedTreeNode: TreeNode;` Handle `onNodeSelect()`: ``` onNodeSelect(event: any) { this.sele...
32,678
I've heard the British term "half seven" (or "half nine," "half five", etc) used to tell time. I can't remember though if it means 6:30 or 7:30 (i.e. half *an hour before* seven, or half *past* seven)? I'm American and have never heard another American use the phrase, but apparently it's very common in the UK.
2011/07/04
['https://english.stackexchange.com/questions/32678', 'https://english.stackexchange.com', 'https://english.stackexchange.com/users/10378/']
*Half seven* is the same as *half past seven*, with *past* simply missing. It's **7:30**.
Americans say "half *past* seven". I've never heard anyone say "half *before* seven" nor have I heard an American say "*half seven*". It does lead to odd situations. My German wife has a very good English friend. She learned the difference between "half seven" and "*halbsieben*" when they both showed up on time yet an ...
32,678
I've heard the British term "half seven" (or "half nine," "half five", etc) used to tell time. I can't remember though if it means 6:30 or 7:30 (i.e. half *an hour before* seven, or half *past* seven)? I'm American and have never heard another American use the phrase, but apparently it's very common in the UK.
2011/07/04
['https://english.stackexchange.com/questions/32678', 'https://english.stackexchange.com', 'https://english.stackexchange.com/users/10378/']
*Half seven* is the same as *half past seven*, with *past* simply missing. It's **7:30**.
Half past 7 means 7:30 it's also a slang term for "crazy" or "insane". There is an American battle rapper who goes by Half Past 7 because of the slang meaning.
32,678
I've heard the British term "half seven" (or "half nine," "half five", etc) used to tell time. I can't remember though if it means 6:30 or 7:30 (i.e. half *an hour before* seven, or half *past* seven)? I'm American and have never heard another American use the phrase, but apparently it's very common in the UK.
2011/07/04
['https://english.stackexchange.com/questions/32678', 'https://english.stackexchange.com', 'https://english.stackexchange.com/users/10378/']
Americans say "half *past* seven". I've never heard anyone say "half *before* seven" nor have I heard an American say "*half seven*". It does lead to odd situations. My German wife has a very good English friend. She learned the difference between "half seven" and "*halbsieben*" when they both showed up on time yet an ...
Half past 7 means 7:30 it's also a slang term for "crazy" or "insane". There is an American battle rapper who goes by Half Past 7 because of the slang meaning.
44,322
I am a senior Python developer. Recently I came across to the need of fully understanding how bitcoin works on it's core. The Internet is full of explanations and tutorials for regular folks and even dummies. You can get familiarized with it pretty well if all you care is basic understanding, so that you could start ...
2016/05/24
['https://bitcoin.stackexchange.com/questions/44322', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/35934/']
The book Mastering Bitcoin would be a good solid start (although it might not answer **all** your questions). It is also available for [free](https://github.com/bitcoinbook/bitcoinbook).
The [Developer Documentation](https://bitcoin.org/en/developer-documentation) may also be of use.
44,322
I am a senior Python developer. Recently I came across to the need of fully understanding how bitcoin works on it's core. The Internet is full of explanations and tutorials for regular folks and even dummies. You can get familiarized with it pretty well if all you care is basic understanding, so that you could start ...
2016/05/24
['https://bitcoin.stackexchange.com/questions/44322', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/35934/']
The book Mastering Bitcoin would be a good solid start (although it might not answer **all** your questions). It is also available for [free](https://github.com/bitcoinbook/bitcoinbook).
You should also check out the free Princeton Bitcoin textbook: [Bitcoin and Cryptocurrency Technologies](https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf).
44,322
I am a senior Python developer. Recently I came across to the need of fully understanding how bitcoin works on it's core. The Internet is full of explanations and tutorials for regular folks and even dummies. You can get familiarized with it pretty well if all you care is basic understanding, so that you could start ...
2016/05/24
['https://bitcoin.stackexchange.com/questions/44322', 'https://bitcoin.stackexchange.com', 'https://bitcoin.stackexchange.com/users/35934/']
The [Developer Documentation](https://bitcoin.org/en/developer-documentation) may also be of use.
You should also check out the free Princeton Bitcoin textbook: [Bitcoin and Cryptocurrency Technologies](https://d28rh4a8wq0iu5.cloudfront.net/bitcointech/readings/princeton_bitcoin_book.pdf).
28,071,829
Given a rectangle consisting of 1's and 0's, how can I find the maximum number of non-overlapping 2x2 squares of 1's? Example: ``` 0110 1111 1111 ``` The solution would be 2. I know it can be solved with Bitmask DP; but I can't really grasp it - after playing with it for hours. How does it work and how can it be ...
2015/01/21
['https://Stackoverflow.com/questions/28071829', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1327559/']
I wanted to point out that the graph we get by putting vertices at the centers of squares and joining them when they overlap is *not* claw-free: If we take (in the full plane) a 2x2 square and three of the four diagonally overlapping 2x2 squares, they form the induced subgraph ``` • • \ / • / • ``` This is a ...
If you build a graph where every node represents a 2x2 square of 1's and there is an edge between two nodes if they overlap, then the problem is now: find the maximum independent set in this graph.
28,071,829
Given a rectangle consisting of 1's and 0's, how can I find the maximum number of non-overlapping 2x2 squares of 1's? Example: ``` 0110 1111 1111 ``` The solution would be 2. I know it can be solved with Bitmask DP; but I can't really grasp it - after playing with it for hours. How does it work and how can it be ...
2015/01/21
['https://Stackoverflow.com/questions/28071829', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1327559/']
I wanted to point out that the graph we get by putting vertices at the centers of squares and joining them when they overlap is *not* claw-free: If we take (in the full plane) a 2x2 square and three of the four diagonally overlapping 2x2 squares, they form the induced subgraph ``` • • \ / • / • ``` This is a ...
Here is a dynamic programming solution. 1. The state is `(row number, mask of occupied cells, shift position)`. It looks like this: ``` ..#.. .##.. .#... .#... ``` In this case, the row number is 2(I use zero-bases indices), the mask depends on whether we take a cell with `#` or not, the shift position is...
28,071,829
Given a rectangle consisting of 1's and 0's, how can I find the maximum number of non-overlapping 2x2 squares of 1's? Example: ``` 0110 1111 1111 ``` The solution would be 2. I know it can be solved with Bitmask DP; but I can't really grasp it - after playing with it for hours. How does it work and how can it be ...
2015/01/21
['https://Stackoverflow.com/questions/28071829', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1327559/']
I wanted to point out that the graph we get by putting vertices at the centers of squares and joining them when they overlap is *not* claw-free: If we take (in the full plane) a 2x2 square and three of the four diagonally overlapping 2x2 squares, they form the induced subgraph ``` • • \ / • / • ``` This is a ...
edit 20:18, there is a counterexample posted by @ILoveCoding My intuition says, that this will work. I am unable to prove it since I'm not advanced enough. I can't think of any counterexample though. I will try describe the solution and post the code, please correct me if my solution is wrong. First we load input to ...
6,094,828
is it possible to upload a video to Facebook via the Graph API, using the Javascript SDK? something like this... ``` FB.api('/me/videos', 'post', {message: "Test", source: "@http://video.link.goes/here.flv", access_token: "token"}, function(response) { console.log(response) }); ``` now I know that this won't wo...
2011/05/23
['https://Stackoverflow.com/questions/6094828', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/270311/']
Yes, you can do this posting data to an iframe like [here](https://stackoverflow.com/a/5455783/1107651), or you can use [jQuery File Upload](http://blueimp.github.com/jQuery-File-Upload/) . The problem is you can't get response from iframe, using plugin you can use a page handle. Example: ``` <form id="fileupload" act...
The question is very similar to the one asked here: [Facebook new javascript sdk- uploading photos with it!](https://stackoverflow.com/questions/4264599/facebook-new-javascript-sdk-uploading-photos-with-it).
12,739
We use pop accounts as a backup when our server or internet connection is down. We've recently upgraded to sbs 2008. I've added our backup pop accounts via the SBS console pop conenctor. When i hit retreive now it give me an error. in the event log the error is described as: ``` The TCP/IP connection with the '[po...
2009/05/27
['https://serverfault.com/questions/12739', 'https://serverfault.com', 'https://serverfault.com/users/3955/']
Download the network monitor from <http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=983b941d-06cb-4658-b7f6-3088333d062f> and use it to watch the connection to the POP3 server. POP3 is a simple protocol and POP3 commands are plain text. In the output from the network monitor you'll be able to se...
I would recommend (if you havent already) trying a differnt pop3 account on seperate host if possible to rule out any problems either with the host or some kind of incompatibility between the two.
12,739
We use pop accounts as a backup when our server or internet connection is down. We've recently upgraded to sbs 2008. I've added our backup pop accounts via the SBS console pop conenctor. When i hit retreive now it give me an error. in the event log the error is described as: ``` The TCP/IP connection with the '[po...
2009/05/27
['https://serverfault.com/questions/12739', 'https://serverfault.com', 'https://serverfault.com/users/3955/']
You need to do this in the exchange console: set-connector "pop3 connector name" -ConnectionTimeout hours:minutes:seconds set-connector "pop3 connector name" -ConnectionIdleTimeout hours:minutes:seconds This will increase the amount of time it will take before exchange assumes that the connector has become idle - eve...
I would recommend (if you havent already) trying a differnt pop3 account on seperate host if possible to rule out any problems either with the host or some kind of incompatibility between the two.
7,629,550
I'm using rsync `--link-dest` to preform a differential back up of my computer. After each backup, I'd like to save out a log of the new/changed files. Is this possible? If so, how would I do it?
2011/10/02
['https://Stackoverflow.com/questions/7629550', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/597864/']
Answer from the rsync mailing list: Use `--itemize-changes`
Here's another answer [from the mailing list](https://lists.samba.org/archive/rsync/2011-October/026974.html). There's a script by Kevin Korb: > > If you want something you can run after the fact here is a tool I wrote > a while back that does a sort of diff across 2 --link-dest based backups: > > > <http://sanita...
7,629,550
I'm using rsync `--link-dest` to preform a differential back up of my computer. After each backup, I'd like to save out a log of the new/changed files. Is this possible? If so, how would I do it?
2011/10/02
['https://Stackoverflow.com/questions/7629550', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/597864/']
Answer from the rsync mailing list: Use `--itemize-changes`
For referance you can also compare using rsync to do a dryrun between hardlinked backup directories to see how they are changed. ``` rsync -aHin day_06_*/ day_05_* 2>&1 | grep -v '^\.d' ``` Shows files that are added, removed, or renamed//moved. The later only happens if you have a re-linking program relinking file...
29,621,214
I have a form with different input fields.So for very minute , the data entered by the user needs to be automatically stored in the database. Once the request is submitted , it will be directed to the struts file where the database interactions will be carried out . What i have tried, I had set the timeout function to...
2015/04/14
['https://Stackoverflow.com/questions/29621214', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1099079/']
I have made a [fiddle](http://jsfiddle.net/o0c3rmp3/5/) according to your requirement. ``` var timer; var fun = function autosave() { alert(); jQuery('form').each(function () { jQuery.ajax({ url: "http://localhost:7002/submitStudent.do?autosave=true", data: jQuery(this).seriali...
I recommend that you use [ajaxForm](http://malsup.com/jquery/form/#api) plugin and in the autosave function just fire $('form').submit(); this is the fast and good way
68,944,559
Consider these series: ```py >>> a = pd.Series('abc a abc c'.split()) >>> b = pd.Series('a abc abc a'.split()) >>> pd.concat((a, b), axis=1) 0 1 0 abc a 1 a abc 2 abc abc 3 c a >>> unknown_operation(a, b) 0 False 1 True 2 True 3 False ``` The desired logic is to determine if the string in th...
2021/08/26
['https://Stackoverflow.com/questions/68944559', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9918345/']
Let us try with `numpy` `defchararray` which is vectorized ``` from numpy.core.defchararray import find find(df['1'].values.astype(str),df['0'].values.astype(str))!=-1 Out[740]: array([False, True, True, False]) ```
IIUC, ``` df[1].str.split('', expand=True).eq(df[0], axis=0).any(axis=1) | df[1].eq(df[0]) ``` Output: ``` 0 False 1 True 2 True 3 False dtype: bool ```
68,944,559
Consider these series: ```py >>> a = pd.Series('abc a abc c'.split()) >>> b = pd.Series('a abc abc a'.split()) >>> pd.concat((a, b), axis=1) 0 1 0 abc a 1 a abc 2 abc abc 3 c a >>> unknown_operation(a, b) 0 False 1 True 2 True 3 False ``` The desired logic is to determine if the string in th...
2021/08/26
['https://Stackoverflow.com/questions/68944559', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9918345/']
IIUC, ``` df[1].str.split('', expand=True).eq(df[0], axis=0).any(axis=1) | df[1].eq(df[0]) ``` Output: ``` 0 False 1 True 2 True 3 False dtype: bool ```
I tested various functions with a randomly generated Dataframe of 1,000,000 5 letter entries. Running on my machine, the averages of 3 tests showed: zip > v\_find > to\_list > any > apply 0.21s > 0.79s > 1s > 3.55s > 8.6s Hence, i would recommend using zip: ``` [x[0] in x[1] for x in zip(df['A'], df['B'])] ``` o...
68,944,559
Consider these series: ```py >>> a = pd.Series('abc a abc c'.split()) >>> b = pd.Series('a abc abc a'.split()) >>> pd.concat((a, b), axis=1) 0 1 0 abc a 1 a abc 2 abc abc 3 c a >>> unknown_operation(a, b) 0 False 1 True 2 True 3 False ``` The desired logic is to determine if the string in th...
2021/08/26
['https://Stackoverflow.com/questions/68944559', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/9918345/']
Let us try with `numpy` `defchararray` which is vectorized ``` from numpy.core.defchararray import find find(df['1'].values.astype(str),df['0'].values.astype(str))!=-1 Out[740]: array([False, True, True, False]) ```
I tested various functions with a randomly generated Dataframe of 1,000,000 5 letter entries. Running on my machine, the averages of 3 tests showed: zip > v\_find > to\_list > any > apply 0.21s > 0.79s > 1s > 3.55s > 8.6s Hence, i would recommend using zip: ``` [x[0] in x[1] for x in zip(df['A'], df['B'])] ``` o...
34,957,630
Attempting to implement the basic JavaPoet example (see below) in a Android ActivityWatcher class from LeakCanary: ``` .addModifiers(Modifier.PUBLIC, Modifier.STATIC) ``` The Modifier.PUBLIC and Modifier.STATIC, and the other .addModifiers statement produce the Android Studio error > > addModifiers (javax.lang.mo...
2016/01/22
['https://Stackoverflow.com/questions/34957630', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2312175/']
Change your imports to `import javax.lang.model.element.Modifier`. If you can’t import this package change your project’s module configuration from the Android SDK to the Java SDK.
In your Android project, create a single Java module for code use JavaPoet. suce as ![select the java library](https://i.stack.imgur.com/evkaO.png) In this module, your `build.gradle` file should be like this: ``` apply plugin: 'java' sourceCompatibility = "1.7" targetCompatibility = "1.7" dependencies { compil...
34,957,630
Attempting to implement the basic JavaPoet example (see below) in a Android ActivityWatcher class from LeakCanary: ``` .addModifiers(Modifier.PUBLIC, Modifier.STATIC) ``` The Modifier.PUBLIC and Modifier.STATIC, and the other .addModifiers statement produce the Android Studio error > > addModifiers (javax.lang.mo...
2016/01/22
['https://Stackoverflow.com/questions/34957630', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2312175/']
Change your imports to `import javax.lang.model.element.Modifier`. If you can’t import this package change your project’s module configuration from the Android SDK to the Java SDK.
**I find this way can work** ---------------------------- this just is Android studio bug . Android studio code check error for that . add this code in your build.gradle in your moudle ,or your app module ,that error will go gone! ``` implementation 'org.checkerframework:checker:2.1.10' ``` add this one ,and the pr...
18,329,849
I wants to convert PDF file pages into a series of images in wpf application . Please help me. Thanks & Regards Anupam mishra
2013/08/20
['https://Stackoverflow.com/questions/18329849', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1838025/']
GhostScript is a powerful tool (FREE and open source) that can convert PDF documents into image files: [Download GhostScript from sourceforge](http://sourceforge.net/projects/ghostscript/) This is command line tool; from .NET it can be invoked by calling Process.Start.
There are lot of libraries that can serve your purpose - * [ABC PDF](http://www.websupergoo.com/abcpdf-1.htm) * [PDF Focus .Net](http://www.sautinsoft.net/help/pdf-to-word-tiff-images-text-rtf-csharp-vb-net/index.aspx#) * [PDF Clown](http://www.stefanochizzolini.it/en/projects/clown/) (Open Source)
14,530,375
I have a Handsontable table filled with data and already rendered After checking the cells, I have located a couple of cells of interest and would like to color them - is there a good way to do this using the Handsontable code? Please note this is after loading and rendering the table Edit: The table is rendered ...
2013/01/25
['https://Stackoverflow.com/questions/14530375', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/150878/']
The homepage provides a good example for your purpose: <http://handsontable.com/demo/renderers.html> Just modify the condition (in this case upper/left corner). ``` cells: function (row, col, prop) { if (row === 0 && col === 0) { return {type: {renderer: greenRenderer}}; } } ``` and you're done.
1. get the coordinates of the selected cell(s) using handsontable('getSelected') 2. if the selection is not empty : a. loop on all cells to gather each cell's renderer using handsontable('getCellMeta') and meta.renderer, then store them in an array (this should be done only once) b. update the table using handsontabl...
14,530,375
I have a Handsontable table filled with data and already rendered After checking the cells, I have located a couple of cells of interest and would like to color them - is there a good way to do this using the Handsontable code? Please note this is after loading and rendering the table Edit: The table is rendered ...
2013/01/25
['https://Stackoverflow.com/questions/14530375', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/150878/']
The homepage provides a good example for your purpose: <http://handsontable.com/demo/renderers.html> Just modify the condition (in this case upper/left corner). ``` cells: function (row, col, prop) { if (row === 0 && col === 0) { return {type: {renderer: greenRenderer}}; } } ``` and you're done.
One a bit strange method that I'm using, and it actually fast and works fine: ``` afterRender: function(){ render_color(this); } ``` ht is the instance of the handsontable, and render\_color: ``` function render_color(ht){ for(var i=0;i<ht.countRows();i++){ for(var p=0;p<ht.countCols();p++){ cell_co...
4,343,424
$$\frac{1}{y} \frac{\text{d}y}{\text{d}x} = \frac{1}{x}$$ The way I solve this: for all $x$ in $(-\infty,0)$ $\ln |y| = \ln |x| + A$ where $A$ is a real constant (since we know antiderivatives are separated by a constant) $|y| = B|x|$ where $B$ is a positive constant equals $\exp(A)$ $y= Bx$ or $-Bx$ It seems to ...
2021/12/28
['https://math.stackexchange.com/questions/4343424', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/840119/']
The first point of confusion here is that you antidifferentiatied $$\frac{y'}{y}=\frac1{x}$$ to $$\ln(|y|)=\ln(|x|)+A,$$ but this is not entirely correct. The antiderivatives of $\frac1{t}$ are given by the piecewise, $$\ln(-t)+A;\,\forall{t\lt0}$$ $$\ln(t)+A;\,\forall{t\gt0}.$$ Taking this into account, you should hav...
Consider the DE in its explicit normal form $\frac{dy}{dx}=\frac{y}{x}$. The difference is that the equation is now defined for $y=0$, inside the quadrants the solutions remain the same. As an ODE, this equation is singular or not defined on the line $x=0$. Thus the solutions on $(-\infty,0)$ and $(0,+\infty)$ are sep...
24,232,234
After surfing the web about cookies and session I am creating a simple login in nodejs using express with cookie/session using redis as my data storage. What do you think is the best way to handle cookies/session after the user logs in? I also have these question in my mind: 1. How do i prevent using userA cookie to...
2014/06/15
['https://Stackoverflow.com/questions/24232234', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2717352/']
A common pattern is to create a QObject-derived class and make `connect_client` a slot in that class. Connect statement will look like `...clicked.connect(my_object.connect_client)`. In this case you can store any data in the object (e.g. `self.abapclient = abapclient`) and use it later when you like. `main` will hav...
You could pass the object as argument to the slot. Just give the class of object that is sent to connected slots as part of the `pyqtSignal`, like `pyqtSignal(YourClass)`. More details are provided in @HansHermans answer at [PyQt signal with arguments of arbitrary type / PyQt\_PyObject equivalent for new-style signals]...
42,342,207
I'm quite new to JSON. What im trying to do is i have JSON with 3 objects in it and i want to put each objects into its respective (there's 3 div). The code below doesn.t append anything to the HTML: ``` var testwrapper= $("<div/>").addClass("testwrapper").appendTo(somethingwrapper); var test1wrapper= $("<di...
2017/02/20
['https://Stackoverflow.com/questions/42342207', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7592295/']
i see this corrections: The method dummytestJSON(), needs to return clean JSON , return testJSON; And in method updateTest: ``` function updateTest(){ console.log("updating test"); //console.log(testJSON); var Test_ = dummytestJSON(); var testwrapper = ["Test One","Test Two","Test Three"]; for(va...
Try: ``` <div class="Test One" id="div_1"></div> <div class="Test Two" id="div_2"></div> <div class="Test Three" id="div_3"></div> ``` Then use ``` document.getElementById('div_1').innerHTML = ... ``` to set the contents.
43,876,071
hi there i got a php code from some tutorial but i can't understand the use of [] in front of the variables, can someone explain this code please. ``` $text= "KKE68TSA76 Confirmed on 30/03/17 at 2:12PM Ksh100.00 received from 254786740098"; } $mpesa =explode(" ", $text); $receipt=$mpesa[0]; // ...
2017/05/09
['https://Stackoverflow.com/questions/43876071', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7778161/']
The [ ] is an array position. Exploding $mpesa turns that string of text into an array split by every space. $mpesa[0] is array position one, containing KKE68TSA76, $mpesa[1] contains Confirmed.. etc
The [ ] us an array positioner, so it indicates the position of an element in the list/array. But what are arrays? > > An array is a special variable, which can hold more than one value at > a time. - [W3Schools](https://www.w3schools.com/php/php_arrays.asp) > > > ``` $array = array( "Item 1", // Position 0...
37,904,174
Good day! I'm having a struggle to aligned the jumbtron to my calendar icon. And the elements of the jumbtron is not inside of it. Can someone help me how to solve this? Ideas? i just started studying bootstrap and css. Here's the picture. [![enter image description here](https://i.stack.imgur.com/Inz3W.png)](https:/...
2016/06/19
['https://Stackoverflow.com/questions/37904174', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5438871/']
You can use [cron](https://en.wikipedia.org/wiki/Cron). `crontab -e` to create schedule and run scripts as root, or `crontab -u [user] -e` to run as a specific user. at the bottom you can add `0 * * * * cd /path/to/your/scrapy && scrapy crawl [yourScrapy] >> /path/to/log/scrapy_log.log` `0 * * * *` makes the script ...
You can run your spider with the JOBDIR setting, it will save your requests loaded in the scheduler ``` scrapy crawl somespider -s JOBDIR=crawls/somespider-1 ``` <https://doc.scrapy.org/en/latest/topics/jobs.html>
21,188,760
``` g = Goal.objects.filter(Q(title__contains=term) | Q(desc__contains=term)) ``` How can I add to my `filter` that `user=request.user`? This doesn't work: ``` g = Goal.objects.filter(user=request.user, Q(title__contains=term) | Q(desc__contains=term)) ``` Models: ``` class Goal(models.Model): user = models....
2014/01/17
['https://Stackoverflow.com/questions/21188760', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3207076/']
Keyword arguments (`user=request.user`) must come **after** non keyword arguments (your Q object). Either switch the order in your filter: ``` Goal.objects.filter(Q(title__contains=term) | Q(desc__contains=term), user=request.user) ``` or chain two `filter()` calls together ``` Goal.objects.filter(user=request.us...
``` g = Goal.objects.filter(Q(user__iexact=request.user) & Q(title__contains=term) | Q(desc__contains=term)) ``` Use & in place of Python and operator
21,188,760
``` g = Goal.objects.filter(Q(title__contains=term) | Q(desc__contains=term)) ``` How can I add to my `filter` that `user=request.user`? This doesn't work: ``` g = Goal.objects.filter(user=request.user, Q(title__contains=term) | Q(desc__contains=term)) ``` Models: ``` class Goal(models.Model): user = models....
2014/01/17
['https://Stackoverflow.com/questions/21188760', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3207076/']
Keyword arguments (`user=request.user`) must come **after** non keyword arguments (your Q object). Either switch the order in your filter: ``` Goal.objects.filter(Q(title__contains=term) | Q(desc__contains=term), user=request.user) ``` or chain two `filter()` calls together ``` Goal.objects.filter(user=request.us...
According to django [docs](https://docs.djangoproject.com/en/1.11/topics/db/queries/). Lookup functions can mix the use of Q objects and keyword arguments. However, if a Q object is provided, it must precede the definition of any keyword arguments.
44,029,064
How to create new array from slicing the existing array by it's key? for example my input is : ``` var array = [{"one":"1"},{"one":"01"},{"one":"001"},{"one":"0001"},{"one":"00001"}, {"two":"2"},{"two":"02"},{"two":"002"},{"two":"0002"},{"two":"00002"}, {"three":"3"},{"three":"03"},{"three":"003"},{"three":"0003"},{"...
2017/05/17
['https://Stackoverflow.com/questions/44029064', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2024080/']
You can first create array and then use `forEach()` loop to add to that array and use `thisArg` param to check if object with same key already exists. ```js var array = [{"one":"1","abc":"xyz"},{"one":"01"},{"one":"001"},{"one":"0001"},{"one":"00001"},{"two":"2"},{"two":"02"},{"two":"002"},{"two":"0002"},{"two":"00002...
``` var outputArray=[array.reduce((obj,el)=>(Object.keys(el).forEach(key=>(obj[key]=obj[key]||[]).push(el[key])),obj),{})]; ``` Reduce the Array to an Object,trough putting each Arrays object key to the Object as an Array that contains the value. <http://jsbin.com/leluyaseso/edit?console>
29,035,230
I'm trying to connect my c# client to my c server. The client is on Windows and the server on Linux. The server runs without errors but the client can't connect, the connection times out. c server: ``` int main() { int socketid; int clientid = 0; char bufer[1024]; struct sockaddr_in serv_addr, client_addr; memset(&s...
2015/03/13
['https://Stackoverflow.com/questions/29035230', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3870191/']
This has been standardized, [proposal 2764: Forward declaration of enumerations (rev. 3)](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf) allowed the forward declaration of enums if you specify the underlying type, whereas before this was not possible. The main reason is that when the underlying typ...
It's a difference in design goals. Forward declaring a class creates an incomplete type that can be used opaquely in pointers/references. This is a very useful property. An incomplete enum type is not that useful. However being able to declare an enum without declaring what constants are inside that enum **is** usefu...
33,749,645
Hello friends i want to generate csv file in my application in following format [![enter image description here](https://i.stack.imgur.com/cooVj.png)](https://i.stack.imgur.com/cooVj.png) Whne in android i get followign type csv [![enter image description here](https://i.stack.imgur.com/hfwnM.png)](https://i.stack.img...
2015/11/17
['https://Stackoverflow.com/questions/33749645', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1461486/']
use these lines of code for using **HttpURLConnection** For sending the request parameter are as:- ``` Uri.Builder builder = new Uri.Builder() .appendQueryParameter("phone", number) .appendQueryParameter("password", password) .appendQueryParameter("device_...
There might be more than one issue but a big one is you never send the request, all you are doing is creating the request and setting up the parameters you need to do a ``` conn.connect(); ``` or ``` conn.getInputStream(); ``` or any number of things you can do to send the request and get the information you re...
56,803,873
I have the following code ``` declare l_clob clob; l_line varchar2(32767); l_field varchar2(32767); l_line_start pls_integer := 1; l_line_end pls_integer := 1; l_field_start pls_integer := 1; l_field_end pls_integer := 1; begin select response_clob into l_clob from xxhr.xxhr_web_ser...
2019/06/28
['https://Stackoverflow.com/questions/56803873', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/941397/']
To delete a file from a zip file, try this. I am demonstrating on how to delete one file. Feel free to amend it to suit your needs **Logic:** 1. Use `.MoveHere` to move the file to user's temp directory. This will remove the file from the zip file 2. Delete the file from the temp directory **Code: (Tried and Tested)...
Using the Hints from above answer by Siddharth. This little piece of code worked. **Fortunately you can pass path of a folder inside the Zip to `NameSpace` directly and loop through it's files.** Using path as `C:\-----\Test.Zip\Folder\Folder` So this worked Beautifully. ``` Dim oApp As Object Dim fl As Object Set ...
51,011,048
I have that class: ``` public class DNDRunner { private NotificationManager mNoMan; public DNDRunner(Context context) { mNoMan = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); } public void run(String param) { mNoMan.setZenMode(Integer.parseInt(param), n...
2018/06/24
['https://Stackoverflow.com/questions/51011048', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1382894/']
1. Because cm are too big. You'd have to work with floats, which means you'd need to round all the time. They wanted something smaller. Also, the first devices were 160 dpi, do 1dp=1px which was convenient at the time (now very few devices ship at mdpi so this advantage is gone). It also just so happens to match the dp...
1. As said by @Gabe Sechan, cm are too big (even mm). Contrary to cm, conversion to pixels is based on density category rather than exact density of the screen, which avoids rounding issues you'd have with cm to px (factor of 1.5x, 2x, 3x, etc rounds much better than an "arbitrary" ppi). 2. Yes. Conversion of dp to px ...
7,434,865
I want to do something like ```vim let colors = execute(":highlight") ``` This is obviously incorrect; all I can do is `execute(":highlight")` which will open a window, but what I really need is to get the contents of that window into a variable — much like a `system()` call would do for external commands. Can this ...
2011/09/15
['https://Stackoverflow.com/questions/7434865', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/45959/']
There is a command called `:redir` that is specifically designed to capture the output of one or more commands into a file, a register, or a variable. The latter option is what we want in this case: ``` :redir => colors :silent highlight :redir END ``` To see the complete list of the ways to invoke the command, refe...
``` let colors = lh#askvim#exe(':hi') ``` [Which](https://github.com/LucHermitte/lh-vim-lib/blob/master/autoload/lh/askvim.vim#L59) just encapsulates [`:redir`](http://vimhelp.appspot.com/various.txt.html#%3aredir). Or even better: ``` let colors = lh#askvim#execute(':hi') ``` [which](https://github.com/LucHermit...
1,390,990
Lets say I have the following array in JavaScript: ``` var skins = new Array('Light', 'Medium', 'Dark'); ``` How would I go about checking to see what ID in that array (0, 1, or 2) has a matching value to a string I give it. So for example, if I look at a string of 'Medium', I should be returned the ID 1.
2009/09/07
['https://Stackoverflow.com/questions/1390990', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/115182/']
You can use [Array.indexOf](http://eveloper.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf): ``` var index = skins.indexOf('Medium'); // 1 ``` This function has been introduced in [JavaScript 1.6](https://developer.mozilla.org/en/New_in_JavaScript_1.6), but you can include it for compatibility wi...
``` Array.prototype.lastIndex= function(what){ var L= this.length; while(L){ if(this[--L]=== what) return L; } return -1; } Array.prototype.firstIndex= function(what){ var i=0, L= this.length; while(i<L){ if(this[i]=== what) return i; ++i; } return -1; } ```