id
stringlengths
3
6
prompt
stringlengths
100
55.1k
response_j
stringlengths
30
18.4k
236071
I'm trying to determine the best way to structure my application so that I don't get a lot of javascript splattered all over the place. I have an ASP.NET MVC application with a view which loads a sllooooowwwww partial view using Michael Kennedy's approach to [Improve perceived performance of ASP.NET MVC websites with ...
I would consider not using partial views at all, for the reasons that you mentioned. Instead of loading partial views with ajax, load json data from controller. Use JavaScript template like handlebars.js to get the razor effect on the client side. Much cleaner. Smaller http payload.
236702
I have a digraph which I've set to "rankdir=LR;" so that "rank=same" will be top-to-bottom. I decided to add a few clusters to this graph, but as a result "rank=same" has now become bottom-to-top. A minimal example shows the problem: ``` digraph graph { graph [ rankdir=LR; nodesep = "0.5 equally", newran...
Testcontainers uses the self-typing mechanism: ```java class GenericContainer<SELF extends GenericContainer<SELF>> implements Container<SELF> { ... } ``` This was a decision to make fluent methods work even if the class is being extended: ```java class GenericContainer<SELF extends GenericContainer<SELF>> implement...
236741
It's my first time trying out this package and I followed the installation guide at <https://laravel.com/docs/8.x/passport> but when this code block in my controller signup action it throws the error: ``` $token = $user->createToken('authToken')->accessToken; ``` Here's the code for my signup action: ``` public fun...
I found the solution on: <https://github.com/laravel/passport/issues/1381>. In composer.json just add "lcobucci/jwt": "3.3.3" and execute composer update.
236912
I've added a few jars from the Factual API, my project builds fine, and the jars can be accessed from my main module. However, when I run the app I'm getting 'java.lang.verify' error as follows: ``` 11-05 13:18:07.094 4612-4612/com.example.nickm.tddeals E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.VerifyError:...
In requiring something similar, where the usual text selection behavior is required on an element which should otherwise respond to `ngClick`, I wrote the following directive, which may be of use: ``` .directive('selectableText', function($window, $timeout) { var i = 0; return { restrict: 'A', priori...
237051
I am making a registration system with an e-mail verifier. Your typical "use this code to verify" type of thing. I want a session variable to be stored, so that when people complete their account registration on the registration page and somehow navigate back to the page on accident, it reminds them that they need to ...
This came down to the basics of debugging/troubleshooting. 1. Understand as much as you can about the technique/library/function/whatever that you're trying to use. 2. Inspect the salient bits and make sure that they are what you expect or what they should be. (There's a slight difference between those two, depending ...
237671
My current code looks like this ``` void XXX::waitForUpdates() { boost::unique_lock<boost::mutex> lock(mutex_agentDone); while(!allAgentUpdatesDone()) { COND_VAR_AGENT_DONE.wait(lock); } } void XXX::onAgentUpdate(YYY argums){ Agent * target = const_cast<Agent*>(argums.GetAgent()); boost::u...
Just quit the Xcode. Reset your simulator content and settings. Clean and build your project again and you are ready to go. **Edited** * delete the Derived Data in the Organizer under Projects or directly in ~/Library/Developer/Xcode/DerivedData * clean the Build Folder by choosing "Product" in the MenuBar and clic...
237913
I want to display 24 unique id's but he is only giving me 1: This is my php ``` <?php $sql = "SELECT id FROM 15players ORDER BY RAND() LIMIT 24"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); $row = ...
`mysql_fetch_array` only returns 1 row you need to loop through the results. ``` while($row = mysql_fetch_array($result)) { echo $row['id']; } ```
237983
The way I know it's deffintely DBNull is when I use String.IsNullOrEmpty it errors out with 'Cant convert type DBNull to type String' I'm using an ODBCDataReader with the following ODBCCommand to transfer from a Quickbooks Desktop company file to a SQL database via LINQ; not sure if this is a quirk of ODBC or somethin...
This is undefined behavior because `ivec` has size `4` yet you are indexing elements such as `4`, `5`, and `9` which are out of bounds. ``` for(auto i : ivec){ cout << ivec[i] << endl; } ``` Instead you should be printing the elements themselves ``` for(auto i : ivec){ cout << i << endl; } ``` To be clear, in...
238031
I have a database containing all orders I can connect to and query. Also, I have a text file containing the orders of the last database query I can connect to and query. I need to be able to left join the two in VBA. I don't have any problems with the database as it is in the connection string, but I can't seem to pass...
The mobile registration page allows for users to signup without an email address: <http://touch.facebook.com/r.php>
238313
I've tried almost everything on stack overflow, but to no avail. I've tried it all, but still nothing, so I'm here. I'm simply just trying to set the title to a white color and then set the title to "Terms of Service". Here's what I have: ``` #import <UIKit/UIKit.h> @interface TOCViewController : UINavigationControll...
To set title in `UINavigationBar` set `UIViewController` title ``` - (void)viewDidLoad { [super viewDidLoad]; [self setTitle:@"Terms of Service"]; } ``` For title color you need to set text attributes of `UINavigationBar`. ``` - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; ...
238609
I have a custom content type with a file field. I am trying to attach a file uploaded through a custom form to the custom content type. I am able to load the node and update all the other values of the node except the file field. I found [Realityloop: Programmatically attach files to a node in Drupal 8](https://mzlizz...
If you use media core module to manage files, you have already uploaded your file, and you want to attached it to filed eg `field_file` ``` $node = Node::load(NID); $node->set('field_file' , ['target_id' => FID]); $node->save(); ``` Note: `FID` is your file id.
238800
I want to print name and salary amount of the employee which has highest salary, till now its okay but if there are multiple records than print all. There are two table given :- EMPLOYEE TABLE :- [![enter image description here](https://i.stack.imgur.com/BuAoV.jpg)](https://i.stack.imgur.com/BuAoV.jpg) SALARY TABLE:...
It is "with ties" functionality what you're trying to achieve. Unfortunately mySQL doesn't support that (in the [docs](https://dev.mysql.com/doc/refman/8.0/en/select.html) there is nothing to add to the "LIMIT" part of the query), so you have no other option rather than looking for max salary first and filter records a...
238876
I have a classifieds website. The website is **php** based, and uses a **mysql** database. Today, I have a sitemap which I have to update using an external php script. This php script takes all classifieds from the database and creates an xml sitemap, fresh. Problem is I have to do this manually, by first opening the...
You are asking too much from Google. They aren't magic. Indexing the whole internet is a big task. And they aren't out there to do what you want. However, there are ways to get the google to notice things fasterish and also ways to get more up-to-the-moment searching through other means. Step one. The xml sitemap is g...
238913
I am trying to install yarn through npm on Mac by referring the documentation given here: <https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable> ``` npm install --global yarn ``` However when I run this command in terminal, I am getting the following error and the package is not being installed ``` npm WARN...
You can put all the ages into a list up front by calling `input()` in a loop instead of copying and pasting it eight times: ``` ages = [int(input(f"Enter the age of guest {i}(in years): ")) for i in range(1, 9)] ``` I'd suggest having your `getCost` function just return the cost for a single age (hint: make this sim...
238917
The trend of halide nucleophilicity in polar protic solvents is $$\ce{I- > Br- > Cl- > F-}$$ The reasons given by Solomons and Fryhle[1], and by Wade[2] are basically as follows. 1. Smaller anions are more solvated than bigger ones because of their 'charge to size ratio'. Thus, smaller ions are strongly held by the h...
This is a rather intellectually-stimulating question and one that is also very difficult to answer. You have constructed a very good case for why the nucleophilicity order would not be expected to reverse in polar aprotic solvents, i.e. the order of intrinsic nucleophilicities of the halide ions should be $\ce {I^- > B...
239006
I have a field that sometimes has one value and sometimes 2 values separated by a comma.I need to split the values into two columns. I have seen solutions using functions, but i need to add it to a view. Here is what I have been trying to do for the first column ``` SELECT CASE WHEN EXISTS(SELECT reportto FROM dbo.p...
You don't need subselects in your `CASE` statemant, you can work with the columns directly: ``` SELECT CASE WHEN CHARINDEX(',', reportto) > 0 THEN SUBSTRING(reportto, 1, CHARINDEX(',', reportto) -1) ELSE reportto END AS [Primary OTS Approver] FROM placement; ```
239055
Here is my SQL code. I have selected the price of each row and the milestone of each row and the id to join the tables, but I have only the result of one row. PHP code to do multiple filters: ``` if($i==0) { if($fc == "projet") { $filtre_bdd .= "AND p.$fc = '$fv' "; } else { $filt...
The *creation* might be the cause of your confusion. In fact, you are right: Two string instances are involved in the line ``` String summer = new String("Summer"); ``` As there are two string instances involved, they must have been created somwhere and sometime. The creation time is the big difference. The `"Summe...
239227
I have to execute the following `cmd` commands of Windows in Java. **The `cmd` commands:** ``` Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. //First i have to change my default directory// C:\Users\shubh>D: //Then move to a specific folder in the D drive.// D...
I suggest using <https://commons.apache.org/proper/commons-exec/> for executing o/s command from within Java because it deals with various issues you may encounter later. You can use: ``` CommandLine cmdLine = CommandLine.parse("cmd /c d: && cd MapForceServer2017\\bin\\ && mapforceserver run ..."); DefaultExecutor ex...
239326
I am trying to parse iTunes top movies (top songs, albums etc) RSS feed, using PHP. Is there a library that I can use to parse them, without writing too much XML code (or using simplexml)? I tried [simplepie](http://simplepie.org/), but it gave me some inconsistent results, and it is no longer maintained.
Here is a good overview: <http://www.webresourcesdepot.com/php-rss-parsers/>
239499
I made an edit on a low-quality answer (pretty much as a side effect while I was checking the answer for stealthy spam links and comparing it to other answers). But [a user rejected it](https://gaming.stackexchange.com/review/suggested-edits/194250) (edit has now been approved overall) because he thinks the post is no...
I'm not going to comment on the post that motivated this question. I didn't even look at it, and it sounds like the edit was accepted eventually, anyway. I'll address the actual issue, instead: Just because an answer should be deleted as it stands doesn't mean that any and all possible future versions of the answer wo...
240089
I need to add a small strip in between items of a RecyclerView. This strip can come after different number of items in a list. This needs to be done dynamically. I need to implement something like what FitBit has done:[![enter image description here](https://i.stack.imgur.com/pLl7t.jpg)](https://i.stack.imgur.com/pLl7t...
You should use the concept of different view types using [getItemViewType(int)](https://developer.android.com/intl/pt-br/reference/android/support/v7/widget/RecyclerView.Adapter.html#getItemViewType(int)). Then on [onCreateViewHolder(ViewGroup, int)](https://developer.android.com/intl/pt-br/reference/android/support/v7...
240177
I keep receiving this error for my mobile navigation: > > Uncaught TypeError: Cannot set property 'onclick' of null > > > I cannot find the cause. The error is referring to the last 3/4 lines of code. ``` var theToggle = document.getElementById('toggle'); function hasClass(elem, className) { return new RegE...
Looks like Your .js loaded before DOM was initialized, and `document.getElementById('toggle')` found nothing, as there is no element with this id yet. Place this `<script>` in the end of HTML.
240448
(On Mac OS X 10.6, Apache 2.2.11) Following the oft-repeated googled advice, I've set up mod\_proxy on my Mac to act as a forward proxy for http requests. My httpd.conf contains this: ``` <IfModule mod_proxy> ProxyRequests On ProxyVia On <Proxy *> Allow from all </Proxy> ``` (Yes, I realize that's not ideal, but...
> > State: 1 > > > is a generic state which is always returned to the client to prevent information disclosure to unauthenticated clients. You should find a similar error message in your server log ("C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG") with an accurate state. More information regar...
240699
Let's say I get a directory listing of .jpg files and then want to display them ``` const fs = require('fs'); fs.readDirSync(someAbsolutePathToFolder) .filter(f => f.endsWith('.jpg')) .forEach(filename => { const img = new Image(); const filepath = path.join(someAbsolutePathToFolder, filename)...
You can use Node's (v10+) `pathToFileURL`: ``` import { pathToFileURL } from 'url'; const url = pathToFileURL('/some/path/#001-image.jpg'); img.src = url.href; ``` See: <https://nodejs.org/api/url.html#url_url_pathtofileurl_path>
240770
My goal is to have a computer stream the video from a usb webcam to my own android app. On the PC I'm running VLC which streams the capture device (webcam) over RTSP on port 8554, with the following settings: ``` Video Codec: H.264 Video Resolution: 1600x1200 x 0.25= 400 x 300 px Video Frame Rate: 12 fps Video Bitrat...
Try http stream from VLC. You can never remove all the lag when transcoding, but should be able to get it down to < 10 seconds.
240961
We have a domain based on Gmail. This question is for the within domain users. Whenever a certain user replies to my email, it mostly creates a new thread of its own. For example, if I start an email chain with > > subject: Hello World > > > Now, if this specific user replies to the email, then it mostly crea...
Nowadays, as September 2019, Google Sheets doesn't include a way to hide the active owner/editors selection on the regular spreadsheet view. Please submit your feedback to Google using [Google Feedback](https://www.google.com/tools/feedback/intl/en/).
241469
I have a simple script that should Update variable in a column where user login equals some login. ``` <?PHP $login = $_POST['login']; $column= $_POST['column']; $number = $_POST['number']; $link = mysqli_connect("localhost", "id3008526_root", "12345", "id3008526_test"); $ins = mysqli_query($link, "UPDATE test_table...
Simply remove quotes: `'$column' =` should be `$column =` --- Your code is open for SQL Injection, use prepared statements.
241547
I am currently working on a wordpress site, I am using a form that the user can modify so that it updates the database : Here's the HTML/PHP code : ``` echo '<form class="form-verifdoc" target="noredirect" method = "post">'; echo '<label class="label-verifdoc" style="float:left;margin-top:10px;margin-right:10px;"for...
Your expected output needs to be wrapped in curly braces in order to be a valid JSON object. That said, use `from_entries` to create an object from an array of key-value pairs, which can be produced by accordingly `map`ping the input object's `Objects` array. ``` .Objects | map({key: .ElementName, value: .ElementArray...
241704
**Objective:** Pass an array of information from tableview to another tableview using the data created. **Problem:** Couldn't access the array information from TableViewController in preparingForSegue **Result:** TableViewController contains employee names, and when click on each of the employee, it goes to the det...
According to your question you are going to pass **one** item (the employee) to the detail view controller, not an array. Do that: * In `VillageTableViewController` replace `prepare(for` with ``` override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "showVillages", let...
241742
On Code Review, I've noticed that there is a blind upvoting of posts. People judge the question by the heading, not by the effort. Is this a proper way of upvoting posts?
As one of this site's [top voters](https://codereview.stackexchange.com/users?tab=Voters&filter=all) and with one of my former display names being @lol.upvote, I feel somewhat obligated to post an answer here. This site has been in public beta for well over 3 years (today is beta day #[1254](http://area51.stackexchang...
241817
I'm building an iPhone app using the Titanium framework. I need a 5-star rating control in my app, just like the one found in the app store. As a temporary solution I'm using the slider for adding a rating. Most of the examples I found on the web are in objective C. can somebody guide me on achieving this using titaniu...
You just need to create a `view` and populate it with the number of buttons you want then assign a click event to them. ``` var rateView = Ti.UI.createView(), max = 5, min = 1; // used in the flexMin and flexMax function rate(v) { // rate code storage goes here // your choice on if you want to have separa...
241854
This is probably a dumb question(and I can't find a previous iteration of this question), but... How do I rigorously show that $\Bbb Q$ and $\Bbb R$ are not isomorphic? I mean there is a notion of $\Bbb Q$ being smaller than $\Bbb R$, and perhaps it has something to do with $\sqrt{2}$ being in $\Bbb R$ and not in $\Bb...
Well, if you have a field isomorphism $\phi: F\to K$, then if we have a polynomial equation $$ x^n + a\_{n-1} x^{n-1}+ \ldots + a\_0 = 0, $$ with coefficients in $F$, we get an equation $$ x^n + \phi(a\_{n-1})x^{n-1} + \ldots \phi(a\_0) = 0 $$ with coefficients in $K$. Then if $\alpha$ is a solution to our equation wit...
243335
Im trying to access a enum from a model class to write a switch case to perform a segue. Here is my code: ``` class LandingViewController: UIViewController { // MARK: Private Structs. private struct SegueIdentifier { static let forcedUpdate = "forcedUpdate" static let optionalUpdate = "optionalUpdate" } // ...
yes, u can use the same text box added in the `ViewController` in `DerivedViewController`, for this u add one more `textbox` in the `DerivedViewController's` scene and connect the `IBOutlet` to `ViewController 's` `textbox` no need to create a new outlet for `textbox` in the `DerivedViewController` this way u can inher...
243595
I am trying to extract a string between two patterns from another string in C++. > > Example of input: "C++ is not that easy" > > > Pattern1: "C++" > > > Pattern2: "that" > > > Result: " is not " > > > I would like to loop this operation to extract all matching strings from binary file later.
The best way for this is to use regular expressions. You can read more about it [here](http://msdn.microsoft.com/en-us/library/4384yce9%28v=vs.80%29.aspx)
243996
I have a table with 11 columns and 5 rows The Columns are labelled in this manner A ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,ADD CLA is a Manual Input Cell CL1 is always equal to CLA. A, being the cell that already contains an input in the form of single number. Given, first row contains a random arrangement of numbers f...
Usually, I use something like this: ``` <table> <td align="center"> <div class="round-button"> <a href="viewStatus.php"> <img name="myImg" src="images/City.png" alt="Home" onClick='Func'/> </a> </div> </td> </table> <script type="text/javascript"> functi...
244100
``` $ie = New-Object -com internetexplorer.application ``` Everytime i open a new website with this object(ie every time when script runs) it is opened in a new IE window and i don't want it to do that. I want it to be opened in a new tab but that too in a previously opened IE window. I want to reuse this object when...
You can use `Start-Process` to open the URL. If a browser window is already open, it will open as a tab. ``` Start-Process 'http://www.microsoft.com' ```
244457
I want to use a `case "name"` . ``` char arg1[256]; one_argument(argument, arg1, sizeof(arg1)); if(*arg1) { switch(LOWER(*arg1)) { case 'anime': { } break; } } ``` When i call command `do_reload anime` not work. `do_reload` is main function and `'anime'` is case. If i us...
As others have stated, you can't use text literals with `case` statements. Your alternatives are: 1. Lookup table with text and function pointers. 2. `std::map` with function pointers. 3. The if/else-if/else ladder. *Note: One issue with `std::map` or lookup table is that all function must have the same signature....
244638
I have a script which gets all the files from particular location.But I need to fetch the files which are lates. The script should give the latest files which are present at that location. eg.I have a location at whcih there are some files named as below ``` DataLogs_20141125_AP.CSV DataLogs_20141125_UK_EARLY.CSV ...
You could do this: 1. Get the latest date by splitting individual file names and taking the first element from reverse sorted. 2. From the latest date, get all the files which contain latest date ``` fileList = ['DataLogs_20141125_AP.CSV', 'DataLogs_20141125_UK_EARLY.CSV', 'DataLogs_20141125_CAN.CSV', 'DataLogs_201...
244845
I have created a timer which is not synchronizing on multiple browsers. On inactive tabs of browsers or even on devices timer is running faster or slower.. There is difference of 3-4 seconds on different tabs.. How to sync them? This is my module code: ``` import { Observable, BehaviorSubject, Subscription } from 'r...
You made an external (I hope either global or auction-specific) service for getting the time left and you get an observable from that service. Good, I would do the same! But I think you should remove that "RequestAnimationFrame" from the service. My guess is that you are using it to update the view. You should not do t...
244966
Hi I am working on a school project and I am having a hard time with a particular function. I have been working on it for a while, I would appreciate any type of input. We have to use this function: ``` bool movieLibrary::readMovieInfo(ifstream& inFile) { inFile>>rank>>year>>votes>>nationality; getline(inFi...
Since you call `readMovieInfo` in your loop condition, *and also* in the body of your loop, you'll call it twice for each index except 0. Since you increment `i` before the second call in each iteration, you'll overwrite the second element with the third, the fourth with the fifth, and so on: you'll lose every other m...
244995
Summary: I have close to 500 \*.csv files that I need to merge into one csv file where during the merge process the filename for each csv needs to be added in each row in a new column. I have read many threads here on stackoverflow and beyond. I am attempting to do this in Terminal (not a script that I run in terminal...
```sh awk -v OFS=, ' FNR == 1 { print "date,ProductNumber,Brand,Description,Size,UnitType,Pack,UPC,Available,Status,Delivery Due Date" file = FILENAME sub(/.csv$/, "", file) } {print file, $0} ' *.csv > out.csv ``` If the list of file is too long, then ```sh find . -name '*.csv' -...
245186
I created a Google sheet for my team and we needed to attach files on it. I found a code which i thought worked well. I haven't coded for sometime nor used google script before. But from looking at it not working it must be the script or the onclick= on submit? The google drive ID is fine , and i checked for all the <...
```r n_df <- 20 df_rows <- sample(1:50000, n_df) df_list <- lapply(1:n_df, function(x){ data.frame(z = rnorm(df_rows[[x]])) }) ``` You can also do this without pre-sampling the number of rows in each (if desired): ```r df_list <- lapply(1:n_df, function(x){ data.frame(z = rnorm(sample(1:50000, 1))) }) ``` As ...
245187
The last few failing builds pass fine on my computer, but I am having trouble getting them to pass on travis. The problem is coming from there few lines in the tests (and other similar operations): <https://github.com/garth5689/pyd2l/blob/master/test/pyd2l_test.py#L15-L20> In my tests, since I have complicated data to...
`./` is redundant; the path to the file is already relative to your current working directory. The problem is that you want it to instead be relative to your test directory, so: ``` import os # ... with open(os.path.join(os.path.dirname(__file__), 'soup_1899_pickle.pkl'), 'rb') as soup_pickle: ```
245406
I have a following mysql query to update my `tblcem_appraisal_log` table ``` UPDATE tblcem_appraisal_log AS tblog INNER JOIN ( SELECT ta.id FROM tblcem_appraisal_log AS ta INNER JOIN tblcem_master_appraisal AS tm ON tm.id = ta.master_app_id ORDER BY ta.id DESC LI...
You have to select the column in your subselect and use the alias of that table: ``` UPDATE tblcem_appraisal_log AS tblog INNER JOIN ( SELECT ta.id, tm.quarter1 FROM tblcem_appraisal_log AS ta INNER JOIN tblcem_master_appraisal AS tm ON tm.id = ta.master_app_i...
245954
I've been trying to retrieve some of my e-mails in order to have them as data in R. In case it is needed, it is on a Microsoft Exchange Server. ``` require(RDCOMClient) folderName = 'ElastAlerts' #creating the outlook object OutApp <- COMCreate('Outlook.Application') outlookNameSpace <- OutApp$GetNameSpace("MAPI") ...
I was facing the same issue and resolved it after playing around it. Possible solutions, In `folder <- outlookNameSpace$Folders(1)$Folders(folderName)` This instead of using "1" try using "2" or "3", it works for me. Don't know why it is changing folder index.
245979
I am having trouble reading in data from a JSON file. I have gone through the other reading JSON questions on Stack Overflow and the JSON docs to no avail. I am trying to read in data to be displayed in Three.js. The following snippet works: ``` var obj = { "points" : [ { "vertex":[0.0,0.0,0.0] }, { "vertex":[200.0,0...
Read the docs for [getJSON](http://api.jquery.com/jQuery.getJSON/), it is an asynchronous call! You need to put the for loop in in the callback.
246066
Given a number \$n ≥ 2\$, a [blackbox function](https://codegolf.meta.stackexchange.com/a/13706/100664) \$f\$ that takes no arguments and returns a random integer in the range 0...n-1 inclusive, and a number \$m ≥ n\$, your challenge is to generate a random integer in the range 0...m-1 inclusive. You may not use any no...
[Jelly](https://github.com/DennisMitchell/jelly), ~~6~~ 5 bytes =============================================================== ``` ÇÐṀḊ¿ ``` [Try it online!](https://tio.run/##AR0A4v9qZWxsef81WOKAmf/Dh8OQ4bmA4biKwr////8yNw "Jelly – Try It Online") A monadic link taking `m` as its argument and expecting the blackbo...
246651
I see this question out there. but the answer doesn't work for me. I created an empty asp.net website. .NET 4.5 I installed the sample in nuget via Install-Package Microsoft.AspNet.Identity.Sample -pre I could not get the initializer to run. so i the did the following ``` public class ApplicationDbContext : Iden...
I try this, and problem is solved. in 「App\_Start\Startup.Auth.cs」 ``` public partial class Startup { // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 public void ConfigureAuth(IAppBuilder app) { // Configure the db context, user man...
246691
I'm new to numpy and have been tasked with the following situation: I need to create two numpy arrays of random integers (between 0 + 1). One numpy array represents the x-coordinates and the other one represents the y-coordinates. I then need to check to see if the points fall inside a circle of radius one by using squ...
**squareDataOne** looks like this: ``` [7.43871942e-02 2.73007883e-01 5.23115388e-03 6.57541340e-01 3.08779564e-01 1.24098667e-02 5.08258990e-01 6.52590269e-01 8.90656103e-02 3.76389212e-02 2.12513661e-01 2.79683875e-01 7.76233370e-01 6.48353342e-02 8.01663208e-01 8.69331480e-01 4.34903542e] ``` **squareData2** ...
246706
**AN OVERBROAD PATENT ON ELECTRONIC COLLECTION OF ITEMS** - This patent claims the idea of... an electronic collection of items! 10 minutes of your time can help narrow US patent applications before they become patents. [Follow @askpatents](https://twitter.com/AskPatents) on twitter to help. **QUESTION** - Have you se...
A successive process of elimination using the attributes of a collection of images is the basis of the board game "Guess Who?" which has been sold by Milton Bradley since 1979. In this game players try to identify a selected face in a collection, by questioning each other about facial attributes and eliminating faces f...
247061
So right now trying to test out the new Visual Studio Code on OS X, but running into a myriad of issues. Right now been sort out the issue with the dnu command, but now having issues with: `dnx . kestrel` This would be in relation to the **Commands with Ease** section from the [Visual Studio Code](https://code.visua...
I had a similar issue when trying to run from the \samples\latest folder instead of \samples\1.0.0-beta4 folder. Simply trying again from where I was supposed to be worked.
247086
[![What My new screen does...](https://i.stack.imgur.com/bPxyl.jpg)](https://i.stack.imgur.com/bPxyl.jpg) So a week ago i purchased a 7" MAKIBES touchscreen for my raspberry pi 2 I went on this website for help with setting this screen up: <http://www.waveshare.com/wiki/7inch_HDMI_LCD_(B)#Rev1.1_LCD_Images_for_Raspbe...
Based on everything you've described in the comments, it sounds like your issue is directly related to your power supply. The Raspberry Pi Foundation [recommends](https://www.raspberrypi.org/help/faqs/#powerReqs) a minimum of a `1.8`. According to your comment, you have a `.5 A`. > > .., is there a suitable charger o...
247157
I want to log user's actions in my Ruby on Rails application. So far, I have a model observer that inserts logs to the database after updates and creates. In order to store which user performed the action that was logged, I require access to the session but that is problematic. Firstly, it breaks the MVC model. Secon...
Hrm, this is a sticky situation. You pretty much HAVE to violate MVC to get it working nicely. I'd do something like this: ``` class MyObserverClass < ActiveRecord::Observer cattr_accessor :current_user # GLOBAL VARIABLE. RELIES ON RAILS BEING SINGLE THREADED # other logging code goes here end class Application...
247447
I'm trying to remove date properties from Article schema generated by the Yoast SEO plugin. In their developer [docs](https://developer.yoast.com/features/schema/api/#change-a-graph-pieces-data) the `wpseo_schema_article` filter is set as an example for manipulating with Article graph piece. However even with this `ty...
Use [`numpy broadcasting`](https://numpy.org/doc/stable/user/basics.broadcasting.html), (`[:, None]`), to compare each date with all rows in contracts to check if the date is inbetween, then sum the number of contracts where this is `True`. First create a DataFrame of your dates then we do the comparison. ``` df = pd...
247510
I have done almost everything from numerous tutorials to get the RTC to work, but when I run `sudo hwclock -r`, i still get the following error. > > hwclock: Cannot access the Hardware Clock via any known method. > hwclock: Use the --debug option to see the details of our search for > an access method. > > > My...
You should be using device tree now. I suggest the following changes. Remove the following lines from `/etc/modules' ```none snd-bcm2835 i2c-bcm2835 i2c-bcm2708 rtc-ds1307 ``` I.e. `/etc/modules` should only contain ```none i2c-dev ``` Remove the following line from `/etc/rc.local` ```none echo ds3231 0x68 > /...
247687
I have created a modal box called sectors. Within my modal box I have created a line of code where the text will change color on click, but I want the original text color to be blue. I have tried setting the original font color to blue; but then the text does not change color on click. ```html <head> <script...
There are a couple of issues: 1. The draw options aren't quite right. This isn't actually causing the error, though. 2. There's a bug leaflet-draw that causes the exception you're seeing. Leaflet Draw Options -------------------- `square` is not a draw option. The correct option is `rectangle`. Additionally, all of ...
248234
This isn't a duplication of [Submit code during interview](https://softwareengineering.stackexchange.com/questions/98619/submit-code-during-interview), it's more a specific case. Let me tell how the situation developed. I was contacted by a small company(<50) in Europe. I am located in South America. I spoke with the...
Yes, be cautious. They don't need the license to **code written on your time**. In order to use the code, they would just need surrender language *in your employment offer*. It isn't a traditional scam - as you said, scammers don't spend two hours with a mark. **But** it does sound like *they intended to use y...
248247
Hello everyone I'm trying to setup my hp laserjet 4100n printer, but ubuntu 11.10 doesn't recognize it. I try to install the HPLIP or linux drivers, but then when it says to restart your computer when you have a parallel port printer nothing happens once you restart it. I try the installation 3 times ignoring the ste...
Try this link. It's the HP linux driver for your printer. <http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=29118&prodTypeId=18972&prodSeriesId=83436&swLang=8&swEnvOID=2020>
248248
I have a MySQL database-table with the following colums ``` ID status (can contain values 0, 1, 2) timepstamp text note owner ``` I'd like to obtain the following information about the entries of aspecific owner from the table: ``` number of entries number of entries where status=0 number of entries where status...
Give this a try - ``` SELECT COUNT(*) AS total, SUM(IF(status=0, 1, 0)) AS stat0, SUM(IF(status=1, 1, 0)) AS stat1, SUM(IF(status=2, 1, 0)) AS stat2, SUM(IF(LENGTH(note)>0, 1, 0)) AS notes, MIN(timestamp) AS mintime, MAX(timestamp) AS maxtime FROM tbl_name WHERE owner="name" GROUP BY owner...
248341
I want to have a same URL throughout my website. Whatever the user clicks on the web page, the redirected link should not display in the address bar in order to avoid the user to bookmark that page. Whatever it is, the user have to come from the home page and should follow the link to proceed further. Any help???
There are couple of options- 1. build your site with flash / silverlight or something like that. 2. put all your site in a IFrame, and navigate through it. 3. put a single http endpoint and put all your data in the http request data (with an post body or a session or cookie). for 2 and 3 users might sniff the traffic...
248425
I received an app, and e-shop of sorts, that I'm supposed to try to run and then modify a bit. I run it with Jetty on my local machine and went to <http://localhost:8080/etnshop/> (the 'welcome screen'), which seemed to work alright. However, after clicking on a button that's supposed to connect to a database, I receiv...
I have solved my problem with this code. ``` private Bitmap getBitmap(Drawable vectorDrawable) { Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); vectorDrawa...
248442
**This question is based on** [*this other question*](https://stackoverflow.com/questions/1145228/) **of mine, and uses all of the same basic info. That link shows my table layouts and the basic gist of the simple join.** I would like to write another query that would select EVERY record from ***Table1***, and simply...
``` SELECT t1.LogEntryID, t1.Value, t1.ThresholdID, case when t1.Value < t2.threshold then 1 else 0 end as Rank FROM Table1 t1 INNER JOIN Table2 t2 ON t1.ThresholdID = t2.ThresholdID ORDER By Rank ``` You can add `DESC` after `ORDER By Rank` if you want the reverse order.
248487
i'm working with laravel 5.1 (ecommerce), i passed some variables to my view: My variable "$price\_coupon" con be "0" OR ">0" for example 10,20 etc... I would like HIDE this: ``` <tr class="cart-subtotal" id="coupon"> <th>Coupon:</th> <td> <span class="amount">€{{ number_format($price_coupon, 2) }}</span> </td> </t...
All you're trying to do here is to compare the date to just *one* of your "3 or more" dates: you just have to work out which one that is, and then compare two dates. Since `Date` implements `Comparable<Date>`, you can use `Collections.min` and `Collections.max` to find the earliest and latest of them: ``` Date earlie...
248591
I'm new to Python, and pretty much programming/scripting. I'm just looking for someone to critique my methods and tell me if there are more efficient ways to do things. ``` #!/usr/bin/env python3 # # # A quick script to create a civil war game ############################ # DECLARE GLOBAL VARIABLES # ################...
As mentioned by [@abarnert](https://codereview.stackexchange.com/users/27320/abarnert), you're using infinite recursion to *"repeat forever"*. By default, after you've recursed more than 1000 times, your program will throw an error. The better way to do this would be to use a `while condition` loop. In this case, your ...
248612
Visiting the lost mansion of a conjurer, where portals were opening for a few seconds, a sorcerer tried to keep open one that led to the Elemental Plane of Fire blocking it with an [Immovable Rod](https://www.dndbeyond.com/magic-items/4662-immovable-rod). I'm interested in what would happen in order to preserve an int...
Taking a look at the description from 5e spells that open portals to other planes such as the 9th level conjuration spell *Gate*: > > The portal has a front and a back on each plane where it appears. > Travel through the portal is possible only by moving through its > front. Anything that does so is instantly trans...
249124
I get this response from a service I am calling. I wish to write an assertion in Soap-UI to validate the value of the `<Result>` tag. ``` <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <ServiceResponse> <!--Issue happens here when xmlns attribute is present--> <Servic...
`myList[0]` is not an identifier. It is an [array access expression](http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.10.3). The identifier in this case is `myList`.
249356
I Am correctly using my own way to achieve this, but I don't know if it is efficient or not , so this is the function : ``` public SqlDataReader GetArticlesByPage(int pageNum, int pageSize) { if (pageNum == 0) pageNum = 1; SqlDataReader dr = SqlHelper.ExecuteReader(string.Format("SELECT TOP {0} Des, I...
You can do all the paging at sql server. For example, see <http://blogs.x2line.com/al/archive/2005/11/18/1323.aspx> If you don't want to do it this way and insist on using `TOP`, then skipping the rows at start is pretty all you can do and it's ok. (from above link) ``` DECLARE @PageNum AS INT; DECLARE @PageSize A...
249357
I am trying to write tests for my nodejs server application and by now everything worked fine. I can compile my code from typescript to javascript without error and everything but when I try to run mocha tests the typescript pre-compilation fails due to not finding my self defined typings in `typings.d.ts`. Here are m...
In my case, I inserted the following into `tsconfig.json` ``` { "ts-node": { "transpileOnly": true }, "compilerOptions": { ... } } ``` and it works.
249472
I am trying to do a basic search feature but I am having a small issue. When I go to the template that has the search form, it is displaying all the items before I even try to search. Is there a way to show a blank template until the user has put in a search term and hit the search button? Example: [Search field][But...
This would be an example of covariant return types: ``` class Food {} class Fruit : Food {} class FoodEater { public virtual Food GetFavouriteFood() { ... } } class FruitEater : FoodEater { public override Fruit GetFavouriteFood() { ... } } ``` In languages that support return type covariance, this would be ...
249711
I got a table View and collection view on the each cell. When I tapped the cell, following code will be invoked in cell's `didSelectRowAt:IndexPath` method. ``` func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { navigationController?.pushViewController(anotherViewController(), ...
I suspect the problem rests in the `anotherViewController()` reference. I was even able to reproduce the problem when I pushed to a `UIViewController` instance: ``` navigationController?.pushViewController(UIViewController(), animated: true) ``` But when I instantiate a scene from a storyboard, that worked fine. Obv...
249748
I'm new to PHP, and I need some help. I can't seem to get the right score for a student. The scenario: * Input answers (answer key) for an exam with corresponding points * Input student-answer for that exam * Get total score of the student. My PHP code: ``` for ($count = 1; $count <= $num_ans; $count++) { $answ...
I don't like the design, I believe you should not inherit (this, for example, makes your type not be an aggregate), and that there are better approaches to serialization/deserialization than checking the size of the entity. That being said, after you force the initialization you can just assign. The implicitly declared...
249968
I follow below steps to deploy my custom jar 1)- I created on docker image through the below docker file ``` FROM openjdk:8-jre-alpine3.9 LABEL MAINTAINER DINESH LABEL version="1.0" LABEL description="First image with Dockerfile & DINESH." RUN mkdir /app COPY LoginService-0.0.1-SNAPSHOT.jar /app WORKDIR /app CMD ["j...
Try to access on nodeport `localhost:31284` and please use service type as `NodePort` instead of `LoadBalancer` because loadbalancer service type mostly used on cloud level. and Use Target-Port as same port you configured on pod definition yaml file. so your url should be `http://10.96.142.93:8000` or another way y...
250649
I'm trying to make a set of views (*that include several textviews and buttons - all in **different parent layouts**, but in the same activity*) invisible if a particular condition is evaluated to false. The conventional way to do that would be: ``` findViewById(R.id.myview).setVisibility(View.INVISIBLE); ``` My qu...
If the `View`s are in different parents , you can't do it directly, but you can implement a method to change the visibility of a bunch of `View`s if you want to keep your code clean: ``` List<View> relatedViews = new ArrayList<>(); // ... relatedViews.add(view1); relatedViews.add(view2); relatedViews.add(view3); //...
251241
I have a table form with some rows, that are controlled by user. Meaning they can add as more as they want. Let's pretend user requested 5 rows and i need to check if they all have values. ``` function validateForm() { var lastRowInserted = $("#packageAdd tr:last input").attr("name"); // gives me "packageItemName5"...
Like this ```js const validatePackageItems = () => { const nameValidate = $("form[name=packageForm] input[name^=packageItemName]"); // all fields with name starting with packageItemName const vals = nameValidate.map(function() { return this.value }).get(); // all values const filled = vals.filter(val => val.trim...
251503
I'm developing an ASP.NET application where I have to send an PDF based on a Table created dinamically on the page as attachment on a email. So I have a function that creates the PDF as iTextSharp Document and returns it. If i try just to save this document, it works fine but I'm having a bad time trying to make it as ...
Try to avoid passing the native iTextSharp objects around. Either pass streams, files or bytes. I don't have an IDE in front of me right now but you should be able to do something like this: ``` byte[] Bytes; using(MemoryStream ms = new MemoryStream()){ Utils.GeneratePDF(table, lastBook, lastDate, ms); Bytes =...
251701
I am trying to do the following. I have several spreadsheets that are named something like "ITT\_198763" where the ITT part stays the same but the number changes. I also have one tab called program where the 6 digit number is imported on row 40 (hence the RngToSearch below). I need the program to 1) find the "ITT" shee...
Yuo are getting that error because `foundColumn` has an invalid value. Step through the code and see what is the value of `foundColumn` Here is an example which works. ``` Sub Sample() Dim RngDest As Range, RngToSearch As Range foundColumn = 1 Set RngToSearch = Sheets("Program").Range("C40:q40") Se...
251777
I'm trying to setup a rewrite/redirect rule on a **web.config** file. I have little to no experience with IIS servers so I've been looking through solutions online, here at StackOverflow and other forums, and already tried a number of them without success. I must point out that I only have FTP access to the server so ...
How about this: ``` #include <stdio.h> int main() { double number = 612.216; char number_as_string[20]; snprintf(number_as_string,"%lf", number); for(int i = 0; number_as_string[i] != '\0'; i++) if(number_as_string[i] != '.') printf("%c", number_as_string[i]); return 0; } ``` T...
252015
An overview of what I've done: I've inherited `System.Windows.Forms.TextBox` and added a few properties to help me out in creating forms that generate SQL statements. I use to create a large function that would check for changes in the `TextBox` compared to a string. Then it would take text and concatenate it to a S...
There's not much to review here really. I'd be more interested in reviewing the code that's actually doing the work, but here goes. 1. Lose the Systems Hungarian notation. The IDE/Code tells me what the data type is. That is if you... 2. Declare the data types of the properties 3. Use auto properties. There's *way* t...
252108
I am learning how to program apps in ios. Anyone out there know of a recent tutorial that shows how to push a new instance of a table view controller object on top of the stack without the need to create and hookup new nib? I found an old tutorial at iphone SDK Articles dated 3/2009. The website does not exist anymore...
On the line where your begin the UIGraphicsImageContext, use `UIGraphicsBeginImageContextWithOptions` instead of `UIGraphicsBeginImageContext`. Try something like this: ``` UIGraphicsBeginImageContextWithOptions(targetSize, NO, 0.0) ``` Notice the three parameters passed above, I'll go through them in order: 1. `ta...
252127
I am running into an issue that I cannot seem to wrap my head around. I am using Razor Pages and have two objects that can be bound. ``` [BindProperty] public MeetingMinuteInputDto MeetingToCreate { get; set; } [BindProperty] public MeetingMinuteUpdateDto MeetingToUpdate { get; set; } ``` Above two are separate dt...
I was doing something similar. Searching for any solution, I find your question, but not a solution I share the solution. I implement multiple BindProperty and multiple Actions OnPost, and the solution I find is to do some in the Asp.Net MVC, using the [Bind] property. In your case, it would be. ``` public class Me...
252479
1. I need help with the prototype. 2. I need help with the caller. 3. I need help with the function header. I don't know how much more detail this site wants me to add, but the code speaks for itself, I am having trouble with the top three items but for some reason the site wants more context? ``` #include <iostream...
The `\w` is `0-9a-zA-Z_`\* you need to allow the `#` as well, you can use an alteration or a character class. ``` [#\w]+ ``` or ``` (?:#|\w)+ ``` Full example: ``` [#\w]+(?:\s*(\([^()]*+(?:(?1)[^()]*)*+\)))? ``` Demo: <https://3v4l.org/75eGQ> Regex demo: <https://regex101.com/r/1PYvpO/1/> > > \w stands for ...
252519
I am trying to repair my wipers, there is no voltage in the wires that connects to the wiper motor. I checked the fuses and current is passing through them, so they are ok. I think the Wiper Relay (or wiper control module) went bad, but I do not know where it is located. Can someone help me?
Though I may not be correct, have you tried opening your hood and using a spray bottle of water on your spark plug wires? Lightly mist around where the wires connect on both ends of the wires, and maybe a few squirts around on the wires themselves. If the vehicle stutters, it may just be that the wires need to be repla...
252867
i want make my button visible after matching some pattern into url every thing is going fine but it does not set visibility of my button to true i am trying this ``` try { sleep((int)(Math.random() * 1000)); btn = (Button) findViewById(R.id.My_btn); btn.req...
You're getting the error: > > 05-04 10:34:19.783: > ERROR/AndroidRuntime(915): > android.view.ViewRoot$CalledFromWrongThreadException: > Only the original thread that created > a view hierarchy can touch its > views.05 > > > This suggests that you're attempting to make the button visible from a non-ui thread...
253102
When I try to install Python 3.8 terminal says it is done, but when I run `python --version` it says Python 3.7. ```none (base) user@admin:~$ sudo apt-get install python3.8 Reading package lists... Done Building dependency tree Reading state information... Done python3.8 is already the newest version (3.8.2-1ub...
As per the instructions on [How to Install Python 3.8 on Ubuntu, Debian and LinuxMint – TecAdmin](https://tecadmin.net/install-python-3-8-ubuntu/), try the following: ### Prerequisites: Install [and or update] the following packages; build-essential, checkinstall, libreadline-gplv2-dev, libncursesw5-dev, libssl-dev, ...
253158
I am currently handed over a php project which was hosted by a different company before.My core domain is Java so everything related to PHP is new to me.When I run the project its difficult to know which PHP file the browser is showing since the URL does not show actual PHP filename due to 'URL rewriting'.I tried to re...
``` echo __FILE__; $included = get_included_files(); var_dump($included); ```
254132
I am building an activity model, somewhat similar to this [package](https://github.com/justquick/django-activity-stream). It has an actor, verb and the target. ``` class Activity(models.Model): actor_type = models.ForeignKey(ContentType, related_name='actor_type_activities') actor_id = models.PositiveIntegerFi...
Okay so answering my own question here. I had some help with zymud's answer. So, apparently in the [documentation](http://www.django-rest-framework.org/api-guide/relations/#generic-relationships), there is a way to serialize the Generic relation. So, all I had to do was create a custom field and associate that field i...
254533
I am new to Kotlin. I have an android project which I opted to convert to kotlin. This is my piece of code. ``` import com.beardedhen.androidbootstrap.BootstrapButton class EndTrip : AppCompatActivity(){ internal var endtrip: BootstrapButton ?= null override fun onCreate(savedInstanceState: Bundle?) { super....
The error tell you that you cannot guarantee that `endtrip` is not null at that line of code. The reason is that `endtrip` is a `var`. It can be mutated by other thread, even if you do a null check just before you use that variable. Here is the [official document's](https://kotlinlang.org/docs/reference/typecasts.html...
254784
I have set up Google Analytics v2 beta on a test project as bellow **MainActivity.java** ``` public class MainActivity extends Activity { Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ma...
This doesn't look good: ``` <string name="ga_trackingId">UA&#8211;37418075&#8211;1</string> ``` `&#8211;` (–) is `&ndash`; which is a different character from the ASCII - (-) (`&#45`). I'm pretty sure GA just expects ASCII in the tracking Id. Unless that was just inserted when pasting into stack overflow.
254956
I want to enable the tab menu after the the data is found (dt1.Rows.Count is not null) .In the HTML code below all the tabs are disable HTML ``` <div id="Tabs" role="tabpanel" style="background-color: #CCCCCC; " > <ul class="nav nav-tabs" > <li id="result1" class="active disabled" style="left: 0px; top...
In your **aspx** file add `id` and `runat="server"` to the `ul` and its `li` tags. That way they will be visible from C# code. ``` <ul id="TabList" runat="server" class="nav nav-tabs"> <li id="result1" runat="server" class="disabled" ..... /> ........ </ul> ``` Now in your **C# code** you can set attributes...
255032
I have an activities table like below (also contains some other columns): ``` +------------------+---------------+------------+ | data | event | logged_on | +------------------+---------------+------------+ | 12345 | File | 2015-04-08 | | 25232 | Bulletin | 2015...
Use `NOT EXISTS` to return only rows that has no later with same data/event. ``` SELECT data, event, logged_on AS latest_log_date from activites a1 where not exists (select 1 from activites a2 where a1.data = a2.data and a1.event = a2.event and a2.logged_on > a...
255682
I have several JSON files that look like this ``` { "$schema": "someURL", "id": "someURL", "type": "object", "properties": { "copyright": { "id": "someURL", "type": "object", "description": "Setup for copyright link", "properties": { "translation": { "id": "someURL",...
I have find the solution. Now HTTPRuntime class doesnt have CacheInternal Property.So to achive the above task I have created a global list adding sessions in that list in Session\_Start and removing the sessions in Sessions\_end functions of Global.asax.
255835
I'm writing a ncurses based chat program. At first, I wrote just networking stuff (without ncurses) and everything worked fine, but after adding graphics I can't get the client app to work properly. The main problem is reading from stdin and socket at the same time. In ncurses-less version I've used pthread and it wor...
Your problem is in the `select()`. The first parameter is **not** the number of file descriptors you are passing in *read\_fds*, but it's the highest socket ID + 1. From the man page: > > The first nfds descriptors are checked in each set; i.e., the > descriptors from 0 through nfds-1 in the descriptor sets are ...
256364
For $a,b \in \mathbb{R}$ define $a \sim b$ if $a - b \in \mathbb{Z}$ I don't understand how I'm suppose to prove this: Prove that $\sim$ defines an equivalence relation on $\mathbb{Z}$ Also can you help me with finding the equivalence class of 5. In other words what I'm trying to describe is the set $[5]$ = {$y : 5 ...
You need to check 3 things : 1. Reflexivity : $a\sim a$ because $a-a = 0 \in \mathbb{Z}$ 2. Symmetry : $a\sim b$ implies that $a-b\in \mathbb{Z}$, and so $b-a\in \mathbb{Z}$ and hence $b\sim a$ 3. Transitivity : If $a\sim b$ and $b\sim c$, then $a-b, b-c\in \mathbb{Z}$, and hence $$ a-c = a-b + b-c \in \mathbb{Z} $$ S...
256390
I have a table that populates data from Postgres. I am able to populate the data. I have written a method to delete data from my mat-table. but when I click on the delete button then all data goes off from the screen and the data that I clicked remains. After I refresh the page manually and then I see that the data tha...
You have to Create a function for get Data you delete ! **.ts** ``` deleteQuestionSet(row) { this.dataSource.data = <QuestionSetInterface>this.dataSource.data.filter(i => i == row) ; this.httpClient.post('http://localhost:8080/mylearning/deletequestionSet',this.dataSource.data[0],{ responseType: "text" }) ...
256518
I've defined this function: ``` // retrieves zip of package manifest supplied var retrieveZip = function(metadataClient, args, callback) { metadataClient.retrieve(args, function(err, result) { metadataClient.checkRetrieveStatus({id: result.result.id, includeZip: 'true'}, function(err, result) { if(result....
From your description, it sounds like you just want to call `checkRetrieveStatus` until it's done, *not* `retrieve` *and* `checkRetrieveStatus`. Is that correct? If so, the thing to do is to extract the status check out into your own function that can recursively call itself, like this: ``` var checkStatus = function...
256805
In the last few days I already posted two alternative proofs ([here](https://math.stackexchange.com/questions/1455348/proof-that-if-phi-in-mathbbrx-is-continuous-then-x-mid-phix-ge) and the other available link) of the basic result in metric spaces that, given a continuous function $\phi \in \mathbb{R}^X$, the set $\{ ...
At the end of your proof, you set $\alpha = \phi(\bar{z}) - \epsilon$, $x^\*=\bar{z}$, but $x^\* \not\in G : = \{ \phi(x) < \phi(\bar{z}) - \epsilon\}$. **Edit:** I believe you want to set $\alpha = \phi(z) + \epsilon$, that way at least $z=x\in G$ and for each $B\_\delta(x)$, there exists $t\in B\_\delta(x)$ such tha...
256847
Using SQL Server 2008, without using full-text indexing or CLR integration, is there a better way to search a table column for arbitrary text than the following: ``` declare @SubString nvarchar(max) = 'Desired substring may contain any special character such as %^_[]' select * from Items where Name like '%' + re...
Your form is trying to POST data to the server. This is a HTTP POST request. You define GET and SET methods in your view. You need to use POST there. ``` @app.route('/new_action', methods=['GET', 'POST']) # Changed SET to POST here @login_required def new_action(): # ... what ever... ``` You should go through t...
256935
I would like to prove that $\alpha = \frac{1}{2\pi} \frac{xdy-ydx}{x^2+y^2}$ is a closed differential form on $\mathbb{R}^2-\{0\}$ . However when I apply the external derivative to this expression (and ignore the $\frac{1}{2\pi}\cdot\frac{1}{x^2+y^2}$ factor ), I get: \begin{equation} d \alpha = \frac{\partial x}{\par...
Well, let us write $\alpha=f\cdot \omega $ with $f(x,y)=\frac{1}{x^2+y^2}$ and $\omega=xdy-ydx$. Then \begin{align} d\alpha=df\wedge \omega+fd\omega&=-\frac{1}{(x^2+y^2)^2}\left(2xdx+2ydy\right)\wedge\omega+ \frac{1}{x^2+y^2}2dx\wedge dy=\\ &=-\frac{1}{(x^2+y^2)^2}\left(2x^2 dx\wedge dy-2y^2dy\wedge dx\right)+ \frac{1}...
257176
I have no intent to post a duplicated thread here. I'm interested in an offline version of Stack Overflow where I can study on the run as my job is an interstate courier that does not always have an Internet connection. Using 3G data is very expensive though. Is there a way to download an offline dump from the Stack O...
I have created several books (physical and eBooks). I've update the Python eBook with data from the latest data dump (June 2016) and generated a Python physical book if you want that. While not exactly what you're after (it's not quite "outlook style"), both books have links (eBook has hyperlinks, physical book as pag...
257567
I'm trying to send faxes with a .NET (C#) program using Crystal Reports and Unimessage Pro (or any other fax program). My problem is that Unimessage Pro (and other fax programs) uses printer fonts for the fax commands. Since .NET doesn't support printer fonts the fax commands in the report are converted to Courier New...
I got this answer from WordCraft (company behind Unimessage Pro) > > 1. Create a file named WilCapAX.INI in the main Windows folder, e.g. > C:\Windows\WilCapAX.INI The file > should contain the following: > [WilCapAX] > Commands=C:\Commands.DAT Where "C:\Commands.DAT" is the name of > a text file you are going t...