id
stringlengths
3
6
prompt
stringlengths
100
55.1k
response_j
stringlengths
30
18.4k
314788
I'm working with a app to record walks, but I can't get the polylines to be as smooth as it looks in other apps, like runkeeper. I have tried with different activityType, desiredAccuracy and so on. I have tested on iPhone 5c, 6s and 7. It always looks like the example photo, it was recorded out in the open without any ...
If you want to load images from gallery, you can pass file URI into Picasso ``` Picasso.with(getActivity()).load(fileUri).into(imageView); ``` --- You also have to make sure that you have enough permissions to fetch the given image.
315136
I'm using google map in my app , the code runs on device perfectly but the map does not load ! I just see a white screen ! what's the problem ? here is the code , please help ! ``` public class MyMap extends MapActivity { private MapView map; private MapController controller; @Override public void onCrea...
put your map api key in xml [here](http://mobiforge.com/developing/story/using-google-maps-android) is tutorial to get map api key
315445
I am using Android Studio 1.5 on Windows 7. I created an AVD emulating a Nexus\_5\_API\_21. I specified an SD card of 2 GB. I have copied a file to the SD card. Why is null returned from System.getenv("SECONDARY\_STORAGE")? I am sure you must realize by now how green I am. Here is an additional fact. This code works o...
try something like this: ``` String strSDCardPath = System.getenv("SECONDARY_STORAGE"); if ((null == strSDCardPath) || (strSDCardPath.length() == 0)) { strSDCardPath = System.getenv("EXTERNAL_SDCARD_STORAGE"); } ``` also read this for reference: <http://pietromaggi.com/2014/10/19/finding-the-sdcard-path-on-andro...
315487
I now played around with iptables (the whole day) to make my rules work, but there is one issue.. all traffic that I redirect goes through my server and back through my server. We are talking about high HIGH amounth of bandwidth. So I hoped there was a option to redirect a user to the external global IP, so it talkes t...
I *think* you want an xinetd redirect, not an iptables one (I've never needed to do this in anger). Try this: ``` # /etc/xinetd.d/redirect25 service redirect25 { port = 25 type = UNLISTED disable = no socket_type = strea...
315743
How would I go about making this form able to send to multiple recipients? At the moment it's only allowing me to send it to 1 email only, and when I try typing multiple in (e.g "user1@example.com, user2@example.com") it returns the message for when it's invalid. What do I need to do to fix this? EDIT: The user has to...
Here is the code for your function. I know you are not looking for the answer but sometimes looking for an example and seeing how it works gets you more easily to the point where you understand how it really works. ``` .data msg1: .asciiz "Give a number: " .text .globl main main: li $v0, 4 la $a0, msg1 ...
315971
I am trying to reproduce this Mathematica program in Python: ![Mathematica program](https://i.stack.imgur.com/0Km6p.png) It finds the roots of an numerical integration, and forms a plot of these values. However, I cannot get my attempt to run. Current attempt: from scipy.integrate import quad from scipy import inte...
The performance impact isn't actually the best argument against this example and you would have to measure the performance in your own application to decide whether this is a problem. It is more likely to cause a slow down if a large number of items being checked are not set or if you placed a check such as this within...
315994
Prove or disprove the following statement: "If $(v\_1,v\_2,v\_3,v\_4)$ is a basis for the vector space ${\Bbb R}^4$ and $\textbf{W}$ is a subspace of ${\Bbb R}^4$ then some subset of $(v\_1,v\_2,v\_3,v\_4)$ forms a basis for $\textbf{W}$." I have an intuition for this and I think it is false because it's saying that ...
Your idea is right. A concrete counter example would be good. Let $v\_i = e\_i$, the $i$-th standard unit vector. Let $W = \operatorname{span}\{ v\_1 + v\_2\}$, then none of the $\{e\_i\}$ is a basis for $W$.
316073
I have JSON like this: ``` [{"ID" : "351", "Name" : "Cam123 ", "camIP" : "xxx.xxx.xxx.xxx", "Username" : "admin", "Password" : "damin", "isSupportPin" : "1" }, {"ID" : "352", "Name" : "Cam122 ", "camIP" : "xxx.xxx.xxx.xxx", "Username" : "admin", "Password" : "damin", "isSupportPin" : "0" } ] ``` I want to get `...
Here what you have is an `NSArray` of `NSDictionary`s. So using SBJSON library you could do as following ``` SBJsonParser *parser = [SBJsonParser alloc] init]; NSArray *data = [parser objectFromString:youJson]; for (NSDictionary *d in data) { NSString *value = [d objectForKey:@"Name"]; } ``` The library can be ...
316229
It only returns one email while there are multiple in the database. I want to select all emails and copy them to the new table. ``` $qry5 = $con->prepare("SELECT email from ssrod.emails where WebformId = ? AND Agency_Id = ?"); $qry5->bind_param("ss", $WebformIdToCopy, $_SESSION['AgencyId']); $qry5->ex...
Don't use a loop! ``` INSERT INTO ssrod.emails (WebformId, Agency_Id, LOBId, email ) SELECT ?, ?, ?, email FROM ssrod.emails WHERE WebformId = ? AND Agency_Id = ?; ``` You seem to understand parameters. Next, *always* use them!
318581
Given a Weibull Distribution $f\_R$, how do I transform $R\to R^2$, and what is the distribution for $R^2$? Attempt: Since $f\_R$ is distributed with parameter $k$ and $h$ as a function of $x$, so . $$f\_R=(k/h)\*(x/h)^{k-1}\*exp(-{x/h}^k)$$ Using the random variable transformation: $g(y) = -f\left[r^{-1}(y)\right] ...
"The definition of sin of and angle is opposite/hypotenuse" - well that only works for a right-angled triangle, and is the beginning of the definition of the sine function. In order to extend the definition draw a unit circle with centre at the origin. Measure the angle counterclockwise from the positive $x$-axis and ...
318608
After I tested the form by clicking the submit button (shown on <http://deafmagic.com/tourist-register.php>) to check the validation and it showed a blank page. Im not sure what Im doing wrong with the scripts. The red \* dot next to the textfields are required to be filled. I only tested one or two textfields to see i...
Use the Validating event to reformat the entered number. You'll want to use an ErrorProvider to report input errors back the user. To get a fixed number of significant digits, you need to dynamically create the formatting string for the number, based on the entered value. You can use Math.Log10() to calculate the numb...
318709
I have a wordpress installation and I need this query on every post: ``` select post_id, meta_key from wp_postmeta where meta_key = 'mykey' and meta_value = 'somevalue' ``` I have 3M rows on that table, and the query takes about 6 sec to complete. I think it should be much faster. If I show the index of the table, i...
`wp_postmeta` has inefficient indexes. The published table (see Wikipedia) is ``` CREATE TABLE wp_postmeta ( meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT, post_id bigint(20) unsigned NOT NULL DEFAULT '0', meta_key varchar(255) DEFAULT NULL, meta_value longtext, PRIMARY KEY (meta_id), KEY post_id (p...
319007
I am implementing a C# application which reads binary data from a microcontroller at a high baudrate (8 MegaBaud) using an USB-Serial adapter (FTDI FT232H). The problem is when the stream contains 0x1A, sometimes a big chunk of data (thousands of bytes) is lost after this byte. I found on the forums that 0x1A is a spe...
First of all, I can't explain why receiving that character would cause bytes to be lost. While you might think the problem is setting the EOF character, that doesn't quite make sense. The [documentation for the `DCB` (device control block) structure](http://msdn.microsoft.com/en-us/library/windows/desktop/aa363214(v=v...
319097
I have a question in SQL that I am trying to solve. I know that the answer is very simple but I just can not get it right. I have two tables, one with customers and the other one with orders. The two tables are connected using customer\_id. The question is to list all the customers that did not make any order! The ques...
How about this: ``` SELECT * from customers WHERE customer_id not in (select customer_id from order) ``` The logic is, if we don't have a customer\_id in order that means that customer has never placed an order. As you have mentioned that customer\_id is the common key, hence above query should fetch the desired res...
319147
How do you programmatically set the width of an ImageView inside a TableRow? I do NOT want the cell width to change, only the width of the image inside the cell. *Layout: (The ellipsis are there to reduce the code)* ``` <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="...
Another way that u resized the bitmap ``` ImageView img=(ImageView)findViewById(R.id.ImageView01); Bitmap bmp=BitmapFactory.decodeResource(getResources(), R.drawable.sc01); int width=200; int height=200; Bitmap resizedbitmap=Bitmap.createScaledBitmap(bmp, width, height, true); img.setImageBitm...
319302
Due to lack of content, my footer has been so big. I was trying to limit the size by adding height:10% to the CSS, but it doesnt work. How can I limit it .e.g. to 10% of the screen? (I want it to be responsive). Following is HTML: ``` <div class="wrapper col7"> <div id="copyright"> <div class="list-group" style=...
You need to pass the element as an object to your function by this in your html like ``` <button type="button" class="btn btn-danger" id="btn-eliminar" data-customer-id="myModalTitle" onclick="myCall(this)"> Erase Point </button> ``` and in functions ``` function myCall(self) { //self w...
319440
Well, PHP times. My client wants me to use Yii2 as the framework for his project. I got it up and running. No problem. I used the advanced template via composer. Set my web root to /frontend/web, etc. NOW, i want to use this url format **website.com/messages/ or website.com/messages/tom**... etc. Right now the ...
Ok, here is the solution. In recents version of Apache (from 2.3.9), AllowOverride is set to NONE by default. Previous versions have AllowOverride set to ALL. Yii2 assumes that AllowOverride will be set to ALL. If you want to read the whole thread at Yii Forum, here is the link <http://www.yiiframework.com/forum/...
320978
I have the `Range` of a word and its enclosing sentence within a big long `String`. After extracting that sentence into its own `String`, I'd like to know the position of the word within it. If we were dealing with integer indexes, I would just subtract the sentence's starting index from the word's range and I'd be do...
This can get kinda tricky, depending on precisely what you need to do. NSRange ------- Firstly, as you may have noticed, `Range<String.Index>` and `NSRange` are different. `Range<String.Index>` is how Swift represent ranges of indices in native `Swift.String`s. It's an opaque type, that's only usable by the String A...
321102
I'm trying to add an item from array to navigation draw submenu. But i could not it. My code ise here ``` > private void addItemsRunTime(NavigationView navigationView) { //adding items run time final Menu menu = navigationView.getMenu(); for (int i = 1; i <= 3; i++) { menu.add("Runtime item "+ i);...
I would use `.reflect` with the map to get promise inspections as the result: ``` const all = Promise.map(items, item => doSomething(item).reflect()); all.then(items => { // will contain an array of the promises that fulfilled correctly let fulfilled = items.filter(x => x.isFulfilled()).map(x => x.value())); //...
321675
Objective: Have postgres generate ids automatically ``` CREATE TABLE user_privilege ( id bigint NOT NULL, name character varying(255) NOT NULL, version integer ); CREATE TABLE INSERT INTO user_privilege (name, version) values ('XYZ', 1); ERROR: null value in column "id" violates not-null constraint ALT...
You need to [use either SERIAL or BIGSERIAL](http://www.postgresql.org/docs/current/static/datatype-numeric.html), not BIGINT. ``` CREATE TABLE user_privilege ( id BIGSERIAL NOT NULL, ``` It's not clear whether your table has a PRIMARY KEY or UNIQUE constraint. But it should.
322762
I have a txt file named subroutines.ahk in it is the below hotstring. ``` ::btw::Thank you for the help ``` I know if I want to run my hotstring from another script all I have to do is include it in that script using: ``` #include subroutines.ahk ``` But I dont want to do that Instead from another script I want t...
There isn’t the way to get all Active comments directly, but you can refer to these steps to build an extension or application with VSTS API to get all Active comments. 1. Get team project’ ID through [Team Projects REST API](https://www.visualstudio.com/en-us/docs/integrate/api/tfs/projects). 2. Get Repository’ ID t...
322871
I have created Empty MVC (ASP.NET Web Application) project using Visual Studio 2013 Update 2 RC & then added AspNet Identity Samples using: > > PM>Install-Package Microsoft.AspNet.Identity.Samples -Pre > > > I have enabled and added migrations & then updated database, which created default tables. ![enter image d...
RTFE: you do not have a property ApplicationUsers on your `ApplicationDbContext` class. Just add: ``` public DbSet<ApplicationUser> ApplicationUsers { get; set; } ```
323016
I have a parent element with a relative width. With the browser fully expanded, its child element has a smaller width. By shrinking the browser, I can make the child element retain its width until it eventually becomes the SAME width as its parent element and subsequent shrinking causes both elements to retain equal wi...
```css #container { width:90%; margin: 0 auto; height: 300px; background-color: #2b6dad; border: 8px solid #2b6dad; overflow:hidden; } #firstDiv { min-width: 50%; width: 300px; max-width:100%; height: 100%; background-color: #da2225; margin: auto; border-left: solid bla...
323070
I am trying to run this simple python script through my terminal window:(it is the example on the bottlepy website) ``` from bottle import route, run, template @route('/hello/:name') def index(name='World'): return template('<b>Hello {{name}}</b>!', name=name) run(host='localhost', port=8080) ``` In order to d...
API v21 added a [`renameAccount()`](https://developer.android.com/reference/android/accounts/AccountManager.html#renameAccount(android.accounts.Account,%20java.lang.String,%20android.accounts.AccountManagerCallback%3Candroid.accounts.Account%3E,%20android.os.Handler)) method to the `AccountManager`, if that helps. Fro...
323392
I have my DNS configured to accept any subdomain (wildcard \*), but I am having trouble feeding back the required content to the browsers. I would like each subdomain to return the relative content, which resides in subdirectories of the same name within the `public_html` path of my server. eg, `example.domain.com/pi...
Maybe you could take a look at the mod\_vhost\_alias module : <http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html>
323709
I have checked ReportUnit and it only supports NUnit 2 results. I couldn't use NUnit 3 results with ReportUnit. 1. Are there any other tools that support an NUnit 3 xml file? 2. Or does ReportUnit have NUnit 3 support?
Reportunit 1.5 supports NUnit3
323883
I'm trying to setup XForwarding over ssh, but it fails. The same result happens whether I use the argument -X or -Y for ssh. The error I get. ``` a@ASUS-N53SM:~$ ssh -X -p 6623 pinker@192.168.0.200 pinker@192.168.0.200's password: Last login: Sun Feb 2 18:42:08 2014 from 192.168.0.201 /usr/bin/xauth: (stdin):1: bad...
This error occurs when the remote machine doesn't know it's own hostname, or has an incorrect hostname associated with 127.0.1.1 (NOTE: Not 127.0.0.1 which should always resolve to localhost). To correct it, ensure that the entry in /etc/hosts for 127.0.1.1 matches the machine's FQDN and short hostname.
323980
I have a URL `http://localhost/index.php?user=1`. When I add this `.htaccess` file ``` Options +FollowSymLinks RewriteEngine On RewriteRule ^user/(.*)$ ./index.php?user=$1 ``` I will be now allowed to use `http://localhost/user/1` link. But how about `http://localhost/index.php?user=1&action=update` how can I make...
If you want to turn `http://www.yourwebsite.com/index.php?user=1&action=update` into `http://www.yourwebsite.com/user/1/update` You could use ``` Options +FollowSymLinks RewriteEngine On RewriteRule ^user/([0-9]*)/([a-z]*)$ ./index.php?user=$1&action=$2 ``` To see the parameters in PHP: ``` <?php echo "use...
324378
I'm having trouble understanding the action economy of joining "melee combat" with "spellcasting". Jon is a [Hexblade](https://www.dndbeyond.com/characters/classes/warlock#TheHexblade) warlock (*Xanathar's Guide to Everything*, p. 55) that likes using his Pact of the Blade Greatsword, or, if feeling down, a Pact of th...
It's possible, but Kludgy. ========================== When going Sword and Board, Jon has no free hands, and no easy opportunity for a free hand, to access their Component Pouch or Focus. The only way to access a material component would be to drop their weapon, access the Material Component, and then pick the weapon ...
324423
I created a tool in Excel VBA that generates a custom report from the data I pulled from a SharePoint list via Excel VBA code. What I want to do is change/update the "Status" field for items within the SharePoint list used above. I read [here](https://sharepoint.stackexchange.com/questions/11426/update-list-from-exce...
You need to add properties in Excel and then align them to Columns in sharepoint. Make sure the names align. ``` For Each Prop In WB.ContentTypeProperties If Prop.Name = "DateSubmitted" Then Prop.Value = Range("DateSubmitted").Value End If Next Prop ```
324510
**OK, here's my situation :** * I am a developer needing to debug under different OS X versions * I currently own 2 macs : a MacBook Pro and an iMac * the iMac has Snow Leopard (10.6) on it - it came pre-installed * the MacBook has been upgraded to Lion and then to Mountain Lion (10.8) * I have purchased Lion & Mounta...
This is entirely possible. I use either of both of the following variants depending on what I'm trying to test: Virtual machines ---------------- You can run OS X 10.7 and newer inside recent versions of Parallels and VMWare Fusion. You can also run the server variants of older OS X versions this way; these older ser...
325808
I want to enable older plug ins not available in m2e v 1.0 I have added this to the POM but it does not work if there are multiple items. ``` <pluginManagement> <plugins> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> ...
"*Cause: **Unrecognised tag**: 'version'*" -- It's complaining about the `<version>[0.0.0,)</version>` tag because it doesn't belong inside of a `<pluginExecutionFilter>`. You should use `<versionRange>[0.0.0,)</versionRange>` instead.
325947
Let $d(x,y)=|x-y|$ and $h(x,y)=|x-y|^{\frac{1}{3}}$ be two distances on $\mathbb{R}$. I want to prove that they are topologically equivalent I supposed that $f(x)=x$ and $g(x)=x^{\frac{1}{3}}$ so we can say that $f(x)\leq g(x)$ $\forall x\in [0,1]$ and $f(x)\geq g(x)$ $\forall x\geq 1$ Will this information lead m...
Here, I use the term "$d$-ball" to indicate a set of the form $\bigl\{y\in\Bbb R:d(x,y)<r\bigr\}$--specifically, I'd call that the $d$-ball centered at $x$ with radius $r$--and similarly use the term "$h$-ball" to indicate a set of the form $\bigl\{y\in\Bbb R:h(x,y)<r\bigr\}.$ To show topological equivalence, we want ...
325963
I am trying to follow this [document](http://drupal.org/getting-started/clean-urls) to enable clean urls on a fresh Drupal installation. When I run the test, I get: ``` The clean URL test failed. ``` My host provider [confirms](https://my.bluehost.com/cgi/help/94) that `mod_rewrite` is enabled. I am using a shared...
The file name should just be `.htaccess`, without the `.txt` extension.
326201
I have 2 tables inside the database, the questions table, and the chances table. the problem is that I want the user to be able to add more chances by clicking the button which says: "INSERT MORE INPUTS OF CHANCES[]", I don't know how to tell PHP to insert this unknown number of inputs to the database. ``` // Check co...
> > Issue with your code is you are not keeping track of the node which > has been last popped from your stack. > > > Here is the updated code: ``` public static List<Integer> caculateSum(BinaryTree root) { List<Integer> sums = new ArrayList<>(); int sum=0; BinaryTree current = root, popped=null; ...
327072
Want to implement a dropdown list on RegisterView cant figure out how to do it I'm new to asp.net mvc5 and following code first approach . I already have a table for Offices. I will list down all my coding. I think ( I'm not sure) i have to initialize the list but dont know how to do it and where to put it Have a mode...
Your file name is wrong.Your file name actually `student_from.html` but in your view `student_form.html`.Please change this.
327122
I have a data sheet that `col A` is an account number, `col F` is a payment amount, `col I` is a user, and `col H` is a payment date....I am trying to sum payment amounts that fall in the same month for a particular user for a average monthly payment amount. It is a list of future payments that can have weekly or biwee...
Easier to see whats going on with character variables ``` id <- c('a', 'a', 'b', 'f', 'b', 'a') day <- c('x', 'x', 'x', 'y', 'z', 'x') test <- data.frame(id, day) output <- as.data.frame.matrix(table(test)) ``` This is the simplest way to do it...use the `table()` function then convert to data.frame
327351
In my ruby on rails application I have controlled called AnimalsController. At this controller I have a method "edit" and a corresponded edit.html.erb view in my animals folder. When I also manually added some static javascript file into the page which are located at public/assets/js/ folder. When I render the view, in...
I'm not qualified to say whether or not this is the correct way, but the following code will calculate `(r1 - r2)**2` as you request. The key enabler here is the use of the Keras functional API and [Lambda](https://keras.io/layers/core/#lambda) layers to invert the sign of an input tensor. ``` import numpy as np from ...
328782
I have a test input form where a child select box is created depending on the value of one of the choices in the parent select box. Selecting any of the other choices in the parent select box should remove the child. It works, but only once. If the child select box is created a second time, then it is not removed by se...
Try ``` var gel = document.getElementById('gift'); if(gel){ myform.removeChild(gel); } ``` Update: ``` <!DOCTYPE html> <html> <head> <script> function createtext() { var var1 = document.getElementById('s'); var var2 = var1.value; if (var2 == "American Express...
328826
I have one XML File: ``` <?xml version="1.0" encoding="utf-8" standalone="yes"?> <NewDataSet> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" <xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="NewDataSet" msdata:IsDataSet="true"...
Well, being that we are talking about an xml file and not a database you will not be able to get the "latest" version of the data unless you always load from file and not from memory but even then you expose yourself to concurrency issues. The best choice here would be to switch to a database or maybe implement someth...
328852
is there a possibility to show data that is two-factorial in a table using R? Please consider my example with replicates. So one has two or more values in every cell. I tried using ftable() and table() but am not getting anywhere :( Thank you so much for helping Example input ``` A B Value 1 1 1.2 1 ...
Perhaps something like the following would be helpful: ``` library(data.table) library(reshape2) dcast.data.table( as.data.table(df)[, `:=`(A = paste0("A", A), ## Prefix A values with "A" B = paste0("B", B))], ## Prefix B values with "B" A ~ B, value.var = "Value", #...
328955
I have a recursive class `Expression` which denotes boolean-like expressions, for instance: ``` (a & b) | (c & ~d) ``` Note that `Expression` takes care of both unary and binary expressions. Basically, `Expression` should follow the CFG similar to a boolean expression. I have designed the class in this way: ``` cl...
Conceptually, ``` return Expression(...); ``` creates a new `Expression` object, and then copies or moves it to the return value. In your case, you have no move constructor (there is no implicit move constructor since you have a user-declared destructor), and a deleted copy constructor, so this is not possible. You...
329061
My UITableView has a subview with a fixed position. But when I scroll, the scrollbar is hidden by the subview. How can I avoid this? ## EDIT ## ``` self.menuViewRelative = [[UIView alloc] init]; self.menuViewRelative.backgroundColor = [UIColor whiteColor]; self.menuViewRelative.opaque = YES; self.menuViewRelative.fra...
Are you using `addSubview:` for this? That will make it the top-most subview, which will cover the scroll bars. If you instead use `insertSubview:atIndex:` and ensure it's *just* above the other content in your table view, it will be below the scroll bars. You might need to override `layoutSubviews` of the UITableVie...
329124
Trying to use a taxi booking app that was created for me, throwing an error when trying to register a user. Error is: ``` W/System.err: org.json.JSONException: Value 501 at error of type java.lang.String cannot be converted to JSONObject 11-05 01:59:32.079 in.techware.lataxi W/System.err: at org.json.JSON.typeMism...
I had the same issue with my iPhone 8, Xcode Beta 9.2 did not support my version of iOS 11.1. However Xcode 9.1 does support my version of iOS 11.1
330829
In “The Force Awakens,” the Millenium Falcon seems to withstand impacts that would crush a normal Earth machine. First, when Rey steals it and has trouble getting it to take off, it rams into the ground at high speed. Then when Han crash lands it on the Starkiller base decelerating from light speed (!), smashes throug...
There is a (perhaps) bewilderingly *authoritative* answer available! Oddly enough it is not very detailed in purely metallurgical terms, but it seems to offer all the general history and background anyone could want. Haynes Publishing is a rather splendid British company that has specialised, since 1960, in detailed m...
331618
My question is similar to this post([Applying mutate\_at conditionally to specific rows in a dataframe in R](https://stackoverflow.com/questions/51940709/applying-mutate-at-conditionally-to-specific-rows-in-a-dataframe-in-r)), and I could reproduce the result. But whey I tried to apply this to my problem, which is putt...
Read the [manual](https://dart.dev/articles/libraries/creating-streams#creating-a-stream-from-scratch) and check my answer: ```dart Stream<bool> gpsStatusStream() async* { bool enabled; while (true) { try { bool isEnabled = await Geolocator().isLocationServiceEnabled(); if (enabled != isEnabled) { ...
331863
I want to use a box filter but I think it's causing "Ringing Artifiacts" (could be something else). Is there a connection between them- I think I remember my teacher mentioning it but I'm not totally sure what I'm seeing is "Ringing Artifacts" but that's the term he used. Is there a connection between the two? Or am I ...
Ringing is an artifact that occurs when the kernel in the spatial domain has oscillations. Although the box filter has much oscillations in the Fourier domain, it is not the case in the spatial/temporal domain so you should be fine if you directly convolve in the spatial domain. For instance, if you have a dirac and c...
332020
I want to import a csv file to my MySQL database with HeidiSQL. But some of my fields are empty. What could I do to let HeidiSQL know these empty values have to be seen as NULL-values? Sample of csv-file (last 2 fields not yet known): ``` NULL;Students Corner;437452182;; ``` Create commands: ``` CREATE ...
If solved it by writing \N in each empty field instead of writing NULL !
332181
Why do changes to one EditText change all EditText with same id despite being stored and changed individually? **Example:** I'm trying to create a table of **n** rows. Each row is created from `table_row.xml` a layout file containing an EditText with an `android:id="@+id/row_value"` When I call `updateTable()` all ...
I removed the `android:id` attribute from the EditText and instead replaced it with an `android:tag` attribute instead. So Instead of: ``` EditText inputField = (EditText) row.findViewById(R.id.row_value); ``` Changed to: ``` EditText inputField = (EditText) row.findViewWithTag("userInput"); ``` `UpdateTable()`...
332222
I have a table like this: ``` <table id="orders"> <tr> <td>05/06/2005</td> <td>3216549</td> <td>description</td> <td>2.000,00</td> <td>100</td> <td>20,00</td> <td><div id="state" class="state-c"> </div></td> <td><a href="modify.php?id=222"><span class="bt-edit">EDIT</span></a></td> ...
You can get it like following using `window.getComputedStyle`. ```js var text = window.getComputedStyle($('#state')[0], ':before').content alert(text) ``` ```css .state-c:before { content: "Confirmed"; } ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <table...
332399
I'm trying to connect to the rest api from a remote server, and the only response I ever get back is: *`var jsondata = {"currencySymbol":"$","is_error":true};`* I'm able to make api calls from the site's API Explorer (within the same domain). But no matter what I do from my remote host, any calls to this site's rest....
To get the rest API working, you need to call an url looking like that (this example to create a contact) ``` http://www.mysite.com/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=Contact&action=create&api_key=(myAPIkey)&key=(mySiteKey)&json={“contact_type":"Individual","first_name":"Tester","last_name":"Yol...
332539
I'm trying to build an npm package from [this repo](https://github.com/webglearth/webglearth2), I have the "minified" js file, which IntelliJ downloads when seeing the `<script src="">` tag, the file is called `http_www.webglearth.com_v2_api.js` So, I've followed instructions as per [npm official](https://docs.npmjs.c...
Take a look at [this working example](https://codesandbox.io/s/1r9x22pk5q) containing your code for the `DatePicker` component. The error might be in the following - did you wrap your component in `MuiPickersUtilsProvider` with the required `utils` prop provided? ``` <MuiPickersUtilsProvider utils={MomentUtils}> <...
332646
Before i start i will divide the problem into two parties: PART 1 : --- --- In c++ to get type of data we can use `typeid` but it's give you the data as `const char*` ,and i want it to return the type of the data. Example: ``` int data = 20 ; float data2 = 3.14 ; char *data3 = "hello world" ; std::cout<< typ...
If you have a limited list of types you want to support, use `boost::variant<int, float, const char*, ...>` instead of `boost::any` (or `void*`). Then you can define a visitor to call the correct instantiation of the print function. ``` #include <boost/variant.hpp> #include <boost/foreach.hpp> #include <vector> #inclu...
333024
I have a Python RDD of strings. I want to figure how many of these values are null. Here is an idea of how the file has been read in: ``` matrix = sc.textFile("txtFile.txt").map(lambda x: x.split("\t")) ``` So, what I have is an RDD of strings that have been split on the tabs. `matrix.first()` returns: `[u'1,2010-0...
Do you mean something like this? ``` import numpy as np matrix.map(lambda xs: np.array([0 if x else 1 for x in xs])).sum() ``` Regarding your attempts: ``` vals = matrix.map(lambda x: [float(x)]) ``` doesn't fail because of the empty strings (it would but it doesn't reach this part) but because element passed as ...
333053
I have added this @Bean to the class I have `main` function in ``` @Bean public CommonsRequestLoggingFilter requestLoggingFilter() { System.out.println("inside logging filter"); CommonsRequestLoggingFilter loggingFilter = new CommonsRequestLoggingFilter(); loggingFilter.setIncludeClientInf...
I have been the same situation and I could resolve it with removing log setting. ``` logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter=DEBUG ``` It runs without this setting. Also, if you want to change log level, you can define the class extends `AbstractRequestLoggingFilter` and write loggi...
333063
i have a knitr based Rnw file that is compiling to pdf perfectly fine in RStudio on mac (v0.97.316) and knitr (v1.1) but in a windows enviornment (same versions) i get a compilation error. I've checked the options in RStudio in both environments and they are consistent. It appears that the windows setup is always inje...
The reason that it was injecting `\SweaveOpts{concordance=TRUE}` is likely to be your weaver was `Sweave` instead of `knitr`, and you also enabled Rnw concordance: <http://www.rstudio.com/ide/docs/authoring/rnw_weave> But I cannot say for sure it is not a bug for the Windows version of RStudio. Anyway, it is easy to ve...
333133
I want a collection contains unordered, repeatable items. In Java, Set is unrepeatable, List is ordered, which are not what I want. It seems Pool is an appropriate collection, but it doesn't exist in Java. The interface should be as following: ``` public interface Pool<T> { void set(T item); T get(); } ``` ...
You seem to be describing the Guava [`Multiset`](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/Multiset.html), and more specifically [`HashMultiset`](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/HashMultiset.html). No such collection exists in Java...
333340
I have a view controller in which there is tab bar inside the tab bar i have four tab bar items. I have set tag for each of the items. I want to open view controller when user click on any tab bar item. I have used a delegate method of tab bar to make this happen. Now when i click any item it open only first view contr...
You are checking ``` if stateBtn.tag == 1 ``` which is always true so first condition will always execute. Instead you should use ``` if item.tag == 1 ``` because item is the reference to the tab bar item clicked.
333410
I have created this HTML form and coded PHP trying to get the user information getting sent to my e-mail after the user fills out the form and clicks on submit button. However as a result I get just my PHP code outputted after clicking on submit button. Please take a look at my code and let me know what I am doing wron...
> > I get just my PHP code outputted after clicking on submit bottom. > > > PHP is (in this context) a server side language, if the browser is seeing the PHP source then the PHP is not being executed. Either: * You have no webserver * You have not installed PHP support on the webserver * You have not configured t...
333418
**[ANSWER]** Thanks everyone! The code to solved the problem below is: ``` SELECT ID FROM Schedule WHERE (SUBSTRING(Time, 1, 2) = DATEPART(hh, GETDATE())) ``` --- How to select the first two character in SQL Server CE? For example: ``` +-----+-----------+------------+ + Day + Time + ID + +-----+----...
The SQL Standard method is given by the syntax diagram: ``` <character substring function> ::= SUBSTRING <left paren> <character value expression> FROM <start position> [ FOR <string length> ] [ USING <char length units> ] <right paren> ``` Hence, in this example: ``` SELECT SUBSTRING(Time FROM 1...
333625
So I have this line ``` String line = null; ``` And right after that I have a if statement what it tells me the error is > > Syntax error on token ";", { expected after this token > > > So it's saying instead of the ";" there should be a "{". Also the program is telling me that I need an extra "}" which is mo...
You've got code hanging out in the class which has to be in a method or constructor. You can only have variable and method declarations and declarations with assignments in the class, but not non-declarative statements such as... ``` if (f.exists()) { try { reader = new BufferedReader(new FileReader( ...
333887
I have a script that opens "Dictation & Speech", activates it (turns Dictation: On) and runs a shortcut to start dictating (System Events keystrokes Command D). All this works fine, but what I want to do is for it to click done (or the return key) after speech is not heard. I tried someone's answer from StackOverflow. ...
The Done button is `button 1 of process "DictationIM"`: ``` tell application "System Events" to tell process "DictationIM" click button 1 end tell ```
333893
I am trying to call this `highlight()` on the `ngOnInit` but I am getting this error: `ERROR TypeError: Cannot read property 'innerHTML' of null`. In the `ngOninit` I have ``` this.annotationSub = this.annotationService .getWordUpdateListenerTwo() .subscribe((theHardWords: ComplexWord[]) => { thi...
Return the promise in `getData`, then you can do `getData().then()`: ```js getData(id){ return this.$store.dispatch('getData', { employeeId: this.employeeId }).then(() => { if (this.employeeData.length) { // here some code... } }); } ```
334101
Based on the column value, I need to execute 2 different queries in Oracle sql. Table A ``` Col1 Col2 R51 desc_r51 R52 desc_r52 R53 desc_r53 ``` Table B ``` Col1 Type Username R51 All A R52 Specific B ``` Now i need to write a query, where * if Type is All in Table B, get **all value...
If data is static ( not local to function scope ), you can do the following: ``` void Check( unsigned const char* x); void Do() { static const unsigned char bytes[] __attribute__((section(".text"))) = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0x10, 0x1, 0x2, 0x...
334888
I am trying to connect to Snowflake via azure function app. Following is the code snippet (ref: <https://github.com/snowflakedb/snowflake-connector-net#create-a-connection> ) I am using: ``` using (IDbConnection conn = new SnowflakeDbConnection()) { // Connect to Snowflake conn.ConnectionString = @"host = <A...
For the account name, you need to omit the cloud provider and region. So instead of "account.east-us-2.azure" it should be only "account". Since this account is not in the US West deployment, you also must supply a "host" parameter, which does not appear in your connection string. The host should be "account.east-us-2...
335078
We have to feed the masses and we have to do it cheaply. Enters **the goo** Our scientist are still debating what the main ingredient(s) of this thick paste should be. **Can you help them?** The target consumer is the **AVGCIV**, the average citizen. As they are connected to VR (Virtual Reality) most of the...
Algae ===== The Earth is mostly saline water. One of the proposed methods to eliminate world hunger is to use this water to produce algae or seaweed. In large portions of the coast, they can grow quickly and abundantly even without water agriculture. They are not just suggested for food, but also to produce many other...
335606
I have a situation here where I have to use `isset()` and it is returning `false` even when the variable has value in it. My `PHP` version is this: ``` PHP 7.0.33-14+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Dec 18 2019 14:55:39) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-201...
I have found a work-around in my situation which is like this. I replaced this line: ``` return isset($this->pivot->factor) ? $this->pivot->factor : $this->getFactor(); ``` with this: ``` return $this->pivot === null ? $this->getFactor() : $this->pivot->factor === null ? $this->getFactor() : $this->pivot->factor; ...
336430
You see I'm trying to load some data on this adapter, but I can not make a AsyncTask to show a progress dialog so. This is the complete code of the program it gives me error. I completely revised so do not edit any of the UI. ``` public class MatchNowGames extends Activity { Games games = new Games(); Iterator iterad...
You can reference this: [Can't create handler inside thread that has not called Looper.prepare() inside AsyncTask for ProgressDialog](https://stackoverflow.com/questions/3614663/cant-create-handler-inside-thread-that-has-not-called-looper-prepare-inside-a)
336438
What is the easiest setup to hide your public IP from installed applications and prevent things like WebRTC leaks on a common Linux distro?
Your IP can be leaked from a number of sources. 1. Use a browser plugin like noscript and be careful whom you let run scripts on your computer 2. Use a distro like [Tails](https://tails.boum.org/) which has all the necessary firewall rules already baked in
336491
I have a JPA Query I am executing on the Google App-Engine datastore. I am building the query using parameters. After all parameters have been inputted, I wish to view the Query String. That is, I wish to view the actual query being executed by the datastore. Is that even possible? It would really help me in ...
> > That is, I wish to view the actual query being executed by the datastore. > > > Enabling `DEBUG` for the `DataNucleus.Datastore` log category should do it. Check the [DataNucleus Logging](http://www.datanucleus.org/products/accessplatform/logging.html) documentation.
337302
I want to remove the duplicated values of an sorted array. Here is the code to sort the values in ascending order. ``` Dim k As Integer Dim j As Integer Dim sortedArray As Variant Dim sorting As Boolean If sorting = True Then For j = LBound(concentrationArray) To UBound(concentrationArray) For k = j + 1 To UBound...
Use this simple trick to make a 1D array unique: ``` Function Unique(aFirstArray() As Variant) 'Collections can be unique, as long as you use the second Key argument when adding items. 'Key values must always be unique, and adding an item with an existing Key raises an error: 'hence the On Error Resume Next Dim c...
337488
I have a process that requires me to identify different machines, and I'm not sure what's the best way to do it. I do not want to save that ID on a text file or something, but I want to generate it from hardware every time I need it (in case the text with the ID gets deleted or something) I've checked [UUID](https://d...
This worked for me: ``` import subprocess current_machine_id = str(subprocess.check_output('wmic csproduct get uuid'), 'utf-8').split('\n')[1].strip() print(current_machine_id) ```
337512
Although I had to take 5 this month on individual teeth, my dentist reassured me that with the current technology there is absolutely no risk and that I can take as many as I need. If you search the web, you see lots of opinions about this so maybe people are misinformed. Recent research seems to indicate that there ...
Dental X-rays are not 100% free of risk. However, they are very, very low risk. Given people take risks with radiation every day (going into the sun, eating bananas), it is reasonable to accept the risks of dental X-rays to gain the health benefits associated with their diagnostic abilities. This [xkcd info-graphic](h...
337774
Is there any way to run a guest x64 VM on Windows 7 x64? No luck with Virtual PC 2007, Virtual Server 2005R2. (both blocked during install). I know the Windows Virtual PC app that comes with Win 7 doesn't allow 64bit Guests... thanks
[Sun VirtualBox](http://dlc.sun.com/virtualbox/vboxdownload.html) will allow you to create 64bit guests on a 64bit host.
338251
I am building a shopping cart which when a "Buy" button is pressed, a web service returns a JSON output which I then save into a Javascript cookie as a string. A typical return from the web service might be: ``` { "d":{ "58658":{ "id":"58658", "qty":"1", "singlePrice":"754", ...
Okay, now we've got to the root of the actual problem, I think I can help. The problem is basically that you're storing data into the cookie string but not escaping it. So when you set the cookie and it contains commas, the commas can be seen as cookie delimiters. For most of your string, the quotes in the JSON seem t...
338603
I want to return a value when a user selects one of the segmented control options. I am getting the error > > Unexpected non-void return value in void function. > > > How can I get `pageStatus` to change to what is clicked by the user? ``` class ReportsViewController: UIViewController, UITableViewDelegate, UITa...
The `shinyWidgets` package now solves this for you with a slider that allows custom values. Updated code for your third slider would look like this: ``` shinyWidgets::sliderTextInput(inputId = "decade", label = "Time (decade):", choices = c(1,5,10,15,20,25,30)) ```
338756
I have completed Notepad tutorial v3 but one thing i can't figure out how to make my notes to open in view mode not the edit mode. I've made my own notepad with button and stuff but still can't view them.. **Helper class** ``` public static final String KEY_TITLE = "title"; public static final String KEY_BODY = "body...
You can create a new activity. Copy and modify stuffs from the NoteEdit class if you want to make it quick and dirty. *If you have time, you should spend some time think about design and follow **DRY** as Code-Guru suggests "Copy and paste coding is a poor design".* ``` public class NoteView extends Activity { private...
339021
I have a input file that contains DNS zone entries ``` ; whatever.foo [000000] $ORIGIN whatever.foo. $TTL 8400 @ IN SOA ns1.whatever.foo. admin.whatever.foo. ( 2017101913 ; serial number 21600 ; refresh 8400 ; retry ...
One way: Test file: ``` $ cat file xxx IN A 000.000.000.000 else.xxx IN A 000.000.000.000 something-xxx IN A 000.000.000.000 other-xxx IN A 000.000.000.000 abc IN A 000.000.000.000 $ ``` Pattern file: ``` $ cat patterns xxx something-xxx other-xxx else.xxx...
339190
I have a function that which iterates "for each row" in the table. When it is run it should look at each row, pull in the related SET values for that row and run the function which in turns returns a result and updates the correct row with the correct value. What is happening is that it is running and returning the val...
I may be missing something, but why do you need a loop at all?: ``` UPDATE DDDG SET Lat = dbo.GeoCode('us','FL','Miami','33142',Ad1).Lat, Long = dbo.GeoCode('us','FL','Miami','33142',Ad1).Long; ``` It is also possible to improve the query further by reducing the number of calls to `dbo.GeoCode` to just on...
339649
I have an exam coming up an this will be one style of question can anyone please walk me through how it is done? Sorry I am just totally confused and do not how to start Evaluate all the square roots of 4 mod 77, Using the Chinese Remainder Theorem
We have to solve $$x^2-4=(x-2)(x+2)\equiv 0\ (\ mod\ 77\ )$$ The solutions $2$ and $75$ are easy to determine (One of the factors is $0$ or $77$). Another solution is given by $x-2=7$ and $x+2=11$ because this happens to have a solution ($x=9$ satisfies both equations). Then $68$ must also be a solution because of $68...
340155
Recently i upgraded Postgresql from 9.1 to 9.2 version. New planner uses wrong index and query executes too long. Query: ``` explain SELECT mentions.* FROM mentions WHERE (searches_id = 7646553) ORDER BY id ASC LIMIT 1000 ``` Explain in 9.1 version: ``` Limit (cost=5762.99..5765.49 rows=1000 width=184) -> Sort ...
If searches\_id #7646553 rows are more than a few percent of the table then the index on that column will not be used as a table scan would be faster. Do a ``` select count(*) from mentions where searches_id = 7646553 ``` and compare to the total rows. If they are less than a few percent of the table then try ```...
340249
I'm trying to create a single row of data, but the Group By clause is screwing me up. Here's my table: ``` RegistrationPK : DateBirth : RegistrationDate ``` I'm trying to get the age of people at the time of Registration. What I have is: ``` SELECT CASE WHEN DATEDIFF(YEAR,DateBirth,RegistrationDate) < 20 TH...
Are you sure that's the line that raises the error? I would much more expect that it's this line: ``` let uiImage = UIImage(CGImage: cgImage!) ``` That's going to crash any time there's an error creating the image. You either need to use do/try/catch here to catch the errors and deal with them, or you need to us...
340250
I have a geopackage table/layer of buildings. I need to "offset" by using ST\_Translate. <https://postgis.net/docs/ST_Translate.html> The expression `SELECT ST_Translate(geom, 1, 1, 0) FROM "building_UTM"` works when ran in the SQL Window of the DB Manager. [![enter image description here](https://i.stack.imgur.com/6...
The Query Builder is not the same as the DB Manager. DB Manager allows you to query using SQL syntax for various databases, but the Query Builder uses the QGIS expression engine. See <https://docs.qgis.org/2.18/en/docs/user_manual/working_with_vector/expression.html> I would just use the DB manager and create a layer ...
341094
I'm trying to get an activity indicator to rotate during download. For some reason, when I try to get the animation to repeat forever, it throws an error way at the bottom of the VStack code. This works: ``` struct AddView: View { @State var showActivitySpinner: Bool = false @State var urlText: String = "" ...
You must write Animation before .easeIn Correct your modifier to this: ``` .animation(Animation.easeIn(duration: 1.0).repeatForever(autoreverses: true)) ``` As you probably already know, SwiftUI (at the moment) doesn't point to the correct line of error. Thats why it points to the offset.
341176
Consider server S with some public ip and client C behind NAT N. Now C sends some messages on a UDP channel to S. Client C declares the port to which S should connect the RTP stream. As you might have noticed its a standard voip problem where we can use ICE(STUN/TURN). However I am not clear about the flow. The proble...
There are basically two options this could be handled by NAT. First, the NAT implementation can use an [Application Level Gateway](https://en.wikipedia.org/wiki/Application-level_gateway) for `RTP`. In this case it will create a new entry in the NAPT mappings. In that mapping the client-facing port should be the one s...
341635
For now I've been using Paint Tool SAI for drawing, but I bought Adobe Photoshop CS6 lately and I noticed intolerable lagging while drawing with standard brushes. Delay is even bigger when I choose '3D' brushes. My PC specification: * 6-core 3.7GHZ AMD CPU * 24GB DDR3 RAM * 2x128GB Samsung SSD in RAID 0 config * 4x2TB...
photoshop runs has many performance factors which you have to look into when using it . 1. The dpi and the resolution of the photoshop file matters anything above 200 dpi 2000x2000 resolution may start to lag 2. scratch disks : these are like virtual memory the photoshop uses . please make sure it is using the hard di...
341639
I have a .out file (.txt) in the form: ``` This is a text file This file was created by Andrew on 4/5/14 Certificate Result Test #12 Time A B C D 50 4 3 8 9 55 4 8 7 4 60 8 4 1 4 65 7 1 5 1 70 4 2 2 2 ``` ...
If you want to show persons and be able to distinguish clients as well, try a self join. ``` SELECT DISTINCT p.Forenames, p.Surname FROM Person AS p INNER JOIN ClientRecordForm AS crf ON p.ID = crf.AssignedSupportWorker_ID inner join person as personClients on crf.clientid = personClients.id ``` As you can see, you ...
342359
I have a user control with linkbuttons (used for paging) and a repeater inside an update panel. The paging works correctly, but is causing a full page postback every time I click through to the next page. The update panel looks like this: ``` <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Always"> <Cont...
Full postback happens if your UpdatePanel cannot render its contents to a `<div>` (e.g., when it is situated inside of `<tr>`). So check you html inside of UpdatePanel, you might find the answer there (also, look for some incorrect xhtml, like incorrectly closed elements).
342689
I have a postgres table with the following format: ``` id key value ------------------------------------- a 1 p b 2 q c 3 r a 2 s ``` I want to convert it into the following format: ``...
Try this: ``` SELECT * FROM crosstab( 'SELECT id, key, value FROM table ORDER BY 1, 2' ) AS CT(id text, one text, two text, three text); ``` You need the final four column names in `as ct()`, che...
342814
sorry for the basic question but I am trying to understand which is the best way to do this. I am new to promises and angular/typescript/ionic/javascript. I have an array and I want to insert in a SQLlite table one row for each element of the array. **-------------------** **EDIT my code looks like this now and it k...
The reason this fails is because there isn't just one type the compiler can use. When you do ``` run_cb_2<int>(f, 5); ``` The compiler looks at `run_cb_2` and sees that there is only one template parameter. Since you've provided that it skips the deduction phase and stamps out `run_cb_2<int>`. With ``` run_cb_3<i...
342893
I have a following setup: * Several data processing workers get configuration from django view `get_conf()` by http. * Configuration is stored in django model using MySQL / InnoDB backend * Configuration model has overridden `save()` method which tells workers to reload configuration I have noticed that sometimes the...
Why don't you just do? ``` >> X = data(1:4:end) X = 18 19 18 >> Y = data(2:4:end) Y = 32 31 33 ```
342932
In *Star Wars: The Force Awakens*, > > do the Resistance and Rey, Leia, etc. (all characters considered to be part of the *good side*) know that Supreme Leader Snoke exists and is the mastermind behind the First Order and Kylo Ren? Or is Snoke unknown to them and operating in shadow? > > >
Yes. ---- Leia (aka **Resistance leader General Organa**) tells Han that Snoke was the one who corrupted their son Ben > > into becoming Kylo Ren > > > From Alan Dean Foster novelization: First we have Maz discussing Snoke with Han: > > “I need you to get this droid to the Resistance…,” Han said. > > “Me?...
343084
I'm trying to make a puzzle game in microsoft visual c# 2010 and when I try to resize the image to fit the groupbox I get these errors: ``` error CS1502: The best overloaded method match for 'System.Drawing.Graphics.DrawImage(System.Drawing.Image, System.Drawing.PointF)' has some invalid arguments error CS1503: Argum...
your `phpinfo` shows that `mail.add_x_header` is OFF. you need to turn it on To enable the `X-Mail` header, set `mail.add_x_header` to 1 in your `php.ini` ``` <?php $to = "yourplace@somewhere.com"; $subject = "My HTML email test."; $headers = "From: sinha.ksaurabh@gmail.com\r\n"; $headers .= "Reply-To: sinha.ksaurabh...
343097
I have an object that needs to have some 4-5 values passed to it. To illustrate: ``` class Swoosh(): spam = '' eggs = '' swallow = '' coconut = '' [... methods ...] ``` Right now, the way to use `Swoosh` is: ``` swoosh = Swoosh() swoosh.set_spam('Spam!') swoosh.set_eggs('Eggs!') swoosh.set_swal...
First of all, this: ``` class Swoosh(): spam = '' eggs = '' swallow = '' coconut = '' ``` sets *class* attributes `spam`, `eggs`, etc. Your set\_spam method would then presumably go ahead and create *object* attributes of the same name that hide the class attributes. In other words, defining these at...
343292
How can you classify the accuracy of a probability? =================================================== Say I do a study of people that like bananas in 2 different regions. * Region 1: 8 out of 10 people tested like bananas. * Region 2: 500 out of 1000 people tested like bananas. So in region 1, 80% of people like b...
This sounds like this question could be rephrased as "Is the proportion of people who like bananas in Region 1 significantly different than in Region 2?" Reframed that way, the statistical test would be for the z-test for the difference between two proportions. Here is a link to an online calculator: <http://epitool...
343830
There is class name DailyElectricity which is in DTO package and it contain max , min, sum , average with getter and setter ``` public class DailyElectricity implements Serializable { private static final long serialVersionUID = 3605549122072628877L; private LocalDate date; private Long sum; private Doubl...
The issue is that there is no way for spring to figure out how to convert the result of your query to the custom object **DailyElectricity** you are expecting from; in order to make this mapping possible you need to do two things: 1. create a constructor to so you can create a new object and initialize it through the ...
344108
On my spreadsheet, I have an "Organisation List" tab, "Schedule" tab and an increasing number of tabs per organisation, such as "BlueEdge Gym". I have a QUERY formula that lists all dates from the different organisation's tabs schedules into one list on the "Schedule" tab. This makes a master schedule for me to view a...
Issue ===== In react-router-dom v6 the `Route` components no longer have route props (`history`, `location`, and `match`), and the current solution is to use the React hooks "versions" of these to use within the components being rendered. React hooks can't be used in class components though. To access the match param...
344168
I'm trying to create a table with a unique clustered index on Azure Synapse Analytics I've tried ``` CREATE TABLE [myschema].[test] ( ID1 int UNIQUE NOT ENFORCED, ID2 int UNIQUE NOT ENFORCED, message varchar(MAX) ) WITH ( CLUSTERED INDEX (ID1, ID2) ) ``` and ``` CREATE TABLE [myschema].[test] ( ...
we are aware of this issue and working on a resolution . You do have a workaround for this , please try this and it should help. ``` CREATE TABLE [test1] ( ID1 int UNIQUE NOT ENFORCED, ID2 int UNIQUE NOT ENFORCED, message varchar(MAX) ) WITH ( HEAP ) GO CREATE CLUSTERED INDEX isTest ON [Test1](ID...
345050
I have a viewmodel that is instantiated via Koin library at my MainActivity - ```kotlin class SharedInformationViewModel : ViewModel() { val deviceId : MutableLiveData<String> = MutableLiveData<String>() } class MainActivity : AppCompatActivity() { private val sharedInformationViewModel: SharedInformationVie...
You need to use ``` // Activity private val sharedInformationViewModel: SharedInformationViewModel by viewModel() // Fragment private val sharedInformationViewModel: SharedInformationViewModel by sharedViewModel() ``` And ``` = module { viewModel { SharedInformationViewModel() } } ```
345698
I want to redirect all subcategories who belong to the category named symptoms to a same page. I did this: ``` RewriteRule ^category/symptoms/(.*)$ https://my-site/com/list/$1 [L,R=301] ``` Wordpress redirects but always add the subcategory at the end. For example: `my-site/com/category/symptoms/fever` is redirecte...
WordPress only looks for the default template files while loading the child theme. So does woocommerce. Any extra folder or file that exists in your parent theme **can not** be overridden, unless the developer is using actions and filters that allows you to hook into them. Therefore, a simple `require()` or `include()...