query_id stringlengths 4 64 | query_authorID stringlengths 6 40 | query_text stringlengths 66 72.1k | candidate_id stringlengths 5 64 | candidate_authorID stringlengths 6 40 | candidate_text stringlengths 9 101k |
|---|---|---|---|---|---|
5c99bce7471859bea0946d6ecbfae9ba36556c1486bc0f0253893b2a8ddbcc8f | ['6f485016aa20432f976c708583d508a5'] | As of May 2013 Lightworks is in official public beta, however it has a much steeper learning curve than FCP and it's extensive list of things it can't do yet is a bit intimidating. But like me I hope all linux users interested in video editing will keep their eye on this project. | fde05dd5864a094a28c728533b18289c823d859d87462365458194c1c527800f | ['6f485016aa20432f976c708583d508a5'] | It's simple. Just dig around the dirt and gravel, there is 1000's of blocks of stone around you, it isn't hard to just dig stone.
If you want tons of cobble, don't go for the cobble generator. Yes, you are more safe, and there is no gravel, dirt, or any type of ore, first of all just dig around the other blocks. Second of all, the cobble generator creates cobblestone. Cobblestone takes a bit longer to mine than stone, so just go strip mining.
|
c10f136ff048f2af09272801ea978e9ae73884d1643508bda15ded4ccd432cbe | ['6f4dd08e0d7f4234a0d2eef03c728aae'] | I would use a simple hh:mm:ss format (appropriately localized), omitting most-significant components when they are zero.
0:SS
MM:SS
HH:MM:SS
Dd HH:MM:SS
The resulting variation in size will give a good visual indicator of the magnitude and right-aligning will ensure they are easily comparable.
| ce80ec0b869b01b6b8a9e72a87e1c0efa5e901b1524ed486cb3a72c8073e8c1f | ['6f4dd08e0d7f4234a0d2eef03c728aae'] | All of the courses I remember taking (science and math) from grade school through graduate were very liberal about allowing any solution method to be OK. And I personally tend to be a bit (not extreme but a bit) of a reductionist. Why learn the derivative quotient rule when you can use the multiplication rule and a raised to the minus 1? Why learn the two point formula of a line, when y=mx+b is so much simpler to remember and you can still derive what you need? (These are real examples, even now.) But it is a bit of a pain in the butt when I find myself doing 2 point line derivations (in real life business analysis) and only remember y=mx+b. In converse, the quadratic equation is drilled into my headflesh and I don't need to complete the square! bsquared-4 ac is almost an icon. And if you do chemistry, physics, engineering, quadratics are all over the place. Ready facility is useful.
So as I get older (different learnings, but many physical tasks), I find myself more valuing deliberate practice of specific methods. That's fine that you like to block karate chops with "wax on, wax off" but you need to learn "paint the fence" too. You'll be better off having both in repertoire.
So even though it is artificial, I think deliberate practice in specific methods is good training.
|
67a8ea3efad2899f5cb5bd0282709eef760bd60c8961bd4f2c378e7df1a9cdd1 | ['6f5566414668482ba7e8b635d2c2831e'] | Well, I thought it was clear. I'm sorry ;) (and I'm having trouble with stackoverflow ...)
I got multiple models. In some models the variable 'media' is ommited.
Model 1:
{
"type": "video",
"edit": true
}
Model 2:
{
"type": "video",
"edit": true,
"media": {
"sources": [
{
"src": "<FILE>",
"mimetype": ""
}
]
}
}
The sources array can contain multiple entries which need to render a list inside a table (see my first post).
| 209414e46864d26745ff3166deed8379e8359a9cbd25183f72517383ed1f6648 | ['6f5566414668482ba7e8b635d2c2831e'] | I'm trying to render an form with Kendo MVVM. My model is not predefined, some variables are context depended. When loading a model without the variable Kendo failes.
<table>
<tbody data-bind="source: media" data-template="source-template">
</tbody>
</table>
<script type="text/x-kendo-template" id="source-template">
<tr>
<td><input data-bind="value: src" /></td>
</tr>
</script>
The following error is thrown (in Chrome):
"TypeError: Cannot read property 'parent' of undefined
at binders.source.Binder.extend.render (<url>kendo.web.js?1389961074:10552:27)
at binders.source.Binder.extend.refresh (<url>kendo.web.js?1389961074:10456:22)
at Class.extend.bind (<url>kendo.web.js?1389961074:10254:18)
at Class.extend.applyBinding (<url>kendo.web.js?1389961074:11257:28)
at Class.extend.bind (<url>kendo.web.js?1389961074:11233:22)
at bindElement (<url>kendo.web.js?1389961074:11459:20)
at bindElement (<url>kendo.web.js?1389961074:11473:17)
at bindElement (<url>kendo.web.js?1389961074:11473:17)
at bindElement (<url>kendo.web.js?1389961074:11473:17)
at bindElement (<url>kendo.web.js?1389961074:11473:17)"
I already hide this part when the media variable is not available but still the error is thrown.
|
82703270f9e1ef8afd94c95687baf03e09de832347ebb725ffca63a23d913e09 | ['6f56ebed502841bca8248d2b81ac2794'] | I need to build a PDF 1.6 with LuaLaTeX, and I can't get \pdfminorversion command to work:
\pdfminorversion=6
\documentclass{article}
\begin{document}
This is a test
\end{document}
The result is
Undefined control sequence. \pdfminorversion
PdfLaTeX builds the PDF, but I need to use LuaLaTeX (I need the fontspec package).
| 6b862583d6e4217dae45b2f842c78dea42705e26101469141f655898ba70edf0 | ['6f56ebed502841bca8248d2b81ac2794'] | I need to center the title of the parts in the toc. I'm trying these two approaches:
\documentclass{article}
\usepackage{hyperref}
\usepackage{tocloft}
\cftpagenumbersoff{part}
\begin{document}
\tableofcontents
\addcontentsline{toc}{part}{\centerline{Part A}}
\addcontentsline{toc}{section}{Section A}
\addcontentsline{toc}{part}{\hfill{Part B}\hfill}
\addcontentsline{toc}{section}{Section B}
\end{document}
When the PDF is generated, the bookmarks have some of problems:
Part A appears in the bookmarks as "toPart A".
Part B appears hierarchically under Section A.
Part B appears correctly in the bookmarks, but it's not correctly centered in the page.
What can I do to solve this problem? Thank you!
|
09965af79883a224fe9e3f94710d859e798370a8baac4000447798a8b37eaa77 | ['6f57407420a745b1b404578fea487a9b'] | I am following this tutorial, but having trouble getting browserSync to fire when I make CSS changes.
If I call gulp watch it reloads one time, and the SASS compiles to CSS automatically, but browserSync does not fire on change.
The below gist is the entire gulpfile.js
https://gist.github.com/RyanNovas/c940324270b57754e487
| fd08fd28e7dea0be4f05a697b1e1afe01906091fd973524d5187c0b39c8f10ba | ['6f57407420a745b1b404578fea487a9b'] | I am trying to practice using Redux/testing React, and have a simple app set up with the Facebook Create-React Kit.
I have a basic test that is just supposed to make sure an element renders:
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render( < Companies / > , div);
});
It was passing until I implemented Redux in that element, like so:
function select(state) {
return {companies: state};
}
export default connect(select)(Companies);
Now, despite the element certainly rendering in the browser, and the redux implementation working just fine, I am getting this message in the test results:
Invariant Violation: Could not find "store" in either the context or props of "Connect(Companies)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Companies)".
I thought I had done this in my routes with this:
let store = createStore(companyApp);
ReactDOM.render(
<Provider store={store}>
<Router history={browserHistory}>
<Route path="/" component={App}>
<Route path="/companies" component={Companies}>
<Route path=":id" component={Company}/>
</Route>
< /Route>
</Router>
</Provider>, document.getElementById('root'));
but I must be missing something.
|
134439a5f6fc997989dc75488c611097a0493743f08643d02905f574aeb21c5e | ['6f71cdcadbb14a97a0d4445b075dbbb4'] | I am making a simple accordion menu in javascript. I'd like to be able to set the compact and expanded heights for the elements via the css max-height and min-height values. For some reason, when I try to retrieve the min-height and max-height of the elements in javascript for animation purposes, I get an empty string rather than, for instance, "500px" like it should. The max-height value is set in css, e.g.
#id {
min-height: 40px;
max-height: 500px;
}
is all set up, but when I put a debugging mechanism in my javascript such as
alert( item.style.minHeight );
it pops up an empty alert box. This happens in Firefox 3.6.2 and IE 8. Does anybody know why javascript refuses to be able to get an element's minHeight and maxHeight?
| 1bad37b15fd5babc7b6daa1049a016cc5eb02d415c0e87c3214083f77ec5c593 | ['6f71cdcadbb14a97a0d4445b075dbbb4'] | Here is my website: http://dagwaging.110mb.com/
View it in any good browser, then in IE6. It dies in IE6. It seems that in IE6, one can't do this:
div {
position: absolute;
left: 0px;
right: 0px;
}
or this:
div {
position: absolute;
top: 0px;
bottom: 0px;
}
Absolute positions cannot be set for left and right or top and bottom at the same time.
This is terrible, because that is pretty much the basis of my site design.
The HTML can be viewed on the site, and the CSS is in /style.css.
I'd like to fix this without invalidating my CSS or HTML. Can this be done?
Another problem is that my content uses min-width and max-width to avoid over-stretching or compressing the content within. IE6 can't do min-width, so how can I replicate this behavior?
|
8a0ed3a033aefd23c897d24dafd90acdd12248339eba7e3a0b30601be2377481 | ['6f91de520e63466da41c6b22cc07e3f6'] | This is an economics problem, but I'm pretty sure this kind of thing comes up elsewhere. I've used dynamic programming to find the optimal path of a system (law of motion), which is:
$k_{t+1}=\beta\alpha k_t^\alpha$,
where $\alpha,\beta \in R(0,1)$
now I want to find out if this expression converges to a steady state, defined as
$\lim_{t\to\infty} k_{t+1}=k_t=k^*.$
I thought about trying to tackle it as an eigenvalue problem, of the form
$\left[ \begin{matrix} \log k(t+1)\\ \log k(t+2) \end{matrix} \right] = \left[ \begin{matrix} 0 &1\\ 0 &\alpha \end{matrix}\right] \left[ \begin{matrix} \log k(t)\\ \log k(t+1)\end{matrix} \right] + \left[ \begin{matrix} 0\\ \log\beta + \log\alpha \end{matrix} \right]$
or
$U_{t+1} = AU_t +B$
My question is this: will the system converge as long as the eigenvalues of A are inside the unit circle? I'm concerned about how the contribution of B behaves over time. Am I on the right track with this thing at all?
| 32a5b926c6c8133b19cf2a2879f67e2a2c6a34de8f5217fc79837cbbec546c77 | ['6f91de520e63466da41c6b22cc07e3f6'] | hook_views_query_alterallows you to alter the query run by views. db_query is how you do custom queries, though Drupal's database structure isn't fixed, so you should look at something like this article if you're going to do that. I think your original question has a simpler solution, though, which I'll leave there.
|
4aedec67419dec97dd1da4fb371110582d55465fb620b8499b45cd3bfd18b62c | ['6f94c1d75c0f44a3aa3a347da1edf785'] |
You can build jib using mvn compile jib:build and then make docker image and push to registry in next steps.
2 . Alternatively try running as docker in docker so that The gitlab runner can use Docker images to support our pipelines and use docker as image.
image: docker:latest
services:
- docker:dind
Building:
image: maven:3-jdk-8
stage: build
only:
- master
script:
- echo "Building the project"
- mvn compile jib:dockerBuild
| d49b2c1f9a002f4e2ae1e02c8ad428c95f9ae93d35441786fcddd6d8a1c4e1b2 | ['6f94c1d75c0f44a3aa3a347da1edf785'] | The statefulset doesn't have a selector so the YAML in question doesn't work. If you use the below YAML s it works and connects to the job as well. Everything will be deployed in default namespace. You need to use appropriate storage class (below example uses standard)
You can follow <PERSON> deployment from here
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: <PERSON>
spec:
serviceName: <PERSON>
replicas: 1
selector:
matchLabels:
app: <PERSON>
template:
metadata:
labels:
app: <PERSON>
spec:
containers:
- name: <PERSON>
image: cassandra:3
imagePullPolicy: IfNotPresent
ports:
- containerPort: 7000
name: intra-node
- containerPort: 7001
name: tls-intra-node
- containerPort: 7199
name: jmx
- containerPort: 9042
name: cql
env:
- name: CASSANDRA_SEEDS
value: cassandra-0.cassandra.default.svc.cluster.local
- name: MAX_HEAP_SIZE
value: 256M
- name: HEAP_NEWSIZE
value: 100M
- name: CASSANDRA_CLUSTER_NAME
value: "<PERSON>"
- name: CASSANDRA_DC
value: "DC1"
- name: CASSANDRA_RACK
value: "Rack1"
- name: CASSANDRA_ENDPOINT_SNITCH
value: GossipingPropertyFileSnitch
volumeMounts:
- name: cassandra-data
mountPath: /var/lib/cassandra/data
volumeClaimTemplates:
- metadata:
name: cassandra-data
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: standard
resources:
requests:
storage: 1Gi
The service YAML
apiVersion: v1
kind: Service
metadata:
labels:
app: <PERSON>
name: <PERSON>
spec:
clusterIP: None
ports:
- port: 9042
selector:
app: <PERSON>
The Job YAML , The command has been modified to describe cluster as it connects and prints the required cluster info.
apiVersion: batch/v1
kind: Job
metadata:
name: init-db
spec:
template:
metadata:
name: init-db
annotations:
"helm.sh/hooks": postn-install
spec:
restartPolicy: Never
containers:
- name: cqlsh
image: cassandra:3
command: ["/bin/sh", "-c", "cqlsh cassandra.default.svc.cluster.local 9042 -e 'describe cluster'"]
|
067c89fb5ee5bc0603d6e7654d7709bb8cd70e1eb8af960a96d9b4a564feb806 | ['6f9796bd0f604feeb7cdafdf232ad4a7'] | To further elaborate on elclanrs answer, when accessing the key of an object. The keys are always strings. Id is a variable not a string.
Bracket notation works such that you need to put the quotes into the bracket when accessing the key. If not, it will look for a variable with the same name. Dot notation actually converts to bracket notation, and it looks like this,
time.id --> time["id"]
Therefore you cannot use variables with dot notation because it will surround the variable in quotes.
Hope that helped!
| a00b6a87a34f9054cb6f2998f26f1f2e687195d418fb99faedc426d6e88781ee | ['6f9796bd0f604feeb7cdafdf232ad4a7'] | If you do use strings around strings, it can appear ambiguous to javascript. That being said, sometimes it makes sense to do it, and you just need to use different quotes " or ' to ensure it is properly evaluated. TLDR - alternate your strings " and '
you can also escape your quotation marks using "\""
|
9979ff76ef576d4bab93421e2b2aa75e82b1091e3dac271d3b729fc299cc7abd | ['6faa068fc72b40a5a1b45acb7691dcc6'] | My professor posed this question as a possible midterm task and I'm simply trying to make sure that I am understanding the information correctly. A proof within the context of optimality may shed some light. However, I am unsure whether wa and wb are leaves for wn, I believe they are since the sum of their probabilities is the probability of wn. But the question that I'm technically asking is "what is L(C’) – L(C) considering the changes made on L(C)?" | 7705384e6230f1dea9c9e9b92762f8dc79a613f068d9f15b2e7a22c8b586bf64 | ['6faa068fc72b40a5a1b45acb7691dcc6'] | Since "geese" is plural, the possessive form would be "geese's." In the second part of your question, you used geese in an entirely different context that made the word singular instead of plural. In that context, the plural of geese is geeses. If you have a plural possessive of geese, you do indeed get geeses'.
|
21823cb004f45d8173950aacde842fb4dd37d380a814f92a4b5ec933c1f383e4 | ['6fb68afb286d4d91b057d894bd169b32'] | Updating all the columns doesn't make sense in Hive. Hive is different from RDBMS. If your above table was a billion row, 200 column table then the process would be super slow and not an efficient way of using Hive. You can use Hbase for that and pull data from Hbase into Hive.
However, in Hive the approach I use for the above scenario is to have a is_valid (Binary) field in the second table.
Example:
Table 2
schema :
create table table2(emp_id int,emp_name string,etime timestamp, is_vald boolean) set clustered by (emp_id) into 4 buckets stored as orc TBLPROPERTIES('transactional'='true');
data:
emp_id | emp_name | etime | is_valid
1 | <PERSON> | 2016-01-08 12:02:30 | true
2 | <PERSON> | 2016-01-08 11:20:45 | true
3 | <PERSON> | 2016-01-08 11:01:36 | true
Use a left outer join to identify your changed records (I would suggest using a view here)
create view update_emp_id_vw
as select t1.emp_id from table1 t1 left semi join table2 t2 on t1.emp_id = t2.emp_id
update table2 set is_valid=flase where emp_id in (select emp_id from update_emp_id_vw)
insert into table2
select emp_id , emp_name , etime , true from table1 where emp_id in (select emp_id from update_emp_id_vw)
Table2:
emp_id | emp_name | etime | is_valid
1 | <PERSON> | 2016-01-08 12:02:30 | false
2 | <PERSON> | 2016-01-08 11:20:45 | false
3 | <PERSON> | 2016-01-08 11:01:36 | true
1 | <PERSON> | 2016-01-08 12:27:30 | true
2 | <PERSON> | 2016-01-08 12:27:45 | true
Later on you can query only the fields where is_valid = true. If you do not want the history in table2 you can delete the rows where is_valid = false.
There are several other logic you can implement. This is an option if you want to use it as a slowly changing dimension. you can add current_timestamp field to table2 if you want to track the history.
(more info can be found in this blog: https://hortonworks.com/hadoop-tutorial/using-hive-acid-transactions-insert-update-delete-data/)
Hope this helps...
| f9a9d4f5e034c382f7442663b214ea2a78ee0ec04b8d01ab1ef6a143b02086cb | ['6fb68afb286d4d91b057d894bd169b32'] | Another solution using replicate and string_split
select order_id, item, value
from (
select order_id, item,
iif(quantity = 1, '1', concat('1',replicate(',1',(quantity-1)))) as split_quant
from orders) a
CROSS APPLY STRING_SPLIT(split_quant,',') ;
for more info on string_split : https://learn.microsoft.com/en-us/sql/t-sql/functions/string-split-transact-sql?view=sql-server-2017
|
e263fc4db072b0c225b717d17e3cf028a3c4ee6fb32b073fe041f32616b61697 | ['6fbac3b66cef42f4bd38a4fc27e3c2b8'] | In my opinion its better to override methods from ModelAdmin changelist_view and change_view:
Like so:
class FakturaAdmin(admin.ModelAdmin):
[...]
def changelist_view(self, request, extra_context=None):
result = super(FakturaAdmin, self).changelist_view(request, extra_context=None)
request.session['qdict'] = request.GET
return result
def change_view(self, request, object_id, extra_context=None):
result = super(FakturaAdmin, self).change_view(request, object_id, extra_context)
try:
result['location'] = result['location']+"?"+request.session['qdict'].urlencode()
except:
pass
return result
As you wish, after save object you go back to list of objects with active filters.
| 32ea7192c35127b038650b44ea92990bb6355cc5a37eb50664a1bc5d183d506b | ['6fbac3b66cef42f4bd38a4fc27e3c2b8'] | class IssuesAdmin(admin.ModelAdmin):
def change_view(self, request, object_id, extra_context=None): #remember to edit also add_view()... etc
self.form.request = request
form = IssuesAdminForm
class IssuesAdminForm(forms.ModelForm):
class Meta:
model = Issues
def __init__(self, *args, **kwargs):
self.request = # do what you need ;)
super(IssuesAdminForm, self).__init__(*args, **kwargs)
def clean_product(self):
if self.request.user.name=='someone'
return self.cleaned_data["product"]
else:
raise forms.ValidationError("Nope!")
|
d0df82126219d1a21710d9e1d283a6433d49f68a49d52231790902600fbc770b | ['6fc0f151810846e9b095f179bc04837c'] | I have a flash form that sends info to my database though a php file.
The problem is that the flash forms needs an echo response, but i also have to send header(Location:with_url_vars)
... and i just found out that his doesn't work => can't send echo before header()
I think i can't use a javascript or meta-refresh either, because only my swf file executes my php file... so the browser of the user will never reach my php file.
And i also can't send the echo after header(Loaction:...) because once i leave, I can't get back to my echo.
Any ideas what i can do to solve this problem?
THANX
Mavi
| 7f17187383728352a97c41c085d657ea9b4166bde5151f6931ce343ded7d04e5 | ['6fc0f151810846e9b095f179bc04837c'] | I've seen similar questions to this, but this error doesn't come up because of missing outlets (yellow warnings)
I go to my thank you page using the following code - and it works from everywhere
let login = self.storyboard?.instantiateViewControllerWithIdentifier("ViewThankyou")
self.presentViewController(login!, animated: true, completion: nil)
The problem is that when I send info to a php file on my server, the app crashes if i try to use the above code when the php file responds.
let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { data, response, error in
The response works without presentViewController and presentViewController works if I don't use it in the response.
I DID set the storyboard ID "ViewThankyou" and it works from everywhere except after connecting to my php file.
|
d5ccf0d8ac17735bd798c7d8fffbecb3f2d4394e6fbe05c65399ba0c2bb92212 | ['6fc6a7640615488b81fed16ed3672910'] | I have been searching all day to no avail to find a way to do this. Granted I am very VERY new to angular (and coding in general) but every guide I've found doesn't seem to work.
I am trying to make small notification messages show (fixed pos) at the top of the screen sliding in from the right side. If a second notification comes up before the first has faded (or been closed manually) then it pushes the first notification to the right. This will show all notification horizontally along the top of the screen.
Am I missing an easy way to do this? Is there a useful guide out there, or a snippet of something similar?
I don't really have any code to show as I'm having trouble even finding a starting point.
| 5013868d0a2a290461474d078cc2127d5ca53cc10eeba9043c20c0a0c1b2cbdb | ['6fc6a7640615488b81fed16ed3672910'] | Im trying to set the an html datepicker to not allow dates before today to be picked. For some reason it wont read it from a stored variable.
in controller:
LocalDate now = LocalDate.now();
model.addAttribute("now", now);
in html:
<input type="date" name="bookingDate" min="${now}"/>
I outputted "now" to the console while running to see its output and I got 2017-12-11 exactly as the min value of date asks for. It doesnt set the datepicker. I copy pasted the output from console directly into the html instead of ${now} and it worked.
I also formatted it as a string instead of a LocalDate just as a test. Both outputs to console were the same but neither worked in html.
Am I missing something simple or is there no way to do this?
|
0881f344145abc3a6409adbaa7d2af94b931ddd3bd2b8bea40dc47a994f63c6e | ['6fd0cb0652664bcf81a12d42fb91620d'] | methods: {
onShowModal(idWinnerPrize, idPrize, curUser) {
this.userEdit = _.cloneDeep(curUser);
if (idWinnerPrize === idPrize) {
this.confirmAward = false;
this.isDelete = true;
this.isFull = false;
this.userEdit.prize = null;
} else {
this.confirmAward = true;
this.isDelete = false;
let countPrize = this.winners.reduce((acc, cur) => {
if (cur.prize_id === idPrize) {
acc += 1;
}
return acc;
}, 0);
const currentPrize = this.prizes.find(
item => item.id === idPrize
);
if (currentPrize && currentPrize.quantity <= countPrize) {
this.isFull = true;
} else {
this.userEdit.prize = idPrize;
this.isFull = false;
}
}
this.showModal = true;
},
onCloseModal() {
this.showModal = false;
this.notify = false;
},
this is my function show and close modal, and use axios.post to update
async onEdit() {
let res = null;
let userIndex = this.winners.findIndex(
item => item.id == this.userEdit.id
);
res = await axios.post( this.isFull ? REMOVE_PRIZE : EDIT_PRIZE, { id: this.userEdit.id, prize_id: this.userEdit.prize } ).then((res) => { return res.data }).catch((error => {
return error
}));
res = true;
if (userIndex > -1 && res) {
this.winners[userIndex] = this.userEdit;
}
this.showModal = false;
},
updated() {
this.prizes = this.contest.prizes;
this.winners = this.posts.data;
}
},
props: ['contest', 'actionUrl', 'method', 'posts'],
data() {
return {
notify: true,
showModal: false,
confirmAward: true,
isDelete: false,
isFull: false,
userEdit: {},
prizes: [],
winners: []
};
},
mounted() {
this.showModal = true;
}
};
that my Vue component, I want to update the page without refresh the page after I click on edit, I don't know why Axios post can't update data. If I update, I need to refresh the page to see my updated data
| 3b9d60e484c143ed57cffb6edd5d64c375a99889cf888d04f0d18304489c103e | ['6fd0cb0652664bcf81a12d42fb91620d'] | here my code, and the vue warn:
menu.js:39016 [Vue warn]: You may have an infinite update loop in a component render function.
i dont know why, pls help me. I have this when i use v-for to the loop
<template>
<div>
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Image</th>
<th scope="col">Category</th>
<th scope="col">Additional Information</th>
<th scope="col">Created By</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<tr v-for="menu in menuData" :key="menu.id">
<th scope="row">{{ stt++ }}</th>
<td>{{ menu.name }}</td>
<td>{{ menu.image_url }}</td>
<td><ul v-for="category in menu.categories" :key="category.id"><li>{{ category.name }}</li></ul></td>
<td>{{ menu.additional_information }}</td>
<td>{{ menu.menu_user.name }}</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
mounted() {
console.log('Component mounted.')
},
data: function() {
return {
stt: 0,
menuData: [],
}
},
created: function() {
axios.get('/api/menus').then((response) => {
this.menuData = response.data.data.data;
console.log(this.menuData);
});
}
}
</script>
|
d70ec836ec3c15879d3c54f1f78d8787e616e53cc382b525d82e29c95440fdf5 | ['6fd7080f50764c5986aa91207a10758e'] | I don't understand why this code is not working. The user can click on a button to expand the sticky footer. I use jQuery to animate the footer (by increasing the height of #site-footer). A problem occured after clicking on the button: the #ask-offer div is hidden.
You can see the problem below:
jQuery(document).ready(function($) {
'use strict';
var footer = $('#site-footer');
var footerHeight = 0;
$('#site-footer #ask-offer').on('click', function() {
// Menu already open
if (footer.hasClass('open')) {
footer.removeClass('open');
$('#site-footer').animate({ height: footerHeight }, 500);
}
// Menu close
else {
footer.addClass('open');
footerHeight = $('#site-footer').height();
$('#site-footer').animate({ height: 150 }, 500);
}
});
});
html, body {
background: #000;
}
#wrapper {
position: relative;
height: 100%;
width: 100%;
min-width: 800px;
}
.wrapper {
position: relative;
width: 800px;
margin: 0 auto;
}
footer#site-footer {
position: fixed;
bottom: 0px;
left: 0px;
right: 0px;
height: 80px;
width: 100%;
background-color: #FFF;
z-index: 300;
}
#site-footer #shadow {
position: absolute;
top: 8px;
left: 35px;
right: 35px;
height: 40px;
background-color: #FFF;
-webkit-box-shadow: 0px -15px 35px -12px rgba(0,0,0,0.5);
-moz-box-shadow: 0px -15px 35px -12px rgba(0,0,0,0.5);
box-shadow: 0px -15px 35px -12px rgba(0,0,0,0.5);
z-index: 10;
}
#site-footer #ask-offer {
position: absolute;
top: -22px;
left: 30px;
height: 32px;
width: auto;
background-color: #FFF;
z-index: 30;
}
#site-footer #ask-offer a {
position: relative;
display: inline-block;
height: 100%;
padding: 0 70px;
text-decoration: underline;
color: #000;
}
#site-footer #ask-offer a > span {
display: block;
padding-top: 18px;
text-align: center;
text-transform: uppercase;
}
#site-footer #ask-offer a > span:before {
content:"• ";
display: inline-block;
margin-right: 10px;
font-size: 15px;
color: #d3d3d3;
}
#site-footer #ask-offer a > span:after {
content:" •";
display: inline-block;
margin-left: 10px;
font-size: 15px;
color: #d3d3d3;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="wrapper">
<footer id="site-footer">
<div class="wrapper">
<div id="shadow"></div>
<div id="ask-offer">
<a href="javascript:;" title='Demander une offre'><span>Ask an offer</span></a>
</div>
</div>
</footer>
</div>
Do you have any idea?
Thanks!
| 4747410e8443c5c8737a06ffac04a0e3a650be86ba8302032dfceabe92e47b20 | ['6fd7080f50764c5986aa91207a10758e'] | There are several ways to do. Personally I like to extends validation by a ValidationService (I think it is much cleaner).
1) We assume you use PSR-4 to load you own company directory in composer.json:
{
"autoload": {
"psr-4": {
"Acme\\": "app/Acme"
}
...
},
}
You have to run composer dumpautoload.
2) Create your validation service provider:
app/Acme/Extension/Validation/ValidationServiceProvider.php
<?php
namespace Acme\Extension\Validation;
use Illuminate\Support\ServiceProvider;
class ValidationServiceProvider extends ServiceProvider {
public function register() {
}
public function boot() {
$this->app->validator->resolver(function($translator, $data, $rules, $messages) {
return new CustomValidator($translator, $data, $rules, $messages);
});
}
}
3) Register your service provider in app/config/app.php for autoloading:
<?php
return array(
'providers' => array(
...
'Acme\Extension\Validation\ValidationServiceProvider',
),
);
4) Create your custom validation rule(s):
app/Acme/Extension/Validation/CustomValidator.php
<?php
namespace Acme\Extension\Validation;
use Illuminate\Validation\Validator as IlluminateValidator;
class CustomValidator extends IlluminateValidator {
public function validateAlphaNumSpace($attribute, $value) {
return preg_match('/^([a-z\x20])+$/i', $value);
}
public function validateZip($attribute, $value, $parameters) {
...
}
}
5) You are ready to use your custom rule(s). For example if I want to use my AlphaNumSpace rule (useful in many cases because original AlphaNum rule doesn't allow space!):
$rules = [
'name' => 'required|alpha_num_space',
'zipcode' => 'required|zip',
];
|
51f0ee75edd7d347c42177172df34585624f35e6afdae1801bdd3d3ca1f5f2df | ['6fe7f65e9aa443488587e1b07b846bf2'] | I create a new UIWindow and want to show a view in the window like popover view, but It do not show up.(The code I read SVProgressHUD for reference)
the code is below:
In .h file
#import <UIKit/UIKit.h>
@interface PopoverView : UIWindow
@property (nonatomic, strong) NSArray *items;
- (void)show;
@end
In .m file
@interface PopoverView ()
@property (nonatomic, assign) UIWindow *prevKeyWindow;
@end
@implementation PopoverView
@synthesize items=_items;
@synthesize prevKeyWindow;
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:[[UIScreen mainScreen] bounds]];
if (self) {
self.windowLevel = UIWindowLevelAlert;
// Initialization code
UILabel *view = [[UILabel alloc] initWithFrame:frame];
view.backgroundColor = [UIColor blackColor];
[self addSubview:view];
self.backgroundColor = [UIColor blackColor];
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
}
return self;
}
- (void)show {
if (![self isKeyWindow]) {
self.prevKeyWindow = [UIApplication sharedApplication].keyWindow;
[self makeKeyAndVisible];
}
}
@end
Anyone help?
| 4aba2ff1a7f85fad6b7de3ce08b13a12e9948d1ead443a2d812c3d4a8ec8958a | ['6fe7f65e9aa443488587e1b07b846bf2'] | Try
function showhide(id){
$('#'+id).each(function(){
$this = $(this);
if($this.is(":visible") ) {
$this.css('display','none');
}else {
$this.css('display','block');
}
});
}
Or
function showhide(id){
$('#'+id).each(function(){
$this = $(this);
if($this.is(":visible") ) {
$this.hide();
}else {
$this.show();
}
});
}
<span id="mydiv" style="display:none;">
blah blah blah
</span>
<a href="#" onclick="showhide("mydiv");return false;" />show/hide</a>
|
9845be5758026ba4ce770e9210fea1b4104b039eb29bd87a300c366684e22de1 | ['6fe90b35258a4120b0e259cc71605fd1'] | This should cycle through the <div> tags, but it isn't even showing the first one. It should show a "0", then 50ms later, show "1", then "2", and then "3". I get nothing.
Here's the HTML:
<div class="header" id="animation">
<div id="aniObj0" style="display: none;" onLoad="runAnimation();">0</div>
<div id="aniObj1" style="display: none;">1</div>
<div id="aniObj2" style="display: none;">2</div>
<div id="aniObj3" style="display: none;">3</div>
</div>
The JavaScript:
var aniNum = 0;
var animationDelay = 50;
var frameDelay = 50;
function runAnimation()
{
Console.log("runningAnimation");
var prevObj = document.getElementById('aniObj' + (aniNum - 1));
var aniObj = document.getElementById('aniObj' + aniNum);
if(aniObj != null){
if(prevObj != null){
aniObj.style.display = 'none;';
}
aniObj.style.display = 'block;';
aniNum++;
if(aniNum == 0){
setTimeout("runAnimation();", animationDelay);
}else{
setTimeout("runAnimation();", frameDelay);
}
}else{
aniNum = 0;
newAnimation();
}
}
| 0c0068c1c83d03c491fd215399db6f36e55b2e0b395df8eca8abd466dfb0231c | ['6fe90b35258a4120b0e259cc71605fd1'] | string databaseLocation = "|DataDirectory|\\Users.mdf";
string connectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=" + databaseLocation + ";Integrated Security=True;User Instance=True";
SqlConnection sqlConnection = new SqlConnection(connectionString);
SqlCommand command = new SqlCommand();
command.CommandText = String.Format("SELECT * FROM Users WHERE Username = {0}", username);
command.CommandType = CommandType.Text;
command.Connection = sqlConnection;
sqlConnection.Open();
int numberOfRows = command.ExecuteNonQuery();
sqlConnection.Close();
return numberOfRows;
This should check the Users.mdf database for the number of occorances of the username. but im getting a "syntax error near Source" runtime error when it hits the ExecuteNonQuery. I cant find anything wrong... Please help :)
|
61046c85bfd425085479da914b5027d2836a486a2536dbe272ff37fa7529be69 | ['6ff1c0f1e1044f3ca17a35a959b8b59a'] | I had the same issue back in months and I found this solution :
From the documentation, you can use exporterAllDataFn property in $scope.gridOptions
gridOptions.exporterAllDataFn = function () {
return $http.get('/data/100.json')
}
As far as I unsterstood, this function is called once you clicked on the exporterMenuCsv menu button 'Export all data as csv'
I also found this good tutorial made by <PERSON>, major contributor of the ui-grid lib.
Note: I quickly ended up not using this solution: I wanted to add some formatting/filtering/sorting on each columns, so I made my own export function.
Hope it helps
| b043044732083be5ac5376d89c3aa95be42b3e3c57d760d38240373efc80da74 | ['6ff1c0f1e1044f3ca17a35a959b8b59a'] | If you embed jQuery in your app (because Angular embeds jQlite by default, but not jQuery), here is one solution.
You can do it from the controller, after your element is ready:
$element.ready(function () {
$('#offcanvasId').on('hide.bs.offcanvas', function(){
//...
})
});
Nonetheless, there must be some workarounds without jQuery.
You can see more on the documentation https://docs.angularjs.org/api/ng/function/angular.element
|
ebf1c212bd4a053cd90de1a4806e90e329e7d491d93c1b6fff83d10d653f13ed | ['6ff1f4ba5f64495a9d74547ac88b4bf5'] | First - create the POJO / Model class to convert your response.
public class SomeModel{
@SerializedName("name")
@Expose
private String name = null;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Declare your response
Gson gson = new Gson();
SomeModelResponse response = gson.toJson(result, SomeModel.class);
If you will use Gson object more than one time - its better to create a singleton of it because every time when you create a new instance of it - it is use a lot of memory.
After add checking:
if(response !=null && response.getName() !=null){
if(response.getName().equalIgnoreCase("some name")){
// show toast Result Success !!! and move to next screen
}
else if(response.getName().equalIgnoreCase("another name")){
// Invalid Response !!! your logic here
}
}
Also don't forget to check what kind of response are you expect to get. It should not be an Object.class
| faa9b9b75e102a5cc35c6acee79a6b84d15cef38a1906e91abdc6f0b0daea175 | ['6ff1f4ba5f64495a9d74547ac88b4bf5'] | I created an extension function when setting the default animation
fun View.navigate(id: Int, navOptions: NavOptions? = null){
var updatedNavOptions = navOptions
if(updatedNavOptions == null){
updatedNavOptions = navOptions {
anim {
enter = R.anim.slide_in_right
exit = R.anim.slide_out_left
popEnter = R.anim.slide_in_left
popExit = R.anim.slide_out_right
}
}
}
this.findNavController().navigate(id, null, updatedNavOptions)
}
In my fragment just do so:
my_view.click { view?.navigate(R.id.how_referral_program_works) }
|
23c8fe42182fa82e74480d3a3430988a2e3faa8f5dfc47bd4447b921de5bb78c | ['6ffb264f95794c67a802eb004100603a'] | I am new to Android I need some help.
I am using countdown timmer to update a text view up to some date. Its working fine but the timmer does not stop at 0:0:0:0 it keeps going on as this 0:0:0:-12.
I want the text view text to change to Start at 0:0:0:0.
SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy, HH:mm:ss");
formatter.setLenient(false);
String endTime = "22.05.2019, 23:48:00";
Date endDate;
try {
endDate = formatter.parse(endTime);
milliseconds = endDate.getTime();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
startTime = System.currentTimeMillis();
diff = milliseconds - startTime;
countDownTimer = new CountDownTimer(milliseconds, 1000) {
@Override
public void onTick(long millisUntilFinished) {
startTime = startTime - 1;
Long serverUptimeSeconds =
(millisUntilFinished - startTime) / 1000;
Toast.makeText(MainActivity.this, "Time left :" + serverUptimeSeconds, Toast.LENGTH_SHORT).show();
String daysLeft = String.format("%2d", serverUptimeSeconds / 86400);
String hoursLeft = String.format("%2d", (serverUptimeSeconds % 86400) / 3600);
String minutesLeft = String.format("%2d", ((serverUptimeSeconds % 86400) % <PHONE_NUMBER>);
String secondsLeft = String.format("%2d", ((serverUptimeSeconds % 86400) % 3600) % 60);
countdownTimerText.setText(daysLeft + ":" + hoursLeft + ":" + minutesLeft + ":" + secondsLeft);
}
@Override
public void onFinish() {
countdownTimerText.setText("Start");
}
}.start();
| 9b382ebf07856801afd19c4da9bee67ee51f6849299db19e0bbfb128d6562ccd | ['6ffb264f95794c67a802eb004100603a'] | I trying to get the current date and time from Google. with the following code
private class LongOperation extends AsyncTask<String, Void, String> {
@Override
protected String doInBackground(String... params) {
try {
HttpClient httpclient = new DefaultHttpClient();
//for Android 9
httpclient.getConnectionManager().getSchemeRegistry().register(
new Scheme("https", SSLSocketFactory.getSocketFactory(), 443)
);
HttpResponse response = httpclient.execute(new HttpGet("https://google.com/"));
StatusLine statusLine = response.getStatusLine();
if (statusLine.getStatusCode() == HttpStatus.SC_OK) {
String currentDateTime = response.getFirstHeader("Date").toString().replace("Date: ", "");
SimpleDateFormat formatter = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss zz");
// String temp = "Thu Dec 17 15:37:43 GMT+05:30 2015";
try {
date = formatter.parse(currentDateTime);
} catch (ParseException e) {
e.printStackTrace();
}
SimpleDateFormat sd = new SimpleDateFormat("dd/MM/yyyyHH:mm:ss");
GoogleDate = sd.format(date);
System.out.println("Google Date :" + GoogleDate);
} else {
//Closes the connection.
response.getEntity().getContent().close();
throw new IOException(statusLine.getReasonPhrase());
}
} catch (IOException e) {
Log.d("Response", e.getMessage());
}
return GoogleDate;
}
@Override
protected void onPostExecute(String serverDate) {
Toast.makeText(MainActivity.this, "Time is "+ serverDate, Toast.LENGTH_SHORT).show();
}
}
It's working fine in the in debug build and release build as well but when I turned minify true in Gradle file the app crashes and shows the following error.
2020-04-23 00:36:39.558 <PHONE_NUMBER>/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #4
Process: com.developer.emten, PID: 18528
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:355)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:784)
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference (Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Unknown Source:43)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Unknown Source:10)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Unknown Source:4)
at org.apache.commons.logging.LogFactory.getLog(Unknown Source:4)
at org.apache.http.impl.client.AbstractHttpClient.<init>(Unknown Source:7)
at org.apache.http.impl.client.DefaultHttpClient.<init>(Unknown Source:1)
at com.developer.emten.activities.MainActivity$b.doInBackground(SourceFile:1)
at android.os.AsyncTask$2.call(AsyncTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:784)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.trim()' on a null object reference
at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(Unknown Source:400)
at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(Unknown Source:126)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Unknown Source:6)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Unknown Source:10)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Unknown Source:4)
at org.apache.commons.logging.LogFactory.getLog(Unknown Source:4)
at org.apache.http.impl.client.AbstractHttpClient.<init>(Unknown Source:7)
at org.apache.http.impl.client.DefaultHttpClient.<init>(Unknown Source:1)
at com.abc.app.activities.MainActivity$b.doInBackground(SourceFile:1)
at android.os.AsyncTask$2.call(AsyncTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:784)
Please help me. Can anyone tell me the Proguard script which needs to be added?
I have also attached the build output as well.
Your Kind help will be highly appreciated.
|
c1672f631659a4f73b9d3bc6e3d2df0d6d4e62b1510e8ea8aef6e699b704b80c | ['70036898008048cc987fb2533c16edaf'] | The following code is returning an unexpected (and wrong value).
x1 = ceil(ceil(ceil(100*1.0f)*1.0f)*1.1f);
It is returning 111 not 110. I am aware that multiplying a number by 1 is pointless, but those 1's are not always ones. When they are other values the function works as expected.
| dd256a080a57a1c801e0815f748dd69db97d15f5d24e6f3ffca7f4ac6eff7fdd | ['70036898008048cc987fb2533c16edaf'] | I started getting a strange bug recently. I am converting my app from iPhone to iPad. It all seemed to be going well until I noticed that all my buttons and switches stopped working. When my app launches everything loads up fine (on both platforms). Then when you try a button the app appears frozen. Nothing happens at all. When you press the Home button all the changes you made (but did not see) are quickly displayed just before returning home. If you reopen the app (without quiting it) all buttons work just perfect. But on initial launch everything is broken.
Has anyone had this happen before? All I changed from the old working version was which xib gets displayed (iphone or ipad).
|
98fa8ff7ff6adb77262522f80f2f38c2a1bd05515b1fa2bcd3c98ed73eab4870 | ['70166874086f4df3ac94df8ad4e3d9e5'] | Проблемма в то, что при открывании 100 страниц, к апи идут 10000 запросов, что не очень хорошо. Нужно уменшить обращения к апи. Так как много одинаковых запросов,и соответственно ответов, подумал можно сделать два-три запроса и сохранить ответы (массивы где-то). Вопрос только где? Ведь нужно еще потом ответы(массивы) на сервере обрабатывать. | 9bb1e98186ee346ee570d50938942fa96cd9828010254b9baddf36ea3e6ea7a8 | ['70166874086f4df3ac94df8ad4e3d9e5'] | А будет ли правильно хранить полученные данные от АПИ, напоминаю, что это массивы с данными (список городов) в сессиях? Ведь во время отрабатывания текущей страницы, нужно обращаться к етим данным несколько раз и на следующих страницах также. Какое решение можно применить? Если закешировать саму страницу АПИ, все равно огромное количество запросов к закешировнному файлу делает нагрузку. |
3ad4eb3013f91f30d0e176f272c32edcb7893c445181d7eaefa408599d48fed4 | ['702956b162a941a3af0ae12ef4df5adb'] | What exactly are you trying to do? If smoothing then try Meanfilter or GasssianFilter, or maybe BandpassFilter, or for highpass edge-detection try EdgeDetect or Highpass... all of these are much easier to use than Butterworth (they don't require ToDiscreteTimeModel or RecurrenceFilter) they just operate right on the 2D data, | b64a57c565ffe750306f11366498183234c086de9321ddbe1e83c7cb5693334e | ['702956b162a941a3af0ae12ef4df5adb'] | Here's a few pieces of the puzzle. To generate monotonic sequences of "random" numbers:
Accumulate[RandomReal[{0, 0.1}, 10]
{0.<PHONE_NUMBER>, 0.<PHONE_NUMBER>, 0.141986, <PHONE_NUMBER>, <PHONE_NUMBER>,
<PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>, <PHONE_NUMBER>, 0.329844}
Now let's say you have a vector x and you want the first few to go up a tiny bit and the rest to go down. Specify the direction using the vector dir
x = RandomInteger[{0, 10}, 10];
dir = Flatten@{ConstantArray[1, 4], ConstantArray[-1, 6]};
ran = dir RandomReal[{0, 0.1}, 10];
x+ran
Now x+ran is a perturbed vector of the same kind as x, but with the first four perturbed up and the rest perturbed down. To have some remain unchanged, set the corresponding elements of dir to zero.
|
628ab787f0f401a646843ecd014a58a4d08c7d9d49f0141c8bf1ffb7794daf2e | ['703a6f13abf243ffa21a037ebece18c6'] | What do I have to change to get my 3rd ed content compatible to 4th ed specifiactions?
Does anyone know an abstract of the changes or do I have to compare the whole cam and rte specifications?
Can't find such a document neither at adlnet.org nor searching globaly.
Thx!
| ef692960feab87160953d9327c35ef39fa7e5db2e0c382ac5ffcfc587d2a491b | ['703a6f13abf243ffa21a037ebece18c6'] | Do you only want to launch your spa from within the LMS without any tracking?
Than you should use the adlcp:scormType="asset".
Else your content would have to support the whole mandatory sco communication features like:
find the scorm api
initialize the session
get and set values
errorhandling
finalize the session
|
08e4e1607a9ab44b730772fd93be2494e9231eb9cfd746e145c8fdc292d5653e | ['703cb04da84a43d4b8c5b19d28ff0d61'] | I'm simply trying to edit a div named meta description inside of a div named post by taking the html and creating a textarea with it then plugging it back in. I have it working for the Title, content, and even meta keywords, but for some reason the description's textarea just keeps coming up empty in the end.
//---------------edit meta Description------------
var Description = metaDescription;
Description.show();
//save the html within the div
var ogDescription = "None";
if (metaDescription.html()) {
ogDescription = $(Description).html().trim();
}
console.log('ogDescription = ' + ogDescription);
// create a dynamic textarea
var editDescription = $("<textarea />");
editDescription.val(ogDescription);
console.log('editDescript val after adding === ' + editDescription.val());
console.log('editDescript html after adding === ' + editDescription.html());
editDescription.attr('class', 'editDescription')
.css('height', metaHeight)
.css('width', post.css('width'));
// add the textarea
Description.html("<p>meta Description:</p>");
$(Description).append(editDescription);
//--end edit meta Description
Output
Title = Newly Added Post
Posts.js:79 Content = Testing 1, 2, 3
Posts.js:105 ogDescription = Testing 1,2 and u know 3
Posts.js:110 editDescript val after adding === Testing 1,2 and u know 3
Posts.js:111 editDescript html after adding ===
Posts.js:129 Keywords = none, for, now
Description html after === <p>meta Description:</p><textarea class="editDescription" style="height: 80px; width: 262px;"></textarea>
| 7a1ef532d9a2647b2e03136e9ff3259c98fee652b9c7da0b7283ca8fe3c7311f | ['703cb04da84a43d4b8c5b19d28ff0d61'] | I have a laptop connected to a domain named Homebase, where I have a domain user (<PERSON>) logged in. On that laptop I also have a local account named <PERSON> which I don't use, but I'd rather not delete it. The problem is I am trying to access my domain user's local Download folder.
If I look under C:\Users it shows a folder for <PERSON> and one for <PERSON>.HOMEBASE. If I try to access this folder in C# "C:\Users\Jamie.HOMEBASE" it throws a Directory Not Found Exception. If I look at all the folders under C:\Users in C# I do NOT see <PERSON>.HOMEBASE, but only one folder named <PERSON>. Which I checked whats inside and it is indeed the local user <PERSON> and not the domain user.
What's going on? How come I can access this folder in windows explorer with that path, but not with C#?
|
85f062065c26e85eb8c284d8f3d81fbb85d8545ba909a785a20c939c7f94cd85 | ['703dcad8ea574f3f9fd200a7e84e4a83'] | I'm using the system-config-printer utility in Linux Mint 17. Click the "+ Add" button. Next, choose "Network Printer". It should display your Canon printer twice, once by cnijet format (e.g. cnijnet:/88-87-17-89-c1-62), and once as "LPD network printer via DNS-SD". Choosing the LPD daemon cleared up this error for me.
| 38203f33ddfccab5bdaaa31feaebdaab9d391f44a9f8bef91ad6b426b0aa04a8 | ['703dcad8ea574f3f9fd200a7e84e4a83'] | I'm doing a filter and I basically have this
filter('Sheet'!B2:B,
('Sheet'!A2:A=1)+
('Sheet'!A2:A=2)+
('Sheet'!A2:A=3)+
('Sheet'!A2:A=4)+
('Sheet'!A2:A=5)
)
I'd like to simplify this as follows:
filter('Sheet'!B2:B,
'Sheet'!A2:A in (1,2,3,4,5)
)
Anyone have any idea if I can do this?
Here's a screenshot of my actual code:
|
5813dc6ba3bccda9d5bd56e8b52037077d014423c5f5a625d37d923bc3da2e73 | ['7054301fc0e749c1836e3e7dc5d92f46'] | Xcode 9.1
Swift 4
I'm trying to do some things if a property list still doesn't exist at a certain URL. The code is:
import UIKit
class ViewController: UIViewController {
let urlPers = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent("punterosborrable.plist")
lazy var infoPunt = try? Data(contentsOf: urlPers)
override func viewDidLoad() {
super.viewDidLoad()
switch infoPunt {
case nil:
puntNUM = 1
puntALG = 1
puntGEO = 1
puntDYA = 1
default:
puntNUM = try! PropertyListDecoder().decode([Int].self, from: infoPunt!)[0]
puntALG = try! PropertyListDecoder().decode([Int].self, from: infoPunt!)[1]
puntGEO = try! PropertyListDecoder().decode([Int].self, from: infoPunt!)[2]
puntDYA = try! PropertyListDecoder().decode([Int].self, from: infoPunt!)[3]
}
Supposedly, if I don´t write anything to the Url, infoPunt should have the value nil. However, just after running the line
switch infoPunt {
the debugger shows that infoPunt.storage = (Data?) some
What does this mean? What value (or data) is infoPunt holding at this point? I thought it should be nil.
Thanks in advance
| be7e302d3e4c6f55b934df22fae2ad53b30be8c37b009bed0a0554d9401776b2 | ['7054301fc0e749c1836e3e7dc5d92f46'] | I'm using Xcode 9.1
I want a simple thing. I want to have a UILabel that adjust its size to show its content.
For that, I'm doing the next things.
First, I add 3 constraints.
1.- Center it horizontally.
2.- Fix it a distance 10 from the left margin.
3.- Fix it a distance 20 from the top margin.
I put number of Lines = 0
And in Line Break : Word Wrap
Now I modify the text from "Label" to a large one. However, only the first line is shown. What I am doing wrong?
PD: I'm a noob, so at the moment, I just want to use the utilities pane. Thanks in advance.
|
3e19aae044895461b285bfb73f10d41eda00c264562d529b1797ced13a03b7f7 | ['70663e5bb7494afc934bc77ccf88b258'] | Whats a smart way to create a list of authors with their respective articles without creating new users for each one?
Each author could have many articles and each article could have many authors.
I know how this works in a custom relational db but I am not sure how it would work best with the WP DP.
A combination of Custom post types and custom fields I presume?
| ce2a12521f07ba47d22d76be4e05fad08f577a264a3bcf5faf9a9347a6252bed | ['70663e5bb7494afc934bc77ccf88b258'] | Thank you for pointing it out. I corrected the third echo statement. I also noticed that I was write div style tag with wrong syntax. I have corrected it. But its still not increasing space between my widgets. Am I writing the style correctly? is there another way to do this? |
dba68e3efad4f500fc02b87ca511bd8a38cf2c6297be9d5d21415351d2cb499b | ['70777ef5dda14d46b3aa86fc47353380'] | Private Sub btnScore_Click(sender As Object, e As EventArgs) Handles btnScore.Click
If i < scores.Length Then
'display inputbox to the user
runs = InputBox("Enter score for " & (i + 1) & " innings", "Score")
'if runs is entered
If runs < 0 Then
MessageBox.Show(VALID_MESSAGE)
Exit Sub
ElseIf runs <> "" Then
'parse the value of runs
If (Double.TryParse(runs, out)) Then
'parse the runs and add it to the array scores()
scores(i) = Double.Parse(runs)
runningScore += scores(i)
'add the rainfall value to the listbox along with month name
lstScores.Items.Add(scores(i) & " :" & runningScore)
'increment the value of i
i = i + 1
Else
'display error message
MessageBox.Show(VALID_MESSAGE)
lblTotal.Text = ""
End If
Else
'if runs is empty then display error message
MessageBox.Show("Enter runs for " & i & "innings")
End If
Else
MessageBox.Show(ONLY_MESSAGE)
End If
If runs < 0 Then
MessageBox.Show(VALID_MESSAGE)
End If
'calculate total runs And display on the lable
If scores(6) = 7 Then
lblTotal.Text = String.Format("final score is {0}", scores.Sum())
End If
End Sub
This is the reason why if you input invalid data it will add into lstScores, because your If statement.. is in bottom of your code, although is not recommend where you put the If else statement... Remember reading of the code is start in top to bottom.
Your first If statement is like this. If runs <> "" then ...., of course if you type the -1 value in the Input Text the Boolean will result to true, If -1 <> "" = true, then it will proceed to the statement which is
If (Double.TryParse(runs, out)) Then
'parse the runs and add it to the array scores()
scores(i) = Double.Parse(runs)
runningScore += scores(i)
'add the rainfall value to the listbox along with month name
lstScores.Items.Add(scores(i) & " :" & runningScore)
'increment the value of i
i = i + 1
This is the line of code even the value is invalid or not it still adding value in the lstScores, lstScores.Items.Add(scores(i) & " :" & runningScore)
Now after that statement you will receive a message which is :
Enter valid runs value
If runs < 0 Then
MessageBox.Show(VALID_MESSAGE)
End If
That code is the reason why you receiving the message. If you input -1 of course the result of boolean is true, why? -1 is lessthan to 0 which is true.
The thing i do is, I've insert If statement.. above, which is If runs < 0 then .... and also Exit Sub to instantly end the statement. If you input -1 to Input Text the result is something like this, if runs(-1) lessthan to 0 the Boolean result is true then it will proceed to statement which is the Message and Exit Sub.
Try my code above, and also use Breakpoints.. Hope this helps..
| 7da0315874fc3736729553a267fb34b1cee3e476da4952542eb48830d99292c2 | ['70777ef5dda14d46b3aa86fc47353380'] | My problem is what event will file after i kill the Main Process?
I have no problem when killing the Sub Process. When i kill the Sub frmAdmin Process,
For eg.
This event will be fire,
Private Sub frmAdmin_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If e.CloseReason = CloseReason.TaskManagerClosing Then
'Put you desired Code inside this!
'updateLogoutStatus(Euserid)
'updateLogoutStatus(DecryptAdminUser)
MsgBox("Why are you terminating me from : TaskManager?")
End If
End Sub
But when i kill the Main Process, Which contains the sub process,
Nothing happens. No event fire.
I already searched to internet but they only kill the sub process, not Main process.
Any ideas will be a big help.
The reason why i'm doing this because if the user Kill the main process using Task Manager, I want to trigger a Function.
|
49036b954027595606f3293ce0a15dbc2436e21fd663b03437d4ba6f191b7b41 | ['707fd6998b294ddd8d372a17ff13d5b9'] | int highestValue = someList.IndexOf(someList.Max())
someList contains a lot of duplicates and someList.Max() returns the index of the first instance of the highest value.
Is there some trickery I can use (reversing the order of the list?) to get the index of the final occurrence of the highest value in the list, rather than resorting to writing a manual method?
| 785ba636b4fc3f0c960d3385b6e1a80a816bd6bbfafc2b58836515b9da836d3e | ['707fd6998b294ddd8d372a17ff13d5b9'] | I've inherited an api that accesses remote (real time) json via observable subscriptions.
In large part a lot of the members are just strings and doubles but a few are lists and I have zero idea how to iterate through them via linq/takewhile and subscribe methods.
mcSub.TakeWhile(p => p.Status == Market.OPEN).Subscribe(x => Console.WriteLine(DateTime.Now.Second + " - " + mc.Event.Name + " - " + x.Items[0].Prices));
Where x.Items is a list, how would I iterate through that to display prices for all Items in a single statement?
Thanks in advance.
|
32a4bd176109581bd87b95465d4f4438f826fa7fc943762a71673a896c1fd9d7 | ['708cc3a44f55405b96271c7b8ad8f614'] | OK, so what I wanted to do can be achieved using the "Provided" dependency tag, instead of the "Compile" tag.
If I use the provided tag in "MyCompanyUtils", specifically for the GSON dependency, it tells MyCompanyUtils that one of the projects that uses MyCompanyUtils will include the GSON dependency itself.
Imagine it like this:
MyCompanyUtils uses (provided) GSON
MyClientUtils uses (compile) MyCompanyUtils
MyClientApp1 uses (compile) MyClientUtils, (compile) GSON
MyClientApp2 uses (compile) MyClientUtils, (compile) Skobbler
As the Skobbler library includes GSON, this means that MyClientApp2 doesn't need to manually compile it. Because MyCompanyUtils is expecting one of the projects that implements it to provide the GSON library, this works fine.
I now also need to include and compile the GSON dependency for MyClientApp1, which I did not need to do before. This is again because MyCompanyUtils is expecting that projects implementing it will provide a compiled version of the library.
| 499545fc23a6cf076ca2ffdf0c27783ce0d1199c35104aa489308b3079275975 | ['708cc3a44f55405b96271c7b8ad8f614'] | I have been using the older version of Skobbler maps for a fair while now, and have found it to be quite successful. I have recently began upgrading to version 2.4, to gain some of the extra functionality provided in this version ('via points' being the main feature I am interested in).
I can get the AndroidSDKDemo project running. I can get my own project running. But as soon as I add an offline package, the app crashes every time on start up, with a "Fatal Signal 11 0x00000004".
After I have added the offline maps package to the SKMaps.zip file, it does not matter if I set the connectivity mode to online or offline, the app still crashes, just based on the presence of the files in the preinstalled maps folder.
I downloaded the offline maps package via the AndroidSDKDemo project. I then used the android "adb backup -noapk" command to create a compressed version of the app's files, and extracted the SKMaps folder. I then moved the "v1" folder from "Maps" into "PreinstalledMaps", and zipped the file, and then added this file to my test application (the one that crashes) in the assets folder.
It also appears that the crashing may have something to do specifically with the SKMaps.zip... If I take the SKMaps.zip file from the demo project (unchanged, just downloaded straight off the web), and place it in my test app - the app works fine. If I take the SKMaps folder that was made in the backup (and therefore contains information in the "Maps" folder, and without moving ANYTHING in this file (not even moving anything to "/PreinstalledMaps"), and put this folder in my test project, the app crashes.
Does anyone have any ideas on how I can fix this problem? It's been hugely frustrating for me, as I can't really figure out why things aren't working. I may be doing something wrong, but I am lost as to what this might be.
Thanks in advance for your help
|
07b6cb8535453554be4e0cf8cf17e9dd794caa00973c00955979506641ff9b0c | ['708d96bd549f4d1498d3b03654286a4e'] | Make sure the worksheet isn't hidden. Excel will throw an error for .ExportasFixedFormat if the worksheet is hidden or very hidden. If yours is hidden, you can unhide it first in your code:
Sheets("Fa VAT").Visible = xlSheetVisible
At the end, you can hide it again.
Sheets("Fa VAT").Visible = xlSheetHidden
| 4873380b9b8ed9c4747b6a88c064a189c58e5b10c24dfba2173a11a60555b1f7 | ['708d96bd549f4d1498d3b03654286a4e'] | You can run T-SQL from Excel if you make a SQL Server connection rather than using Microsoft Query. Choose Data > From Other Sources > From SQL Server.
Enter your server name and choose your database. Excel will provide you with a list of tables. This is confusing because it makes it seem like you cannot use SQL or T-SQL, but you can. Go ahead and choose a table. Set whatever settings you would like on the next page, then click Finish.
Once the Import Data dialog box appears, click on Properties and then choose the Definition tab. Under Command Type: change the selection to SQL. Then you can put whatever SQL or T-SQL you like in the Command Text box. You can now use T-SQL because the Connection String is SQL OLEDB rather than something more generic.
Once you finish entering the Command Text, Excel will give you an error telling you the connection will no longer be the same as the one you initially set up. Just click Yes and proceed from there.
|
166abfb5ada8c864a89331464b3fbf6292b8b45076ba7c0dfb5114c268cc397a | ['70a9e1e9dea241fba283a4711c82c2d0'] | The emulator used to accept numerical input from my number-pad with num lock on, now, however, it acts as if num lock is off. For example, if I type "7" on my number-pad, it responds as if "Home" has been pressed.
The numerical keys along the top are still fine, and it makes no difference if I toggle num lock.
Emulator version output:
Android emulator version <IP_ADDRESS> (build_id 5537588) (CL:N/A)
Copyright (C) 2006-2017 The Android Open Source Project and many others.
This program is a derivative of the QEMU CPU emulator (www.qemu.org).
This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
I'm running Ubuntu 18.04
Does anyone know what I've changed or is this a bug?
| 9083f8b04b2be6c8bef4d3d9dae54a54a02e5016d7a8a41b4de4d5111e836d6d | ['70a9e1e9dea241fba283a4711c82c2d0'] |
The layout xml file will have a main layout. you can set the background attribute of this layout.
Android apps don't do this. Users don't expect it either. Generally a user will hit the home button or the back button - read the activity lifecycle docs on how to handle this in your app:
http://developer.android.com/training/basics/activity-lifecycle/index.html
Using the visual design tools in Android Studio may be confusing at first. It will depend on what type of layout you are trying to move objects in. Have you read the getting started docs?
https://developer.android.com/training/index.html
|
6beda095ebb28a53ec3351362d27ff14d6bacd98444569f3f5e7f9bbfe734092 | ['70ab2991b4cb43aa9da7a19ef0cb7fc5'] | Ok, I understand that (at least it's an issue with intel's memory controller, a whole other question would be "how is ram accessed? Is it mapped and opaque to the firmware?"). I was just confused as the actual unit of storage. So pick a bank, pick a row address, pick a column address and you get an 8 bit value. | 66f20270255f8d33d83371a7d5253a773203dfc936545851c52b33d36460e611 | ['70ab2991b4cb43aa9da7a19ef0cb7fc5'] | Tengo un problema para integrar Data tables con el json que recibo de respuesta por parte de mi servidor.
El código que estoy manejando es este:
function lstCiudades(){
$.ajax({
method:"POST",
url:"php/catalogo/class.Ciudades.php",
data: "func=lst"
}).done(function (res){
var resp = eval("("+res+")");
if (resp["status"] == "ok_lst"){
$('#tbbTable').DataTable({
"ajax": resp["success"]
});
//imp(resp);
}else if (resp["status"] == "warning_lst") {
Toast.fire({
type: 'error',
title: 'Ocurrió una alerta',
text: resp["warning"]["message"],
});
}else{
Toast.fire({
type: 'warning',
title: 'Ocurrió un error inesperado:',
text: 'Reinicie el sitio web.',
});
}
});
}
<PERSON> como estructurar el contenido en esta tabla:
|
e39398be9dfb12521aa908f18aec5f0981e5b1646d982d0c555283b16da60f9d | ['70b6cca39a9b4ac8a7ab9b1d6fb5bf78'] | Good day
We need to copy data from one server to another server for a migration. I have received an Excel list in which I have the following columns.
All contained files must be copied. Unfortunately, the new path where the documents should be copied should also be written into the DataFrame and finally the whole thing should be exported as CSV.
The export is no problem.
But I have problems with the loop.
In my imagination:
I have a basic destination path
- I work per line
- I copy the file using the file path
- I add the "destination path + file name" in new path in the data frame
- Repeat on the next line
So i started with:
import os
import glob
import shutil
import numpy as np
import pandas as pd
Docdf = pd.read_excel('S:\Test_MSC.xlsx')
destpath = 'S:\\Test_dest\\'
for f in Docdf:
[...] *problem*
Docdf .to_csv("enchanced_file.csv", sep = ";", encoding = "utf-8")
How do I best build the loop?
Many thanks for the support
| d7323c5d620d6bcb681dc2e20bc0d761fc1b20426d7ac93dbd59e0caf4da37f6 | ['70b6cca39a9b4ac8a7ab9b1d6fb5bf78'] | Just do this:
#Load your CSV
df = pd.read_csv("Your-file.csv") #Load the file
#Write out the lines you need with a while
i = 0
j = 1000
while j < len(equzi):
equzi[i:j].to_csv('output'+str(j)+'.csv', index=False, sep=";")
i = j + 1
j += 1000
Because you said that the first line should be the same and in my understanding is this the header.
|
a04724ce0b9c5e558f46b81808301ccd41f66890822c5d0d7d92b4a9118bef83 | ['70ba2d9320fe47158ab227d1b21631f6'] | I want in actionscript to place an object in my library onto the stage where I clicked. Seems easy? Right? TOTALLY BLANKING. any help would be awesome :)
my code thus far is:
package code {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Main extends MovieClip {
public var redBox: Box = new Box(mouseX, mouseY);
public function Main() {
// constructor code
stage.addEventListener(MouseEvent.CLICK, mouseClickEvent);
}
public function mouseClickEvent(e:MouseEvent):void {
addChild(redBox);
}
}
}
that is the main and then the box code is:
package code {
import flash.display.MovieClip;
public class Box extends MovieClip{
public function Box(myX:Number, myY:Number) {
// constructor code
myX = x;
myY = y;
}
}
}
| c5ada254ddd4b17e544c44d912ff7d4ca66577fbb1504e3d674279a20369e77f | ['70ba2d9320fe47158ab227d1b21631f6'] | I am trying to pull all tweets that include #multitouch from a single twitter. (not just pull everyone that ever tweets using #multitouch, just from one person)
my code right now [which just pulls by hashtag]:
$(document).ready(function () {
$.getJSON('http://search.twitter.com/search.json?q=%23multitouch:&screen_name=25KDIGITAL:&callback=?', function (json) {
for(i = 0; i < 3; i++)
{
$("#TweetBar").append("<li>" + json.results[i].text + "</li>", "<p>" + json.results[i].from_user + "</p>");
}
//$("#TweetBar").show(2500, 'linear');
});
});
is this at all possible? thanks!
|
e6991d95accd48ccf3b02d4e0e34d4d7ee6b6c877d2d26e843b0a7bd8d3f3f27 | ['70c0ac67909947bdb6617b1408c13a2a'] | Using Microsoft Graph client sdk how would one go about using search Odata query to lookup if subject or body contains a certain search term.
The $search Odata query parameter is available in the Graph Client api, but i could not find how to use the parameter using the client sdk for c#.
| 85a290e1fcfdf98acaa5657806cc151f34ae6e3ece4709ac0f45685add0c7b34 | ['70c0ac67909947bdb6617b1408c13a2a'] | I would like to store mail token related data in a cache on the application level. The token should be accessible from multiple sessions.
If it is not possible to store this data in a shared cache, would it be possible to create a token cache that persists to a database and would that be a feasible idea?
|
6c61c74a2a8ee2046b68cef5e084610c5d6ff55b7c8ef106921c400c62cf2c28 | ['70dd724baa6d40099707a910f39719de'] | The IPOPT solver error is:
EXIT: Invalid number in NLP function or derivative detected.
An error occured.
The error code is -13
This typically occurs when there is a NaN evaluated because of divide by zero. You can either reformulate equations such as x==1/y to x*y==1 or else put a lower bound on y to avoid divide by zero. Here is a modified version of your problem that solves successfully.
#import Gekko optimization package
from gekko import gekko
import math
#create gekko model
m = gekko()
m.options.SOLVER=1
#constants
pi = math.pi
densityParticle = 10000 #kg/m**3
densityGas = 1.225 #kg/m**3
gravity = 9.806 #m/s^2
#initialize needed variables
lower = 1e-3
empirical = m.Var(value=1,lb=lower)
widthInlet = m.Var(value=1,lb=lower) #in meters
heightInlet = m.Var(value=1,lb=lower) #in meters
diameterOutlet = m.Var(value=1,lb=lower) #in meters
viscosity = m.Var(value=1,lb=lower) #kg/m*s
velocityInlet = m.Var(value=1,lb=lower) #m/s
lengthCone = m.Var(value=1,lb=lower) #in meters
lengthCylinder = m.Var(value=1,lb=lower) #in meters
frictionLoss = m.Var(lb=lower)
diameterCut = m.Var(lb=lower)
turns = m.Var(lb=lower)
separation = m.Var(lb=lower)
#define box equations
m.Equation(frictionLoss==empirical*widthInlet*heightInlet/diameterOutlet**2)
m.Equation(turns==((pi*(2*lengthCylinder - lengthCone))/heightInlet))
m.Equation(diameterCut==((9*viscosity*widthInlet)/(2*pi*turns*velocityInlet*(densityParticle-densityGas)))**.5)
m.Equation(separation==((velocityInlet**2)/((diameterCut/2 )+ gravity)))
#add constraint on surface area
m.Equation(separation<=.9)
#define object function (negative to maximize instead of minimize)
m.Maximize(separation)
#set mode to steady state optimization (solution does not change with time)
m.options.IMODE = 3
m.solve()
#print results
print('the optimized friction loss is: ' + str(frictionLoss.value[0]))
print('the optimized empirical constant is: ' + str(empirical.value[0]))
print('the optimized inlet width is: ' + str(widthInlet.value[0]))
print('the optimized inlet height is: ' + str(heightInlet.value[0]))
print('the optimized outlet diameter is: ' + str(diameterOutlet.value[0]))
print('the optimized cut diameter is: ' + str(diameterCut.value[0]))
print('the optimized viscosity is: ' + str(viscosity.value[0]))
print('the optimized number of turns is: ' + str(turns.value[0]))
print('the optimized inlet velocity is: ' + str(velocityInlet.value[0]))
print('the optimized particle density is: ' + str(densityParticle))
print('the optimized gas density is: ' + str(densityGas))
print('the optimized cone length is: ' + str(lengthCone.value[0]))
print('the optimized cylinder length is: ' + str(lengthCylinder.value[0]))
The solution is:
apm 136.36.211.159_gk_model0 <br><pre> ----------------------------------------------------------------
APMonitor, Version 0.9.2
APMonitor Optimization Suite
----------------------------------------------------------------
--------- APM Model Size ------------
Each time step contains
Objects : 0
Constants : 0
Variables : 13
Intermediates: 0
Connections : 0
Equations : 6
Residuals : 6
Number of state variables: 13
Number of total equations: - 5
Number of slack variables: - 1
---------------------------------------
Degrees of freedom : 7
----------------------------------------------
Steady State Optimization with APOPT Solver
----------------------------------------------
Iter Objective Convergence
0 2.16410E-01 8.99000E-01
1 -4.04256E-01 2.98848E-01
2 -9.00000E-01 7.23825E-02
3 -8.89266E-01 9.38042E-02
4 -8.90825E-01 2.39141E-01
5 -8.96687E-01 4.43769E-02
6 -8.99389E-01 1.59439E-02
7 -9.00000E-01 5.84573E-03
8 -9.00000E-01 2.35805E-10
9 -9.00000E-01 2.35805E-10
Successful solution
---------------------------------------------------
Solver : APOPT (v1.0)
Solution time : 1.410000000032596E-002 sec
Objective : -0.900000000000000
Successful solution
---------------------------------------------------
the optimized friction loss is: <PHONE_NUMBER>
the optimized empirical constant is: 0.97878134972
the optimized inlet width is: 0.84720656046
the optimized inlet height is: <PHONE_NUMBER>
the optimized outlet diameter is: 1.<PHONE_NUMBER>
the optimized cut diameter is: 0.<PHONE_NUMBER>
the optimized viscosity is: <PHONE_NUMBER>
the optimized number of turns is: 0.012001017114
the optimized inlet velocity is: 2.<PHONE_NUMBER>
the optimized particle density is: 10000
the optimized gas density is: 1.225
the optimized cone length is: <PHONE_NUMBER>
the optimized cylinder length is: <PHONE_NUMBER>
There is additional information in the Design Optimization course such as the two bar truss problem that is related to your problem.
| f0e2165af388f2ec1c1a470cb0e728a2d8739833e3a78438fb9fb238e4115fa1 | ['70dd724baa6d40099707a910f39719de'] | Solvers such as APOPT or IPOPT use m.solver_options values if both m.options and m.solver_options are set. The Gekko m.options values are only a subset of all the solver options but also some of the most common configuration parameters that are adjustable for all solvers. Some of the common options are convergence tolerances (RTOL and OTOL), maximum iterations (MAX_ITER), and maximum time (MAX_TIME). Common solver results are also output such as objective function value (OBJFCNVAL), solve time (SOLVETIME), and solution status (APPINFO).
There are also specific options that are configurable by the solver type. For example, the APOPT solver is a Mixed Integer Nonlinear Programming (MINLP) solver. There are additional options that are configurable only from m.solver_options such as:
m.solver_options = ['minlp_maximum_iterations 500', \
# minlp iterations with integer solution
'minlp_max_iter_with_int_sol 10', \
# treat minlp as nlp
'minlp_as_nlp 0', \
# nlp sub-problem max iterations
'nlp_maximum_iterations 50', \
# 1 = depth first, 2 = breadth first
'minlp_branch_method 1', \
# maximum deviation from whole number
'minlp_integer_tol 0.05', \
# covergence tolerance
'minlp_gap_tol 0.01']
The IPOPT solver is a Nonlinear Programming (NLP) solver so it doesn't use the MINLP options.
|
15836e9dee2bd8d6f84f05b07224d3e3c0f9569619befc8b345418a40afb484c | ['70eb9ffe4c04401d973622b8f6593111'] | I think it is something like:
// Get a video entry
String str = "http://gdata.youtube.com/feeds/api/videos/" + videoId;
YouTubeQuery youtubeQuery = new YouTubeQuery(new URL(str));
String videoEntryUrl = youtubeQuery.getUrl().toString();
VideoEntry videoEntry = service.getEntry(new URL(videoEntryUrl),VideoEntry.class);
// Get the comments url for this video
if (videoEntry.getComments() != null) {
String commentUrl = videoEntry.getComments().getFeedLink().getHref();
System.out.println(commentUrl);
// Get the comment feed; use a new query
YouTubeQuery youtubeQuery = new YouTubeQuery(new URL(commentUrl);
youtubeQuery.setMaxResults(50);
youtubeQuery.setStartIndex(1);
String commentUrlFeed = youtubeQuery.getUrl().toString();
CommentFeed commentFeed = service.getFeed(new URL(commentUrlFeed),CommentFeed.class);
// The response should contain an url for the next feed, if any, already with an updated start-index.
for (int i = 0; i < commentFeed.getEntries().size()
&& commentFeed.getEntries().get(i) != null; i++) {
String author=commentFeed.getEntries().get(i).getAuthors().get(0).getUri().substring(41)
String commentId=commentFeed.getEntries().get(i).getId().substring(47);
String comment=commentFeed.getEntries().get(i).getPlainTextContent();
}
}
// Loop thru next comment feed call, if more can be expected.
// Use updated url from the response or set start-index = start-index + max-results.
}
| 7f6fb93f8ed2bd127e4714c1d59dc21896e8671f121c944cf393a21b1f92ce3b | ['70eb9ffe4c04401d973622b8f6593111'] | Changed your code. This works for me.
<?PHP
// (1): Choose a valid channel_id
$myChannelId = 'UUJQ2_kh7m7muj2xxxx'; // 'REPLACE_ME';
// (2): api version 3
$API_KEY = 'AIzaSyB7HuVrtyiUV8ow1SegS6xxxxxxxxx'; // 'REPLACE_ME';
// (3): Library from: https://github.com/google/google-api-php-client
// set_include_path(); // REPLACE_ME as needed to point to your client library.
require_once 'Google/Client.php';
require_once 'Google/Service/YouTube.php';
session_start();
$client = new Google_Client();
$client->setDeveloperKey($API_KEY);
//$client->setScopes('https://www.googleapis.com/auth/youtube');
//$redirect = filter_var('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'],
// FILTER_SANITIZE_URL);
//$client->setRedirectUri($redirect);
// Define an object that will be used to make all API requests.
$youtube = new Google_Service_YouTube($client);
// Call the channels.list method to retrieve information about the
// currently authenticated user's channel.
$channelsResponse = $youtube->channels->listChannels('contentDetails', array(
'id' => $myChannelId,
));
$htmlBody = '';
foreach ($channelsResponse['items'] as $channel) {
// Extract the unique playlist ID that identifies the list of videos
// uploaded to the channel, and then call the playlistItems.list method
// to retrieve that list.
$uploadsListId = $channel['contentDetails']['relatedPlaylists']['uploads'];
$playlistItemsResponse = $youtube->playlistItems->listPlaylistItems('snippet', array(
'playlistId' => $uploadsListId,
'maxResults' => 50
));
$htmlBody .= " ";
foreach ($playlistItemsResponse['items'] as $playlistItem) {
$title = $playlistItem['snippet']['title'];
$video_id = $playlistItem['snippet']['resourceId']['videoId'];
$htmlBody .= "<a href='https://www.youtube.com/watch?v=".$video_id."'>";
$htmlBody .= "<img src='http://img.youtube.com/vi/".$video_id."/1.jpg'>".$title."</a></br>";
}
$htmlBody .= '</ul>';
}
?>
<!doctype html>
<meta charset="utf-8">
<html>
<head>
<title>My Uploads</title>
</head>
<body>
<?PHP print $htmlBody?>
</body>
</html>
|
179ea0292b1e62b20d9a0f32fa95dfe7d04d63c59c1ef5a60f581e69f6d62f05 | ['710699c698ec44e58bf09c3c9603b095'] | Thank you <PERSON> for your help! I really appreciate it.
Here is my solution if someone will need it for reference
package com.example.researcher.heatmap;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* TODO: document your custom view class.
*/
public class MyView extends View {
Paint paint;
ArrayList<Point> points = new ArrayList<>();
private int pointsPos = 0; //Which point we will be drawing
public float x;
public float y;
public int radius = 150;
public MyView(Context context) {
super(context);
x = this.getX();
y = this.getY();
init();
}
public MyView(Context context, AttributeSet attrs) {
super(context, attrs);
x = this.getX();
y = this.getY();
init();
}
public MyView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
x = this.getX();
y = this.getY();
init();
}
private void init() {
// Load attributes
paint = new Paint();
paint.setColor(Color.BLUE);
paint.setStrokeWidth(5);
paint.setStyle(Paint.Style.STROKE);
populateArrayList();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
paint.setStyle(Paint.Style.STROKE);
canvas.drawColor(Color.WHITE);
canvas.drawCircle(points.get(pointsPos).x, points.get(pointsPos).y, radius, paint);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_UP:
//Check if the point press is within the circle
if(contains(event, points.get(pointsPos))){
Random r = new Random(System.nanoTime());
pointsPos = r.nextInt(points.size());; //between 0 and points.length
postInvalidate();
}
case MotionEvent.ACTION_CANCEL: {
break;
}
}
postInvalidate();
return true;
}
private boolean contains(MotionEvent event, Point point) {
float xTouch = event.getX();
float yTouch = event.getY();
if ((xTouch - point.x) * (xTouch - point.x) + (yTouch - point.y) * (yTouch - point.y) <= radius * radius) {
return true;
}
else {
return false;
}
}
public void populateArrayList(){
points.clear();
points.add(new Point(220, 1020));
points.add(new Point(550, 320));
points.add(new Point(780, 500));
}
}
| 95e57418088d55a7ff2458bd0521897276c8a650953e6b5d65c350dfa5d9f0a0 | ['710699c698ec44e58bf09c3c9603b095'] | This is my first time using Canvas in Android.
I am creating an app that would display circles at certain positions on the screen one at a time (positions are selected randomly). New circle should be drawn after the previous one was selected/touched, and the previous one should disappear.
I have some ideas about it: to keep an arraylist of Point objects(each object contains x,y coordinate of the centre of the circle) and randomly select one each time the circle is drawn on the screen. So first I am populating an array of points. I also know how to randomly select the element from arraylist.
My biggest confustion is how to connect onDraw and onTouchEvent methods with each other? I know I should check if the circle was selected and only then draw a new circle at the randomly selected position, but I m not sure how to make a call for onDraw() method from the onTouchEvent...
Could you please help with this issue?
My code is below:
package com.example.researcher.heatmap;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.text.TextPaint;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
/**
* TODO: document your custom view class.
*/
public class MyView extends View {
Paint paint;
ArrayList<Point> points = new ArrayList<>();
public MyView(Context context) {
super(context);
init();
}
public MyView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public MyView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
}
private void init() {
// Load attributes
paint = new Paint();
paint.setColor(Color.BLUE);
paint.setStrokeWidth(5);
paint.setStyle(Paint.Style.STROKE);
populateArrayList();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
paint.setStyle(Paint.Style.STROKE);
canvas.drawColor(Color.WHITE);
int i=1; // should be random, will randomize later
for(Point p: points) {
p.x = points.get(i).x;
p.y = points.get(i).y;
canvas.drawCircle(p.x, p.y, 50, paint);
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
int i=1;
for(Point p: points) {
Canvas canvas = new Canvas();
p.x = points.get(i).x;
p.y = points.get(i).y;
canvas.drawCircle(p.x, p.y, 50, paint);
}
postInvalidate();
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL: {
break;
}
}
postInvalidate();
return true;
}
public void populateArrayList(){
points.clear();
points.add(new Point(120, 120));
points.add(new Point(150, 320));
points.add(new Point(280, 200));
}
}
|
534e90437699ae23b205b2a8706cce68589bf25bff96e8ce1ecb96c420d2d26e | ['71142831dad54ed4b22cf2551b47b614'] | It can be a setting in firewall or MS Exchange to attempt to defeat spam.
It is related to the number of characters in a single line of the message headers.
In the past, spammers might have sent email to hundreds of addresses in the To or Cc line of the email, and this restriction was created to filter out such email.
There are also limits in message body. Postfix defaults to 990 length limit, but
it does not bounce email based on this. It will insert newlines to prevent the line
from being longer.
| a7180e79f7b5ee42247d2ebda61b6c5719d47173a97359f5a98f1a407a1c5e75 | ['71142831dad54ed4b22cf2551b47b614'] | Certainly there has to be *some* voltage limit below which it is always considered 0 and another above which it is always 1? It would make no sense that fluctuation e.g. between 0-0.5V would be considered jumping between 0 and 1. This page states that the limits are not properly specified, but provides guidance: http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications |
bbeedc73e1abc3465faf614db60f4d9d175482b401c99fe2d8c1a97c43d584ac | ['71183119059e4a3b84b7ec1fcc0a6541'] | I have a simple question : Is it possible to fill a drop down list with two value from a table?
I have a table with field X and field Y and I want my drop down in my form to show :
Value1 YField - Value1 XField
Value2 YField - Value2 XField
Value3 YField - Value3 XField
...
Or I have not choice but to add another drop down to select my value from and put a Text (formula) field under it using its value to build what I want?
I would like to avoid overloading the form if possible.
Thank you!
| d66d55a6f335cf9f47e78b0b70ded01bd9e323ce91f6b83b0c3f919b4aab660a | ['71183119059e4a3b84b7ec1fcc0a6541'] | So I want to match a string to a simple mask but I would like to avoid using regex because my client have access to this mask and can change it.
Is it possible to have a string matches something like #####-000?
Or I have no choice but to convert my simple mask to regex ?
Thank you.
|
f075499a68afda5f0ac37d3e8fabe98c0c9e267b18987d14c0248abfaa8d7b58 | ['711f11b07e8f4c509972359906890866'] | You could pass a string or object in the (click) and play around with that instead trying to manipulate the DOM
For example:
in the .html onOpen($event, 'profile') or onOpen($event, menu.profile)
in the .ts file
public menu: = { profile: {name: 'Profile', url: '....', icon: 'sample.svg', isActive: true }, home: {...} }
Are you trying to add an active class in the menu item or what exactly are you trying to achieve ?
EDIT:
<a (click)="onOpen($event, menu.profile)" [class.active]="menu.profile.isActive === true">
<i class="fa fa-file-text-o"></i>
<p>Profile</p>
</a>
| 6f37d938d90974964e167fd1f23f977f7d81988c9dfb43471dcab057e95c4f58 | ['711f11b07e8f4c509972359906890866'] | It depends how big the application is. If you only have few components "describing" one function it is fine to keep one. So for example if you have a small public website with a front page, contact page etc. I don't see any reason to have multiple modules.
In most common cases Angular is used for larger web apps, with authentication and it is by the framework design much better to separate components in modules for encapsulation, lazy loading etc.
|
31466e075e77e47057d50efd28d70bcbf71cb4df53be4ceab8ee4f924b8dbfe2 | ['71282573eb9c47e3a2e1a19e72e895ba'] | I'm Ussing <PERSON> with Jquery. That grid has DateTime column. Data in that column shows like "/Date(1377196200000)/" . Help me to arrange this to proper format.
this is script of my grid;
function LoadGridView() {
var dataSource = GetDataSource();
$("#batchgrid").kendoGrid({
dataSource: dataSource,
editable: "inline",
selectable: "row",
toolbar: ["create"],
autobind: true,
reorderable: true,
pageable: {
refresh: true,
pageSizes: [5, 10, 20, 50, 100]
},
sortable: {
mode: "multiple"
},
sort: { field: "PrjNm", dir: "asc" },
groupable: {
messages: {
empty: "Drop columns here"
}
},
columnMenu: {
sortable: true,
filterable: true,
messages: {
columns: "Hide/Show Columns",
filter: "Apply filter",
sortAscending: "Sort (asc)",
sortDescending: "Sort (desc)"
}
},
resizable: true,
dataBinding: function () {
record = (this.dataSource.page() - 1) * this.dataSource.pageSize();
},
filterable: {
messages: {
and: "And",
or: "Or",
filter: "Apply filter",
clear: "Clear filter",
info: "Filter by"
},
extra: false, //do not show extra filters
operators: { // redefine the string operators
string: {
contains: "Contains",
doesnotcontain: "Doesn't contain",
startswith: "Starts With",
endswith: "Ends"
},
number: {
eq: "Is Equal To",
neq: "Not equal to",
gte: "Greater than or equal to",
lte: "Less than or equal to",
gt: "Greater than",
lt: "Less than"
}
}
},
navigatable: true,
columns: [
{ title: "No", template: "#= ++record #", width: 45 },
{ field: "ItemCode", title: "Item Code", width: "150px" },
{ field: "ItemName", title: "Item Name", format: "{0:c}", width: "300px" },
{ field: "PreviousDate", title: "Previous Date", type: "date", format: "{0:dd/MM/yyyy}" },
{ field: "PreviousValue", title: "Previous %", width: "110px", format: "{0:2}" },
{ field: "Value", t`enter code here`itle: "%", width: "150px", format: "{0:2}" },
{ command: ["edit"], title: " ", width: "175px" }
]
});
}
| 105b552ede0c95fc8ed7724f705325cc6e609cc038959a0353b4ef07f89aaa54 | ['71282573eb9c47e3a2e1a19e72e895ba'] | I have MVC 4 web based system. I need to handle error page in web.config file. I m try do with httpError syntax. When 404 it will show blank page. not show the actual error page. url also not show as error page.
web.config code:
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" />
<error statusCode="404" responseMode="ExecuteURL" path="~/Error/PageNotFound.htm" />
</httpErrors>
please help this.
|
9536cfb984e15be3c2ead10ca46fe1f366a5c7367decabeeed85ba4d74755f59 | ['712cef3735eb490bb80cdde699d189b9'] | I'm building a site with Umbraco, and there are a couple of pages that need to be visited over HTTPS instead of HTTP (e.g. a login page).
I've seen a couple of macros that get put on the page that needs to use HTTPS, and essentially just check the protocol used and do a Response.Redirect with the correct protocol if necessary. This seems like a terrible way of achieving what seems to be a fairly basic requirement - ideally I'd want Umbraco to render any links to these pages as <a href="https://...", not do a redirect when the user goes to a page.
With these redirecting macros, there's also the possibility of a browser displaying a warning if the user's on an HTTPS page and navigates to a HTTP one. If the links are relative, the user will be redirected from HTTPS to HTTP, and the browser may warn about this.
Is there a way to achieve this without modifying any Umbraco framework code?
| d1841d53c18c3d709649bd46100d54271c9b7f410bc8aeb620081c750fb887a1 | ['712cef3735eb490bb80cdde699d189b9'] | I'm not sure about the WebServiceHostFactory, but it sounds like you're hosting the service inside IIS and it's got more than one authentication method selected. If you've got IIS 5 or 6, try going into IIS and viewing the properties for the website or virtual directory containing your service. Go to the Directory Security tab, click the Edit button under "Anonymous access and authentication control", and then un-tick either "Anonymous access" or "Integrated Windows authentication". I'm not sure about IIS7.
|
d04646f12f22955e3a6acc387429f991c61a10919551ece054dc61435f3b56c2 | ['713cbcee82574d0ba1c65d53ff05b899'] | A solution that seems to be working is wrapping up the VBox in a spark:Scroller component like below:
<s:Panel width="100%" height="100%" top="50" bottom="10"
left="10" right="10" title="{FeedItemsRptrCont.height}">
<s:Scroller width="100%" height="100%">
<s:Group width="100%" height="100%">
<mx:VBox id="FeedItemsRptrCont" width="100%" height="100%">
<mx:Repeater id="FeedItemsRptr" width="100%" height="100%" dataProvider="{Story_Collection}">
<s:Label text="{FeedItemsRptr.currentItem.storyTitle}" />
<s:RichText text="{FeedItemsRptr.currentItem.storyDesc}" />
<mx:HRule width="100%" />
</mx:Repeater>
</mx:VBox>
</s:Group>
</s:Scroller>
</s:Panel>
However, what you want to be doing seem to be something that a spark:List would do better than a repeater.
| 2a08956a8d6339029ee07ac5f820ee437c50e8b2ed4a3f51081473f9f61fe7f9 | ['713cbcee82574d0ba1c65d53ff05b899'] | Since the files/list (https://developers.google.com/drive/v2/reference/files/list) is automatically paged, I'm looking for a way to get all files matching a query in several batches (using a while and nextPageToken). I would also like to show progress of that happening, but that requires knowing the total number of files matching that query.
Using this from an android project so the actual call looks like this:
public static String QUERY_VIDEOS = "mimeType='video/mp4'";
FileList list = mService.files().list().setMaxResults(1000).setQ(QUERY_VIDEOS).execute()
Any ideas?
Thanks
|
2977712b44f094a4ff2df94a116a337567b93de9f0903a13eae693c7b6eb0075 | ['714202cfe11b47a68e1fd80adaec21e1'] | I'm a VERY basic user of code, and am trying to complete a personal project........
I've managed the 1st part of my project, but for the life of me can't figure out the final part.
In short: I have two drop down options. The second appears depending on the 1st selection, and is populated depending on the 1st choice.
(This I've done with JavaScript with thanks to previous posts here).
What I need next is depending on the choice in the 2nd drop down a text box appear with a text value. Each choice from the 2nd drop down will produce a different text value / message.
Hope this makes sense and someone can help me out
| f758a52db9af367a2472617688834c6e8cf01fa1a2edec83b1049e95ece152b0 | ['714202cfe11b47a68e1fd80adaec21e1'] | How do I create a drop down list dependant on previous drop down and final choice displays text box?
E.G. 1st drop down has a choice of 1, 2 & 3. 2nd list had a choice of A,B,C if I chose 1 from previous, D, E, F if I chose 2, or X,Y, Z if I chose 3. Then if I chose any letter a text box displays with a message, (a different message for each letter choice)?
Hope this makes sense. Thanks.
|
ebdc2811c6d90df08f5d58b2b2b8bccb32ebe1ee39061c9cc008a09082327520 | ['7163d4ea966846e297fa8908c4075f98'] | I am using docker containers on CentOS to simulate devices on the network and have two tools that are to run inside each of those containers to simulate communication with actual network devices. Individually, either tool works inside the docker containers and can communicate with the outside world via one port we'll call 8000 here, but due to both attempting to use 8000, they are unable to run simultaneously. To resolve this, I am looking to mirror traffic on 8000 to another port we'll call 8001 here so that one tool can run on 8000 while the other receives its packets on 8001. In my Dockerfile, I EXPOSE both of these (though do not publish them in the run command).
Poking around the internet, I found this. Attempting to adapt it to my purposes, I ended up with the below, which I execute from within docker exec -it <container> bash. By my primitive understanding, it should copy the message to a different localhost IP's port 8000 while letting the original message through, then pass the duplicate packet back to <IP_ADDRESS>:8001.
iptables -t mangle -A PREROUTING -p UDP --dport 8000 -j TEE --gateway <IP_ADDRESS>
iptables -t nat -A PREROUTING -d <IP_ADDRESS> -p UDP --dport 8000 -j DNAT --to <IP_ADDRESS>:8001
This does not appear to be working. Running a tool on 8001 caused it to miss all packets I threw at 8000 from the outside world.
Similarly, I found this one, and tried adapting it to the below, but it doesn't seem to work either, and trying to get netcat running properly in a container has proven to be quite the headache.
iptables -A PREROUTING -t mangle -p tcp ! -s <IP_ADDRESS> --dport 8000 -j TEE --gateway <IP_ADDRESS>
iptables -A OUTPUT -t nat -p tcp -s <IP_ADDRESS>/32 --dport 8000 -j DNAT --to <IP_ADDRESS>:8001
I am new to both docker and iptables, so any explanation of the underlying mechanisms of what is going wrong here would be greatly appreciated.
| 5b327f5553a2bb0f93b4a9bdca3fca472dd37e46ebca313723b3cc8fd7c3ddbc | ['7163d4ea966846e297fa8908c4075f98'] | friends, I have got ubuntu 12.04 LTS, and I need to install directx 9.0c redistributable file on it which I have already downloaded...But the problem is that wine always shows dxerror.log and closes...Please show me some solution. without it I can't install some useful windows softwares as well as MS Office.
|
66e4f247e6c470eef373ba52ff93904989ff543bc96eef1327b2de33a9fdf6cf | ['717a699d14b642559734561ef9ced314'] | I search all the car offers from a website. I have more than 70 000 car offers. In one page, i can only see 30 car offers.
Page 1 URL : https://caroffer.com/offer/ => I can see 30 car offers
Page 2 URL : https://caroffer.com/offer/p-2 => I can see 30 car offers
Page 3 URL : https://caroffer.com/offer/p-3 => I can see 30 car offers
.
.
.
Page n URL : https://caroffer.com/offer/p-n => I can see 30 car offers
How to I get all the 70 000 car offer ?
How to I connect to all this offers via JSOUP?
| 08b31ab23b8a854a6b0cf3ec388e7a7a8c97a259a3c96e87a2eb8d8ede84cf4a | ['717a699d14b642559734561ef9ced314'] | I would like to retrieve data in streaming from a website using Spark streaming. I think that I have to use custom receivers. So, I tried this :
import org.apache.spark.sql.SparkSession
import org.apache.spark.{SparkConf}
import org.apache.spark.streaming.dstream.DStream
import org.apache.spark.streaming.{Seconds, StreamingContext}
object StreamingMain {
val conf = new SparkConf().setMaster("local[2]").setAppName("NetworkWordCount")
val ssc = new StreamingContext(conf, Seconds(1))
val spark = SparkSession.builder.config(conf).getOrCreate()
val lines = ssc.receiverStream(new UrlReceiver("http://stream.meetup.com/2/rsvps"))
println("lines value" + lines.print())
val words: DStream[String] = lines.flatMap(_.split(","))
}
import org.apache.spark.streaming.receiver.Receiver
import org.apache.spark.storage.StorageLevel
import java.io.InputStreamReader
import java.io.BufferedReader
import java.net.{URL, URLConnection}
import org.apache.spark.internal.Logging
class UrlReceiver(urlStr: String) extends Receiver[String](StorageLevel.MEMORY_AND_DISK_2) with Logging {
override def onStart() = {
new Thread("Url Receiver") {
override def run() = {
val urlConnection: URLConnection = new URL(urlStr).openConnection
urlConnection.setRequestProperty("User-Agent", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0")
println(urlConnection)
val bufferedReader: BufferedReader = new BufferedReader(
new InputStreamReader(urlConnection.getInputStream)
)
var msg = bufferedReader.readLine
while (msg != null) {
if (!msg.isEmpty) {
store(msg)
println("msg" + msg)
}
msg = bufferedReader.readLine
}
bufferedReader.close()
}
}.start()
}
override def onStop() = {
}
}
I have the following result on the console with no data:
-------------------------------------------
Time: 1602750320000 ms
-------------------------------------------
I would like to retrieve data in streaming from the website. As soon as a new data is on the website, I would like to track it. The streaming application should be always running (it should stop if I or the user decide to stop the application)
Thank you for your help.
|
2d5eb7bd35599b2d9a33b452488bc130543bfe67d587f260bdac6c9962c22652 | ['718009bc7f00419db676f7d4e2dbc31d'] | So when a Select changes you want to set display none on all span tags beneath the product1 div right?
From the code you have there it looks like you will get the parent div og the select, which would be the div with the class input. So i guess you would have to get the parent of that div once more and the select all child spans.
| fb7af41957c757c6e4974041253cc370c210d389be8f727fc470250644befe17 | ['718009bc7f00419db676f7d4e2dbc31d'] | I see that there is a space in the url you supplied to the http.post method.
"rest-service/quotes/health /director"
I don't know if that is causing it.
But I also see that you POST your request to the service. Are you sure that your endpoint has been set up for POST requests?
I would recommend creating a basic endpoint that you call with a GET request, and no parameters. Just to root out the problem.
|
7ed2991fe50b4db5993a03bbf4485400cfbe01136b856982535093431c72db33 | ['7184d6622a08498fb2b94be07dbf9a2d'] | I have such Vue component with Vuetify components:
<template>
<div>
<v-container fluid>
<v-layout row>
<v-flex xs12>
<v-carousel cycle continuous>
<v-carousel-item v-for="slide in slides" :key="slide.id">
<v-sheet
:color="slide.color"
height="100%"
tile
>
<v-layout
align-center
fill-height
justify-center
>
<div class="display-3">{{ slide.text }}</div>
</v-layout>
</v-sheet>
</v-carousel-item>
</v-carousel>
</v-flex>
</v-layout>
</v-container>
<v-container>
<v-layout row>
<v-flex
xs12
v-for="ad of ads"
:key="ad.id"
>
<v-card
class="mx-auto"
max-width="400"
>
<v-img
class="white--text"
height="200px"
:src="ad.imageSrc"
>
<v-card-title class="align-end fill-height">{{ ad.title }}</v-card-title>
</v-img>
<v-card-text>
<span>Number {{ ad.id }}</span><br>
<span class="text--primary">
<span>{{ ad.text }}</span>
</span>
</v-card-text>
<v-card-actions>
<v-btn
text
color="orange"
>
Share
</v-btn>
<v-btn
text
color="orange"
>
Explore
</v-btn>
</v-card-actions>
</v-card>
</v-flex>
</v-layout>
</v-container>
</div>
</template>
<script>
export default {
data () {
return {
slides: [
{ color: 'primary', text: 'Place ads for free. Forever.' , id: 1},
{ color: 'secondary', text: 'Find your desire for acceptable price.', id: 2},
{ color: 'orange', text: 'Sell junk and make money.', id: 3},
],
ads: [
{ id: 1, imageSrc: '@/src/assets/img/ads/1.jpg', title: 'Title 1'},
{ id: 2, imageSrc: '@/src/assets/img/ads/2.jpg', title: 'Title 2'},
{ id: 3, imageSrc: '@/src/assets/img/ads/3.jpg', title: 'Title 3'},
{ id: 4, imageSrc: '@/src/assets/img/ads/4.jpg', title: 'Title 4'},
],
publicPath: process.env.BASE_URL
}
}
}
</script>
<style scoped>
</style>
Images are under /src/assets/img/ads folder. But I get error:
[Vuetify] Image load failed
src: /img/ads/4.jpg
I can't imagine how to properly compute images path? I tried many ways, but got same error - I tried using require, <%= BASE_URL %> and so on. In official documentation I didn't find a right method to load images from assets folder.
I use last versions of Vue and Vuetify.
| 7cc0da59540b77da8b2947d077cf5dad273583e9465c1f36ba41f722093188eb | ['7184d6622a08498fb2b94be07dbf9a2d'] | I am trying Inertia.js (Rails on backend) to get working with Ionic app. It actually works, but when I click Inertia link I got error message that response from server is not valid Inertia response - "All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.", however all Headers and response are look good and same app works as web app with Inertia. I can't figure out how why does Inertia consider that response not valid.
Here is error:
Response and request headers:
|
6ce4276a3aa0d6f22ed4b0d5a97512ec4d8a832ed3a2f90f5472ae2be89da1bd | ['7186ddfabfbe46aa95ade14de607c2e1'] | If <b>Date</b>, <b>Name</b>, <b>Hobby</b> and the <br />'s will always be there in that way, I suggest you use strpos() and substr().
For instance, to get the date:
// Get start position, +13 because of "<b>Date</b>: "
$dateStartPos = strpos($yourText, "<b>Date</b>") + 13;
// Get end position, use dateStartPos as offset
$dateEndPos = strpos($yourText, "<br />", $dateStartPos);
// Cut out the date, the length is the end position minus the start position
$date = substr($yourText, $dateStartPos, ($dateEndPos - $dateStartPos));
| 1179468e89e104167a366c032dcca5f38c087de8e1a6d122bbd67259c1ecbd68 | ['7186ddfabfbe46aa95ade14de607c2e1'] | The reason why all of them go at the same time, is because you select all of them, $("textarea") returns all matching elements.
To prevent that behaviour, create this (I didn't include the event functions for readability)
// Do things for each matching elements, separately
$("textarea").each(function() {
$(this).focus();
$(this).blur();
$(this).keyup();
});
As for the id / class for the tooltip: it is generally better to keep the CSS external, so in that case, giving the tooltips a CSS class would be better.
|
495f1811a385996868c0d3565feeb7a49556addb874d8ee0b17574aad6c91771 | ['7195cb7bed61445fb82d5ca6a3d6bdf0'] | I'm writing an application in which I have to log on to a CRM 2011 server from ASP.NET code. I quickly found this article:
http://msdn.microsoft.com/en-us/library/cc156363.aspx
The problem I'm having is in this bit of code from that article:
//Create the Service
CrmService service = new CrmService();
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.CrmAuthenticationTokenValue = token;
service.Url = crmurl;
Visual Studio can't resolve CrmService. So I tried to add a web reference to this project and point the web reference at the CRM service I'm using. The URL I'm getting from Settings->Customizations in CRM, and I'm using the Organization Service endpoint. However, after I add that reference CrmService is still unresolvable. What am I doing wrong?
| 07c5839d2a037ff4adc8fc377e66dfe25a5452fa02f286f0293c51703bbfa74c | ['7195cb7bed61445fb82d5ca6a3d6bdf0'] | After a lot of fighting, here is my solution.
[MacroImplementation(Definition = typeof (ControllerNameMacroDefinition))]
public class ControllerNameMacroImplementation : SimpleMacroImplementation
{
public ControllerNameMacroImplementation([Optional] IReadOnlyCollection<IMacroParameterValueNew> arguments)
{
}
public override HotspotItems GetLookupItems(IHotspotContext context)
{
var ret = "CONTROLLER";
var fileName = GetFileName(context);
if (!fileName.IsNullOrEmpty())
{
//Replace "Controller.cs" in two separate steps in case the extension is absent
ret = fileName.Replace("Controller", "").Replace(".cs", "");
}
return MacroUtil.SimpleEvaluateResult(ret);
}
/// <summary>
/// Returns the filename of the current hotspot context
/// </summary>
private string GetFileName(IHotspotContext context)
{
var psiSourceFile = context.ExpressionRange.Document.GetPsiSourceFile(context.SessionContext.Solution);
return psiSourceFile == null ? string.Empty : psiSourceFile.Name;
}
}
|
5581f8f69f20e9f9224a0b1107551c74c32bbad0bcd780dd37da9821eda1f22f | ['71c0dd8e29194dbbb22585a3151318cf'] | Using pose for defining the terms should work: (although there may be another way)
Require Export HoTT.
Theorem th_2_8_1 :
forall (x y:Unit), Unit <~> x=y.
Proof.
pose(g:=fun (x y:Unit)(p:x=y) => match p with idpath => tt end).
pose(f := fun (x y:Unit)(s:Unit) =>
match x,y,s return (x=y) with tt,tt,tt => idpath end).
pose( alpha1 := fun (x y:Unit)(s:Unit) =>
match x,y,s return ((g x y) o (f x y))s = s
with tt,tt,tt => idpath end).
pose(P := fun
(f : forall (x y:Unit)(s:Unit), x=y)
(g : forall (x y:Unit)(p:x=y), Unit)
(x y:Unit)
(p:x=y)
=>
((f x y) o (g x y)) p = p).
pose(h := fun (x:Unit) =>
match x return P f g x x idpath
with tt => idpath idpath end).
pose(alpha2 := fun (x y:Unit)(p:x=y) => (J Unit (P f g) h) x y p).
intros x y.
exists (f x y).
apply(BuildIsEquiv Unit (x=y) (f x y) (g x y) (alpha2 x y) (alpha1 x y)).
induction x0.
rewrite <- (f x y).
induction x.
simpl.
apply(idpath idpath).
apply(tt).
Defined.
| ad5a021d8226ecc79cfdea6bad27d2b076a9e84eda691ce78a92d222e299b496 | ['71c0dd8e29194dbbb22585a3151318cf'] | I used this (after RUN apt-get install -y python3):
RUN apt-get install -y locales
RUN apt-get install -y language-pack-en
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN python3 -c "print('UTF8 works nice! ')"
And it prints UTF8 works nice! correctly.
|
01c131c6bf6037fbcc5ba31d5282e693d77de240be95f8dece73fd7e70be9272 | ['71c53c387849415a8465cb2e3eacc8ee'] | The problem that I am experiencing is that when I try to connect to the database that is in a docker container, I keep getting the error SQLSTATE[HY000] [2002] Connection refused through PDO. I have tried the methods mentioned here as well as some other posts that say very similar things, to no avail. MySQL is currently active, and ready to accept connections. I am running Docker Engine 19.03.12 Compose 1.26.2 Docker Desktop 2.3.0.4 (46911) with Compose File version 3.8. Below is my docker-compose.yml:
version: "3.8"
services:
web:
build:
context: ./php
dockerfile: Dockerfile
container_name: php74
depends_on:
- database
ports:
- "8000:80"
volumes:
- "./php:/var/www/html"
database:
command: "--default-authentication-plugin=mysql_native_password"
container_name: mysql8
environment:
MYSQL_DATABASE: <PERSON><IP_ADDRESS> (46911) with Compose File version 3.8. Below is my docker-compose.yml:
version: "3.8"
services:
web:
build:
context: ./php
dockerfile: Dockerfile
container_name: php74
depends_on:
- database
ports:
- "8000:80"
volumes:
- "./php:/var/www/html"
database:
command: "--default-authentication-plugin=mysql_native_password"
container_name: mysql8
environment:
MYSQL_DATABASE: quizzane
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: quizzane
MYSQL_PASSWORD: "QFtdFZk2wC-c4skfJ?5#TPLrXyeZVTJ99=s*GEBVR_!XQ9B?_?NE+Dwc7pL!2fzb"
image: "mysql:8.0.21"
ports:
- "6033:3306"
restart: always
and then my Dockerfile:
FROM php:7.4.9-apache
RUN apt-get update && apt-get upgrade -y
RUN apt-get install openssl curl zlib1g-dev enchant libsodium-dev libzip-dev bzip2 libcurl4-openssl-dev libssl-dev libpng-dev libgmp-dev libxml2-dev libenchant-dev libc-client2007e-dev libc-client-dev libkrb5-dev libonig-dev libedit-dev libtidy-dev libxslt-dev libgd2-xpm-dev -y
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
RUN docker-php-ext-install bcmath calendar ctype curl enchant exif ffi ftp gd gmp iconv imap intl mbstring pcntl pdo pdo_mysql readline shmop soap sockets sodium sysvmsg sysvsem sysvshm tidy tokenizer xsl zip -j$(nproc)
RUN ls /usr/local/lib/php/extensions/no-debug-non-zts-20190902/
EXPOSE 80
and my PDO connection file:
try {
$datasource = 'mysql:host=<IP_ADDRESS>;port=6033;dbname=quizzane';
$username = 'quizzane';
$password = 'QFtdFZk2wC-c4skfJ?5#TPLrXyeZVTJ99=s*GEBVR_!XQ9B?_?NE+Dwc7pL!2fzb';
$pdo = new PDO($datasource, $username, $password);
$conn->setAttribute(PDO<IP_ADDRESS>ATTR_ERRMODE, PDO<IP_ADDRESS>ERRMODE_EXCEPTION);
echo "Connected successfully";
}
catch(PDOException $e)
{
echo "Connection failed: " . $e->getMessage();
}
The IP that is not localhost is the IP of the docker container. Here is part of what MySQL shows when starting up:
mysql8 | 2020-08-30T17:19:08.484523Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.21' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
| 4773145b2dcbbb1296ab057c00ec9d7e26059c713bec0e894f0741ddaa661e08 | ['71c53c387849415a8465cb2e3eacc8ee'] | Using this tutorial from youtube you will install the Live Server VSCode extension for use with html files. However, you will most likely (although you haven't mentioned) be using PHP or other languages because apache supports it. For this, use this tutorial from GitHub. It installs a browser extension (compatible with chrome/chromium-based/firefox browsers) that connects to a server instance and serves the reload function to that webserver. This does NOT install a web server (in this case it shouldn't matter). If you follow the tutorial, it should be really self-explanatory.
|
8433654b504748a15ce13acd6aeb740306fd676c231ba7a1488555b9df278c59 | ['71d3d2a4636740ddab3cbebcc5f76b3f'] | I'm struggling to think about how to achieve this. What I want to do is have a series of questions (to represent a Likert table) in a CharField object like so:
for a in range(1, 11):
locals()['ATL' + str(a)] = models.PositiveIntegerField(
choices=[
[1, 'Disagree Completely'],
[2, 'Disagree Strongly'],
[3, 'Disagree'],
[4, 'Neutral'],
[5, 'Agree'],
[5, 'Agree Strongly'],
[7, 'Agree Completely'],
],
widget=widgets.RadioSelectHorizontal(),
verbose_name = Constants.ATL_qu_list[a-1])
del a
And then change the verbose name for the question depending on the question number (again, I know I'm not supposed to be using locals() to store variables). Is there an easier way of achieving a dynamic label though? Thanks!
| c3e718c64d8331fd9126f5f592689544b9eebfac4b205f4a56fc0bc41834eb68 | ['71d3d2a4636740ddab3cbebcc5f76b3f'] | Okay, here's my answer (as well as a clarification for what I am looking for). Basically I had a series of Likert questions to put to participants which I wanted to represent as CharFields. Because each Likert question uses the same seven choice scale, it seems like inefficient coding to repeat the same functionality and only change the verbose name between each declaration.
Accordingly, I've instead used this method to achieve what I want:
# Reads in the list of survey questions
with open('survey/survey_questions.csv') as csvfile:
data_read = list(csv.reader(csvfile))
...
for a in range(1, 11):
locals()['ATL' + str(a)] = models.PositiveIntegerField(
choices=[
[1, 'Disagree Completely'],
[2, 'Disagree Strongly'],
[3, 'Disagree'],
[4, 'Neutral'],
[5, 'Agree'],
[6, 'Agree Strongly'],
[7, 'Agree Completely'],
],
widget=widgets.RadioSelectHorizontal(),
verbose_name = data_read[a-1][0])
del a
|
3faea8c4d178f03e34c2d26f3f9c45b06a538ef622d53644026c85f70416b624 | ['71dbf25d4b1046fb8da93b49d6cc3143'] | Use a setter method in your model to do it.
Your view would look like this:
<% form_for @post :url => { :action => "update" } do |post_form| %>
Title: <%= post_form.text_field :title %>
Content: <%= post_form.text_field :content %>
Tags: <%= post_form.text_field :tag_field %>
<% end %>
And then in your model you would have a model such as this:
def tag_field=(field_data)
field_data.split.each { |tag| tags.build(:name => tag) }
end
Edit: As has been mentioned, there are plugins which do this for you, acts_as_taggable_on_steroids is a horribly named, but very effective option.
| f80ff97f8e26e5c83aeb73a388b6baadad679998a57451f1a1cc121e83a49821 | ['71dbf25d4b1046fb8da93b49d6cc3143'] | As <PERSON> suggested, single table inheritance is your best bet. You would need to add the type field to the users table in the database and subclass your User model as below:
class Admin < User
# You probably don't need any methods here.
end
but you would also need to create a before filter. Quite similar to the one which makes sure that the user is logged in, it simply checks the class of your user. This should go in your ApplicationController:
def check_admin
current_user.is_a? Admin
end
There you go, <PERSON>'s your uncle, you have rudimentary authorisation.
To promote a user to Admin within rails, just change the type field. Of course, in this way, the user can only hold one access level (which is fine for a lot of applications). If you should want a more complex system, acl9 is quite well equipped for the job. I personally make a habit of using it along with authlogic to form quite a powerful system.
|
8143b289540c610e01eadbd7605ac2b41a1750ef4ade4df8d2a1aee0c63085be | ['71e76ba8d7104a35b25480b2c8b1c4e7'] | Keycloak REST API allows to list the users :
http://localhost:8080/auth/admin/realms//users
and what is more useful to filter users with a query like:
http://localhost:8080/auth/admin/realms//users?firstName=Test
Is it possible to write the query with Excluding condition? For example :
http://localhost:8080/auth/admin/realms//users?firstName!=AnyName ( that example not working and in response, the whole list of users returns ). Or I understand that it's a "rocket science" but might be like http://localhost:8080/auth/admin/realms//users?role!=Admin ...
| 6ab07d528e4b050bec60d0dcc6a752400f1d2fd6da1ec3aac76af1ac66066ce0 | ['71e76ba8d7104a35b25480b2c8b1c4e7'] | Need to protect client-server communication. I was found a nice approach in .Net Core to generate X509 Certificates ( Self-Signed). But it's really lack of any information how to work with Certificate Revocation List in .Net Framework. Will be appreciate for answers to those questions :
How to create CRL file with .Net ( Without BouncyCastle ) ? Can it be created as any text file and signed after? If yes, what is the format of columns?
Is I'm right understanding that CRL file could be added to Certificate? As far as I know, a change of certificate brokes it.
How to add Certificate to Certificate Revocation List?
|
aa602d11efaaff91bed649d11d94520ec6dac046ba004e2037495538e1a78bbf | ['71f35af0b58c472682a11843170a1a58'] | I believe you are right about the proxy being why you see only yourself. Any reference to the proxy will apply to only the object in your session.
Do you need to have the game and
player as session scoped? The fact
that you are trying to use them
across sessions indicates
that they are not session scoped data. You could just create them from a factory and store their references in a session scoped bean.
Alternatively, if you do want the player to be session scoped, you could wrap a reference to a prototype in a session bean. You can then use the prototype reference for your cross session data, and the session bean for any session specific local data.
There are several ways to resolve this, but in essence you need to move your cross session data out of the session scoped beans and into an application scope bean which can be shared.
| 45fc27f9e0ce984aecc63907d99bda950da335f478b81b2a2d7b0686ef1d0ad8 | ['71f35af0b58c472682a11843170a1a58'] | You are removing an item from the list you are iterating over.
One way to resolve this is to add the item to remove to a new collection, and then, when you have completed the first loop, remove those items from the list.
e.g. something like
synchronized (attendancePolicy.getListEmployee()) {
Set toRemove = new HashSet();
for(EmployeeAttendancePolicy employeeAttendancePolicy : attendancePolicy.getListEmployee()){
employeeInfo=employeeInfoSessionBeanLocal.findEmployeeInfoEntityByEmployeeInfoId(employeeAttendancePolicy.getEmployeeId());
if(employeeInfo!=null){
...
}else{
toRemove.add(employeeAttendancePolicy);
}
}
attendancePolicy.getListEmployee().removeAll(toRemove);
}
|
ae5d33fd32d104429b9c3dda592370147bacc3deea961b68910ab0155d4f99b8 | ['72050140b0b54868b61a77411c6d7ecc'] | You can boot the system with a live Windows CD/DVD/USB and use "TAKEOWN" and "ICACLS":
TAKEOWN /f "X:\" /r /d y
ICACLS "X:\" /reset /T
If you do not have a live Windows, extract the HDD's and connect them another windows machine and reset them from there.
| a402ca88769e3bd31bd4dadf2c528877a05dcb7904f7a0b31d479f9bd545873a | ['72050140b0b54868b61a77411c6d7ecc'] | When adding a route to a multihomed host, you might want to have control over the source IP address your host is sending from when starting communications using this route. This is what src is for.
Therefore to answer your question by point :
No, it has no effect on forwarding traffic, it is only for local generated traffic.
You can use bot dev and src to double-check if the src IP entered corresponds to the correct dev interfaces. If the source IP mentioned is not on the device specified you will get an error.
|
dde6c5872c5a8715f6cd057ae9c05731609c355eccd993b5d7f93876a2b2390c | ['7206533805894444b7ad76b4cdc23b8a'] | I am writing in python and have all my functionalities for analyzing datasets. Now, I would like to turn these functions into a user-ready application that, in a sense, works like an .exe app. In bokeh, I saw that you could create a plot, table...etc; however, is it possible to create a GUI where you can:
upload a file for analysis
load functions from my written python to analyze the uploaded file
graph the results onto a graph
click different buttons that can take you to different (so-called) pages so that you can perform different functions.
basically it can go from one page to the other kind of like a webpage where you click one button it links you to the next page for another purpose and home to go back. Could you potentially do this with bokeh?
| 71e500edf0f86db095438db7f7b9242bde3ae110d86444bdb59d1f030233084f | ['7206533805894444b7ad76b4cdc23b8a'] | Like the title. I have tested my docker on my local machine using docker build -t container-name and everything worked fine without any errors. Once I uploaded to beanstalk via CLI EB it fails. I have figured that there is one part where I run <PERSON>'s chinese NLP where it fails. Everything else is working fine but there seem to be no errors in the logs or anything unusual I can tell to understand how to debug this.
I have tried every possibility and looked through the web to no avail. There is one time when the full logs from the EB showed 'memoryerror' which I cannot recreate under any circumstance but that is all the clue I have. Here are the logs:
> ---------------------------------------- /var/log/eb-docker/containers/eb-current-app/eb-29f07434a6e4-stdouterr.log
> ----------------------------------------
> <IP_ADDRESS> - - [07/Jul/2020 17:24:29] "POST /food_autocomplete HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:30] "POST /food_autocomplete HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:34] "POST /food_nutrient_modal HTTP/1.1" 200 -
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> <IP_ADDRESS> - - [07/Jul/2020 17:24:36] "POST /smart_suggestions HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:38] "POST /food_nutrient_modal HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:39] "POST /addfood HTTP/1.1" 204 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:40] "POST /food_table_generate HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:42] "POST /personal_submit HTTP/1.1" 204 -
> /usr/local/lib/python3.8/site-packages/spacy/util.py:271: UserWarning:
> [W031] Model 'en_Reported_outcome_NLP' (0.0.0) requires spaCy v2.2 and
> is incompatible with the current spaCy version (2.3.0). This may lead
> to unexpected results or runtime errors. To resolve this, download a
> newer compatible model or retrain your custom model with the current
> spaCy version. For more details and available updates, run: python -m
> spacy validate warnings.warn(warn_msg)
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "POST /food_nlp_onthefly HTTP/1.1" 200 - Building prefix dict from the default dictionary ...
> Dumping model to file cache /tmp/jieba.cache Loading model cost 0.990
> seconds. Prefix dict has been built successfully. * Serving Flask app
> "base" (lazy loading) * Environment: development * Debug mode: off
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/utils/deprecation.py:143:
> FutureWarning: The sklearn.linear_model.logistic module is deprecated
> in version 0.22 and will be removed in version 0.24. The corresponding
> classes / functions should instead be imported from
> sklearn.linear_model. Anything that cannot be imported from
> sklearn.linear_model is now part of the private API.
> warnings.warn(message, FutureWarning)
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn( * Running on
> http://<IP_ADDRESS>:5000/ (Press CTRL+C to quit)
> <IP_ADDRESS> - - [07/Jul/2020 17:23:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:23:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:23:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:02] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:02] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:02] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:17] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:17] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:17] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:21] "GET /personal HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:21] "POST /usertimezone HTTP/1.1" 204 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:22] "GET /static/img/favicon.png HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:29] "POST /food_autocomplete HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:30] "POST /food_autocomplete HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:34] "POST /food_nutrient_modal HTTP/1.1" 200 -
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> <IP_ADDRESS> - - [07/Jul/2020 17:24:36] "POST /smart_suggestions HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:38] "POST /food_nutrient_modal HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:39] "POST /addfood HTTP/1.1" 204 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:40] "POST /food_table_generate HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:42] "POST /personal_submit HTTP/1.1" 204 -
> /usr/local/lib/python3.8/site-packages/spacy/util.py:271: UserWarning:
> [W031] Model 'en_Reported_outcome_NLP' (0.0.0) requires spaCy v2.2 and
> is incompatible with the current spaCy version (2.3.0). This may lead
> to unexpected results or runtime errors. To resolve this, download a
> newer compatible model or retrain your custom model with the current
> spaCy version. For more details and available updates, run: python -m
> spacy validate warnings.warn(warn_msg)
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <IP_ADDRESS> - - [07/Jul/2020 17:24:47] "POST /food_nlp_onthefly HTTP/1.1" 200 - Building prefix dict from the default dictionary ...
> Dumping model to file cache /tmp/jieba.cache Loading model cost 0.990
> seconds. Prefix dict has been built successfully.
>
>
> ---------------------------------------- /var/log/docker-events.log
> ---------------------------------------- 2020-07-07T17:08:43.222801211Z image pull python:3.8.2-buster
> name=agitated_hugle) 2020-07-07T17:09:46.255907751Z container create
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:46.256131915Z container
> attach
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:46.295742501Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3,
> name=bridge, type=bridge) 2020-07-07T17:09:46.734903605Z container
> start 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:49.122315926Z container die
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (exitCode=0,
> image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:49.171805355Z network
> disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3,
> name=bridge, type=bridge) 2020-07-07T17:09:49.813444357Z container
> destroy
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:49.831035003Z container
> create
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:49.831391340Z container
> attach
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:49.884733812Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed,
> name=bridge, type=bridge) 2020-07-07T17:09:50.290165549Z container
> start 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:53.138031459Z container die
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (exitCode=0,
> image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:53.195435239Z network
> disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed,
> name=bridge, type=bridge) 2020-07-07T17:09:53.294312475Z container
> destroy
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:53.313349292Z container
> create
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:09:53.313571816Z container attach
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:09:53.362840973Z network connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0,
> name=bridge, type=bridge) 2020-07-07T17:09:53.774896296Z container
> start c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:10:30.678618014Z container die
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (exitCode=0,
> image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:10:30.740972059Z network
> disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0,
> name=bridge, type=bridge) 2020-07-07T17:10:31.134171606Z container
> destroy
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:10:33.387455304Z container create
> d7445fa259c0281ef92909bae68e0ef640122c3c8aadc8523ccd0ab3168cb439
> (image=sha256:bbe93b4133f847fb8b7217d07fea76d7954db093dced90575f5904437b41bf3e,
> name=angry_hermann) 2020-07-07T17:10:33.476870016Z container destroy
> d7445fa259c0281ef92909bae68e0ef640122c3c8aadc8523ccd0ab3168cb439
> (image=sha256:bbe93b4133f847fb8b7217d07fea76d7954db093dced90575f5904437b41bf3e,
> name=angry_hermann) 2020-07-07T17:10:33.494062931Z container create
> bc23ff300c23cff0b00d12faab49a790a21b9e3bdc8879039afd236163de3cca
> (image=sha256:e4dac3e5b2864c76b1be5c0a9931a23c29d30896eb3deae344dce336ddbb11e5,
> name=admiring_driscoll) 2020-07-07T17:10:33.573500812Z container
> destroy
> bc23ff300c23cff0b00d12faab49a790a21b9e3bdc8879039afd236163de3cca
> (image=sha256:e4dac3e5b2864c76b1be5c0a9931a23c29d30896eb3deae344dce336ddbb11e5,
> name=admiring_driscoll) 2020-07-07T17:10:33.592409924Z image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/staging-app:latest) 2020-07-07T17:10:36.173605128Z
> container create
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:10:36.223247839Z
> network connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:10:36.637664357Z container
> start 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:10:41.964896576Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:10:42.012166449Z
> image untag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536)
> 2020-07-07T17:10:42.740687237Z image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:10:42.836810391Z
> image tag
> sha256:4f7cd4269fa9900fe43f5c0db2267926ee972cac6cec74a92b9136e49f8b3489
> (name=python:3.8.2-buster) 2020-07-07T17:16:40.255804571Z container
> die 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (exitCode=137, image=a01459d6ad26, name=goofy_easley)
> 2020-07-07T17:16:40.376674654Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:16:43.031775619Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:16:43.789437781Z container
> start 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:17:07.998859712Z
> container die
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (exitCode=137, image=a01459d6ad26, name=goofy_easley)
> 2020-07-07T17:17:08.142891259Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:17:10.700159940Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:17:11.346017877Z container
> start 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:23:30.234526457Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:23:30.281059141Z
> image tag
> sha256:4f7cd4269fa9900fe43f5c0db2267926ee972cac6cec74a92b9136e49f8b3489
> (name=python:3.8.2-buster) 2020-07-07T17:23:32.677604215Z image pull
> python:3.8.2-buster (name=python) 2020-07-07T17:23:33.765347130Z image
> tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/staging-app:latest) 2020-07-07T17:23:34.638892876Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/staging-app:latest) 2020-07-07T17:23:34.721945923Z
> container create
> 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (image=a01459d6ad26, name=pensive_taussig)
> 2020-07-07T17:23:34.777140048Z network connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97,
> name=bridge, type=bridge) 2020-07-07T17:23:35.225632098Z container
> start 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (image=a01459d6ad26, name=pensive_taussig)
> 2020-07-07T17:23:40.730637840Z container kill
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley, signal=15)
> 2020-07-07T17:23:50.749346961Z container kill
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley, signal=9)
> 2020-07-07T17:23:51.007134732Z container die
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (exitCode=137, image=a01459d6ad26, name=goofy_easley)
> 2020-07-07T17:23:51.064061323Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:23:51.079435605Z container
> stop 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:23:51.254045082Z
> container destroy
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:23:51.303433852Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:23:51.350189423Z
> image untag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536)
> 2020-07-07T17:25:13.302167787Z container die
> 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (exitCode=137, image=a01459d6ad26, name=pensive_taussig)
> 2020-07-07T17:25:13.478841157Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97,
> name=bridge, type=bridge) 2020-07-07T17:25:16.050466851Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97,
> name=bridge, type=bridge) 2020-07-07T17:25:16.806548828Z container
> start 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (image=a01459d6ad26, name=pensive_taussig)
>
>
> ---------------------------------------- /var/log/docker
> ---------------------------------------- Jul 7 17:08:13 ip-172-31-2-67 docker: time="2020-07-07
> type="*events.TaskDelete" Jul 7 17:17:07 ip-172-31-2-67 docker:
> time="2020-07-07T17:17:07.984841127Z" level=info msg="ignoring event"
> module=libcontainerd namespace=moby topic=/tasks/delete
> type="*events.TaskDelete" Jul 7 17:23:50 ip-172-31-2-67 docker:
> time="2020-07-07T17:23:50.730877626Z" level=info msg="Container
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> failed to exit within 10 seconds of signal 15 - using the force" Jul
> 7 17:23:51 ip-172-31-2-67 docker:
> time="2020-07-07T17:23:51.007035781Z" level=info msg="ignoring event"
> module=libcontainerd namespace=moby topic=/tasks/delete
> type="*events.TaskDelete" Jul 7 17:25:13 ip-172-31-2-67 docker:
> time="2020-07-07T17:25:13.295457935Z" level=info msg="ignoring event"
> module=libcontainerd namespace=moby topic=/tasks/delete
> type="*events.TaskDelete"
>
>
>
> ---------------------------------------- /var/log/nginx/error.log
> ---------------------------------------- 2020/07/07 17:16:38 [error] 5596#0: *144 upstream prematurely closed connection while reading
> response header from upstream, client: <IP_ADDRESS>, server: ,
> request: "POST /food_nlp_onthefly HTTP/1.1", upstream:
> "http://<IP_ADDRESS>:5000/food_nlp_onthefly", host:
> "healthbook.humango.co", referrer:
> "https://healthbook.humango.co/personal" 2020/07/07 17:16:39 [error]
> 5596#0: *131 upstream prematurely closed connection while reading
> response header from upstream, client: <IP_ADDRESS>, server: ,
> request: "POST /food_nlp_onthefly HTTP/1.1", upstream:
> "http://<IP_ADDRESS>:5000/food_nlp_onthefly", host:
> "healthbook.humango.co", referrer:
> "https://healthbook.humango.co/personal" 2020/07/07 17:16:47 [error]
> 6480#0: *1 connect() failed (111: Connection refused) while connecting
> to upstream, client: <IP_ADDRESS>, server: , request: "GET /
> HTTP/1.1", upstream: "http://<IP_ADDRESS>:5000/", host: "<IP_ADDRESS>"
> 2020/07/07 17:16:47 [error] 6480#0: *3 connect() failed (111:
> Connection refused) while connecting to upstream, client:
> <IP_ADDRESS>, server: , request: "GET / HTTP/1.1", upstream: "http://<IP_ADDRESS>:5000/", host: "<IP_ADDRESS>" 2020/07/07 17:16:47
> [error] 6480#0: *5 connect() failed (111: Connection refused) while
> connecting to upstream, client: <IP_ADDRESS>, server: , request: "GET
> / HTTP/1.1", upstream: "http://<IP_ADDRESS>:5000/", host: "<IP_ADDRESS>"
> 2020/07/07 17:17:07 [error] 6480#0: *7 upstream prematurely closed
> connection while reading response header from upstream, client:
> <IP_ADDRESS>, server: , request: "POST /food_table_generate HTTP/1.1", upstream: "http://<IP_ADDRESS><PHONE_NUMBER> - - [07/Jul/2020 17:24:29] "POST /food_autocomplete HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:30] "POST /food_autocomplete HTTP/1.1" 200 -
> 172.31.4.206 - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:34] "POST /food_nutrient_modal HTTP/1.1" 200 -
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:36] "POST /smart_suggestions HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:38] "POST /food_nutrient_modal HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:39] "POST /addfood HTTP/1.1" 204 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:40] "POST /food_table_generate HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:42] "POST /personal_submit HTTP/1.1" 204 -
> /usr/local/lib/python3.8/site-packages/spacy/util.py:271: UserWarning:
> [W031] Model 'en_Reported_outcome_NLP' (0.0.0) requires spaCy v2.2 and
> is incompatible with the current spaCy version (2.3.0). This may lead
> to unexpected results or runtime errors. To resolve this, download a
> newer compatible model or retrain your custom model with the current
> spaCy version. For more details and available updates, run: python -m
> spacy validate warnings.warn(warn_msg)
> 172.31.4.206 - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:47] "POST /food_nlp_onthefly HTTP/1.1" 200 - Building prefix dict from the default dictionary ...
> Dumping model to file cache /tmp/jieba.cache Loading model cost 0.990
> seconds. Prefix dict has been built successfully. * Serving Flask app
> "base" (lazy loading) * Environment: development * Debug mode: off
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/utils/deprecation.py:143:
> FutureWarning: The sklearn.linear_model.logistic module is deprecated
> in version 0.22 and will be removed in version 0.24. The corresponding
> classes / functions should instead be imported from
> sklearn.linear_model. Anything that cannot be imported from
> sklearn.linear_model is now part of the private API.
> warnings.warn(message, FutureWarning)
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn( * Running on
> http://0.0.0.0:5000/ (Press CTRL+C to quit)
> 172.31.4.206 - - [07/Jul/2020 17:23:47] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:23:47] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:23:47] "GET / HTTP/1.1" 200 -
> 172.31.4.206 - - [07/Jul/2020 17:24:02] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:02] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:24:02] "GET / HTTP/1.1" 200 -
> 172.31.4.206 - - [07/Jul/2020 17:24:17] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:17] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:24:17] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:21] "GET /personal HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:21] "POST /usertimezone HTTP/1.1" 204 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:22] "GET /static/img/favicon.png HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:29] "POST /food_autocomplete HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:30] "POST /food_autocomplete HTTP/1.1" 200 -
> 172.31.4.206 - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:24:32] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:34] "POST /food_nutrient_modal HTTP/1.1" 200 -
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator CountVectorizer from version
> 0.21.2 when using version 0.23.1. This might lead to breaking code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator TfidfTransformer from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator LogisticRegression from
> version 0.21.2 when using version 0.23.1. This might lead to breaking
> code or invalid results. Use at your own risk. warnings.warn(
> /usr/local/lib/python3.8/site-packages/sklearn/base.py:329:
> UserWarning: Trying to unpickle estimator Pipeline from version 0.21.2
> when using version 0.23.1. This might lead to breaking code or invalid
> results. Use at your own risk. warnings.warn(
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:36] "POST /smart_suggestions HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:38] "POST /food_nutrient_modal HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:39] "POST /addfood HTTP/1.1" 204 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:40] "POST /food_table_generate HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:42] "POST /personal_submit HTTP/1.1" 204 -
> /usr/local/lib/python3.8/site-packages/spacy/util.py:271: UserWarning:
> [W031] Model 'en_Reported_outcome_NLP' (0.0.0) requires spaCy v2.2 and
> is incompatible with the current spaCy version (2.3.0). This may lead
> to unexpected results or runtime errors. To resolve this, download a
> newer compatible model or retrain your custom model with the current
> spaCy version. For more details and available updates, run: python -m
> spacy validate warnings.warn(warn_msg)
> 172.31.4.206 - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> 172.31.27.83 - - [07/Jul/2020 17:24:47] "GET / HTTP/1.1" 200 -
> <PHONE_NUMBER> - - [07/Jul/2020 17:24:47] "POST /food_nlp_onthefly HTTP/1.1" 200 - Building prefix dict from the default dictionary ...
> Dumping model to file cache /tmp/jieba.cache Loading model cost 0.990
> seconds. Prefix dict has been built successfully.
>
>
> ---------------------------------------- /var/log/docker-events.log
> ---------------------------------------- 2020-07-07T17:08:43.222801211Z image pull python:3.8.2-buster
> name=agitated_hugle) 2020-07-07T17:09:46.255907751Z container create
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:46.256131915Z container
> attach
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:46.295742501Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3,
> name=bridge, type=bridge) 2020-07-07T17:09:46.734903605Z container
> start 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:49.122315926Z container die
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (exitCode=0,
> image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:49.171805355Z network
> disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3,
> name=bridge, type=bridge) 2020-07-07T17:09:49.813444357Z container
> destroy
> 5e3269e6db83eb7da60b4f011e0038ee847a83a16200482885ccdfc1ee53f4b3
> (image=sha256:938ea8d987340203ade469ba4cbf79ea7af3626bc521c6e4667959b700877892,
> name=interesting_vaughan) 2020-07-07T17:09:49.831035003Z container
> create
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:49.831391340Z container
> attach
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:49.884733812Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed,
> name=bridge, type=bridge) 2020-07-07T17:09:50.290165549Z container
> start 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:53.138031459Z container die
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (exitCode=0,
> image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:53.195435239Z network
> disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed,
> name=bridge, type=bridge) 2020-07-07T17:09:53.294312475Z container
> destroy
> 55647e02051fdd853af507483370a89e29e916ef618c0f8dff83b88054d157ed
> (image=sha256:8c7a43e1019f42bc7153ec0b4d142740110250db72ae1475d44d3fa9d16e771d,
> name=friendly_goldstine) 2020-07-07T17:09:53.313349292Z container
> create
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:09:53.313571816Z container attach
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:09:53.362840973Z network connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0,
> name=bridge, type=bridge) 2020-07-07T17:09:53.774896296Z container
> start c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:10:30.678618014Z container die
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (exitCode=0,
> image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:10:30.740972059Z network
> disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0,
> name=bridge, type=bridge) 2020-07-07T17:10:31.134171606Z container
> destroy
> c3c43c4db5b583beb1fbe2161bd73b7a6ea4411b58366f4f043db51b6e2412b0
> (image=sha256:f973e6783f1cb4b492fdf837be75718d5cd396707432a9dbebab795c7a8f1c29,
> name=crazy_cartwright) 2020-07-07T17:10:33.387455304Z container create
> d7445fa259c0281ef92909bae68e0ef640122c3c8aadc8523ccd0ab3168cb439
> (image=sha256:bbe93b4133f847fb8b7217d07fea76d7954db093dced90575f5904437b41bf3e,
> name=angry_hermann) 2020-07-07T17:10:33.476870016Z container destroy
> d7445fa259c0281ef92909bae68e0ef640122c3c8aadc8523ccd0ab3168cb439
> (image=sha256:bbe93b4133f847fb8b7217d07fea76d7954db093dced90575f5904437b41bf3e,
> name=angry_hermann) 2020-07-07T17:10:33.494062931Z container create
> bc23ff300c23cff0b00d12faab49a790a21b9e3bdc8879039afd236163de3cca
> (image=sha256:e4dac3e5b2864c76b1be5c0a9931a23c29d30896eb3deae344dce336ddbb11e5,
> name=admiring_driscoll) 2020-07-07T17:10:33.573500812Z container
> destroy
> bc23ff300c23cff0b00d12faab49a790a21b9e3bdc8879039afd236163de3cca
> (image=sha256:e4dac3e5b2864c76b1be5c0a9931a23c29d30896eb3deae344dce336ddbb11e5,
> name=admiring_driscoll) 2020-07-07T17:10:33.592409924Z image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/staging-app:latest) 2020-07-07T17:10:36.173605128Z
> container create
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:10:36.223247839Z
> network connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:10:36.637664357Z container
> start 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:10:41.964896576Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:10:42.012166449Z
> image untag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536)
> 2020-07-07T17:10:42.740687237Z image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:10:42.836810391Z
> image tag
> sha256:4f7cd4269fa9900fe43f5c0db2267926ee972cac6cec74a92b9136e49f8b3489
> (name=python:3.8.2-buster) 2020-07-07T17:16:40.255804571Z container
> die 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (exitCode=137, image=a01459d6ad26, name=goofy_easley)
> 2020-07-07T17:16:40.376674654Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:16:43.031775619Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:16:43.789437781Z container
> start 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:17:07.998859712Z
> container die
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (exitCode=137, image=a01459d6ad26, name=goofy_easley)
> 2020-07-07T17:17:08.142891259Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:17:10.700159940Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:17:11.346017877Z container
> start 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:23:30.234526457Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:23:30.281059141Z
> image tag
> sha256:4f7cd4269fa9900fe43f5c0db2267926ee972cac6cec74a92b9136e49f8b3489
> (name=python:3.8.2-buster) 2020-07-07T17:23:32.677604215Z image pull
> python:3.8.2-buster (name=python) 2020-07-07T17:23:33.765347130Z image
> tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/staging-app:latest) 2020-07-07T17:23:34.638892876Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/staging-app:latest) 2020-07-07T17:23:34.721945923Z
> container create
> 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (image=a01459d6ad26, name=pensive_taussig)
> 2020-07-07T17:23:34.777140048Z network connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97,
> name=bridge, type=bridge) 2020-07-07T17:23:35.225632098Z container
> start 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (image=a01459d6ad26, name=pensive_taussig)
> 2020-07-07T17:23:40.730637840Z container kill
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley, signal=15)
> 2020-07-07T17:23:50.749346961Z container kill
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley, signal=9)
> 2020-07-07T17:23:51.007134732Z container die
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (exitCode=137, image=a01459d6ad26, name=goofy_easley)
> 2020-07-07T17:23:51.064061323Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e,
> name=bridge, type=bridge) 2020-07-07T17:23:51.079435605Z container
> stop 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:23:51.254045082Z
> container destroy
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> (image=a01459d6ad26, name=goofy_easley) 2020-07-07T17:23:51.303433852Z
> image tag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=aws_beanstalk/current-app:latest) 2020-07-07T17:23:51.350189423Z
> image untag
> sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536
> (name=sha256:a01459d6ad267dabc254bb7b7cd75af0179b81cfdf6762d9bfa13691b2f2d536)
> 2020-07-07T17:25:13.302167787Z container die
> 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (exitCode=137, image=a01459d6ad26, name=pensive_taussig)
> 2020-07-07T17:25:13.478841157Z network disconnect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97,
> name=bridge, type=bridge) 2020-07-07T17:25:16.050466851Z network
> connect
> 0313ee36f6c330fb7f0435db1997443faa3aec1cf0aa895a68bce628065eece5
> (container=29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97,
> name=bridge, type=bridge) 2020-07-07T17:25:16.806548828Z container
> start 29f07434a6e45cb922cdde01f615fadb13962602050e7330821ca7efe4234e97
> (image=a01459d6ad26, name=pensive_taussig)
>
>
> ---------------------------------------- /var/log/docker
> ---------------------------------------- Jul 7 17:08:13 ip-172-31-2-67 docker: time="2020-07-07
> type="*events.TaskDelete" Jul 7 17:17:07 ip-172-31-2-67 docker:
> time="2020-07-07T17:17:07.984841127Z" level=info msg="ignoring event"
> module=libcontainerd namespace=moby topic=/tasks/delete
> type="*events.TaskDelete" Jul 7 17:23:50 ip-172-31-2-67 docker:
> time="2020-07-07T17:23:50.730877626Z" level=info msg="Container
> 65f83c0b3683725ef5c6e633ef3302f8ee853e4edd5478c900a2a27086421a7e
> failed to exit within 10 seconds of signal 15 - using the force" Jul
> 7 17:23:51 ip-172-31-2-67 docker:
> time="2020-07-07T17:23:51.007035781Z" level=info msg="ignoring event"
> module=libcontainerd namespace=moby topic=/tasks/delete
> type="*events.TaskDelete" Jul 7 17:25:13 ip-172-31-2-67 docker:
> time="2020-07-07T17:25:13.295457935Z" level=info msg="ignoring event"
> module=libcontainerd namespace=moby topic=/tasks/delete
> type="*events.TaskDelete"
>
>
>
> ---------------------------------------- /var/log/nginx/error.log
> ---------------------------------------- 2020/07/07 17:16:38 [error] 5596#0: *144 upstream prematurely closed connection while reading
> response header from upstream, client: <PHONE_NUMBER>, server: ,
> request: "POST /food_nlp_onthefly HTTP/1.1", upstream:
> "http://172.17.0.2:5000/food_nlp_onthefly", host:
> "healthbook.humango.co", referrer:
> "https://healthbook.humango.co/personal" 2020/07/07 17:16:39 [error]
> 5596#0: *131 upstream prematurely closed connection while reading
> response header from upstream, client: <PHONE_NUMBER>, server: ,
> request: "POST /food_nlp_onthefly HTTP/1.1", upstream:
> "http://172.17.0.2:5000/food_nlp_onthefly", host:
> "healthbook.humango.co", referrer:
> "https://healthbook.humango.co/personal" 2020/07/07 17:16:47 [error]
> 6480#0: *1 connect() failed (111: Connection refused) while connecting
> to upstream, client: 172.31.4.206, server: , request: "GET /
> HTTP/1.1", upstream: "http://172.17.0.2:5000/", host: "172.31.2.67"
> 2020/07/07 17:16:47 [error] 6480#0: *3 connect() failed (111:
> Connection refused) while connecting to upstream, client:
> <PHONE_NUMBER>, server: , request: "GET / HTTP/1.1", upstream: "http://172.17.0.2:5000/", host: "172.31.2.67" 2020/07/07 17:16:47
> [error] 6480#0: *5 connect() failed (111: Connection refused) while
> connecting to upstream, client: 172.31.27.83, server: , request: "GET
> / HTTP/1.1", upstream: "http://172.17.0.2:5000/", host: "172.31.2.67"
> 2020/07/07 17:17:07 [error] 6480#0: *7 upstream prematurely closed
> connection while reading response header from upstream, client:
> <PHONE_NUMBER>, server: , request: "POST /food_table_generate HTTP/1.1", upstream: "http://172.17.0.2:5000/food_table_generate",
> host: "healthbook.humango.co", referrer:
> "https://healthbook.humango.co/personal"
|
3f89cc5b884af04e73a0621b328dda4fc1d27f1b62426936c7a4477b6465bfbe | ['721145df37104793abba17ca6aba9c6c'] | Background
According to PlanetMath <PERSON>'s lemma is this:
Let $G$ be a finite group and let $V$ and $W$ be irreducible $G$-modules. Then, every $G$-module homomorphism $\,f: V \to W$ is either invertible or the trivial zero map.
Corollary
Let $V$ be a finite-dimensional, irreducible $G$-module taken over an algebraically closed field. Then, every $G$-module homomorphism $\,f: V \to V$ is equal to a scalar multiplication.
Proof
Since the ground field is algebraically closed, the linear transformation $f: V\to V$ has an eigenvalue; call it $\lambda$. By definition, $\,f - \lambda 1$ is not invertible, and hence equal to zero by <PERSON>'s lemma. In other words, $\,f = \lambda$, a scalar.
Question
In the proof above, why can <PERSON>'s lemma be applied to $\,f - \lambda 1$? Is it assumed that $\,f - \lambda 1$ is also a $G$-module homomorphism?
| 1bdff7360a3c9a1e12f50ea66365459ed545e37ce4bdcb289d70bdfd97c61f2d | ['721145df37104793abba17ca6aba9c6c'] | I recommend this post and this one.
Generally, our data should go through to two main Quality Assurance (QA) prisms:
1.Automatic – Checking rules that don’t require the human eye, and, oblige to preordained rules. All those rules you want your data to fit. For example, for the road layer, no dangles. Or buildings shouldn’t intersect roads unless the roads are tunnels.
2.Sampling – Checking a sample that would reflect the quality of the whole data, and requires human decipher. For example, let’s say you want to buy Point of Interest (POI) data that contain several types: culture, education and commerce. You’ll need to check a sample and see, with your own eyes and mind that the POIs are categorized correctly. How many should you check depends on the standard you use and the level of error you allow.
|
af1d6a450d6daae9a47fc31dd09ef98455c2ced57191a7b8ac1ff58f4043e97c | ['721acef5384240e9b14031cc296cb86e'] | I am using spark and I have different kind of compressed files on hdfs(zip,gzip,7zip,tar,bz2,tar.gz etc). Could anyone please let me know best way for decompression. For some compression I could use CompressionCodec. But it does not support all compression format.For zip file I did some search and found that ZipFileInputFormat could be used. but i could not find any jar for this.
| b561a488fd2e31fb596487555c33332a8cfa2fd9ea5dd2ac274c2aeb58d166fe | ['721acef5384240e9b14031cc296cb86e'] | I was also trying the same thing, But did not find anything regarding adding dependency to build.sbt. By the time we can figure out how to put dependency in build.sbt, One work around is you can download the jar from https://www.versioneye.com/java/com.github.master:spark-stemming_2.10/0.1.0 location and specify this jar in spark-submit --jars or spark-shell --jars command and use its classes.
|
a09de8d600bacf679cfe154ccf89dea3a7bf0b4c7e87d273ec3d5cc4a2796b1f | ['722090b591c849fe930859f93d50c6d8'] | I'm trying to use Google Drive Reports API /admin/reports/v1/usage/users/all/dates
Is there any report parameter we can use to get total number of files owned by a user?
For example "accounts:drive_used_quota_in_mb" gives total used quota. Similar to this is there any parameter for total number of files?
| fd6a4979ae70f549040016daa3dd991a1fe7790bb6dc53ddf259e14f5c8a550d | ['722090b591c849fe930859f93d50c6d8'] | If user don't have permissions to the ".java/.systemPrefs" directory, at the time of installation it is showing below warning and stack trace.
Is there any way to suppress these warnings?
WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: java.io.FileNotFoundException: /etc/.java/.systemPrefs/com/install4j/installations/prefs.tmp (Permission denied)
|
c0251f65617dc7ec26e68486ffa517045a9abd2defcb625531088f0ed0697142 | ['72244395993a4b9db4fa7201a4895902'] | I'm wanting to convert '.NEF' to '.png' using the rawpy, imageio and opencv libraries in Python. I've tried a variety of flags in rawpy to produce the same image that I see when I just open the NEF, but all of the images that output are extremely dark. What am I doing wrong?
My current version of the code is:
import rawpy
import imageio
from os.path import *
import os
import cv2
def nef2png(inputNEFPath):
parent, filename = split(inputNEFPath)
name, _ = splitext(filename)
pngName = str(name+'.png')
tempFileName = str('temp%s.tiff' % (name))
with rawpy.imread(inputNEFPath) as raw:
rgb = raw.postprocess(gamma=(2.222, 4.5),
no_auto_bright=True,
output_bps=16)
imageio.imsave(join(parent, tempFileName), rgb)
image = cv2.imread(join(parent, tempFileName), cv2.IMREAD_UNCHANGED)
cv2.imwrite(join(parent, pngName), image)
os.remove(join(parent, tempFileName))
I'm hoping to get to get this result:
https://imgur.com/Q8qWfwN
But I keep getting dark outputs like this:
https://imgur.com/0jIuqpQ
For the actual file NEF, I uploaded them to my google drive if you want to mess with it: https://drive.google.com/drive/folders/1DVSPXk2Mbj8jpAU2EeZfK8d2HZM9taiH?usp=sharing
| 85cab7c2e25c5b506280cc18500dedc956e6df2b689d053925a41a07c3318907 | ['72244395993a4b9db4fa7201a4895902'] | Adding a little to what @TheoreticallyNick posted earlier:
import cv2
import threading
class camThread(threading.Thread):
def __init__(self, previewName, camID):
threading.Thread.__init__(self)
self.previewName = previewName
self.camID = camID
def run(self):
print("Starting " + self.previewName)
camPreview(self.previewName, self.camID)
def camPreview(previewName, camID):
cv2.namedWindow(previewName)
cam = cv2.VideoCapture(camID)
if cam.isOpened():
rval, frame = cam.read()
else:
rval = False
while rval:
cv2.imshow(previewName, frame)
rval, frame = cam.read()
key = cv2.waitKey(20)
if key == 27: # exit on ESC
break
cv2.destroyWindow(previewName)
# Create threads as follows
thread1 = camThread("Camera 1", 0)
thread2 = camThread("Camera 2", 1)
thread3 = camThread("Camera 3", 2)
thread1.start()
thread2.start()
thread3.start()
print()
print("Active threads", threading.activeCount())
This will open up a new thread for each webcam you have. In my case, I wanted to open up three different feeds. Tested on Python 3.6. Let me know if you have any issues, also thanks to TheoreticallyNick for the readable/functioning code!
|
e923ca556c4d5f810c1689b14a5cabf74057c4e833b6d7a5be1e7aca96ffc153 | ['723ac2ede211475594197c8e9ebba0fb'] | Any possible way to keep entering numbers, and when the same number is entered 2 or more times an error message arises or something like that? I need this to be answered in Java only. I'm new and I don't know where to go from here. I need help searching values in the array and then printing out all the numbers that have been entered.
public class Test
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
System.out.println("How big is the group?: ");
int[] group = new int[input.nextInt()];
for (int i = 0; i < group.length; i++)
{
System.out.println("Please enter number: ");
group[i] = input.nextInt();
}
| 77b3d0cf167d0d965b5168201216f46d45fab1c101dad0a9e37d137dd7734f7b | ['723ac2ede211475594197c8e9ebba0fb'] | If the cell has a value not equal to 0 then it will add up, X = X +1 so then I can see how many pages I need to print. I'm not sure if this is the best way to do it, but here is what I have so far.
All help is needed! This is just a side project for work, so time is not an issue. I am creating this in excel also.
Sub Find_Pages_to_Print()
Sheets("Invoice").Select
Dim X As Integer
If Not Range("D9").Value = 0 Then
X = X + 1
If Not Range("D41").Value = 0 Then
X = X + 1
If Not Range("D70").Value = 0 Then
X = X + 1
If Not Range("D100").Value = 0 Then
X = X + 1
Else:
X = X + 0
If Not Range("D131").Value = 0 Then
X = X + 1
If Not Range("D161").Value = 0 Then
X = X + 1
If Not Range("191").Value = 0 Then
X = X + 1
Else:
X = X + 0
If Not Range("D221").Value = 0 Then
X = X + 1
End If
End If
End If
End If
End If
End If
End If
End If
MsgBox "Sets to Print: " & X
End Sub
|
dfbc5e690f63be72b347ca9ff9172273fa9cbd89e4e9df761fbffbe4035749f6 | ['724feafa240b4aa2bf69edbcd0ed1839'] | I've been looking around for help on this, and haven't been able to find anything that actually explains it. I'm fairly new to Android programming, and I'm working on my first app, a score keeper for a card game.
In MainActivity, I have an ImageButton that, when pressed, prompts the user to enter in the number of players and the players' names. Once this is done, the app programmatically fills out a TableLayout with a grid of TextViews that will hold the scores. It makes the ImageButton and associated TextView disappear, and makes the TableLayout visible. However, when the user goes to one of two Activities in the menu, then clicks on the up arrow to go back to MainActivity (I call getSupportActionBar().setDisplayHomeAsUpEnabled(true); on both Activities), MainActivity reverts back to the original layout (as if the user had just opened the app). This is not the case, however, when the user returns to MainActivity via the device back button.
I know that I can't rely on onSaveInstanceState() and onRestoreInstanceState() for this, since those are only called if the system destroys the Activity (At least, that is my understanding. Correct me if I'm wrong). From what I've gathered, if I want to save and reload the current layout, I need to do it in onPause() and onResume(), but I am not sure of a good way to do this since I can't effectively use a Bundle. Is there a good way to go about this?
| 0c17d2451703fab4635ef09c02789e8510524d871f2130a87f917fbeda31c3b7 | ['724feafa240b4aa2bf69edbcd0ed1839'] | I'm working on an app to keep score for a card game, and it was working fine until now. I have several places where I check to make sure that the number put in won't cause any errors, that is, they don't break the rules of the game. If such input is encountered, the app opens an AlertDialog telling the user of the problem. However, I had tried to call getDialog().setCanceledOnTouchOutside(false), which threw a NullPointerException since I was creating the AlertDialog with an AlertDialog.Builder. I removed the statement, but every time I try to run the app and intentionally make the AlertDialog pop up, the NullPointerException message shows up and the app crashes.
Here's the method that creates the AlertDialog:
@Override
public Dialog onCreateDialog(Bundle savedInstanceState)
{
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(getString(R.string.title_error))
.setMessage(errorText)
.setCancelable(false);
switch (errorType)
{
case 1:
builder.setPositiveButton(getString(R.string.text_OK), new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
PlayerNumErrorDialogListener activity = (PlayerNumErrorDialogListener) getActivity();
activity.onFinishPlayerNumError();
dialog.dismiss();
}
});
break;
case 2:
builder.setPositiveButton(getString(R.string.text_OK), new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
CurrentTotalScoreErrorDialogListener activity = (CurrentTotalScoreErrorDialogListener) getActivity();
activity.onFinishCurrentTotalScoreError();
}
});
break;
case 3:
builder.setPositiveButton(getString(R.string.text_OK), new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
PlayerScoreErrorDialogListener activity = (PlayerScoreErrorDialogListener) getActivity();
activity.onFinishPlayerScoreError();
}
});
break;
}
// This is the line I have removed.
// getDialog().setCanceledOnTouchOutside(false);
return builder.create();
}
And here's the stack trace:
FATAL EXCEPTION: main
Process: com.gcapps.richcardsscorekeeper, PID: 5268
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Dialog.setCanceledOnTouchOutside(boolean)' on a null object reference
at com.gcapps.richcardsscorekeeper.ErrorDialog.onCreateDialog(ErrorDialog.java:94)
at android.app.DialogFragment.getLayoutInflater(DialogFragment.java:398)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:904)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
at android.app.BackStackRecord.run(BackStackRecord.java:833)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:452)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6134)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Any ideas as to why the NullPointerException is still being thrown? I've tried restarting the app, rebuilding the project, invalidating the cache and restarting Android Studio, and even copying the entire class, deleting it, and pasting it into a new file (in case the old one was corrupt for some reason).
|
d54bb8bb59acbaa963656edb2b6487b2fd8691ae928df4cbe40ea888b9a98066 | ['7254941016db4113ac51ef835aca83d7'] | I have one variable v of length 20 that i wish to correlate with m other variables. For all m between 1 and 100, compute the distribution for the maximum absolute correlation coefficient between v and each of the other m variables, assuming the variables are independent.
In addition, i am required to find the probability of getting a maximum absolute correlation above 0.4
This is what i had tried so far. I am confused about how to run a loop to calculate the coefficient for a range of number of variables from 1 to 100 and saving the coefficient value with the corresponding m value of variables.
However, i get an error message: Error in cor(v, m_norm) : incompatible dimensions In addition, set.seed does not ensure i get the same results when i run the code
set.seed(42) # default set by the question
v <- rnorm (20) # length of variable v
nrun <- 100 # to run m from 1 to 100 to generate variables
m <- numeric(nrun)
# I want to calculate the max abs correlation coefficient between v
# and each of the other m variables (where m takes on values from 1
# 100)
for ( i in 1: nrun) {
m_norm <- rnorm(m)
m[i] <- cor(v, m_norm)
}
# Find the frequency of the correlation coefficients > 0.4
sum(abs(cor(max(m)) > 0.4 / nrun
# Plot m on the x axis and frequency of correlation
# coefficients >0.4 on the y axis
plot ( m = 1:100, sum(abs(cor(max(m)) > 0.4 / nrun)
I am supposed to get 100 maximum abs coefficient values when i calculate correlation between variable v with m (which ranges 1 to 100) variables. I am to find the probability and frequency of getting a max abs correlation above 0.4, in addition plot frequency against m.
| d44d60a419bd7c2bd4826566892a0d4b1a7fd1abced9e4b56cad81e7939e08fa | ['7254941016db4113ac51ef835aca83d7'] | Looking to plot grouped bar plots
data:
structure(list(Main = c<PHONE_NUMBER>, 0.<PHONE_NUMBER>,
<PHONE_NUMBER>), Total = c<PHONE_NUMBER>, -0.<PHONE_NUMBER>,
<PHONE_NUMBER>)), class = "data.frame", row.names = c(NA,
-3L))
intended output should look like this:
My current plot code which does not make sense to me:
barplot(main_total$Main, main_total$Total)
ggplot would be preferred but i have trouble coding it.any help will be appreciated. Thank you
|
051385d23859e533bcf2564249ef361d3d152a86fa93ee7fa1a5a265b1bfc724 | ['7258c6bc46cc43ee96dcf7e0c605fcb9'] | We have e2e test integrated with Jenkins system. For a few weeks this test successfully ran both, locally and from Jenkins (as a part of the build pipeline).
At the end of Sprint, I modified the script to reflect Sprint changes and made sure it passed locally. Then, I merged the changes with master. Now, e2e runs from Jenkins are failing 100% of the time, while when I locally connect to QA envs there is no problem.
The error I am getting is - Element is not clickable at point (x, y) which I cannot reproduce locally.
The server doesn't have a real screen so I cannot go out there and see what's going on. Resolutions are perfectly matching. I have other people running this test locally and there is no problem.
What could possibly cause these failures and how do I troubleshoot this problem?
Thanks for your help!
| 5c7a0d241bd8f089202800c7b882632735ba5011d7504a657c93f5848e88b71e | ['7258c6bc46cc43ee96dcf7e0c605fcb9'] | I've tried to put the descriptive error message and exit the test run via fail() function but only with a partial success - it appears that I am doing something wrong... Here is my code:
it('set up internal budget', function(done) {
var acceptBudgetButton = element(by.buttonText('Accept Budget'));
page.setInternalBudget(); //setting budget values
browser.wait(function() {
return browser.isElementPresent(acceptBudgetButton);
}, 30000, 'Error - Accept Budget button is not visible.');
acceptBudgetButton.click();
done();
done.fail('Unable to setup internal budget. Terminating test run');
});
When "Accept Budget" button is not available I expected 3 things from this script:
1) See "Accept Budget button is not visible" error, followed by wait time out
2) See "Unable to setup internal budget. Terminating test run" error
3) Expect protractor to immediately exist test run, as we got into failure.
In the reality, only first expectation is met. Script keeps on running and I don't even get "Unable to setup internal budget" error... so it looks like my done.fail statement is being ignored.
What should I change to make all of my dreams/expectations come true?
|
8602d6ff694b2bef7e89c022bffdc3d815dbb8950b9821051f81ef090cffa578 | ['7268856c8f9d44bd8ed97cebdc51d191'] | The solution to this was a bit of a hack - it's adding a dummy test that doesn't get logged.
Install pytest-ordering. Add a new file with a dummy test somewhere marked as last, e.g.
@pytest.mark.last
def test_dummy():
assert True
Then in the pytest_runtest_protocol function, skip the dummy test right at the start:
def pytest_runtest_protocol(item, nextitem):
if item.name == 'test_dummy':
return False
# Rest of function
As the last function will always be the dummy function which can't be retried, the session fixtures will be valid going into the test and will only be torn down afterwards.
| 98c85c933e78e61f1d595ac58d28e61350b48073745a145ffa9014a174c8fa5c | ['7268856c8f9d44bd8ed97cebdc51d191'] | I'm setting up some configuration in conftest.py for rerunning failed pytest tests in specific cases.
This function has been added to conftest.py. The idea is that a test can be set to retry by using the request fixture to set request.node.retry to True.
def pytest_runtest_protocol(item, nextitem):
"""Checks for manual mark and if found, reruns test if requested"""
if item.get_closest_marker("manual") is None:
return
# Infinite loop for rerunning tests
while True:
# Run test and get result
item.ihook.pytest_runtest_logstart(
nodeid=item.nodeid,
location=item.location
)
# Hangs on this line on retry
reports = runtestprotocol(item, nextitem=nextitem)
# Check results
if not getattr(item, 'retry', False):
for report in reports:
item.ihook.pytest_runtest_logreport(report=report)
return True
else:
delattr(item, 'retry')
This works when multiple tests are being run, but if only one test is being run, or the test is the last in a series, then the first failure of the test causes teardown of all fixtures. Function-level fixtures are fine to be set up again (in fact, I want them to be to ensure clean state) but session-level fixtures are also torn down, and I need them to restart the test.
Is there any way to prevent the session-level fixture teardown until I'm ready?
|
8cc8594b74ac0af599a5ab34b38b1b8c6b14109ab23f8fd5bfcc093b84112230 | ['7270b0132f0b4b8fb07dfa5f8f6e538a'] | Personally I just studied Philosophy by taking courses at University. These were the pieces we read in class that I found interesting and engaging (we also read some <PERSON> that I found way too dense, and I think a couple others as well, but I always liked these the best). | 36412be5d27ba30bbe113a248792d7af13cf83653b23c855806d082b48f2fa6e | ['7270b0132f0b4b8fb07dfa5f8f6e538a'] | First I encourage you to use image layer instead of render layer, because otherwise you will have to render the scene each time you open up Blender. It could be quite disappointing for very complex scenes. For doing so you need to save your image with all the passes by using the OpenEXR Multilayer
Now for the exact recipe (as illustrated on old the blender manual)
Finally, I don't see the Diffuse and the glossy passes (D/I/C). You should check them before rendering as shown on this image
I hope this is helpful and Good luck!
|
8945d3e6a0a226d6591310ba0b48af78f916fbfba470712b02c5a233eadb7add | ['72804a05a5e6486ca5cf71949f6f79eb'] | I want to get the content of request object after it serializes passed object. I want to uderstand how retrofit serilizes my object.
@POST("/RegisterNewDevice")
public void registerDevice (@Body Device device,
retrofit.Callback<ResultBooleanResponse> callback);
How retrofit will represent my Device object? Let's say it is defined as follows:
public class Device {
private int id;
private String deviceName;
//... constructors, getters and setters ...//
}
Because of https connection used for my services I cannot intercept it easily.
| a4e3a4e2f13119ff226d535d9f1c03bdbd28761bbfe16ab5309a20de4262f35c | ['72804a05a5e6486ca5cf71949f6f79eb'] | I have an activity for user registration. At some point, in that activity I have a fragment with registration form. When user click REGISTER button I have a an event dispatched with event bus like this
In RegistrationFragment (contained in RegistrationActivity)
EventBus.getDefault().post(new RegistrationSuccessfulEvent());
In RegistrationActivity
public void onEvent(RegistrationSuccessfulEvent event) {
startActivity(new Intent(this, MainActivity.class));
}
I get this exception
Could not dispatch event: class com.myapp.RegistrationSuccessfulEvent to subscribing class class com.myapp.RegistrationActivity ...
java.lang.IllegalStateException: Activity has been destroyed
Why I get activity destroyed? Is it possible that if activity A contains a fragment F that activity is terminated while F is still up and running? I thought that A is alive while F is alive or any other contained fragment is in running state. I'm quite confused about activity-fragment coupling lifecycle.
|
8bd40420405badf666b95116cc83f85b9ebc74310d2facf721f7410ef1d5c0ea | ['728d57f4d26d4e76ab5b3b6094bdd2a1'] | We're seeing issues with our Rails app on Heroku under load where request queueing (as reported by New Relic) rises dramatically, despite CPU utilization being well under 100% and memory usage being well within the dynos' capacity.
The places I've thought to look for issues at this point are resources contention (e.g database connections) and blocking awaiting responses from external services.
I'm looking for help with how to approach sorting the issue out. Aside from the two things I've mentioned what else would you be looking for? What tools would you use to get at the data and make sense of it?
Thanks for any suggestions.
| 577d0027cd388fdf1682dcebfee76dddb50c558b819d7698461bc7aa92572c93 | ['728d57f4d26d4e76ab5b3b6094bdd2a1'] | I have forked Jekyll Now from https://github.com/barryclark/jekyll-now/commit/fb2f50ba6fab860134c416cc097707da159d8c6f to my mofomofo account on Github, and renamed the repo to mofomofo.github.io, but nothing's showing up there but a 404.
I have established that it is buildable and runnable by pulling it locally and running jekyll serve.
Does this work for anyone else?
|
8b3418a46c1f63b2be4e05ecd91a0c9bdfe84b076e19f11986495ddd125e3f4f | ['728e32a6ae1e41c98eee3579aaabbf11'] | First of all you need a running mysql instance. There are 2 possibilities :
(1) You need the domain :
local instance / domain : localhost
Remote instance / domain or IP
(2) You need the port of the mysql server instance
Default is 3306
(3) The name of the database you want to connect to.
Lets say you need to connect to the database test
Now in order to connect to the database you will need to generate the connection url. In our case since (I assume) you want to write java, the url is in jdbc format
jdbc:mysql://localhost:3306/test
In order to connect netbeans to a mysql Database you will need to follow the next steps :
Locate the service tab on the project tab and right click on the Databases.
Select the Mysql Driver and click next. (If the driver misses just download the file from the suggested portal it will be a jar).
Finally fill the appropriate information on the next frame
If you need parameters to your jdbc URL you can do so like :
jdbc:mysql://localhost:3306/test?param1=value1
You can find more detailed information on the Netbeans website : https://netbeans.org/kb/docs/ide/mysql.html
| 4ef3443051e6c5f0f8b0be8887b05bb2ac44ed8270f482b504a02808ff635986 | ['728e32a6ae1e41c98eee3579aaabbf11'] | I have several sensors measuring temperature, humidity , and air quality.
The data is collected through an IoT platform and stored to a Cassandra Cluster. For the data distribution to all other applications from Cassandra Cluster, I have created a Rest Api in java.
The data collection scripts are written in C and python . While the Rest Api in java.
My question is the following.
I want to filter my raw sensor data in order to exclude values such as high & low temperatures etc. in order to have as low as possible fault ratio. have read about the t Kalman Filtering , but I don't want it to happen in real time , I prefer to filter my data straight on the Cassandra nodes.
My best guess right now is to create a service using for ex. java , and filtering data with a time gap excluding the undesirable values.
For example a service that will triggered once a day and it will exclude all the "bad" values from the time of last activation since the last record.
Is there any suggestion for an approach like that?
Or does anyone have a better suggestion ?
Or even better some publication that can guide me through the process .
Thanks in advance.
|
dfed3e1c5f79789c006eb73b2f26539ce21d6b70c26e483acc74a0aed60b9faf | ['7292d34e3e484fb1bfe18e628016f099'] | I have been created feature carousel slider by using jquery.featured.carousel.js file and some css.
Here is my jsfiddle LINK.
When run these source code in localhost, It is need everytime refresh the page to getting responsive view when i resize the window.
Here is my javascript:
<script type="text/javascript">
$(document).ready(function() {
initSlider();
});
$( window ).resize(function() {
initSlider();
});
function initSlider()
{
if ($( window ).width() < 1004 && $( window ).width() > 900)
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : .8,
largeFeatureHeight: .8,
smallFeatureWidth: .3,
smallFeatureHeight: .3,
topPadding: 20,
sidePadding: 30
});
}
else if ($( window ).width() < 900 && $( window ).width() > 768)
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : .7,
largeFeatureHeight: .7,
smallFeatureWidth: .2,
smallFeatureHeight: .2,
topPadding: 40,
sidePadding: 30
});
}
else if ($( window ).width() < 768 && $( window ).width() > 680)
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : .577,
largeFeatureHeight: .577,
smallFeatureWidth: .19999,
smallFeatureHeight: .19999,
topPadding: 40,
sidePadding: 30
});
}
else if ($( window ).width() < 680 && $( window ).width() > 580)
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : .488,
largeFeatureHeight: .488,
smallFeatureWidth: .111,
smallFeatureHeight: .111,
topPadding: 60,
sidePadding: 30
});
}
else if ($( window ).width() < 580 && $( window ).width() > 412)
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : .388,
largeFeatureHeight: .388,
smallFeatureWidth: .1,
smallFeatureHeight: .1,
topPadding: 70,
sidePadding: 30
});
}
else if ($( window ).width() < 412 && $( window ).width() > 250)
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : .3,
largeFeatureHeight: .3,
smallFeatureWidth: .06,
smallFeatureHeight: .06,
topPadding: 80,
sidePadding: 10
});
}
else
{
var carousel = $("#carousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value,
trackerIndividual:false,
trackerSummation: false,
autoPlay:0,
largeFeatureWidth : 0,
largeFeatureHeight: 0,
smallFeatureWidth: .3,
smallFeatureHeight: .3,
topPadding: 20,
sidePadding: 20
});
}
}
</script>
In the above code, I m using:
$( window ).resize(function() {
initSlider();
});
When i remove this code, again it works the same.
Note: For this carousel responsive view, I can't use css media queries.
May i know, How to set the width or how can i modify my code to get responsive view without refresh the page every time?
Any idea would be highly appreciated.
Thanks.
| 0240e2a77e1d70055693b5b47595fe764546e4c1a68188156e5297f95cd13d52 | ['7292d34e3e484fb1bfe18e628016f099'] | I have been created email newsletter using mailchimp
Now i want to add image slider with responsive design,
But i have been searched lot online..
Some online docs says can't able to add image slider in email newsletter.
For example this link told., its impossible.
So, may i know, what is the exact link, to achieve this one?
Any help would be highly appreciated,
Thanks in advance.
|
b51e6bdb7c43e29e1183ce90c4576397570ccabc98404b23f6877f9606d12bb0 | ['729494db4ebb4f8d9a6811e2fa0d53fb'] | I am using this spinner on my site.
For those unfamiliar with brackets live preview I believe that the editor serves up the site from a temporary http server and updates whenever there is a change in the code.
Whenever I check the site through this feature the spinner works. the same goes for if I go to my website at www.tylererickson.com within Brackets' custom Google Chrome window, however if opened in a normal Chrome window the spinner doesn't animate.
Any help is aprreciated, thanks in advance.
Code:
HTML
<div class="loader">
<div class="inner one"></div>
<div class="inner two"></div>
<div class="inner three"></div>
</div>
CSS
.loader {
position: absolute;
top: calc(50% - 32px);
left: calc(50% - 32px);
width: 64px;
height: 64px;
border-radius: 50%;
perspective: 800px;
}
.inner {
position: absolute;
box-sizing: border-box;
width: 100%;
height: 100%;
border-radius: 50%;
}
.inner.one {
left: 0%;
top: 0%;
animation: rotate-one 1s linear infinite;
border-bottom: 3px solid #EFEFFA;
}
.inner.two {
right: 0%;
top: 0%;
animation: rotate-two 1s linear infinite;
border-right: 3px solid #EFEFFA;
}
.inner.three {
right: 0%;
bottom: 0%;
animation: rotate-three 1s linear infinite;
border-top: 3px solid #EFEFFA;
}
@keyframes rotate-one {
0% {
transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
}
100% {
transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
}
}
@keyframes rotate-two {
0% {
transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
}
100% {
transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
}
}
@keyframes rotate-three {
0% {
transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
}
100% {
transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
}
}
| 57aa0d66c472448e0b8903c9633f60f1c6fe12e30edef8a4c08f7dd4448b9481 | ['729494db4ebb4f8d9a6811e2fa0d53fb'] | This error was caused by a compilation error somewhere in the rails asset pipeline. This specific instance was caused by a rogue TypeScript file in app/assets/javascripts after I had removed typescript-rails from my Gemfile.
Thanks to @dstarh I was able to find the error.
I'll leave this here since I couldn't find any information on this error anywhere. Hopefully it can help someone else.
|
729bf30f08a56ffef644bdd6af4abb1361185afb907a22a762c38d851ec866af | ['72b7b6054e9742d681cf280239d9479b'] | You can do it like this,
var optionalIntArray: [Int?]
optionalIntArray = [1, 2, 3, nil, 4, 5]
When you print the array using print() you'll see it like this,
[optional(1),optional(2)...]
That is correct output because, your array is supposed to hold optional int which will be represented as
optional(1)
for an integer optional value 1.
If you want to iterate over the optionalIntArray and add only the unwrapped values, use flatMap() on array like,
let arrayContainingUnwrappedValues = optionalIntArray.flatMap{$0}
arrayContainingUnwrappedValues
| d4b8fdbe41e0b0bb4b655822e557c05d12f74b50daae2452404e14d78c2eba5e | ['72b7b6054e9742d681cf280239d9479b'] | Hi I was studying about initialize class method in objective-C. I came across this code which confused me
+ (void)initialize {
if (self == [Car class]) // what is the use of method class??
{
// Makes sure this isn't executed more than once
_defaultModel = @"Nissan Versa"; // initializing the static variable _defaultModel
}
}
Here I know that we're using if (self == [Car class]) to check whether the self is referring to class itself or not. But what is the functionality of method class in [Car class] . I'm a newbie and I'm learning objective-C from couple of weeks when I searched for answers for this question all i got is difference b/w class methods and instance methods which I know. So please tell me what is the functionality of method class. Thanks in advance .
|
3554398f074bd5cfbf9f90934e43b09a9a91a00a7b389d0acc34583c33444417 | ['72bbba3e00a5428f8f634301d033afbc'] | Actually you don't need to define the access callback, it defaults to the user_access() function which is powered by the hook_permissions from drupal.
The access arguments in the hook menu should be the same as the array key in the hook permission.
So try removing the underscores from the
'access arguments' => array('order_form_permission')
| 5d405f4b48da623eeffc1e64290b0875f65419db0214e95c1ba322b324bcda1e | ['72bbba3e00a5428f8f634301d033afbc'] | The system_settings_form($form) function is a shortcut that allows you to build a form without having to worry about the save button/submit handler (those are added automatically).
If you want to build a full form including submit handler etc you'll have to define a form function and a form submit handler and then call it via drupal_get_form('MY_FORM_NAME_admin_settings_form');
So
Define a form function
This can have any name you want
MY_FORM_NAME_admin_settings_form($form, &$form_state){
//Put your form array here-
//Add a submit button
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save'
);
return $form;
}
Define the submit handler
After this form is submitted it will automattically try to call MY_FORM_NAME_admin_settings_form_submit so we'll have to define the submit handler
MY_FORM_NAME_admin_settings_form_submit($form, &$form_state){
//All the input is in the $form_state['input'] so we'll put it in a message to see what's happening.
drupal_set_message('<pre>' . print_r($form_state['input'], true) . '</pre>');
//Do your thing with the data
//Save it via variable set
}
Print this form
Call this form via drupal_get_form where you need it.
drupal_get_form('MY_FORM_NAME_admin_settings_form');
|
c856a2a488cd0e93969573f1530cc8a56453d5525b297d96c3f4fdadce8cd02e | ['72bbf3b499e44101bf7c7363d8689f7f'] | Be sure to log out of your ArcGIS Online account(s), or blow away your browser cache, and try again. It sounds like a pre-existing login is being used when you load the app. You can check the cookies in the browser console if you are really curious.
Here's information on adding users to the ArcGIS Online organization: https://doc.arcgis.com/en/arcgis-online/administer/invite-users.htm.
Here's a quick DevLab on how to build a custom ArcGIS API for JavaScript app that uses private layers. This app walks you thru creating a new app with a login to display a layer that is not accessible to the public: https://developers.arcgis.com/labs/javascript/access-private-layers/index.html
| 31a012ed5c2f12c0086de73e1409ca3f6346dda4ed291d91037461a6127359b8 | ['72bbf3b499e44101bf7c7363d8689f7f'] | @AmyB It's not a great position, this could be avoided by using the Steed standing stone power (Equipped have no weight [not just armor], armor doesn't slow you down, +100 capacity). If I'm using heavy armor, I usually pick it up pretty quickly. Admittedly, people are pretty picky about their standing stones though |
bf17d09f57fa0e6778e95285d082fbd5bca2e1f438efd3c79abb9c5d9658cc82 | ['72d4003cc89646699546ad7c2a1965df'] | Using Slick.js - how i can remove current active slide? I made of an example, but nothing works
var $status = $('.pagingInfo');
var $slickElement = $('.slideshow');
$slickElement.on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) {
//currentSlide is undefined on init -- set it to 0 in this case (currentSlide is 0 based)
var i = (currentSlide ? currentSlide : 0) + 1;
$status.text(i + '/' + slick.slideCount);
});
$slickElement.slick({
slide: 'img',
speed: 1,
infinite: false,
swipe: false,
autoplay: false,
dots: false
});
$('.remove-slide').on('click', function() {
$slickElement.slick('slickRemove', i);
});
My fiddle here - http://jsfiddle.net/q5yae1t3/9/
| 74f86fb100fb60cb1833308e2fa4aadb4dabdddbb822f40598c15ad036834291 | ['72d4003cc89646699546ad7c2a1965df'] | $doc->_script = preg_replace('window\.addEvent\(\'domready\',\s*function\(\)\s*{\s*\$\$\(\'.hasTip\'\).each\(function\(el\)\s*{\s*var\s*title\s*=\s*el.get\(\'title\'\);\s*if\s*\(title\)\s*{\s*var\s*parts\s*=\s*title.split\(\'<IP_ADDRESS>\',\s*2\);\s*el.store\(\'tip:title\',\s*parts\[0\]\);\s*el.store\(\'tip:text\',\s*parts\[1\]\);\s*}\s*}\);\s*var\s*JTooltips\s*=\s*new\s*Tips\(\$\$\(\'.hasTip\'\),\s*{\s*maxTitleChars:\s*50,\s*fixed:\s*false}\);\s*}\);', '', $doc->_script);
|
d95d0c10b7d6864ab19bbfcbbd7b74cef0f640e88568a2a3949ed95d0661f588 | ['72d745aed6734e7caf01cf2a6f958540'] | I have a billing web application & that application is used form different domain by different client. in my local server i am regularly upgrading feature of that web application. then after upgrading one feature i have to login each domain's cpanel or ftp then update particular code that i have changed.
this is very much embarrassing for me to update all different domain.
is there any easiest way to do that from bitbucket or any version control? or any other easiest way?
Thanks is advance.
| b3fa2445d1593fb3ec195e64a27dbcdcd5506c4e957e3d08a73700c8fb421739 | ['72d745aed6734e7caf01cf2a6f958540'] | in Laravel i can get value of two column in one table in this code
$customerName = Customer<IP_ADDRESS>where('id', '=', Input<IP_ADDRESS>get('customerID'))->first()->customer_name;
$created_at = Customer<IP_ADDRESS>where('id', '=', Input<IP_ADDRESS>get('customerID'))->first()->created_at;
i want to know that how to get this two value (customer_name and created_at) in one query
|
347082a43d7987616b64391735a39149fd2de9cb816a052c9923f61c70921c1a | ['72ed4bf931a749deba98559acb5c8072'] | Its obvious, in this sentence I'm talking about using apache + mod_php, or changing the sentence, not using a proxy service to process PHP code and execute it on the web server itself. Obviously, if your apache are behind a lighthttpd, nginx, haproxy, the problen can appears from one of them. | 314772114b81cfe481a2360a1f30f7884f068c382abcff81a3e8260fab3165e3 | ['72ed4bf931a749deba98559acb5c8072'] | Thanks again rjg. I've made changes that I believe should mirror your suggestion, but I get an error. I've posted details above about the error and updated the script. Any idea what's causing this? I'm using VSCode + Blender Development to launch blender. Also, if you need the FULL detail of the error results please let me know . I narrowed it down in the post. |
5615427a7270e330fd092d09d70297f4c1323aa7b3bc419afd9536d9f373174a | ['72ed56f4448b4aa5a197e097de14bbde'] | I dealt with this problem earlier.
If you show the response of a cross-site request in an iframe, the new browsers are denying the access to this iframe, because of the same-origin policy or cross-site scripting/request prohibition.
For more information see here: IFrame Permission Denied
If you want to dynamically add content, this solution might help you: Add Dynamic Content
Best regards
| 658c43aa24307711d365d96e60db62d4372ebb4131b85f4517370087ac0d50a4 | ['72ed56f4448b4aa5a197e097de14bbde'] | As far as I know, you have to structure your document like in the examples.
jQuery is searching a header with an anchor, followed by a div block, and so on ...
Example:
<div id="accordion">
<h3><a href="#">First header</a></h3>
<div>First content</div>
<h3><a href="#">Second header</a></h3>
<div>Second content</div>
</div>
So, you have to use the markup of jQuery, otherwise jQuery will not recognize your content.
Another problem of your <ul> list is, that jQuery doesn't know which part is the header and which part is the content.
At this point you have several options:
You can find the corresponding lines of code in jQuery and edit them (not recommended)
You can write your own accordion (based on the original)
(If you really want your <ul> list) You can exchange the <ul> and <li> tags at runtime with the corresponding "jQuery tags"
Use the markup of jQuery (recommended)
Best regards
|
1e26db9ffa36abf5c8667c26e58f740c6c4921f84915bc90a713d9abec494ee8 | ['72ee04d1b510431ea407dd54c38d3d3c'] | всем привет задам терзающий меня вопрос, есть таблица human с строкой data_okon (с датой окончания) и строкой status, после как пройдет дата окончания мне надо присвоить значение в строку status неактивный, но если время еще не вышло, или при добавлении новых людей их статус должен быть активным, и все это должно происходить без моего вмешательство
| 1a8d4cb2366a5e57785d0e84ad7229136f4782927c4d41eb85df8ffe2cb04c6e | ['72ee04d1b510431ea407dd54c38d3d3c'] | This answer might be a bit late but here we go.
Statement 1: A set is either finite or infinite. (Law of excluded middle)
Statement 2: A finite set cannot be put into one-to-one correspondence with a proper subset of itself. Proof.
Statement 3: So, by statement 1, if there exists a set which can be put into one-to-one correspondence with a proper subset of itself, then it should be an infinite set.
See this link for more descriptive proof!
|
50978f91bd896e859950d9d6edcab4b75e0f1156b7d4234d04db88b3ba94a2c9 | ['72f6a3dba79c4a0da324616321ab5ced'] | Try this:
<HEAD><TITLE>Server Disk Alert</TITLE>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
<script type="text/javascript" src="../../../Backup/2012/Web Projects/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var widthValue = document.getElementsByClassName("item")[0].innerText;
document.getElementsByTagName("hr")[0].style.width = widthValue;
if (parseInt(widthValue, 10) > 90) {
document.getElementsByTagName("hr")[0].style.backgroundColor = "red";
}
});
</script>
</HEAD>
| 29e6547cd1115e09d3e45deb8be4c0e5f36ebdf3c0ccb6eefd7ba3165479ee8f | ['72f6a3dba79c4a0da324616321ab5ced'] | Suppose if we have to modify or do some prepossessing on parameters of ui-sref like below:
ui-sref="post({postId: post.post_id, postTitle: post.post_title | myFilter )})"
As shown if I want to apply my custom filter to parameter, is there any way to it?
I have tried like above, but it didn't worked and was giving syntax color.
The other solution could be probably to modify attribute in controller only, but that it not feasible for me, as these data is coming from server in list and I don't think to pre-process it in controller is good idea just for this.
Any suggestions this can be achieved?
|
fbae458c7d9185d7a7ce65cdf12406b7d923944ce3d32550e4b946210e6db566 | ['72f969950bd94f10b5b1636d1b3fee1d'] | I'm at the start of building a comparison page.
<form>
<input type="text" id="input-one" />
<input type="text" id="input-two" />
<button type="submit" value="Compare"></button>
</form>
<div id="form-image-display">
Basket
</div>
<div class="drone" >
<p class="part">H107</p>
</div>
<div class="drone" >
<p class="part">H107D</p>
</div>
<div class="drone" >
<p class="part">H107C</p>
</div>
<div class="drone" >
<p class="part">H107C+</p>
</div>
When the user clicks on a grey product box it adds the item to a basket (actually it displays an image and fills out an input field)
When you click on this generated image (as a form of removing from basket) it is supposed to delete the image and clear the corresponding form field.
This seems to work with one item but not the second.
Can anybody explain what I'm missing?
$(document).ready(function(){
$(".drone").click(function(){
$(this).addClass('selected');
var partNumber = $(this).find("p").text();
if ($("#input-one").val().length == 0 ){
$('input[type=text]#input-one').val(partNumber),
$("#form-image-display").append('<img id="'+partNumber+'" class="image-in-basket" src="http://www.cmldistribution.co.uk/product/'+partNumber+'/main.jpg" />');
}
else if ($("#input-two").val().length == 0 ){
$('input[type=text]#input-two').val(partNumber),
$("#form-image-display").append('<img id="'+partNumber+'" class="image-in-basket"
src="http://www.cmldistribution.co.uk/product/'+partNumber+'/main.jpg" />');
}
});
$(document).on('click','.image-in-basket', function(){
var partNumber = $(this).attr('id');
if (partNumber = $("#input-one").val(partNumber)){
$('input[type=text]#input-one').val("")
$(this).remove();
}
else if (partNumber = $("#input-two").val(partNumber)){
$('input[type=text]#input-two').val("");
$(this).remove();
}
});
});
Please check out the Codepen http://codepen.io/dangergeek/pen/XXeXBd
| 8132c8c5d420876f405a90a1adcd626a0bb73d1382c3172ef37c5551aa7b2003 | ['72f969950bd94f10b5b1636d1b3fee1d'] | I've a simple mod_rewrite rule
RewriteRule ^product/([^/.]+)/([^/.]+)/?$ product.php?partNumber=$1&partName=$2 [L]
It works great for 99.99% of products but there are 3 or 4 products which have a forward slash in their part number (eg PART001/1)
which rewrites to something like:
/product/PART001/1/part-name-here-for-nice-seo
Obviously this doesn't work as it's looking in an extra directory. I need the part number passed correctly as it's used to look up the index in the database and fetch all the product's information.
Is there any way round this?
|
6879bfefcdc705a5710c3bcd947cd3245d2743f75259bd7e504e0361e87d6b3a | ['730654e560ff4aba837ff5ff8921b9be'] | i have a page split in two:
on left {{> expenseList }}
on right {{> Template.dynamic template="expenseForm" data=expenseData}}
on left its a list
on right its a form to enter elements in the list.
desired behaviour:
1: form is empty and ready to add expenses
2: add an expense, form is cleared and ready for next
3: if i click on the left on the submitted expense from {{> expenseList }} the form is populated with the data of that expense and i can update that entry.
i cannot get it to work though. my form doesn't dynamically change the data. i tried to simplify code and add it below
the page code:
<template name="claimsPage">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-md-4">
{{> expenseList }}
</div>
{{> Template.dynamic template="expenseForm" data=expenseData}}
</div>
</div>
</template>
the page js
Template.claimsPage.helpers({
expenseData: function() {
var data = Session.get('expenseData');
return data;
}
});
the list js
Template.expenseList.events({
'click a': function(e) {
e.preventDefault();
var data = {
date: this.date,
description: this.description,
_id: this._id
};
Session.set('expenseData', data);
}
});
the form js
Template.expenseForm.helpers({
purposes: function() {
return Purposes.find();
},
expenseData: function(){
return Session.get('expenseData')
}
});
Template.expenseForm.events({
'click #add-expense': function(e){
e.preventDefault();
var template = Template.instance();
var expense = {
date: template.find("[name='date']" ).value,
description: template.find("[name='description']" ).value,
purposeName: template.find("[name='purpose'] option:selected" ).value,
_id: Random.id()
};
Meteor.call('addExpense', expense, function(error, result) {
if (error)
return alert(error.reason);
template.find("form").reset();
});
}
});
the form html
<template name="expenseForm">
<form>
<input name="date" type="text" value="">
<input name="description" type="text" value="">
<select name="purpose">
<option value="">Select a purpose</option>
{{#each purposes}}
<option value="{{this.purposeName}}">{{this.purposeName}}</option>
{{/each}}
</select>
<button id="add-expense" type="button">Submit</button>
</form>
</template>
I would really appreciate your help with this,
Thanks,
<PERSON>
| d4f90bcd5ee8332859493189f42233232c6a7f57d21229df4459bc9f7da7a0f8 | ['730654e560ff4aba837ff5ff8921b9be'] | here's what i am trying to do:
i have a json that gives me albums. i have on the left side the list of albums and on the right a form i use to add albums and refresh the json.
form appears on click. click on button = create new, click on album = update.
i want the form to also work for editing. so if i click on an album title i get the data and change save button to update.
i get the json, post, edit form using php on the server side.
i set this example here in a simplified version. below the html.
<button type="button" class="btn btn-w-m btn-sm btn-red" ng-click="albumForm = true;"><i class="fa fa-plus"></i> Add album</button>
<div ng-repeat="album in albums">
<a ng-model="currentAlbum" ng-change="onClick()" ng-click=" $parent.albumForm = true; ">{{ album.title }}</a>
</div>
i am new to angular and learning by doing :)
could you please help me out?
thanks,
<PERSON>
|
61511b18da65f8e8e3e4bb938e82263885733cf43a312f460d482c56a7fee186 | ['7308b486f5c34ebe8bc05542c831f7d3'] | Found the answer. For anyone with a similar problem: If you run MongoDB on Homestead it creates its own instance on the virtual server and logs in without using any credentials. Get the ID of your running Vagrant process by typing vagrant global-status and ssh into it by vagrant ssh 1a2b3c. Then just run Mongo on the virtual server and compare your values.
| 813a5d62f8216686242e6a5c98c74786d55d75bad4f3bfe9f3a91c4c27b72b9d | ['7308b486f5c34ebe8bc05542c831f7d3'] | When I refresh the page, my protected route made with react-router-dom is rendered before mapStateToProps fires and the component receives props. This causes redirection to /login route, although I'm already logged in.
I have a Redux store looking like this:
const initialState = {
isAuthenticated: false,
user: {}
};
and a component named App.js which contains routes:
componentDidMount() {
if (localStorage.token)
setAuthToken(localStorage.token);
store.dispatch(loadUser());
}
Where setAuthToken method is adding headers to axios requests.
There's also loadUser() method which is an action creator with such code:
export const loadUser = () => async dispatch => {
if (localStorage.token) {
setAuthToken(localStorage.token);
}
try {
const res = await axios.get('/api/v1/user');
dispatch({
type: USER_LOADED,
payload: res.data
});
}
catch (e) {
console.log(e);
}
};
So it basically changes a store's isAuthenticated field to true and adds user's info into the user object in the store, if there is a JWT token in the localStorage.
In my protected route component I have code that redirects to /login, if Redux store has isAuthenticated equal to false.
render() {
if (this.props.auth.isAuthenticated === false)
return (<Redirect to={'/sign-in'}/>);
Now, everything works fine if I click a link to a protected route from the navbar. If I'm logged in, then the protected route shows. If I'm not, then I'm redirected to the /login.
The problem occurs when I refresh the page being on the protected route. I'm immediately redirected to /login, because the page is rendered before the component receives Redux store's state in props.
How can I fix this? Should I somehow wait for the props, or rather change the method of routes protecting?
|
992b1f0e6e02e8d25bbabd69c68b94b56bfa8b52220f69673296f3cd51f5cb60 | ['730cb70c407f44228da198e4285740c7'] | How do I move a sprite automatically back after dragging it somewhere on the screen?
I tried:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
for (UITouch *touch in touches) {
CGPoint location = [touch locationInNode:self];
CGPoint newPosition = CGPointMake(location.x, self.size.height/2);
self.start.position = newPosition;
}
SKAction *moveTo = [SKAction moveToX:self.frame.size.width/2 duration:0.5];
[self.start runAction:moveTo];
}
| d829b67974a26a58cdadcca2cf8b4448eb8782e503ed71db585e0bff4f85c6d5 | ['730cb70c407f44228da198e4285740c7'] | In my SpriteKit Game i have several sprites with different name properties .
for (int i = 0; i < 10; i++) {
SKSpriteNode *sprite = [SKSpriteNode spriteNodeWithImageNamed:@"png"];
sprite.name = [NSString stringWithFormat:@"name%i",i];
sprite.position = CGPointMake(100, 100);
[self addChild:sprite];
}
Is it possible to call one of these sprites based on their name?
|
b2aff58a437a25b90df7436c8485601f7294f9f7df0097d0a0fc3c8f24a431d3 | ['7311dda6b48c47ddb3c2fc99b8112176'] | In my split app the detail view does not bind any model.
In the component.js I instantiate a named model like this:
// creation and setup of the oData model
var oConfig = {
metadataUrlParams: {},
json: true,
defaultBindingMode : "TwoWay",
defaultCountMode : "Inline",
useBatch : false
}
// ### tab-employee ###
var oModelEmpl = new sap.ui.model.odata.v2.ODataModel("/sap/opu/odata/sap/EMP_SRV"), oConfig);
oModelEmpl.attachMetadataFailed(function() {
this.getEventBus().publish("Component", "MetadataFailedEMPL");
}, this);
this.setModel(oModelEmpl, "EMPL");
The method onSelect in der master-view controller is fired by clicking on an listitem.
onSelect: function(oEvent) {
this.showDetail(oEvent.getParameter("listItem") || oEvent.getSource());
}
This will call the method showDetail
showDetail: function(oItem) {
var bReplace = jQuery.device.is.phone ? false : true;
this.getRouter().navTo("detail", {
from: "master",
entity: oItem.getBindingContext('EMPL').getPath().substr(1),
}, bReplace);
},
In the controller of the detail-view I've these two methods for updating the binding. onRouteMatched calls bindView, where I get the error-message TypeError: oView.getModel(...) is undefined.
onRouteMatched: function(oEvent) {
var oParameters = oEvent.getParameters();
jQuery.when(this.oInitialLoadFinishedDeferred).then(jQuery.proxy(function() {
var oView = this.getView();
if (oParameters.name !== "detail") {
return;
}
var sEntityPath = "/" + oParameters.arguments.entity;
this.bindView(sEntityPath);
}, this));
},
bindView: function(sEntityPath) {
var oView = this.getView();
oView.bindElement(sEntityPath);
//Check if the data is already on the client
if (!oView.getModel().getData(sEntityPath)) {
// Check that the entity specified was found.
oView.getElementBinding().attachEventOnce("dataReceived", jQuery.proxy(function() {
var oData = oView.getModel().getData(sEntityPath);
if (!oData) {
this.showEmptyView();
this.fireDetailNotFound();
} else {
this.fireDetailChanged(sEntityPath);
}
}, this));
} else {
this.fireDetailChanged(sEntityPath);
}
},
I've tried to implement this split app relative to the template generated by WebIDE. Any idea what is missing?
| 9df8df5ecda01b9c9d92264b32bead36631a53cfde6f0fc6d7f5c68d53291b42 | ['7311dda6b48c47ddb3c2fc99b8112176'] | I have an entity set for employees (EmployeeSet) with an association to further details.
EmployeeSet(1) holds the data for one employee and is bound to a detail view. Inside this view I'm using a form to bind the further details with an association called ToFurtherDetails.
No I need one property from EmployeeSet(1) inside this form.
Is there a way to bind a property from a parent node?
|
49904e5911f771185c8550db43ae3309d90f5c87bf7f7ec8674243b6ebd4c965 | ['732192fdae1f44afb1bb8021d54bf695'] | I am writing a script to scrape a Wikipedia page with a list of names for those names. Specifically, I am scraping a Wikipedia page with a list of the names of every jazz pianist (according to Wikipedia, at least). What I want to do is append all of the pianist's names on this page into a list. Here is the link to the Wikipedia page: https://en.wikipedia.org/wiki/List_of_jazz_pianists
I managed to reach a solution with Beautiful Soup v4, but it looks very clunky. Let me describe that solution and why I reached it. (I won't include the HTML file in this post for brevity's sake)
import requests
import bs4
result = requests.get("https://en.wikipedia.org/wiki/List_of_jazz_pianists")
soup = bs4.BeautifulSoup(result.text, "html.parser")
bigList = soup.findAll('div', {'class' : 'div-col columns column-width'})
bigList is the list of each div class = div-col columns column-width, because these divs contain
the actual names of the artists.
artistList = []
index = 0
for nameTag in bigList[5].contents[1].contents:
if index % 2 == 0:
artistList.append(nameTag.contents[0].contents[0])
index += 1
print(artistList)
This is going to take some explaining. It will help if you look at the HTML file for the Wikipedia page. bigList[5] gives all last names of 'F', as F is the 6th character in the alphabet. bigList[5].contents gives a list of 3 elements: a newline escape character, the entire <li> list for F, and finally another
newline escape character. So bigList[5].contents[1] accesses the entire <li> list for F.
bigList[5].contents[1].contents gives a list of each <li> element, separated by a newline escape
character. So my thinking was that I would iterate through each element in this list, only taking the even-indexed elements, as the odd-indexed elements were all newline escape characters. nameTag.contents gives a list consisting of two elements, the hyperlink and name for the pianist, and their date of birth - date of death. So I select the first element of that list. Finally, nameTag.contents[0].contents gives a list containing only one element, the name of the pianist, so I pull the only element of this list in order to append it to artistList as a string, and not a nested list.
As you can see, this is an extremely complicated process for something that seems like it should be simpler. Given that I am new to bs4 and web scraping with python in general, I feel like there's a better solution to this. Moreover, I eventually want to collect data from each pianist's page that is linked on this page. My solution is not very robust or efficient, and I know that will give me problems moving forward with this project.
Is there a better way to do what I'm trying to do? I really appreciate the help, and I'm sorry for the length of the post and any other inappropriate or non-idiomatic mistakes - I am new to stack overflow.
Thanks!
| 5ff1a85bdddf07c69e2e3c05a03b713c88b8f2678ad3bc269d63c2f57b92b712 | ['732192fdae1f44afb1bb8021d54bf695'] | Problem Summary: Given a DataFrame pDF that contains basic data on the names, instruments, and birth dates and death dates of jazz musicians, I want to create a column that either calculates the lifespan of the musicians who have already died, or returns 'N/A' for musicians who have not died or for whom there is no data on.
Explanation: I'm doing a webscraping and data analysis project where I scrape Wikipedia for basic information (names, instruments, birth dates and death dates) on jazz musicians in order to create a database and do some data analysis. I've managed to build a script that works for the list of pianists so far, and as a test I've built a DataFrame pDF with the first 30 musicians on the "List of jazz musicians" Wikipedia page. Here is the current state of pDF:
Artist Instrument Birthdate Deathdate Birth Year \
0 <PERSON> Piano 1895 1963-03-10 1895
1 <PERSON> Piano 1974-12-17 Present 1974
2 <PERSON> Piano 1942 Present 1942
3 <PERSON> Piano 1923 2000-01-20 1923
4 <PERSON> Piano 1961 Present 1961
5 <PERSON> Piano 1930-09-19 2017-10-29 1930
6 <PERSON> Piano 1917 1963 1917
7 <PERSON> Piano 1937-12-11 Present 1937
8 <PERSON> Piano 1953-03-16 Present 1953
9 <PERSON> Piano 1929-12-12 Present 1929
10 <PERSON> Jr. Piano 1953-02-18 Present 1953
11 <PERSON> Piano 1924-01-24 1988-01-12 1924
12 <PERSON> Piano 1921-08-28 1988-01-11 1921
13 <PERSON> Piano 1890 1970 1890
14 <PERSON> Piano 2003-06-25 Present 2003
15 <PERSON> Piano 1944-06-06 Present 1944
16 <PERSON> Piano 1954-02-11 Present 1954
17 <PERSON> Piano 1914 1985 1914
18 <PERSON> Piano 1957 2017 1957
19 <PERSON> Piano 1921 2000 1921
20 <PERSON> Piano 1927-11-11 2016-11-15 1927
21 <PERSON> Piano 1956-11-07 2018-05-11 1956
22 <PERSON> Piano 1966 Present 1966
23 <PERSON> Piano 1937 2013 1937
24 <PERSON> Piano 1907-03-01 1949-12-02 1907
25 <PERSON> Piano 1961-10-25 Present 1961
26 <PERSON> Piano 1926-02-26 2008-02-04 1926
27 <PERSON> Piano N/A N/A N/A
28 <PERSON> Double bass 1925 2008 1925
29 <PERSON> Piano 1946-04-16 Present 1946
Death Year Lifespan
0 1963 NaN
1 Present NaN
2 Present NaN
3 2000 NaN
4 Present NaN
5 2017 NaN
6 1963 NaN
7 Present NaN
8 Present NaN
9 Present NaN
10 Present NaN
11 1988 NaN
12 1988 NaN
13 1970 NaN
14 Present NaN
15 Present NaN
16 Present NaN
17 1985 NaN
18 2017 NaN
19 2000 NaN
20 2016 NaN
21 2018 NaN
22 Present NaN
23 2013 NaN
24 1949 NaN
25 Present NaN
26 2008 NaN
27 N/A NaN
28 2008 NaN
29 Present NaN
All of the information in the table except for the NaNs are strings.
(I understand that Birthdate and Birth Year and Deathdate and Death Year are keeping essentially the same information... this is part of my project I am going to work out later, but I haven't decided what I want to do yet. Additionally, an 'N/A' in the DataFrame means that the information could not be found by the web-scraping script)
Using the year dates that are in the Birth Year and Death Year columns, I want to fill in the values for the Lifespan column so that:
If the Death Year column contains a (four digit) number, the Lifespan column for that row is filled with the basic calculation Death Year - Birth Year.
If the Death Year column does not contain a (four digit) number, the Lifespan column for that row is filled with 'N/A' (or NaN to be consistent with DataFrame syntax - something I also have to change in my script later)
Here is the solution that I came up with:
for index, row in pDF.iterrows():
if (row['Birth Year'] != 'N/A') & (row['Death Year'] != 'Present'):
row['Birth Year'] = int(row['Birth Year'])
row['Death Year'] = int(row['Death Year'])
row['Lifespan'] = row['Death Year'] - row['Birth Year']
My solution is different from the logic I described above because I wasn't exactly sure how to implement the logic.
Here is my main question:
Is the logic that I described in the bullet points the most efficient and pythonic way I could go about accomplishing what I'm trying to do? If not, what's the better way? I was also trying to find a way to re-type all of the four digit numbers in the Birth Year and Death Year columns as integers, but I couldn't find a good-looking way to do that either.
Thank you!
|
d61a0a2b2818d2cd79c3d9bcf46bf4eb4015b2cfc826104346d0da918de6831e | ['733a9146a5b545089c2139d8005b8a4e'] | I am using JNotify in one of my Projects on a linux system (arm7).
And it works great. If i change, rename, delete or create a File it throws an Interrupt.
But I would like to us JNotify to get informed if the Linux System change a File by itself.
I am using a BeagleBone (embeded Linux System). There is a file called value which contains the status of an InputPin (high, low). But if this file is changed by the system JNotify dosen't work... If I change the file by my self everything is ok...
Does anyone know why the change wasn't recognize in the first case.
Linux seems to use a special way to write the file... yet i dont't know how...
But need to interrupt my main loop if this file changes.
Or is there another solution?
Thanks
| 0883fbd59211c61bb29420d648f98e00ab9b68101cae777f192082a164a73d2b | ['733a9146a5b545089c2139d8005b8a4e'] | I'm programing on an embedded linux system calls BeagleBone Black. I'm using JDK vers. 1.6 to run my programms.
At the moment i write code on my normal pc (win7), create a .jar and transfer it via FileZilla to the Linux system (arm7). Then i connect with the embedded system using Putty (ssh tunnel) and start my programm ..."java -jar [name].jar"
Now i'm searching for a way to connect Neatbeans directly to the linux system. To bypass this laborious methode. Is there a way to debugg a programm on my pc via netbeans and it will automatically run on linux? (with console output in netbeans)?
How to configurate the ide for such a task?
Or is there alternative option?
Thanks
|
94ca06ff385f8e1b765a464a6e3ddd053828f0950b00bcae8e4016a7e3fdc2cd | ['7343adb3deec492f98d3c0d48c122763'] | I have boot camped the Mac to have windows. I had an issue so deleted windows during setup to reinstall on the partition. In this process I think I have lost my recovery for Mac as its just all fallen apart from there.
So gone into disk utility to delete the partition to restart it now I am not seeing the partition at all and when I try to resize the Mac one its not allowing me too as it comes with an error that it cannot find the other partition that windows was on.
Now I tried to do a full reset using command R and do the internet one but I get stuck on the apple sign after that so have to restart. If I was to boot the Mac to single mode using command s it takes me to the black screen no bootable device found please insert disk well something like that. Even tried to do clean install of windows but it gets to partition bit it says that partition is formatted in a different way it won't work on it.
When I open finder under devices I have remove disc so I am assuming this is the partition that I've screwed up. I may have overlooked something but guys what can I do?
| 8781b792809cfdec6a3e1602b8d8063c6bc364048c1db5e7870b7bd9556b9906 | ['7343adb3deec492f98d3c0d48c122763'] | I want to uninstall a program using WMI, but I get this error : "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))". Installing it worked without any problems, using the same ConnectionOptions.
Is there any possibility that the Administrator user has rigths to install software, but not to uninstall? If so, how can I edit them?
Main()
{
ConnectionOptions oConn = new ConnectionOptions();
oConn.Impersonation = ImpersonationLevel.Impersonate;
oConn.EnablePrivileges = true;
oConn.Username = "Administrator";
oConn.Password = "password";
System.Management.ManagementScope oMs =
new System.Management.ManagementScope("\\\\<IP_ADDRESS>\\root\\cimv2", oConn);
Uninstall(oMs, "\\\\<IP_ADDRESS>\\root\\cimv2:Win32_Product.IdentifyingNumber= \"{926C96FB-9D0A-4504-8000-C6D3A4A3118E}\",Name=\"Java DB <IP_ADDRESS>\",Version=\"<IP_ADDRESS>\"");
}
static void Uninstall(ManagementScope oMs, string path)
{
if (!oMs.IsConnected) oMs.Connect();
ManagementObject product = new ManagementObject(path);
if ((product != null) && (product.Path.ClassName ==
"Win32_Product"))
{
object result = product.InvokeMethod("Uninstall", null); //here is where I get the error
Console.WriteLine("The Uninstall method result is {0}",
result.ToString());
}
}
Thank You!
|
cfbf50130a182c7162abc9fc7cda1c18f92a26be435a147ad3ddd429e79ac5c0 | ['73458ba90e3f471a816744f330827534'] | From http://www.programiz.com/article/python-self-why
__init__() is not a constructor
[..]One important conclusion [..] is that, __init__() is not a constructor. Many naive Python programmers get confused with it since __init__() gets called when we create an object. A closer inspection will reveal that the first parameter in __init__() is the object itself (object already exists). The function __init__() is called immediately after the object is created and is used to initialize it.
Technically speaking, constructor is a method which creates the object itself. In Python, this method is __new__(). A common signature of this method is
__new__(cls, *args, **kwargs)
Regarding the answert given by <PERSON>, I would argue here, that most languages don't follow that defintion (completely).
Furthermore:
When __new__() is called, the class itself is passed as the first argument automatically. This is what the cls in above signature is for. Again, like self, cls is just a naming convention. Furthermore, *args and **kwargs are used to take arbitary number of arguments during method calls in Python.
Some important things to remember when implementing __new__() are:
__new__() is always called before __init__().
First argument is the class itself which is passed implicitly.
Always return a valid object from __new__(). Not mandatory, but thats the whole point.
Bottomline (for me): __new__() appears to be the constructor, not __init__() although -by all practical means __init__() does part of what most people think a constructor will do.
| 6465ec6ba25ed55be0baa49254c5124ce766a6f91f53e8d96cd201dc0ea3681f | ['73458ba90e3f471a816744f330827534'] | I have a .NET application running in a production environment, which connects to an Oracle database back end.
For availability reasons, I need a local database cache. The current caching solution using DataSet does not perform very well (data loading from back end, storage as XML, local queries on the cache, multithreading issues with DataSet).
What alternatives are there, which are
a) fast
b) reliable
c) do not add a further level of complication doing the inevitable cache synchronization?
I have thought about MS SQL Server Compact Edition as a local store, but have no experience with it.
As an alternative I thought about SQLite, but the fact that it needs COM Interop seem to complicate things. The pure .NET reimplementation of SQLite seems to be abandoned.
|
309b8360f4923c4f95eaf10bd9523677393237087ff04acb451bdf635227654b | ['734f63fae28b49fb8cae108a2dc0ae6f'] | Thank you! As the wiki in your answer says: *Installation of a bookmarklet is performed by creating a new bookmark, and pasting the code into the URL destination field*. So in particular for firefox I had to *show the bookmarks bar > MB on Bookmarks Toolbar > Create a new bookmark > Copy your Javascript code in the `Location` field of the bookmark > Open the `banana pancakes` search on Stack Exchange:https://stackexchange.com/search?q=banana%20pancakes&pagesize=100 > click on the newly created bookmark.* That indeed sorted the questions on `answered` or `asked` date. | b70eb7749f3c6f008bf9484b3eb868e145984eca24b1242279cb44888421fa11 | ['734f63fae28b49fb8cae108a2dc0ae6f'] | @Luuklag could you please explain how? Because the tab does not appear in my browser on firefox for the stackexchange site, and manually transforming: https://stackoverflow.com/search?tab=newest&q=banana+pancakes (which indeed shows the results sorted on date), to: https://stackexchange.com/search?tab=newest&q=banana+pancakes does not show the results sorted on date. |
721d2b4199c6d5a97c76ab88c04afb262d12a9280e736c4e3e0fc851312e3964 | ['7371ac85401349859e99efd21e8222f5'] | This should do the trick:
$(document).ready(function(){
var list = $('.gallery .ggallery .gitem');
var j = 0;
var f = function() {
$('.gallery .gimages').html($(list[j%list.length]).html());
j++;
};
setInterval(f, 2000);
});
See full fiddle: http://jsfiddle.net/kokoklems/nQGw9/
What I am doing is simply defining a function that change the content of you gimages div, and then call it every 2 sec thanks to the setInterval function. The trick to go back to beginning is the use of the list[j%list.length].
| 5fd734c694e09a1dab22421770c18729cbeebd971e5c27630c308bc3c236d34b | ['7371ac85401349859e99efd21e8222f5'] | There is simply not enough splace in the first block to apply the padding. The .tabs is 85px height, the image is 70px height with a margin of 5px top. So the remaining vertical space for your text is 10px only, and you add 7px of padding.
You need to reduce the size of the image in my opinion.
|
162df2388489b816bc2420105dbc1cdea20553748f622e790a9f53d50bb1150d | ['737516c3992146dabce820c47117b0c5'] | Finally after digging through internet and local help I have successfully enabled Continues Integration and Continues Deployment.
Step 1 : Install Windows Platform installer + Web Deploy on TFS as well as on Remote/destination Server.
http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-web-deploy
Step 2 : Create IIS Manager User Account
Step 3 : Configure Publish Profiles and Build Definition.
http://www.johandorper.nl/log/publish-multiple-webprojects-on-build
and use User created in Step 2
step 4 : Make sure appropriate version is present in TFS server at
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio
If absent then copy it from development machine to TFS
Step 5 : Allow an IIS Manager user to connect to a site or an application
Step 6 : Add "Authenticated Users" to root of the application.
Following are build arguments in build definition
/p:VisualStudioVersion=12.0 /p:DeployOnBuild=True /p:TransformConfigFiles=true /p:MSDeployPublishMethod=WMSVC /p:CreatePackageOnPublish=True /p:PublishProfile=ST.pubxml /p:AllowUntrustedCertificate=True /p:Username=my-deploy /p:Password=mypassword
You can also specify which configuration (debug/release/test) to use in build definition by creating environment specific web.config
| b1112d6550693925b5dc1f671bd92a806ebe16e2f204e1198aadfda68b97bb48 | ['737516c3992146dabce820c47117b0c5'] | I am trying to implement continues delivery using TFS 2010. Package is created but package is not deployed to Remote Server.
Following things I have done.
Created "Web Deploy" publish profile for all the websites residing in single solution
Installed WMSVC on IIS 7
Verified TFS has VS2010 installed
Following are my MSBuild Arguments :
/p:TransformConfigFiles=true /p:MSDeployPublishMethod=WMSVC /p:PublishProfile=ST.pubxml /p:DeployOnBuild=True /p:AllowUntrustedCertificate=True /p:Password=V******123 /p:VisualStudioVersion=10.0
I tried most of the combinations of build argument but no luck. Not really sure if TFS 2010 supports CD.
|
8190e1b850feb9dcc446284d3225f8e613f6437662bb71894d3fdcbadfe35593 | ['737e92efbe1040ccaa2b85d45431a9de'] | i know how alrdy.
here i attach the code & sample of the data i hv done.
hopefully this would help fresh grad like me who hv trouble in undrsntdng CRUD
<html>
<head>
<meta charset="UTF-8">
<title>Countries CRUD</title>
<style>
input[type='submit'], button, [aria-label]{
cursor: pointer;
}
#spoiler{
display: none;
}
</style>
</head>
<body>
<form action="javascript:void(0);" method="POST" onsubmit="app.Add()">
<input type="text" id="add-name" placeholder="New country ">
<input type="number" id="add-popu" placeholder="New population">
<input type="submit" value="Add">
</form>
<div id="spoiler" role="aria-hidden">
<form action="javascript:void(0);" method="POST" id="saveEdit">
<input type="text" id="edit-name">
<input type="text" id="edit-popu">
<input type="submit" value="Ok" /> <a onclick="CloseInput()" aria-label="Close">✖</a>
</form>
</div>
<p id="counter"></p>
<table>
<tr>
<th>Country</th>
<th>Population</th>
</tr>
<tbody id="countries"></tbody>
<tbody id="popultns"></tbody>
</table>
<script type="text/javascript" src="main.js"></script>
<script>
var app = new function()
{ this.el = document.getElementById('countries' && 'popultns');
//this.el = document.getElementById('popultns');
let loadTableData = data2;
this.Count = function(data)
{ var el = document.getElementById('counter');
var name = 'country2';
var pop = 'popu2'
if (data)
{ if (data > 1)
{ name = 'countries' ;
pop = "populations" ;
}
el.innerHTML = data + ' ' + name + ' ' + pop ;
}
else
{ el.innerHTML = 'No ' + name + ' ' + pop ; }
};
this.FetchAll = function()
{ var data = '';
if (loadTableData.length > 0)
{ for (i = 0; i < loadTableData.length; i++)
{ data += '<tr>';
data += '<td>' + loadTableData[i].country + '</td>';
data += '<td>' + loadTableData[i].population + '</td>';
data += '<td><button onclick="app.Edit(' + i + ')">Edit</button></td>';
data += '<td><button onclick="app.Delete(' + i + ')">Delete</button></td>';
data += '</tr>';
}
}
this.Count(loadTableData.length);
return this.el.innerHTML = data;
};
this.Add = function ()
{ el = document.getElementById('add-name');
el2 = document.getElementById('add-popu');
// Get the value
var country2 = el.value;
var popltn = el2.value;
if (country2 && popltn )
{ // Add the new value
//loadTableData.push(country2.trim() );
loadTableData.push({country: country2, population:popltn});
// Reset input value
el.value = '';
el2.value = '';
// Dislay the new list
this.FetchAll();
}
};
this.Edit = function (item)
{ var <PERSON> = document.getElementById('edit-name');
var <PERSON> = document.getElementById('edit-popu');
// Display value in the field
let index = item;
el3.value = loadTableData[index].country;
el4.value = loadTableData[index].population;
// Display fields
document.getElementById('spoiler').style.display = 'block';
self = this;
document.getElementById('saveEdit').onsubmit = function()
{
// Get value
var country2 = el3.value;
var popltn = el4.value;
//console.log({country2, pop});
if (country2 || pop)
//console.log(country2);
{ // Edit value (strt,del,replace)
console.log(country2,popltn);
console.log(index, 1,({country2,popltn}));
//update array
loadTableData[index].country = el3.value;
loadTableData[index].population = el4.value;
//self.loadTableData.splice(index, 1,({country2,popltn}));
//console.log(index, 1, pop.trim());
//self.loadTableData.splice(index, 1, pop.trim());
// Display the new list
self.FetchAll();
// Hide fields
CloseInput();
}
}
};
this.Delete = function (item)
{
// Delete the current row
loadTableData.splice(item, 1);
// Display the new list
this.FetchAll();
};
}
app.FetchAll();
function CloseInput()
{ document.getElementById('spoiler').style.display = 'none';}
</script>
</body>
</html>
| 95e3ab2074bf0ca2c8a94835b17a3af0f74f37e7941236533ecbbb7e90013fc7 | ['737e92efbe1040ccaa2b85d45431a9de'] | <body>
<form action="javascript:void(0);" method="POST" onsubmit="app.Add()">
<input type="text" id="add-name" placeholder="New country ">
<input type="number" id="add-popu" placeholder="New population">
<input type="submit" value="Add">
</form>
<div id="spoiler" role="aria-hidden">
<form action="javascript:void(0);" method="POST" id="saveEdit">
<input type="text" id="edit-name">
<input type="text" id="edit-popu">
<input type="submit" value="Ok" /> <a onclick="CloseInput()" aria-label="Close">✖</a>
</form>
</div>
<p id="counter"></p>
<table>
<tr>
<th>Country</th>
<th>Population</th>
</tr>
<tbody id="countries"></tbody>
<tbody id="popultns"></tbody>
</table>
<script type="text/javascript" src="main.js"></script>
<script>
var app = new function()
{ this.el = document.getElementById('countries');
this.el = document.getElementById('popultns');
let loadTableData = data2;
this.Count = function(data)
{ var el = document.getElementById('counter');
var name = 'country2';
var pop = 'popu2'
if (data)
{ if (data > 1)
{ name = 'countries' ;
pop = "popultns" ;
}
el.innerHTML = data + ' ' + name + ' ' + pop ;
}
else
{ el.innerHTML = 'No ' + name + ' ' + pop ; }
};
this.FetchAll = function()
{ var data = '';
if (loadTableData.length > 0)
{ for (i = 0; i < loadTableData.length; i++)
{ data += '<tr>';
data += '<td>' + loadTableData[i].country + '</td>';
data += '<td>' + loadTableData[i].population + '</td>';
data += '<td><button onclick="app.Edit(' + i + ')">Edit</button></td>';
data += '<td><button onclick="app.Delete(' + i + ')">Delete</button></td>';
data += '</tr>';
}
}
this.Count(loadTableData.length);
return this.el.innerHTML = data;
};
this.Add = function ()
{ el = document.getElementById('add-name');
el2 = document.getElementById('add-popu');
// Get the value
var country2 = el.value;
var pop = el2.value;
if (country2)
{ // Add the new value
loadTableData.push(country2.trim() );
// Reset input value
el.value = '';
//el2.value = '';
// Dislay the new list
this.FetchAll();
}
};
the image is the ui tht im working for the function
I'm supposed to auto-generate the table based on the data available from my main.js script which is in JSon format. There is no problem with the data loading since the data can be display in my html file. However, the problem comes whn my data is returned undefined on my auto generated table whn i click the 'add' button to update the data in the table. Whn i click in the edit button, the data is get correctly. only whn the display, it returns me undefined.
|
48eceb7f3d1e0a47f9c10e1362d0cc6a6a374dd5f1f98c4a00680fb8b01616fd | ['739815ebcdd64568a43507af3e8fea6c'] | What does "realm of Symbolic" in the following passage mean?
1: Apparently it seems to me that the writer simply wants to say the "realm of philosophy" or the "abstract matters". As, the two questions which the writer has placed under this realm are of abstract nature.
2: "Symbolic" is used is psychoanalysis as well. But, I am hopeful that it is irrelevant here.
Feminist philosophical scholarship begins with attention to women, to
their roles and locations. What are women doing? What social/political
locations are they part of or excluded from? How do their activities
compare to those of men? Are the activities or exclusions of some
groups of women different from those of other groups and why? What do
the various roles and locations of women allow or preclude? How have
their roles been valued or devalued? How do the complexities of a
woman’s situatedness, including her class, race, ability, and
sexuality impact her locations? To this we add attention to the
experiences and concerns of women. Have any of women’s experiences or
problems been ignored or undervalued? How might attention to these
transform our current methods or values? And from here we move to the
realm of the symbolic. How is the feminine instantiated and
constructed within the texts of philosophy? What role does the
feminine play in forming, either through its absence or its presence,
the central concepts of philosophy? And so on.
Source
| 22caa11415dadef10eac7e358e3d4b4e7c7d60e1be6615a42427e576d662b5b3 | ['739815ebcdd64568a43507af3e8fea6c'] | Additionally I could place my vote to mark these answers as any number of things which make their right to be here invalid. The asker has been scammed, a form of robbery, and would ultimately like a positive resolution. This much is simple. These answers discuss many different things, but all have one thing in common. 1) do not take any actions against the scammers interests 2) be fearful of negative consequences for disrupting the scammers actions and economic interests. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.