id stringlengths 3 6 | prompt stringlengths 100 55.1k | response_j stringlengths 30 18.4k |
|---|---|---|
133169 | I'm using [Restangular](https://github.com/mgonto/restangular) in my project and earlier this code worked well for retrieving array of objects:
```
var params = {name: "Stack", surname: "Overflow"}
var service = Restangular.all('users')
service.getList(params)
```
Response from server was just an array of objects: ... | I was able to solve it using this:
```
var params = {name: "Stack", surname: "Overflow"}
var service = Restangular.all('users')
service.customGET("", params) // first parameter is required, so just provide empty string
``` |
133282 | I am looking at this method in vb.net and I am quite knew to vb.net. I am trying to understand why integer "[to]" and "[step] "is defined in square brackets ? Can some one please explain this to me. Why can these be defined just To/Step. I have attached the code below. Thanks in advance.
```
''' <summary>
''' W... | Square brackets are used to create a variable that has the same name as a keyword.
For example
Dim [Integer] As Integer |
133394 | I am working on a simple program to just draw circles around some fixed points using the Python turtle package; however, I wanted to make it somewhat like a heat map where the colors get "cooler" as they get farther from the original point. My idea was to take the base white color, #FFFFFF, and subtract a percentage ba... | You want to use [HSV](http://en.wikipedia.org/wiki/HSL_and_HSV) instead of RGB for the colors; slide across the hue dimension for your distances. [`colorsys`](http://docs.python.org/library/colorsys.html) can help. |
133438 | Here's [an example](https://plnkr.co/edit/BBKvCsdmTUcLavoxmjqH?p=preview) that introduces both regular Materialize `select` and Angular Materialize component:
```
@Component({
selector: 'my-app',
styles: [`
.select-wrapper {
background-color: red;
}
`],
template: `
<div class="row">
<div class="co... | `ViewEncapsulation.Emulated` is used by default.
To emulated css encapsulation angular addes some attributes to all elements within template.
For example, the following template
```
<div class="col s6">
<select materialize="material_select">
<option>...</option>
</select>
</div>
```
becames
```
<div _ng... |
133598 | I have been trying to work with Programming Erlang , Version 2 ( Joe Armstrong's book). I am trying to solve the first problem in the Chap 13.
As a solution to the problem - I came up with this -
```
-module(errorhandle1).
-export([my_spawn/3,loop/1,test_func/0]).
my_spawn(Mod,Fun,Args) ->
%SpawnedPidRef = mysp... | ```
spawn(fun() -> loop(myspawn_helper(Mod,Fun,Args)) end).
```
is not an equivalent of
```
spawn(?MODULE , loop , [myspawn_helper(Mod,Fun,Args)]).
```
in the second case `[myspawn_helper(Mod,Fun,Args)]` is a parameter of function `spawn/3`. The value of a parameter is evaluated before a function call. It means th... |
133621 | Anybody knows how to convert this 2 dark / light theme "flatbutton" to one "raisedbutton" to switch the dark and light theme ?
Dark / light theme code :
```
child: FlatButton(
onPressed: () {
Magazin.of(context).setBrightness(Brightness.dark);
... | You cannot directly generate a lock file based on an import map yet. But you can pass the entry file of your program along with the import map to generate a lock file.
Here's an example.
`log.ts`:
```js
import { green } from "colors";
console.log(`Status: ${green("OK")}`);
```
`deps.json` (import map):
```json
{
... |
133972 | Below is the code which i use in my edit text to take value only within a certain range
```
EditText.setFilters(new InputFilter[]{ new InputFilterMinMax(Min, Max)});
```
this is my fuction:
```
public class InputFilterMinMax implements InputFilter {
private int min, max;
public InputFilterMinMax(int min... | You can do this with FrameLayout and for circle background you need to create a shape drawable file. Refer my answer here.
```
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/round_shape"
android:clickable="true"
... |
133987 | I am trying to add a column to my table that increments in steps of four which would look like this:
```
1
1
1
1
2
2
2
2
3
3
3
3
etc.
```
I have been reading about CREATE SEQUENCE, but that does not seem to be what I need.
Does anyone have any suggestions how best to ... | You could use `row_number()` and integer division:
```
select
t.*,
(3 + row_number() over(order by id)) / 4 rn
from mytable t
```
This assumes that you have an ordering column called `id`. I would not actually recommend storing this derived information. You can compute it on the fly, or put in a view. |
134452 | I am working on a gesture recognition project. There is a C program that captures the gestures from video input and write them to the file. Now, I have an image viewer written in Python - GTK. It switches to the next or previous window according to gestures. This continuous file read and application update is defined a... | Not sure if I understand you correctly, but I would expect what you want to do is to **schedule a call to `ai()` in your main GTK loop**, so that your program checks if there is input on a regular base.
If this is what you want you have two choices: scheduling the call periodically or schedule the call for when the pr... |
136218 | I have something like this
```
edgesList = {{1, 3}, {1, 5}, {2, 1}, {2, 6}, {5, 2}, {5, 6}, {6, 1}, {6, 4}}
```
And I need something like this as output.
```
{Subscript[x, 1 \[RightArrow] 3] + Subscript[x, 1 \[RightArrow] 5] -
Subscript[x, 2 \[RightArrow] 1] - Subscript[x, 6 \[RightArrow] 1],
Subscript[x, 2 \[... | ```
Clear[x]
equations = Array[0 &, 6];
edgesList = {{1, 3}, {1, 5}, {2, 1}, {2, 6}, {5, 2}, {5, 6}, {6,
1}, {6, 4}};
Fold[With[{i = First@#2, j = Last@#2}, ReplacePart[#1,
{i -> #1[[i]] + Subscript[x, i \[RightArrow] j],
j -> #1[[j]] -
Subscript[x, i \[RightArrow] j]}]] &, equations, edgesList]
... |
136295 | I am an engineering student who loves physics but didn't quite enjoy chemistry.
**a.** When I was in high school chemistry to me was something not as inspiring as physics but in which I couldn't solve problems well. Things looked no more than the arithmetics, but I got the answers wrong.
**b.** Reading university che... | Interesting question but keep in mind that it is normal to dislike a subject. You don't *have to* like chemistry. Many people loathe physics and mathematics. The world is not affected. I am sure your experience is limited to general chemistry and Oxtoby. In statistical terms, one cannot and should not trust a single sa... |
136308 | I am trying to prove that the one-point compactification of the interval $(0,1)$ with the Euclidean Topology is $S\_{1} = \{(x,y)\in \mathbb{R}^{2}|x^{2}+y^{2}=1\}$ and I am having some trouble getting there.
The process I am going by has two steps:
1. Show that $(0,1)$ is homeomorphic to $S\_{1} - \{ (1,0)\}$
2. S... | Suppose instead we remove $(0,1)$ from $S^1$ and consider the sterographic projection $f:S^1-{(0,1)}\to\mathbb{R}$ given by $f(x,y)=\frac{x}{1-y}$ which is a homeomorphism (you should check this, but it is very standard).
Can you show that $(0,1)$ and $\mathbb{R}$ are homeomorphic? |
136452 | I am using a `UIImagePicker` to present the users with camera to take photos which will be used in the app.
My problem is that on the first time a user opens the image picker they are presented with a prompt saying: '"my App" Would like to Access your Camera' with two options, Don't allow and OK.
My requirement is th... | **To detect access to your library:**
You need to use AssetsLibrary for that. First, import assets library framework:
```
import AssetsLibrary
```
Then, request authorization status, and if it is not determined, use blocks to catch those events, like this:
```
if ALAssetsLibrary.authorizationStatus() == ALAuthoriz... |
136589 | It is mentioned in the following article
<https://cacm.acm.org/news/210107-in-memoriam-rudolf-kalman-19302016/fulltext>
that (with attribution which I suspect is wrong)
>
> He also worked with Yu-Chi Ho on the minimal realization problem, resulting in what came to be known as the Ho-Kálmán algorithm.
>
>
>
I kn... | Yes, B.L. Ho is Bin-Lun Ho, my father. I only recently found out his association with Rudolf Kahman as I was looking over copies of his doctoral dissertation. He went on after his time at Stanford to work in the hard disk drive industry. |
136610 | Lets say we have the following List/IEnumerable
```
Program : CPE, ECE
```
Old list:
```
Name Assigned_Area Program
Ivan Matala Mathematics CPE
Ivan Matala Mathematics ECE
Jeremy Cruz Science ECE
Ivan Matala Science CPE
NJ Aquino Engineering CPE
M... | ```
oldList.GroupBy(x => new { x.Name, x.AssignedArea })
.Select(g => g.Count() == 1
? new Entity(g.Key.Name, g.Key.AssignedArea, g.Single().Program)
: new Entity(g.Key.Name, g.Key.AssignedArea, "All programs")
);
```
Here `Entity` is your class with `Name`, `AssignedArea`, and `Pr... |
136770 | Today, we were asked to write a Python file which asks the user to input a positive integer and prints the list:
```
[[1], [1, 2], [1, 2, 3],..., [1, 2, 3,..., n]]
```
Here's my code:
```
A=[]
n=int(input("Input a positive integer:"))
if n>0: A=[[1]]
B=[1]
for i in range(2,n+1):
B+=[i]
A+=[B]
print(A)
```
T... | This is because what you insert to A is a **reference** to B, you are not creating n separate lists.
This means that when you are modifying B you modify all it's references, i.e. all the entries in the list A (except for the first that is a separate list).
The following code works:
```
n=int(input("Input a positive i... |
136782 | I need to insert into an access database. But skip the row if column dup is already in the table.
What I have so far is this:
```
<cfoutput query="hours">
<cfquery name="Employee" datasource="test">
INSERT INTO Tbl_Hours_Comments
(ID, ship_num, dup)
values(#hours.id#, #hours.ship#, #hours.dup#)
</cfquery>
</cfo... | If you are using the Microsoft Access ODBC driver to update the database then you can use `INSERT ... SELECT ... WHERE NOT EXISTS`. The following example is in Python, but it looks like you should be able to do something similar in ColdFusion.
```python
import pyodbc
cnxn = pyodbc.connect("DSN=db1") # Microsoft Acces... |
137100 | Im trying to retrieve the RSS feed from new.google.com, Im using working with the top stories feed right now: <http://news.google.com/news?ned=us&topic=h&output=rss>
I can retrieve and process it right, using: <http://pastebin.com/YDNPXyVK>
Here is my log of what im getting: <http://pastebin.com/a5HRsatX>, it seems w... | You might want to use the ROME library. Here's an example:
```
package com.infosys.hanumant.rome;
import java.net.URL;
import java.util.Iterator;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.X... |
137833 | I have program with asp.net c# but now i need to create an application in windows forms, I have tried to see some tutorials but they all show only one form. How is this concept done in windows forms?
In asp.net you create a page and fill it with controls like text boxes, drop downs etc.. and maybe a button with "Go Ne... | **Follow this link for solution:** [Android Lint contentDescription warning](https://stackoverflow.com/questions/8500544/android-lint-contentdescription-warning)
>
> Resolved this warning by setting attribute android:contentDescription
> for my ImageView
>
>
> android:contentDescription="@string/desc"
>
>
> Andro... |
137960 | I´m trying to create my own leaderboards sytem for my games so I´m working with PHP and requesting info with Ajax into the games, but as I´m not good at all with PHP I´m pretty confused about how to create a JSON object with all the info I need to handle in the javascript part.
What I want to do, in the PHP part is to... | Solution in short, as kindly offered by Brandon Parmenter, goes as follows:
`:bmark http://example.com/search#q=%s -keyword=example`
---
Start of the longer/older answer
Though the solution inspired by the following link does not change the entries for search engine, it does offer a fully functional **keyword** fe... |
138161 | I am trying to log in on a Drupal site, but the site doesn't have the login block enabled.
How can I find the URL for the login form? | Drupal default login URL format,
**example.com/user** |
138284 | I have an AWS S3 bucket called test33333 I need to lock down to minimum necessary permissions. I've created a bucket policy to Deny all except user account **MyUser** a role **MyRole**. (account name xxx out)
```
{
"Version": "2012-10-17",
"Id": "Policy1571158084375",
"Statement": [
{
... | TCP includes congestion control. It will limit traffic to prevent packet loss. UDP just sends all of the packets you request and hopes for the best.
<https://www.geeksforgeeks.org/tcp-congestion-control/> |
138649 | My issue is I have a website that is linking to multiple tables in Oracle. I currently have PHP code that checks user input assigned to a variable to find data in a table, then the oci\_fetch\_row statement that grabs the row where the data matches. This works fine but I cannot find how to output more than one row from... | Put the oci\_fetch\_row statement into a while loop. [OCI Fetch Array](http://www.php.net/manual/en/function.oci-fetch-array.php) for a code sample
```
print"<h2 id='title'>This Users Feedback</h2>";
print"<table border='2'>";
while ($row=oci_fetch_row($stmt3))
{
print"<tr><td><p>Feedback ID:</td><td>$row[0]</td... |
138696 | as I checked the Python doc at [python logging](http://docs.python.org/2/library/logging.handlers.html#logging.handlers.TimedRotatingFileHandler) and with some experiment, I don't quite under stand,
>
> When computing the next rollover time for the first time (when the handler is created), the last modification time ... | Looking at the code for `TimedRotatingFileHandler`, you can't force it to rotate at a specific minute value: as per the documentation, the next rollover will occur at either `logfile last modification time + interval` if the logfile already exists, or `current time + interval` if it doesn't.
But since you seem to know... |
138863 | I'm new to programming and have been taking online courses in swift and spritekit trying to create my first working game from scratch.
Currently I'm having an issue trying to create a sequence of functions that run independently, wait so that only one is running at a time, and loops indefinitely.
The first function:
... | I guess the most correct way to do that would be to refactor code a little bit:
```
func shootTwentyArrows() -> SKAction {
let oneArrow = SKAction.runBlock{
self.shootArrow()
}
let waitBetweenArrows = SKAction.waitForDuration(arrowSpeed)
let fireAnArrow = SKAction.sequence([oneArrow, waitBetweenArrows])
return... |
138933 | Looking for some guidance on a wcf 4 rest service which is based on the WCF REST Template 40(CS) extension in VS2010. I've spent the last couple of days trying to get this bugger to work, reviewing other posts, and while I've gotten close, I can't seem to cross the finish line. After much frustration, it is finally hit... | Stumbled across this link [WCF + REST: Where is the request data?](https://stackoverflow.com/questions/1850293/wcf-rest-where-is-the-request-data) and seen Glenn's response to pass a stream to the method and then rip that apart with a streamreader into a string to get the form post data.
Modified the prototype servic... |
139050 | I've currently got two computers. One computer is at home another one is where I work.
On my breaks I like to work on my own projects at work, however my machine at work is Linux.
My machine at home is Windows.
I'd like to know if it is possible to simultaneously work on an Android Java project
on both Windows and Lin... | The easiest way to ensure that you only have polygons is to ensure that you only take the convex hull of groups where the groupid count is greater than 2.
```
SELECT groupid, ST_ConvexHull(ST_Collect(geom))) As hull_geom into hulledpoints
FROM somepoints
GROUP BY groupid
HAVING count(groupid)>2;
```
This is because ... |
139244 | So Im working with a user interface where the user should be able to edit and delete it's data in the database. But when im trying to post the form, it doesnt save the changes. Here's some code:
Model:
```
namespace Aviato.Models
{
using System;
using System.ComponentModel.DataAnnotations;
using System.Co... | Ok, so I can kind of understand why its happening. In your edit page you have these lines
```
@Html.HiddenFor(model => model.Project)
@Html.HiddenFor(model => model.User)
```
But this is not enough for it to be able to round trip all the data associated with these sub-objects. If you view source on the HTML ... |
139387 | I am running into an issue trying to host two services on the same site. They have the same base uri, but different services names, and each has its own contract.
While testing in my VS environment (IIS 7.5) everything works fine. However when I deploy to a server (IIS 8.5), both uri's are showing the same wsdl for s... | You should, if possible, remove the spaces server-side. I hope you understand **no** javascript will run in the emails you send.
```
// This prevents multiple `window.onload` conflict
window.addEventListener("load", clearLinks);
// This allows you to call the function even later if needed
function clearLinks() {
// ... |
139701 | what does misning btime mean?
```
# ps aux | grep ssh
missing btime in /proc/stat
```
I'm on an embedded system (ts-7600)running a Debian version via UART.
```
#uname -a
Linux ts7600-4aa86d 2.6.35.3-571-gcca29a0+ #2 PREEMPT Thu Jan 22 12:21:50 PST 2015 armv5tejl GNU/Linux
```
I figured I should look at btime, and... | You might be the victim of a repository mirroring error. Or a Web filter (if your site has one) might be blocking the system's access to the Debian repository. `deb.debian.org` is a GeoIP redirector, that attempts to connect you to the Debian repository that is closest to you. The Web filter might not have full knowled... |
140157 | Let's say I want to delete 10% of rows, is there a query to do this?
Something like:
```
DELETE FROM tbl WHERE conditions LIMIT (SELECT COUNT(*) FROM tbl WHERE conditions) * 0.1
``` | I would simply return the total amount of filtered rows, calculate through php and use that value as a limit in my DELETE query.
```
$query = mysql_query("SELECT COUNT(*) FROM tbl WHERE conditions");
$int = reset(mysql_fetch_array($query));
$int = round($int * 0.1);
mysql_query("DELETE FROM tbl WHERE conditions LIMIT... |
140252 | I installed Ububtu 12.04LTS as dual boot along with my Windows 7. I need to remove Grub and restore Windows MBR but without uninstalling Ubuntu | To install a Windows bootloader, boot Windows and create a Repair CD. Boot from the repair CD (or from your original Windows DVD) to a repair prompt and run:
```
bootrec /fixmbr
```
(If you use Windows XP then the command is: `fixmbr`)
If you can't boot Windows and can't create a repair CD, you can install somethin... |
140282 | I have come across the "R cannot be resolved" error countless times but there has always been an easy fix. Sorry to trouble you but I'm stumped this time...
I recently decided to dual boot my computer into Windows 7/Ubuntu (previously Windows 7 only) and load Eclipse for my Android app development, however I came acro... | I had the same issue. Fresh install of ADT Bundle, creating a new project using wizard, was giving me "R cannot be resolved to a variable" error. I tried everything explained in previous post.
In my particular case, it was that I had another copy of Android SDK tools and ADT Bundle was pointing to that one, instead of... |
140331 | I want to use the windows detours library to detour a non win api function. The function is part of the Qt library (QtGui4.dll). I am wondering how I would set up the function signature for :
```
void QPainter::drawText ( const QPointF & position, const QString & text )
```
I had a go with this and it received my us... | The simplest solution is to use an external wrapper that reads a line with edition capabilities, then sends it to your program. A good wrapper is [rlwrap](http://utopia.knoware.nl/~hlub/rlwrap/).
Using a separate tool is in keeping with the unix philosophy of using separate tools for separate purposes (line edition an... |
140611 | I am somewhat familiar with html but am not with java script I am wondering if there is a way to have a form with say for example a name field and based on the name that is input to the field use java script to redirect to an html page for that person.
```
<!DOCTYPE html>
<html lang="en">
<head>
<t... | I think that the main idea comes from that usual "B is A" class inheritance definition. You can rephrase it for member functions like "functions of A are functions of B", however statement with flipped A and B position is correct only for some items, that is "only some functions of B are functions of A". So `B::fn` fit... |
140768 | I have been working on an application that caches an image from the web and shows it even when the user is offline. This worked pretty well until Android 4.4 came out. Now, all I see is a "Can not load the webpage" error. I suppose it might have to do something with the fact that Kitkat uses Chromium for loading webvie... | Got it solved myself. I figured out that Chromium is not caching images with size greater than 1 MB. In other cases, it works perfectly fine. Reported this to Google, for now. |
141039 | I am trying to set Environment Variables for a Nginx And Gunicorn Served Django Project on Ubuntu.
The variables are set for the Ubuntu user and i am able to see the value using `printenv VAR_EMAIL`.
But when i use them django settings it is not working , using them as `os.environ['VAR_EMAIL']`,This doesn't get the va... | What are you using to supervise and run the gunicorn process in Ubuntu? If you're not using any, I recommend you to use `systemd`, there's a small guide on how to setup in the gunicorn docs: <https://docs.gunicorn.org/en/stable/deploy.html#systemd>
After that, you can set the environment variables in the systemd confi... |
141227 | I'm using this code but the value said "undefined" can anyone point me the problem?
this is my java class codes
```
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(com.frux.web.R.layout.activity_main);
String value = "Isiah";
WebView web = (WebView)... | Wrap your passed value in double quotes:
```
web.loadUrl("javascript:setValue(\""+value+"\")");
```
I got this! When you call `loadUrl` for the second time the page has not loaded yet. The solution would be attaching your `setValue` call to `window.onload` event:
```
super.loadUrl("javascript:window.onload = functi... |
141363 | I am making a JavaFX based game that shoots drones using a spaceship to defend your base. I want to wrap a shape around an image to create a hitbox for it.
This will allow the laser to cause damage to the drone whenever it touches the hitbox. It will make the game look better than the laser hitting an invisible wall ... | Set the shape's dimensions based on image, and place both in a `StackPane`:
```
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectan... |
141809 | Currently I am creating a forest scene in the dark, and the trees are shining far away, but when I get close they are fine. I have the shaders set to "Nature/Tree Soft Occlusion [bark/leaves]", but they are still rendering strange far away, but close they are fine.
,
body: Form(
key: formKey,
child: Container(
child: Column(
children: ... | To offset longer sentences and to make sure overlap at word level you should rather use `token_set_ratio`. Also if you want full word overlap then increase the `MIN_MATCH_SCORE` to close to 100.
```
from fuzzywuzzy import fuzz
MIN_MATCH_SCORE = 90
heard_word = 'i5-1135G7'
possible_words = ['11th Generation Intel® Co... |
142519 | In [How can I repair a split in a board?](https://woodworking.stackexchange.com/questions/889/how-can-i-repair-a-split-in-a-board), the accepted response suggests a "dutchman patch," but I'm getting mixed messages from various sources. Some show a dutchman as being the removal of damaged material and insertion of a pat... | >
> So which is it? Is there a difference between a dutchman patch and a butterfly patch?
>
>
>
Yes and no. A Dutchman can be the shape of a butterfly (also called a bowtie) as well as many other shapes.
But a butterfly *in modern usage* typically means a wooden fixing to secure or stabilise a crack.
This is y... |
143028 | I'm trying to checkout a submodule from another project in azure devops.
```
steps:
- checkout: self
submodules: true
persistCredentials: true
clean: true
```
Checking out another repository in the same project works.
**GOAL**
Add as submodule REPOSITORY A in REPOSITORY B.
[;
LdapSearcher.PropertiesToLoad.Add("displayName");
LdapSearcher.PropertiesToLoad.Add("cn");
LdapSearcher.PropertiesToLoad.Add("department");
LdapSearcher.PropertiesToLoad... | I've always found [Howto: (Almost) Everything In Active Directory via C#](http://www.codeproject.com/KB/system/everythingInAD.aspx) helps for most AD questions. |
143559 | In my code here, I consume WCF rest using dataGridView, and by the code below, I want to filter conditions to show only events in last 5 days, so I need to add filter in the link, but I don't know how.
My problem :
\* how add filter to show event last 5 days.
My code:
```
public void button1_Click(object sender, Ev... | If you can see the inside of the array you can use linq to filter
I think your best bat would be to create a class and bind it to class
but you can try this
```
JObject eventob= JObject.Parse(s);
var events =
(from p in (JArray)eventob["ParentObjectYouHave"]
orderby (DateTime?)p.["Start_Date"] desce... |
143813 | So i am building a personal website and am using Materialize for web designing. At first it was good and my pages look good, but then I added some new pages and i found that the css is not applied in these new pages, can anybody help me in solving this.
Actually both are same pages(categories.html) but the path are di... | Facebook Audience Network SDK in the app-level `build.gradle` file.
```js
repositories {
google()
mavenCentral()
}
...
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.gms:play-services-ad... |
144074 | Whenever I boot, it show Plymouth then goes to a screen full of boot log, I -think- the only relevant part is `Starting Wait for Plymouth Boot Screen to Quit...es.ileged Tasks.s..p link was shut down...` (If someone know where this file is logged, I can upload it, I copied this by hand. Everything else is over SSH) It ... | For me the analisis of: "cat /var/log/lightdm/x-0-greeter.log" showed that I had to create the lightdm directory. It was missing. After running the following commands I fixed my machine.
```
mkdir -p /var/lib/lightdm
chown -R lightdm:lightdm /var/lib/lightdm
chmod 0750 /var/lib/lightdm
``` |
144338 | I am using Maven 3, FlyWay and Oracle in a java application. I am trying to call an Oracle procedure from my sql script.
The file is called `V1.0.0__test.sql`, and contents are:
```
execute pkg_test.pr_do_task('TEST_VALUE');
```
Is the correct format? I only get a generic error when I run
```
mvn -P DEV clean com... | ```
Try this,
begin
pkg_test.pr_do_task('TEST_VALUE');
end;
/
``` |
144455 | I have a table like this:
```
--------------------------------------------
| Job | Class | Employee | PayType | Hours |
| 212 A John 1 20 |
| 212 A John 2 10 |
| 911 C Rebekah 1 15 |
| 911 C Rebekah 2 10 |
-------------------... | You can conditional aggregation:
```
select
job,
class,
employee
sum(case when paytype = 1 then hours else 0 end) ot,
sum(case when paytype = 2 then hours else 0 end) st
from mytable
group by
jobs,
class,
employee
``` |
144603 | I want to use a TikZ element to place absolutely on the page. Unfortunately, no matter what I do, the TikZ picture is treated like a character, which causes it to be treated like a paragraph when not placed in another paragraph.
I am aware of the following question, but their solutions do not work here (unless I misse... | It also works completely without `hyperref`. You first have to declare a `\newcounter` in the preamble. Then, instead of setting the PDF page labels at the first numbering change, you set the counter.
You then set the PDF page labels at the second numbering change, using the counter's value for the start of the second... |
144700 | I manage a server with Plesk 12.5 since a couple of years.
Everything (emails, websites, etc.) works perfectly with our main domain (let's call it **myfirstdomain.com**).
Since a couple of weeks, I added a new domain (let's cal it **myseconddomain.fr**) and everything seems to work too (emails and websites), except t... | If you can send mail from the domain, but not receive it, it's not related to SPF. SPF authenticates when you send mail, not receive it.
Have you ensured that an MX record is set up for the secondary domain?
You can test this using the terminal on Linux or macOS with `host -t MX myseconddomain.fr`
If you are on Window... |
145613 | This is my iptables script which i run in bash. The saving of the configurations is part of the script.
```
#!/bin/bash
#
# iptables-konfigurasjon
#
# Set default rule to ACCEPT to avoid being locked out
iptables -P INPUT ACCEPT
# Flush all excisting rules
iptables -F
# New default rules
iptables -P INPUT DROP
i... | // For what its worth, this works on CentOS 6.5 php 5.3.3.
```
$fname = "/dev/null";
if(file_exists($fname)) print "*** /dev/null exists ***\n";
if (is_readable($fname)) print "*** /dev/null readable ***\n";
if (is_writable($fname)) print "*** /dev/null writable ***\n";
if (($fileDesc = fopen($fname, "r"))==TRU... |
146106 | I'm using wkhtmltopdf to download a webpage as pdf.
But the css property letter-spacing seems doesn't work
```
font-size:20px; letter-spacing:0px;
```
[](https://i.stack.imgur.com/ctswV.png)
```
font-size:20px; letter-spacing:1px;
```
[
I am getting error as
>
> The type org.hamcrest.Matcher cannot be resolved. It is indirectly referenced from required .class files
>
>
>
for Rest Assured Api Testing . | Download the jar from below link and place it in project build path
<https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all/1.3>
This worked for me. |
146401 | I want to represent model data as different images using Angular but having some trouble finding the "right" way to do it. The Angular [API docs on expressions](http://docs.angularjs.org/guide/expression) say that conditional expressions are not allowed...
Simplifying a lot, the model data is fetched via AJAX and show... | Instead of `src` you need `ng-src`.
AngularJS views support binary operators
```
condition && true || false
```
So your `img` tag would look like this
```
<img ng-src="{{interface == 'UP' && 'green-checkmark.png' || 'big-black-X.png'}}"/>
```
**Note** : the quotes (ie 'green-checkmark.png') are important here. ... |
146707 | In using the new `Html.EnumDropDownListFor` extension method in MVC 5.1, I'm running into a problem where the selected value isn't updating in the drop down based on the route attribute I'm passing to my controller action.
**View**
```
@model MemberReconWebDemo.Models.EnvironmentsModel
@{
ViewBag.Title = "Environ... | I too encountered this problem today. Renaming the routes parameter to a name different from the models property worked for me.
**Controller Action**
```
[Route("environments/{envparm?}")]
public ActionResult Environments(string envparam)
{
Domain.Environment env;
Enum.TryParse(envparam, true, out env);
... |
146751 | I have an array of Id' and i need to get the details for each of them.
i currently have this.
```
const redis = require('redis');
const redisClient = redis.createClient(process.env.REDIS_PORT, process.env.REDIS_HOST);
const arrayList = [
{ id: 3444 },
{ id: 3555 },
{ id: 543666 },
{ id: 12333 },
];
async f... | Take a look at `NuGet.Build.Tasks.Pack`
You can use a .nuspec file to pack your project if you reference at `NuGet.Build.Tasks.Pack`. I've done this to roll up multiple projects in my solution into one nuget package.
You can pack with `dotnet.exe`:
`dotnet pack <path to .csproj file> /p:NuspecFile=<path to nuspec fi... |
147426 | I'm trying to write a script that highlights everything on a webpage that matches the input to a search box whilst ignoring case in the search for matches.
My html page looks like -
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, s... | Try [replace callback function](https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter) to capture matches and replace with it so `e` become `ee` and `t` keep original case or `T`
```
var html = $(this).data('old-state').replace(search_regexp,
... |
147850 | I trie to get the documents stored with a message in the message\_document table with a doctrine request but the request loops and ends up filling my memory
I tried the same request with sql on Dbeaver and it runs with no problem
great thanks for your help
My message.php
`enter code here`<?php
```
namespace App\Ent... | I have changed my code and now error message is about circular reference
Message entity
<?php
```
namespace App\Entity;
use DateTime;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\MessageRepository;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity... |
147952 | Some days ago i tried to install git on my Debian system.
The instalation aborted and since this moment i get a locales error everytime i try do install/remove something via apt -.-
```
apt-get remove git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following pack... | the locale warning doesn't have anything to do with the git problem. following the instructions, you would want to try `apt-get install --reinstall git` or `aptitude reinstall git`, then try removing it again. If you have the git package in /var/cache/apt/archives, you could also try reinstalling with somehting like `d... |
148857 | I heard that two objects are homeomorphic if one could be deformed into the other by continuous transformation. [For example in this link](http://www-history.mcs.st-and.ac.uk/%7Ejohn/MT4521/Lectures/L21.html), it is shown
>
> a sphere and a torus are not homeomorphic
>
>
> "Proof"
> Removing a circle from a sphere ... | Because when you merge many points into a single one, you do not have a bijection; a homeomorphism is a continuous map with a continuous inverse, and a non-bijective map cannot have a (two-sided) inverse.
Besides, if this operation was a homeomorphism, then its inverse --tearing a circle to turn it into a torus would ... |
148972 | I've been trying to get a simple cloud function to delete an entity in Datastore and for some reason it doesn't work, despite not throwing an error.
My code is fairly simple:
```
const keyToDelete = datastore.key({
namespace: 'alerts',
path: ['alerts', entId]
});
datastore.delete(keyToDelete, (err, apiResp) =... | Got this to work by setting an ID for the entity that was a string and not a number, and which therefore turned it into a name and not an ID. I only did this because I noticed the key was only setting a name, and couldn't figure out a way to change this to ID for some reason. Seems a bit odd as everything else works us... |
149743 | Wikipedia on “Puranas” have shown classification of the Mahapuranas on the basis of the three gunas of Sat, Rajo and Tamo with the caveat “Scholars consider the Sattva-Rajas-Tamas classification as "entirely fanciful" and there is nothing in each text that actually justifies this classification.”
Sattva ("truth") : V... | Since you mentioned other scriptural references, I am quoting what Garuda Purana says on the classification of Puranas according to Gunas.
Garuda Purana classify Puranas according to Gunas in completely different manner.
>
> **Garuda Purana, Brahma Khanda, Chapter 1:**
>
>
> The Puranas devoted to Vishnu are calle... |
149903 | I'm trying to write some code that makes a call to an API, which will then return some URLs, from each of which I'll then need to make a new call. To avoid nesting loads of callbacks everywhere I've tried using async/await, but it doesn't seem to be working for some reason despite the extremely simple setup I've tried.... | In the `apiCall` function you are using `callback` instead of `Promise`, You need to promisify that function so that `const archiveResponse = await apiCall(archiveUrl)` actually works:
```
function apiCall(url) {
return new Promise((res, rej) => {
request(url, { json: true }, (err, res, body) => {
if (err... |
150014 | I need to evaluate some strings (items titles) in order to decide if the item matches or not with some rules.
Regarding the rules, think about something like this.
```
((ball | balls) & messi) -ronaldo
```
The meaning is, if the title contains either `ball` or `balls` and `messi` (but `not ronaldo`) means that matc... | In short, **yes**.
PHP isn't (at the moment) that explicit about declaring data types when creating variables - unlike other languages, although I'm sure PHP are changing their ways.
Although you can do this, it's advised (good practice) to declare the data type of the variable before assigning value(s) to it. |
150095 | I have a web service that returns an object of a custom class (user):
**Web service code**
```
public class User
{
public string login { get; set; }
public string firstName { get; set; }
public string lastName { get; set; }
public string email { get; set; }
}
[WebMethod]
public User GetUserInfo(int ... | Your method `GetUserInfo()` returns a single user, not a colection. So you can't use LINQ on the result.
In your second section you don't need LINQ:
```
RolloutWriter.RolloutWriter rw = new RolloutWriter.RolloutWriter();
rw.Credentials = new NetworkCredential("myuser", "mypassword", "mydomain");
User u = rw.GetUserI... |
150112 | So I'm trying to make a program that takes some random number of entered seconds and converts it to Days, Hours, Minutes, and Seconds. I had to use symbolic constants to define the hours in a day, minutes in an hour, and seconds in a minute. I passed the value through but it's not being recieved so I end up with some h... | This is a problem:
```
Seconds::Seconds(int totalSeconds)
{
totalSeconds = totalSeconds;
}
```
The function parameter `totalSeconds` shadows the class member, so this code is like doing `x = x;`, it has no effect on `this->totalSeconds`.
To fix this either use different variable name, or preferably use construc... |
151238 | I am trying to set up smooth scroll using jquery on my webpage.
I am working from this example here:<https://css-tricks.com/snippets/jquery/smooth-scrolling/>
When I copy and paste this into a js fiddle, it works fine. But for some reason it is not working on my website at all. As you can see I've linked my scripts.... | Your little note in italics is actually quite relevant:
>
> *(This is simplified, since the SQL statement would become too long to be accepted by MySQL. You need to split it up in sections of about 5000 values and execute them. But this is not important for the problem I'm talking about here.)*
>
>
>
I think your... |
151355 | By default, httpd contains the following configuration:
```
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
...
</IfModule>
```
This file contains a mapping from filename extensions... | I can think of three ways to achieve this.
1. Within a directory, virtualhost or .htaccess context, you can use
`RemoveType .com`
to remove the mapping. I'm not certain whether it will work within a proxy context as that's not an actual directory. But if it doesn't, you could go the opposite route of removing .com ... |
151489 | I have to do a calculation, here is a simplification of what I am trying to achieve:
```
$box['dim1'] = 1;
$box['dim2'] = 1;
$box['dim3'] = 1;
$volume = (($box["dim1"]/100) * ($box["dim2"]/100) * ($box["dim3"]/100));
echo $volume;
```
In this case I see:
```
1.0E-6
```
Rather than 0.000001 as I would expect.
T... | Scientific notation is PHP's default for printing extremely large, or extremely small, numbers as strings.
Use [`printf()`](http://php.net/manual/en/function.printf.php) to print your float in decimal format:
```
printf('%f', $volume);
``` |
151655 | I am trying to import a [vegetation data raster](http://www.fs.usda.gov/rds/archive/Product/RDS-2014-0002/) in Esri GRID format from the USDA into QGIS. One file ("w0001.adf") can be added using "add raster", but the attribute table and other info register as error or errors. Using the "ArcInfo/Binary directory" does n... | The .adf file is one component of an Esri GRID 'file', much like the .shp is one component of a shapefile. The other component files generally aren't or don't need to be accessed individually. If you can load that w0001.adf file and see the raster image, I suspect you're seeing all the data. I opened/added the file in ... |
151746 | I have a few managed bean (ViewScoped) that are currently initialized with data in the session. I would like to initialize them with a URL GET parameter so I can provide URLs with the entity ID I want to display in my view. Something like `displayClient.xhtml?entityId=123`.
Right now I am thinking of something like t... | I'd think something along these lines are best practice:
displayclient.xhtml:
```
<f:metadata>
<f:viewParam name=“entityId”
value="#{bean.clientM}”
required="true"
converter=“clientModelConverter”
converterMessage="Bad request. Unknown ClientM... |
152106 | How do you filter a list of items with RxJava ?
I have the following code and `loadData()` emits a `List<Chatroom>` :
```
repository.loadData()
.subscribe(chatrooms -> {
view.showData(chatrooms);
view.showEmptyState(chatrooms.size() == 0);
}, throwable -> Log.i("OnError", "onLo... | ```
loadData()
// Opther operations if any
.filter((chatroom -> { return !chatroom.getBlocked().equals(IS_BLOCKED);})
.toList()
.subscribe(getObserver()); // implement your getObserver() method for observer.
```
This should help. |
152272 | I am selecting records from my table that have been posted within the past day. This is for an internal site, where there are no posts on Saturdays or Sundays.
```
SELECT *
FROM table
WHERE date >= DATE_SUB(CURDATE(), INTERVAL 1 DAY)
```
This works fine if today is a weekday or Saturday (where the previous day is... | Have a look at the [`WEEKDAY`](http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_weekday) operator. It returns the index of the day in the week.
0 = Monday and 6 = Sunday
```
SELECT *
FROM table
WHERE date = CASE WEEKDAY(CURDATE()) -- Switch on day index
WHEN 6 THEN DAT... |
152293 | According to the [Wikipedia article on the proposed Istanbul Canal](https://en.wikipedia.org/wiki/Istanbul_Canal), it is said that the Bosporus has nearly 3 times the amount of ship traffic as the Suez Canal. Presumably this ship traffic comes primarily from Russia and Ukraine. Why does Russia choose to be so dependent... | Because the Baltic Sea ices over every winter. In theory, you could continue year-round operations with icebreakers and cargo ships with a [sufficient ice class](https://en.wikipedia.org/wiki/Ice_class) but that's expensive and there are only so many ice rated cargo ships out there. Alternatively, you could use the St.... |
152388 | I have a dataset 'df' that looks something like this:
```
MEMBER seen_1 seen_2 seen_3 seen_4 seen_5
A 1 1 0 1 0
B 1 1 1 0 1
C 1 1 1 1 0
D 0 0 0 1 0
```
As you can s... | With streams, it is much more difficult because you are now dealing with the `Stream` and `Optional` and you also want to handle the case where the Optionals are empty which also means handling empty streams...it's just a mess so I'd recommend not to do it.
This is one way with `Optionals`. I initially thought it coul... |
152545 | PDF allows you to set permissions such as a document can be printed just once or just 10 times etc. I believe Adobe Acrobat Professional allows you to set those.
My question is it possible to do so in Python programmatically? If so how? | There doesn't seem to be a way to restrict the number of times a PDF file can be printed (outside Adobe LiveCycle or some other very controlled hosted solution). Although there is lots of discussion about this e.g. <https://superuser.com/questions/37216/restrict-print-copies-on-a-pdf>
If you have other info please ind... |
152649 | I am trying to setup Nhibernate with an oracle database so far i have the following:
**App.config (ive commented out the username and password for protection)**:
```
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.Configur... | Finally, as this UITextView as "read-only", I used an UIWebView, doing like this :
```
NSString *contentView = [[NSString alloc] init];
contentView = [NSString stringWithFormat:@"<html><body ><p style=\"color:grey; font-style:italic;\">Some datas</p><hr/><p style=\"font-size:14px;\"> Total: %0.3f </p></body></html... |
152758 | I am trying to encrypt a string using the code below. The issue is I get this error and I have no clue (I'm just learning about encryption) what to do or even where to look. The SharedKey and the IV have been supplied as Hex values. The SharedKey is 64 bytes and the IV is 32 bytes.
System.Security.Cryptography.Cryptog... | It seems you need your data size that the node holds to change each time. You can achieve this by using a constant size node that holds a pointer to dynamically allocated data.
Note that in the example below the struct size stays sizeof(void\*)+ sizeof(node\*)
but the size of data allocated for each node changes using... |
152860 | I am facing an issue while consuming a java web service from .NET. I am able to provide the input to the web serive but not able to get back the result. The result is a custom object which is created in Java with one long, one short and one string variable. But the output I am getting from .NET is that long and short a... | Maybe something like:
```
std::string FormatNum(double num)
{
int numToDisplay ((int)((num + 0.005) * 100.0));
stringstream ss;
int digitsToDisplay(abs(numToDisplay) % 100);
ss << ((num > 0) ? '+' : '-') << (abs(numToDisplay) / 100) << '.' << (digitsToDisplay / 10) << (digitsToDisplay % 10);
return ss.str();... |
153392 | I'm working with a REST API, that returns 2 different kinds of XML responses for the same request.
For example if I ask for a ticket using some ticket number, say `12345` to this API, it either returns:
1. The ticket:

2. Or says that it doesn't have the ticket:
> SendRequestAndReceiveResponse<T1, T2>(RestRequest request)
{
//... |
153417 | You can find my dataset [here](https://drive.google.com/open?id=0B8clGpnMSCjUdTRXNjBNMktkdVE).
From this data, I wish to plot (one line for each):
```
x$y[,1]
x$y[,5]
x$y[,1]+x$y[,5]
```
Therefore, more clearly, in the end, each of the following will be represented by one line:
```
y0,
z0,
y0+z0
```
My x-axis ... | The most simple solution, I think, will be
```
If(mixmatch(id,'blue','green','red') and place='A','Group A',
If(mixmatch(id,'blue','green','yellow') and place='B','Group B')) as allPl
``` |
153527 | When doing `apt-get -y upgrade` on a new Ubuntu 14.04 machine with the `ubuntu:latest` (Xenial) image, it raised an error:
```
Setting up makedev (2.3.1-93ubuntu2~ubuntu16.04.1) ...
mv: cannot move 'console-' to 'console': Device or resource busy
makedev console c 5 1 root tty 0600: failed
```
---
I've a fresh inst... | Agree with other answers/comments that `apt-get -y upgrade` isn't as good an idea as pulling a newer/updated image. Where a particular package is required but out of date in an image, installing that particular package is often enough (since dependencies will be updated as necessary).
**However**, there really is no r... |
153595 | I need to create a new column that establishes relationships between entities in a delimited list ( any delimiter works except a comma ).
Dataframe:
```
df1 = pd.DataFrame(np.array([[1000, 'Jerry', 'BR1','BR1'],
[1001, 'Sal', 'BR2', 'BR1'],
[1002, 'Buck', 'B... | This question is tagged with "ServiceNow" and none of the previous answers are sensitive to the nuances of ServiceNow's Rhino engine. ES6 syntax will throw the following error in any server-side script `Javascript compiler exception: syntax error`. At present (Jan. 2022), ServiceNow only supports ES5 JavaScript.
You s... |
154785 | There are 4 columns on my excel.
For every element in column A, I would like to loop through every element column C. If the element in column C equal to column A, then it return the value of column D in column B.
For example, B4 should return "dog". B5 should return "egg". B6 should return "cat".
 |
154881 | I have a MySQL query that sometimes takes over 1 second to execute. The query is as follows:
```
SELECT `id`,`totaldistance` FROM `alltrackers` WHERE `deviceid`='FT_99000083426364' AND (`gpsdatetime` BETWEEN 1341100800 AND 1342483200) ORDER BY `id` DESC LIMIT 1
```
This query is run in a loop to retrieve rows on cer... | You need to have Apple development certificate and .p12 file of that account of which that provisioning profile exists.
If you don't have, you need to create it from keychain, by requesting a certificate from authorised authority->generate csr and submit in you developer account.
hope it helps you........ |
154939 | I have the following worksheet #1 (simplified for the question) of person and age:
```
Person Age
Bob 40
Brett 35
Brian 38
```
I would like to setup another worksheet where I have the following:
```
Person Age
Spot #1 FORMULA
```
The user will enter a name in Spot #1 and I want a formula/co... | Use the [VLOOKUP](http://office.microsoft.com/en-us/excel/HP052093351033.aspx) function. This example below assumes that your data table is in Sheet1!A1:B4. Although I would recommend that you make your data table a [Named Range](http://office.microsoft.com/en-us/excel/HP052015361033.aspx?pid=CH010036991033) and refere... |
155465 | I'm trying to get data from a fusion table. I write, as it is written in the [example](https://github.com/dart-google-apis/dart_fusiontables_v1_api_client)
```
import "package:google_fusiontables_v1_api/fusiontables_v1_api_browser.dart";
import "package:google_oauth2_client/google_oauth2_browser.dart";
class CFusionT... | You need to authenticate first before you can execute methods on the fusion tables. In the example code below, call the `login` method to invoke the authentication and the fusion tables when authentication was successful.
```
import "package:google_fusiontables_v1_api/fusiontables_v1_api_browser.dart";
import "package... |
155566 | On my Kubernetes Setup, i have 2 Services - A and B.
Service B is dependent on Service A being fully started through.
I would now like to set a TCP Readiness-Probe in Pods of Service B, so they test if any Pod of Service A is fully operating.
the ReadinessProbe section of the deployment in Service B looks like:
`... | Due to the fact that Readiness and Liveness [probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/) are fully managed by `kubelet` node agent and [kubelet](https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/) inherits DNS discovery service from the ... |
155595 | How i can do for open a main frame, please look at my code, and correct, or tell me where i have a misstake.
This is a code for authorization window, and i want see the main frame when i click at the button "login". Please,help me. I don`t know how to do this. I sitting at this program more than 5 days.
```
public s... | You can't do this with a `textarea` element: they support plaintext only, and not HTML. You will have to use a different element with `contenteditable="true"`. I prefer `div`, but others work as well. |
155606 | My thesis (Canadian Research Based, Computer Science), collects three separate research projects (with a tenuous connecting thread).
While collating these projects into a single document, I have looked into other theses coming out of my university and others in my field, and have realized that it's looking like my th... | It is not clear how to judge the "size" of a thesis (page length or word count is probably not very good), but one can clearly do too much research for a Masters or Doctorate. That said a factor of two difference is not really that big since there is always going to be a healthy overlap between the "largest" Master the... |
155645 | Background: Around 600 years ago, the whole world was in conflict.
Outside of Ser, the world was a chaotic and dangerous place. Ser was the only neutral country in a world filled with violence and devastation. There were at least 8 wars going on and nobody had any alliances. All trade was cut off.
The country Ser, le... | My answer is: pretty small.
I'd personally go with something like 1000-3000 humans in the whole world.
That is to cover the entire planet.
Here is a couple of points to justify the number.
* Consider how much influence google, facebook, and amazon are for example.
Each can be run by a couple of people.
Gone are th... |
155954 | I want to create a layout for my android application using inheritance i.e. every screen will have the same background and header.
The layout with that background and header is specified like this:
```
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<Line... | Do you have background.xml?
```
Caused by: android.content.res.Resources$NotFoundException: File #ffffff from drawable resource ID #0x7f040009: .xml extension required
``` |
155963 | I am attempting to optimize a Convolutional Neural Network using a grid search but am encountering an issue when I try to determine how many Dense and Convolutional layers should be used when doing a grid search.
Ideally it would add the Convolutional Layers first (depending on the trial) and then add the Dense layer... | It works when you use the `x <- rlang::enquo(x)` and `name <- rlang::quo_name(x)` before the `if`-statement:
```r
date_from_text <- function(df, x){
x <- rlang::enquo(x)
name <- rlang::quo_name(x)
if(!inherits(df[[name]], c("POSIXct", "POSIXt"))) {
out <- dplyr::mutate(df, !!name := lubridate::ymd_hms(!!... |
155997 | Im creating a JOptionPane dialog box to take input from user to choose the type of cake they want to buy, but i only want to take in an integer value. I am very new to java programming and need some help using try, catch to only get an integer value.
I have created "Cakes[]" array to store and retrieve the flavor of c... | wrap the
```
choiceofcake = Integer.parseInt(userinput);
```
with a try-catch
```
try {
choiceofcake = Integer.parseInt(userinput);
if (choiceofcake > 5 || choiceofcake < 1) {
break;
}
} catch (NumberFormatException ee) {
ee.printStatckTrace ();
continue;
}
``` |
156092 | I'm trying to restore an old Angular project.
After an `npm-install` and then `ng-serve` I get the following error
>
> Could not find API compiler-cli, function \_\_NGTOOLS\_PRIVATE\_API\_2
>
>
>
The error is coming from the @ngtools
package located at `..node_modules\@ngtools\webpack\src\ngtools_api.js:8:11... | The problem basically is that your inner array is illegal. Swift arrays must consist of elements of a single type. You have two types of element, String and Array Of String. Swift tries to compensate but the result is that double indexing can’t work, not least because there is no way to know whether a particular elemen... |
156113 | [Project Euler #11](http://projecteuler.net/problem=11) asks to find the largest product of four numbers of a grid, where the four numbers occur consecutive to each other vertically, horizontally, or diagonally.
Here is my solution in Python. In addition to the usual code review, I have 2 extra questions (actually con... | 1. It's OK to use `max()`, reimplementing it yourself won't save time, especially since the Python version is possibly faster if it's written in C. It's possible to be more concise and clearer though: `max(hori + verti + dia + diarev)`.
2. You should use a list of list to represent a matrix, not a list of dictionaries.... |
156713 | I am using google analytics but when I debug with adb show me these messages.
```
05-11 14:57:48.911 1681-1912/? W/GAv4-SVC: Network compressed POST connection error: java.net.ConnectException: failed to connect to ssl.google-analytics.com/127.0.0.1 (port 443) after 60000ms: isConnected failed: ECONNREFUSED (Connectio... | >
> Make sure you have **AnalyticService** enable in `Manifest`
>
>
>
```
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>
```
And you haven't specify the **GA\_PROPERTY\_ID**(Tracking ID) in `analytics_global_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.