qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
We've been building WIODE for some time now. Very stable release, easy install, and lots of features - [WIODE Browser Based IDE][1] [1]: <http://www.wiode.com/> "WIODE IDE" **UPDATE: WIODE has been replaced with a new project - [Codiad](http://www.codiad.com)**
You missed... * [jsbin.com](http://jsbin.com) * [ideone.com](http://ideone.com) * [codepad.org](http://codepad.org) * [pastebin for PHP](http://codepad.viper-7.com/) (good for testing PHP 5.3)
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
Also I recommend you read this article: <http://eclipse.dzone.com/news/who-needs-online-ide> It links and describes a lot of them, even more then those mentioned by others here. edit: most of the ones describe in that article are dead. Instead check out: Full fledge IDEs: * [ShiftEdit](http://shiftedit.net/) * [Cl...
I've been working on one for a while that you might find interesting if you are looking for something you can install on your own server. <http://abstractionbuilder.com> It's free to use and it currently features some file management on your server, as well as real-time document editing with a nice preview.
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
Also I recommend you read this article: <http://eclipse.dzone.com/news/who-needs-online-ide> It links and describes a lot of them, even more then those mentioned by others here. edit: most of the ones describe in that article are dead. Instead check out: Full fledge IDEs: * [ShiftEdit](http://shiftedit.net/) * [Cl...
We've been building WIODE for some time now. Very stable release, easy install, and lots of features - [WIODE Browser Based IDE][1] [1]: <http://www.wiode.com/> "WIODE IDE" **UPDATE: WIODE has been replaced with a new project - [Codiad](http://www.codiad.com)**
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
Also I recommend you read this article: <http://eclipse.dzone.com/news/who-needs-online-ide> It links and describes a lot of them, even more then those mentioned by others here. edit: most of the ones describe in that article are dead. Instead check out: Full fledge IDEs: * [ShiftEdit](http://shiftedit.net/) * [Cl...
shameless plug for our solution, PythonAnywhere, which lets you code and run python apps in a browser... we also offer hosting for web apps, and our web-based console is fully functional, includes Bash for using git/hg/mercurial, Dropbox integration. You can also code in other languages, although we don't have interpr...
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
We've been building WIODE for some time now. Very stable release, easy install, and lots of features - [WIODE Browser Based IDE][1] [1]: <http://www.wiode.com/> "WIODE IDE" **UPDATE: WIODE has been replaced with a new project - [Codiad](http://www.codiad.com)**
I've been working on one for a while that you might find interesting if you are looking for something you can install on your own server. <http://abstractionbuilder.com> It's free to use and it currently features some file management on your server, as well as real-time document editing with a nice preview.
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
shameless plug for our solution, PythonAnywhere, which lets you code and run python apps in a browser... we also offer hosting for web apps, and our web-based console is fully functional, includes Bash for using git/hg/mercurial, Dropbox integration. You can also code in other languages, although we don't have interpr...
I've been working on one for a while that you might find interesting if you are looking for something you can install on your own server. <http://abstractionbuilder.com> It's free to use and it currently features some file management on your server, as well as real-time document editing with a nice preview.
5,200,950
I have serbian-english words in .rtf format and I need to extract it from this document and put them into some datastructure. I know to work with databases but I don't know if it is suitable for this situation. For example i have italic words and don't know how to put this into database (maybe to put inside tags?). Is...
2011/03/05
[ "https://Stackoverflow.com/questions/5200950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/507018/" ]
We've been building WIODE for some time now. Very stable release, easy install, and lots of features - [WIODE Browser Based IDE][1] [1]: <http://www.wiode.com/> "WIODE IDE" **UPDATE: WIODE has been replaced with a new project - [Codiad](http://www.codiad.com)**
shameless plug for our solution, PythonAnywhere, which lets you code and run python apps in a browser... we also offer hosting for web apps, and our web-based console is fully functional, includes Bash for using git/hg/mercurial, Dropbox integration. You can also code in other languages, although we don't have interpr...
53,584,192
I have an async function that uses redux and it calls an API and returns the response from the server: ``` function xyz() { return async (dispatch, getState) => { const { user: { token } } = getState(); return axios.get(API_URL, { headers: { Accept: "application/json", "Content-Type": "...
2018/12/02
[ "https://Stackoverflow.com/questions/53584192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10458632/" ]
Like I mentioned in the comments, xyz() should return a promise. Double check that the dispatch and getState arguments are getting passed correctly. You'll also need to [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) the returned axios.get promise. For example: ``` abc = asyn...
I don't fully understand what you mean when you say the `console.log` in xyz prints the expected result, are you speaking about the `error.message` in your `catch`? Also, the reason you may be receiving `undefined` is because `function xyz` is not **Async** but rather it returns an async function, thus you should make ...
27,436,710
I have a problem with our web service. We didn't make the web service so we don't know what's really happening. At first, it works in our server but sometimes it doesn't which causes us to restart it. Then now, it shows error message: > > Secure channel cannot be opened because security negotiation with the remote en...
2014/12/12
[ "https://Stackoverflow.com/questions/27436710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4217968/" ]
Finally found the answer! Basically, under Binding in System.Servicemodel of my asp.net application web.config, I should have added: ``` <security mode="None"/> ``` It was deleted because I was playing with the code for the web service authentication. Thank God I have multiple backups! Thanks guys! I'll update this ...
Under Security tag, try this ``` <security mode="None"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> </security> ```
27,436,710
I have a problem with our web service. We didn't make the web service so we don't know what's really happening. At first, it works in our server but sometimes it doesn't which causes us to restart it. Then now, it shows error message: > > Secure channel cannot be opened because security negotiation with the remote en...
2014/12/12
[ "https://Stackoverflow.com/questions/27436710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4217968/" ]
We have fixed **Old Code** ``` <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" /> <message establishSecurityContext="false" /> </security> ``` **New Code** ``` <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredential...
Under Security tag, try this ``` <security mode="None"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /> </security> ```
27,436,710
I have a problem with our web service. We didn't make the web service so we don't know what's really happening. At first, it works in our server but sometimes it doesn't which causes us to restart it. Then now, it shows error message: > > Secure channel cannot be opened because security negotiation with the remote en...
2014/12/12
[ "https://Stackoverflow.com/questions/27436710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4217968/" ]
Finally found the answer! Basically, under Binding in System.Servicemodel of my asp.net application web.config, I should have added: ``` <security mode="None"/> ``` It was deleted because I was playing with the code for the web service authentication. Thank God I have multiple backups! Thanks guys! I'll update this ...
We have fixed **Old Code** ``` <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" /> <message establishSecurityContext="false" /> </security> ``` **New Code** ``` <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredential...
25,781,570
I have state table having state\_id and state\_name. I am displaying it directly in template file like below.. ``` <select name="state" id="state" class="select-submit2"> <option value="">Select state</option> <?php $result=$wpdb->get_results("select * from states"); foreach($result as $row) { ...
2014/09/11
[ "https://Stackoverflow.com/questions/25781570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3240391/" ]
As per as discussed in the previous comments, I guess that property is a custom post type in your site. So if that is the scenario then this should be the solution. ``` <select name="state" id="state" class="select-submit2"> <option value="">Select state</option> <?php $property_id = $_GET['listing_edit']; //the P...
If this is what you are looking for? ``` <select name="state" id="state" class="select-submit2"> <option value="">Select state</option> <?php $result=$wpdb->get_results("select * from states"); foreach($result as $row) { $state_id=$row->state_id; $state_name=$row->state_name; ...
6,002,510
I want to get the source code of a site using PHP, but when I do it comes up empty. I believe it is because you have to sign in to the site before using it, and the PHP call is not in a signed in session when asking for the contents. Is this correct? Is there a way to bypass this or send the sign in user and pass by PH...
2011/05/14
[ "https://Stackoverflow.com/questions/6002510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432539/" ]
You'll need to use something like [cURL](http://php.net/curl) to emulate the log-in form and send the POST request to the remote server. See this post here for a simple example: <http://davidwalsh.name/execute-http-post-php-curl> I would, though, see if the remote site offers an API that you can use to authenticate a...
Yes, first you will need to make a login call to whatever the page is, and use the `CURLOPT_COOKIEJAR` and `CURLOPT_COOKIEFILE` settings to keep track of the session when making calls as an authenticated user using [curl\_setopt](http://www.php.net/manual/en/function.curl-setopt.php).
42,260,106
This is a really ugly question. I have a C++ program which does the following in a loop: * Waits for a JMS message * Calculates some data * Sends a JMS message in response My program (let's call it "Bob") has a rather severe memory leak. The memory leak is located in a shared library that someone else wrote, which ...
2017/02/15
[ "https://Stackoverflow.com/questions/42260106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2209270/" ]
Assuming the memory leak occurs in the "Calculates some data" phase, I think it might make more sense to just refactor that portion into a separate program and fork out to execute that in its own process. That way you can at least isolate the offending code and make it easier to replace it in the future, rather than ju...
If you make the program itself restart or fork the "Calculates some data" section to a separate process, in any case you'll need to check for the memory consumption. Since you're on Linux, an easy way to check this is to get the pid number of the process of interest, and read the contents of the file `/proc/$PID/statm`...
71,044,815
i want to navigate to other page while clicking on the button and while clicking the button i also have to call an api.but its not working can anyone tell me whats the problem [its the api link] [1]: <https://api.tvmaze.com/shows/$%7Bid%7D> its my contact component ``` import React,{useState,useEffect} from 'react'; i...
2022/02/09
[ "https://Stackoverflow.com/questions/71044815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18044392/" ]
Here You can use this , No Error will occured ``` const renderTable = () => { return data && data.length > 0 && data.map((user, i) => { return ( <tr key={i}> <td>{user.show?.name}</td> <td>{user.show?.language}</td> <td>{user.show?.genres}</td> <td>{user.show?.runtime}</td> <td>{...
I think the problem is in api and also the id here > > const url = `https://api.tvmaze.com/shows/${id} > > > where have you declared the id ? and to make sure that the data is coming fine before using it first console.log() the response data and see what you get and open the network tab to see the reason of the e...
152,356
I have a water that is saturated with Calcium Magnesium Carbonate $\ce{CaMg(CO3)\_2}$ (Dolomite). This precipitates in particularly metal pipes and whenever the water is heated. Instead of ion exchange (Sodium for the group 2 metals), reverse osmosis or deionisation, how about reducing the pH to say $\pu{6.6 - 6.9}$ wi...
2021/06/02
[ "https://chemistry.stackexchange.com/questions/152356", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/110662/" ]
$6.6$ is neutral for pretty much all purposes. So is $6.0$. So is $5.0$. You need to go way lower than that. Table vinegar may have $\rm{pH}\approx2.5\dots3.0$, and that's what you want to use to hear that gentle fizz of dissolving carbonates. Yes, this is a viable method. No, it will not corrode steel pipes to any si...
If by "metal", you mean steel: Our water guy recommended sulfamic acid for cleaning. I don't know the chemistry but this is old, standard technology. Water treatment companies like Nalco could have information and supplies. NACE ( national association of corrosion engineers) would have a variety of references ; for a p...
5,287,790
I'm one of the developers working on the [Serval Project](http://www.servalproject.org) and we're looking at using the [Huawei Ideos U1850](http://www.huaweidevice.com/resource/mini/201008174756/ideos/) as the default platform for our Android development activities. We've purchased a few phones from one of our local r...
2011/03/13
[ "https://Stackoverflow.com/questions/5287790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/657262/" ]
The idea of a MAC address is that they are intended to be globally unique identifications. I am not sure how you are seeing the same MAC address across multiple devices, this should never happen. I know it perhaps does not answer your question but it should never happen in the first place. None the less, you can try ...
At first you need to be root on your mobile, and open a terminal ``` ~: netcfg -->show yours net devices ``` Now you can see what device you want to change, then you can do the next steps where eth0 would be replace with your net device name (wlan0 is common). ``` ~: ifconfig eth0 down ~: ifconfig eth0 hw ether 00:...
5,287,790
I'm one of the developers working on the [Serval Project](http://www.servalproject.org) and we're looking at using the [Huawei Ideos U1850](http://www.huaweidevice.com/resource/mini/201008174756/ideos/) as the default platform for our Android development activities. We've purchased a few phones from one of our local r...
2011/03/13
[ "https://Stackoverflow.com/questions/5287790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/657262/" ]
The idea of a MAC address is that they are intended to be globally unique identifications. I am not sure how you are seeing the same MAC address across multiple devices, this should never happen. I know it perhaps does not answer your question but it should never happen in the first place. None the less, you can try ...
While I was searching for a more permanent way to change my wifi mac address, I discovered there is a util for Texas Instrument wifi chips. It is called "calibrator". The wifi mac address can set in the nvs file. Here is what I did. root@android:/system/etc/firmware/ti-connectivity # calibrator set nvs\_mac wl1271-nv...
63,057,142
I am working on the below code. Why am I not able to use the `$('.quantity').each(function()` when adding the content dynamically to the document? As you can see the `$('.quantity').each()` is functioning properly when is hard coded but not working on dynamic content. ```js $("#add").on("click", function(){ $("#con...
2020/07/23
[ "https://Stackoverflow.com/questions/63057142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1106951/" ]
On DOM load, a listener is set on all elements with the specified class. Later when an element is loaded dynamically, that element lacks the listener. One solution is to make the listener adder a function and call it whenever the dynamic content is added. I have edited the snippet for this solution. Else, you can sep...
You can setup jQuery as a live listener by attaching it to the parent like this: `$("#parent").on("click", ".child", (event) => {...});` This way the listener is attached to all childs, even if they have been added after the listener was setup. So in your case something like `$("document").on("click", "#add", (event...
63,057,142
I am working on the below code. Why am I not able to use the `$('.quantity').each(function()` when adding the content dynamically to the document? As you can see the `$('.quantity').each()` is functioning properly when is hard coded but not working on dynamic content. ```js $("#add").on("click", function(){ $("#con...
2020/07/23
[ "https://Stackoverflow.com/questions/63057142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1106951/" ]
Your code is ok, it's just misplaced. I've taken the code with button logic and wrapped it in a named function. You will use this function when creating new buttons. Also, your HTML for the new buttons should be wrapped in `$(...)` to store them and use them after you append them to `#content` ```js function enableBu...
You can setup jQuery as a live listener by attaching it to the parent like this: `$("#parent").on("click", ".child", (event) => {...});` This way the listener is attached to all childs, even if they have been added after the listener was setup. So in your case something like `$("document").on("click", "#add", (event...
232,787
There is a small gap in between my apartment's front door and the door frame. I was told by an exterminator that small roaches may be able to fit through the gap to get inside, and it seems that may be the case given the fact that I sometimes find roaches close to the door. Part of what may be causing the gap is that t...
2021/08/28
[ "https://diy.stackexchange.com/questions/232787", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/140963/" ]
Baby roaches are the least of your worries ------------------------------------------ The problem you're not seeing here is that this isn't just any old door. Due to the fact it's the entrance to your apartment from the corridor, it's a *fire door*, and that means its proper functioning is *critical* to keeping you an...
**Roach spray.** Which you need anyway because roaches are coming in. Keep the can by the door and add spray around the frame and at the bottom when you think of roaches. Roaches on their way in probably rest in the tight space while they decide what to do. Those that do will soak up the poison.
93,809
[Bitcoinabuse.com](http://Bitcoinabuse.com) is where we can report scammer addresses for Bitcoin wallets. What is the equivalent for Ether scammer addresses?
2021/02/22
[ "https://ethereum.stackexchange.com/questions/93809", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/65799/" ]
> > My syntax seems to be ok > > > The compiler thinks otherwise :-) You're missing some brackets `(` `)` around the curly braces... ``` (bool success) = address(parentContract).call({value: msg.value})(abi.encodeWithSignature("triggerPayment(uint256)", index)); ```
Please check if the version of Solidity is correct. Changed in version 0.6.4, please try version 0.6.4 or higher.
32,428,101
I am newbie I have tried to bind simply `HashSet` as `DataSource` of DataGridView, but still has any item in `GridView` ``` dataGridViewBookList.DataSource = null; dataGridViewBookList.DataSource = bookContainer; ``` Creating hash set ``` bookContainer = new HashSet<BookModel>(); dataGridViewBookLi...
2015/09/06
[ "https://Stackoverflow.com/questions/32428101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Your [collection\_select](http://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/collection_select) should be like this (with explanation of each field): ``` collection_select( :user, # field namespace :user_id, # field name # result of these two params will be: <select name="user[user_id]"> # ...
You probably need: ``` <%= form_tag user_path(:id), :method => :post do %> <%= collection_select(:user, :user_id, User.all, :id, :name) %> <button type="submit">Sign In</button> <% end %> ```
36,786,007
``` #include <iostream> #include <vector> #include <algorithm> #include <cstdlib> int main() { std::vector<short> a(256); for (short x = 0; x != 256; ++x) { a[x] = x; } for (auto x : a) { std::cout << x << ' '; } std::cout << std::endl; std::cout << std::endl; std::srand(11); std:...
2016/04/22
[ "https://Stackoverflow.com/questions/36786007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713926/" ]
Both of your issues are not related to asynchronous functions, and actually both issues are because of the same problem: ``` while (stream.DataAvailable) { // read stream here } ``` If data is not *yet* available to read from the stream - both of your ReceiveMessage and HandleConnections functions just skip read...
It doesn't look like a problem with `async`/`await` so much as an issue with your TCP streams. You don't appear to be actually waiting for a response. `SendMessage` writes the server, then `RecieveMessage` expects a response to already be in the stream. If `stream.DataAvailable` is false when you hit the `while` loop...
18,809
I am using Adobe Illustrator CS6 to create small images (like icons) for my app so I need pixel precision. How can I avoid X, Y, W and H properties to have decimals? Can I configure 0 decimals for this properties on my document? If I use the textboxes with this properties it does right, it increases pixel by pixel, b...
2013/06/14
[ "https://graphicdesign.stackexchange.com/questions/18809", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/13374/" ]
Select the object and then tick the **Align to Pixel Grid** option on the **Transform Panel**. This will force objects to snap to the nearest pixel. So, beware, paths will move and changes to match the pixel grid. And strokes are limited to nothing less than 1pt/px. When creating a new document, you can also choose...
Very simple: **just work with pixel preview on**. To do that, go to (top menu) \View \ Pixel Preview.
18,809
I am using Adobe Illustrator CS6 to create small images (like icons) for my app so I need pixel precision. How can I avoid X, Y, W and H properties to have decimals? Can I configure 0 decimals for this properties on my document? If I use the textboxes with this properties it does right, it increases pixel by pixel, b...
2013/06/14
[ "https://graphicdesign.stackexchange.com/questions/18809", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/13374/" ]
Select the object and then tick the **Align to Pixel Grid** option on the **Transform Panel**. This will force objects to snap to the nearest pixel. So, beware, paths will move and changes to match the pixel grid. And strokes are limited to nothing less than 1pt/px. When creating a new document, you can also choose...
go to view and make sure you check the snap to grid, snap to pixel, and snap to point option before you create an icon or any artwork in illustrator. Then you will get perfect pixel in every move.
40,256,919
I am using the Ionic Framework to build a mobile app for Android/iOS. I was able to build the project for android (ionic build android). When I run the app, it will be only a white screen, that's because there is an error (when you use GapDebug, you can run apps on your phone and you will be able to debug, and see err...
2016/10/26
[ "https://Stackoverflow.com/questions/40256919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1276897/" ]
There's no way you can make all Observables do some globally predefined behavior. Since you probably want to handle mostly request from `http` in some uniform way you can replace the default `http` service with your own that extends methods such as `get()` or `post()` and always append `catch()` or `retryWhen()` opera...
The thing is, I don't think the http is throwing an exception, not in the usual sense. It is calling the catch delegate when a HTTP error code is received. From reading around you can catch globally thrown errors like in C# using the [ErrorHandler](https://angular.io/docs/ts/latest/api/core/index/ErrorHandler-class.ht...
42,084,327
I wanna set my custom camera focus distance to infinity while using external fisheye lens, This is what I have done so far: ``` builder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF); builder.set(CaptureRequest.LENS_FOCUS_DISTANCE, 0.0f); ``` But the result is so blurry. I am using Samsung...
2017/02/07
[ "https://Stackoverflow.com/questions/42084327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5344661/" ]
If you are just talking about using the built-in camera's lens to achieve fisheye, then the lowest value you should use is: ``` float minFocalDist = cameraCharacteristics.get(CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE); ``` If you are using an external lens, then I believe that the correct approach is ac...
For anyone googling here, to get Android CameraX, camera characteristics such as CameraCharacteristics.LENS\_INFO\_MINIMUM\_FOCUS\_DISTANCE. For 2021 the syntax is like ... So, you've gone through the process of getting the camera ... ``` theCamera = cameraProvider.bindToLifecycle((LifecycleOwner)this, ...
41,569,804
In my file I have below data, everything is string Input ``` "abcd","12345","success,1234,out",,"hai" ``` The output should be like below Column 1: "abcd" Column 2: "12345" Column 3: "success,1234,out" Column 4: null Column 5: "hai" We need to use comma as a delimiter , the null value is comming without doubl...
2017/01/10
[ "https://Stackoverflow.com/questions/41569804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7399561/" ]
You could try a tool like `CSVReader` from OpenCsv <https://sourceforge.net/projects/opencsv/> You can even configure a `CSVParser` (used by the reader) to output `null` on several conditions. From the doc : > > > ``` > /** > * Denotes what field contents will cause the parser to return null: EMPTY_SEPARATORS, EM...
You can use this Regular Expression ``` "([^"]*)" ``` DEMO: <https://regex101.com/r/WpgU9W/1> ``` Match 1 Group 1. 1-5 `abcd` Match 2 Group 1. 8-13 `12345` Match 3 Group 1. 16-32 `success,1234,out` Match 4 Group 1. 36-39 `hai` ```
41,569,804
In my file I have below data, everything is string Input ``` "abcd","12345","success,1234,out",,"hai" ``` The output should be like below Column 1: "abcd" Column 2: "12345" Column 3: "success,1234,out" Column 4: null Column 5: "hai" We need to use comma as a delimiter , the null value is comming without doubl...
2017/01/10
[ "https://Stackoverflow.com/questions/41569804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7399561/" ]
You could try a tool like `CSVReader` from OpenCsv <https://sourceforge.net/projects/opencsv/> You can even configure a `CSVParser` (used by the reader) to output `null` on several conditions. From the doc : > > > ``` > /** > * Denotes what field contents will cause the parser to return null: EMPTY_SEPARATORS, EM...
Using the [`("[^"]+")|(?<=,)(,)`](https://regex101.com/r/uzJWJY/1) regex you may find either quoted strings (`"[^"]+"`), which should be treated as is, or commas preceded by commas, which denote null field values. All you need now is iterate through the matches and check which of the two capture groups defined and outp...
41,569,804
In my file I have below data, everything is string Input ``` "abcd","12345","success,1234,out",,"hai" ``` The output should be like below Column 1: "abcd" Column 2: "12345" Column 3: "success,1234,out" Column 4: null Column 5: "hai" We need to use comma as a delimiter , the null value is comming without doubl...
2017/01/10
[ "https://Stackoverflow.com/questions/41569804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7399561/" ]
You could try a tool like `CSVReader` from OpenCsv <https://sourceforge.net/projects/opencsv/> You can even configure a `CSVParser` (used by the reader) to output `null` on several conditions. From the doc : > > > ``` > /** > * Denotes what field contents will cause the parser to return null: EMPTY_SEPARATORS, EM...
Step #1: ``` import java.util.regex.Matcher; import java.util.regex.Pattern; final String regex = "(,,)"; final String string = "\"abcd\",\"12345\",\"success,1234,out\",,\"hai\"\n" + "\"abcd\",\"12345\",\"success,1234,out\",\"null\",\"hai\""; final String subst = ",\"null\","; final Pattern pattern = Pattern.co...
41,569,804
In my file I have below data, everything is string Input ``` "abcd","12345","success,1234,out",,"hai" ``` The output should be like below Column 1: "abcd" Column 2: "12345" Column 3: "success,1234,out" Column 4: null Column 5: "hai" We need to use comma as a delimiter , the null value is comming without doubl...
2017/01/10
[ "https://Stackoverflow.com/questions/41569804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7399561/" ]
You could try a tool like `CSVReader` from OpenCsv <https://sourceforge.net/projects/opencsv/> You can even configure a `CSVParser` (used by the reader) to output `null` on several conditions. From the doc : > > > ``` > /** > * Denotes what field contents will cause the parser to return null: EMPTY_SEPARATORS, EM...
You can also use the Replace function: ``` final String inuput = "\"abcd\",\"12345\",\"success,1234,out\",,\"hai\""; System.out.println(inuput); String[] strings = inuput .replaceAll(",,", ",\"\",") .replaceAll(",,", ",\"\",") // if you have more then one null successively .replaceAll("\",\"",...
46,509,520
I have a `JMeter` project with multiple `GET` and `POST` requests and assertions for these. I use `Aggregate results` and `View results tre`e listeners, but none of these can store results on hourly basis. I tried `JMeterPlugins-Standard` and `JMeterPlugins-Extras` packages and `jp@gc - Graphs Generator` listener, but ...
2017/10/01
[ "https://Stackoverflow.com/questions/46509520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3946482/" ]
I'm going to suggest a non-conventional design-level solution: name your samplers dynamically with hour (or date and hour), so that each hour the name will change, and thus they will appear in different category, i.e.: [![enter image description here](https://i.stack.imgur.com/IGiYZ.png)](https://i.stack.imgur.com/IGi...
You might want to use [Filter Results Tool](https://jmeter-plugins.org/wiki/FilterResultsTool/) which has `--start-offset` and `--end-offset` parameters, you can "cut" your results file into "interesting" pieces and plot them according to your requirements. You can install Filter Results Tool using [JMeter Plugins Ma...
46,509,520
I have a `JMeter` project with multiple `GET` and `POST` requests and assertions for these. I use `Aggregate results` and `View results tre`e listeners, but none of these can store results on hourly basis. I tried `JMeterPlugins-Standard` and `JMeterPlugins-Extras` packages and `jp@gc - Graphs Generator` listener, but ...
2017/10/01
[ "https://Stackoverflow.com/questions/46509520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3946482/" ]
I'm going to suggest a non-conventional design-level solution: name your samplers dynamically with hour (or date and hour), so that each hour the name will change, and thus they will appear in different category, i.e.: [![enter image description here](https://i.stack.imgur.com/IGiYZ.png)](https://i.stack.imgur.com/IGi...
To get summarized results per hour add to your test plan [Generate Summary Results](http://jmeter.apache.org/usermanual/component_reference.html#Generate_Summary_Results): > > Generates a summary of the test run so far to the log file and/or standard output > > > Update interval in jmeter.properties to your needs...
46,509,520
I have a `JMeter` project with multiple `GET` and `POST` requests and assertions for these. I use `Aggregate results` and `View results tre`e listeners, but none of these can store results on hourly basis. I tried `JMeterPlugins-Standard` and `JMeterPlugins-Extras` packages and `jp@gc - Graphs Generator` listener, but ...
2017/10/01
[ "https://Stackoverflow.com/questions/46509520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3946482/" ]
I'm going to suggest a non-conventional design-level solution: name your samplers dynamically with hour (or date and hour), so that each hour the name will change, and thus they will appear in different category, i.e.: [![enter image description here](https://i.stack.imgur.com/IGiYZ.png)](https://i.stack.imgur.com/IGi...
You can try with `Jmeter backend Listener`. It has integration with graphite and Influxdb. After storing the results in these time series database you can display the result in Grafana dashboard. Grafana has its own filtering of showing the results in hourly, monthly, daily basis and so on.
41,490
I have a good friend in USA who is a permanent resident and is married to a US citizen. They have only one income (although his income is a bit over $100K per year) and his wife (who is the citizen) has not had any income for over a decade. She also does not have any debt. They have common budget and he had paid off t...
2014/12/18
[ "https://money.stackexchange.com/questions/41490", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24145/" ]
To the best of my knowledge, your immigration status is unknown to the credit reporting agencies, so changing from visa to green card or from green card to citizenship will have no effect whatsoever on your credit score.
Income is not a factor in credit score, current debt and credit inquiries are. Given that he is the one active financially (borrowing and paying for things) it actually makes sense for her to have a better credit score, she probably has a card or two in her name, which gets paid off entirely each month. He on the other...
68,769,767
after 1 week of searching and try&error I'm creating this question in the hope of someone willing to help me out on this one: My VsCode Snippet should transform the following: ``` D:\FolderX\FolderY\src\Folder1\Folder2\Folder3 ``` into: ``` FOLDER1_FOLDER2_FOLDER3_FILENAMEBASE ``` Folder3 could be optional what...
2021/08/13
[ "https://Stackoverflow.com/questions/68769767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16656130/" ]
You can use ```js "body": [ "${TM_DIRECTORY/^(?:.*\\\\)?src\\\\|([^\\\\]+)|(\\\\)/${1:/upcase}${2:+_}/g}_${TM_FILENAME_BASE/.+/${0:/upcase}/}", ], ``` *Details*: * `^` - start of string * `(?:.*\\\\)?` - an optional sequence of any zero or more chars other than line break chars as many as possible and then * `s...
This answer is not directly related to question, however, it is because of the answer from [@Wiktor Stribiżew](https://stackoverflow.com/a/68770129/13264506), that I managed to make my snippet work, after a couple of hours on this. I am modifying the standard `rfce` snippet from dsznajder - ES7+ React/Redux/React-Nati...
25,612,394
The function `bars` takes a list of `Foo` objects and returns a list of the `bar` attributes of those: ``` def bars(foos): bars = [] for foo in foos: bars.append(foo.bar) return bars ``` Coming from a Java background, this is the way I would have solved this in the past. But I feel that ...
2014/09/01
[ "https://Stackoverflow.com/questions/25612394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1627479/" ]
Use [list-comprehensions](https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions): ``` [foo.bar for foo in foos] ``` (You can wrap it with `def bars(foos):`, but I think it's more readable without it)
For your example, `@Korem`'s suggestion of a list comprehension is the ideal solution. But here's an alternative for when you encounter that pattern where you * initialize an empty sequence * append to it in a loop * return the sequence but maybe need to do some more heavy lifting that you can't simply express in an...
19,221,538
I have a ListView which shows a collection of objects. I want to disable the "Blue effect" or "Blue rectangle" when clicking on the ListViewItem, and Let only the object in this Item enabled. Does anyone has an idea about that ?? Here is an Example of one of my ListViewItems: ![LisViewItem](https://i.stack.imgur.com/...
2013/10/07
[ "https://Stackoverflow.com/questions/19221538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2724814/" ]
Setting the `IsEnabled` property of a parent control to `False` will automatically set the `IsEnabled` property of every child control to `False` as well. The only way around this is to set the `IsEnabled` property of the individual controls that you want to be disabled to `False`, *instead* of that of the parent contr...
As I stated at the comments, I would change the ListViewItem template. The code is very verbose, so let's do it: First, create a ResourceDictionary and set a reference to it in you `App.xaml`. Having done that, paste the code below at the ResourceDictionary: ``` <SolidColorBrush x:Key="Item.MouseOver.Backgr...
11,077,864
I am developing application in android.What I want is ,my activity should represent two xml layouts files.concept is like, ->when the activity is started it should show one layout(screen) ->when I click on the button exist on the first layout, it should show 2nd layout in the bottom of the screen,keeping first layout...
2012/06/18
[ "https://Stackoverflow.com/questions/11077864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1457840/" ]
Have both the layout in a single XML. Keep the visibility of the the second layout to `secondLayoutObject.setVisibility(View.GONE)` initially and then on the click of the button change its visibility to `secondLayoutObject.setVisibility(View.Visible)`.
For this you have to use the concept of visibility. Initially set visibility of second layout as GONE and when you press button set Its visibility True.
11,077,864
I am developing application in android.What I want is ,my activity should represent two xml layouts files.concept is like, ->when the activity is started it should show one layout(screen) ->when I click on the button exist on the first layout, it should show 2nd layout in the bottom of the screen,keeping first layout...
2012/06/18
[ "https://Stackoverflow.com/questions/11077864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1457840/" ]
Have both the layout in a single XML. Keep the visibility of the the second layout to `secondLayoutObject.setVisibility(View.GONE)` initially and then on the click of the button change its visibility to `secondLayoutObject.setVisibility(View.Visible)`.
you can try use the bellow example: <https://github.com/AdilSoomro/Iphone-Tab-in-Android> this source code to change layout like button click to load another layout!
11,077,864
I am developing application in android.What I want is ,my activity should represent two xml layouts files.concept is like, ->when the activity is started it should show one layout(screen) ->when I click on the button exist on the first layout, it should show 2nd layout in the bottom of the screen,keeping first layout...
2012/06/18
[ "https://Stackoverflow.com/questions/11077864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1457840/" ]
Have both the layout in a single XML. Keep the visibility of the the second layout to `secondLayoutObject.setVisibility(View.GONE)` initially and then on the click of the button change its visibility to `secondLayoutObject.setVisibility(View.Visible)`.
On method to call two xml files in on activity is by using layoutmanager and assign the screen ratio for both xml files. Use relative layout in both xml. Small code snippet is ``` RelativeLayout layleft = (RelativeLayout)inf.inflate(R.layout.firstxml,null); RelativeLayout layright = (RelativeLayout)inf.inflat...
11,077,864
I am developing application in android.What I want is ,my activity should represent two xml layouts files.concept is like, ->when the activity is started it should show one layout(screen) ->when I click on the button exist on the first layout, it should show 2nd layout in the bottom of the screen,keeping first layout...
2012/06/18
[ "https://Stackoverflow.com/questions/11077864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1457840/" ]
On method to call two xml files in on activity is by using layoutmanager and assign the screen ratio for both xml files. Use relative layout in both xml. Small code snippet is ``` RelativeLayout layleft = (RelativeLayout)inf.inflate(R.layout.firstxml,null); RelativeLayout layright = (RelativeLayout)inf.inflat...
For this you have to use the concept of visibility. Initially set visibility of second layout as GONE and when you press button set Its visibility True.
11,077,864
I am developing application in android.What I want is ,my activity should represent two xml layouts files.concept is like, ->when the activity is started it should show one layout(screen) ->when I click on the button exist on the first layout, it should show 2nd layout in the bottom of the screen,keeping first layout...
2012/06/18
[ "https://Stackoverflow.com/questions/11077864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1457840/" ]
On method to call two xml files in on activity is by using layoutmanager and assign the screen ratio for both xml files. Use relative layout in both xml. Small code snippet is ``` RelativeLayout layleft = (RelativeLayout)inf.inflate(R.layout.firstxml,null); RelativeLayout layright = (RelativeLayout)inf.inflat...
you can try use the bellow example: <https://github.com/AdilSoomro/Iphone-Tab-in-Android> this source code to change layout like button click to load another layout!
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
You were on the right track. First, note that $$\cos(1/n)=1-\frac1{2n^2}+O(1/n^4)$$ Second, we have $$\begin{align} n^3\log(\cos(1/n))&=n^3\log\left(1-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=n^3\left(-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=-\frac12n+O\left(\frac1n\right) \end{align}$$ Finally, $$\begin{align} e^{n^3\l...
$\cos(\frac{1}{n}) = 1 - \frac{1}{2n^2} + o(\frac{1}{n^3})$. Let $a\_n = \cos(\frac{1}{n})$ and $b\_n = 1- \frac{1}{2n^2}$. We have $$\frac{a\_n^{n^3}}{b\_n^{n^3}} = (1 + \frac{o(\frac{1}{n^3})}{1-\frac{1}{2n^2}})^{n^3} = (1+c\_n o(1))^{n^3} $$ where $c\_n = \frac{1}{n^3} \cdot \frac{1}{1 - \frac{1}{2n^2}} = \frac{1}{n...
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
Use comparison test, using the inequality mentioned [here](https://math.stackexchange.com/questions/3254573/nature-of-sum-left-cos-frac1n-alpha-rightn/3254683#3254683) $$1-\frac{x^2}{2}\leq \cos{x}\leq e^{-\frac{x^2}{2}}, x \in \left[0,\frac{\pi}{2}\right]$$ or for $n\geq1$ $$0<\cos{\frac{1}{n}}\leq e^{-\frac{1}{2n^2}}...
$\cos(\frac{1}{n}) = 1 - \frac{1}{2n^2} + o(\frac{1}{n^3})$. Let $a\_n = \cos(\frac{1}{n})$ and $b\_n = 1- \frac{1}{2n^2}$. We have $$\frac{a\_n^{n^3}}{b\_n^{n^3}} = (1 + \frac{o(\frac{1}{n^3})}{1-\frac{1}{2n^2}})^{n^3} = (1+c\_n o(1))^{n^3} $$ where $c\_n = \frac{1}{n^3} \cdot \frac{1}{1 - \frac{1}{2n^2}} = \frac{1}{n...
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
You were on the right track. First, note that $$\cos(1/n)=1-\frac1{2n^2}+O(1/n^4)$$ Second, we have $$\begin{align} n^3\log(\cos(1/n))&=n^3\log\left(1-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=n^3\left(-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=-\frac12n+O\left(\frac1n\right) \end{align}$$ Finally, $$\begin{align} e^{n^3\l...
Use comparison test, using the inequality mentioned [here](https://math.stackexchange.com/questions/3254573/nature-of-sum-left-cos-frac1n-alpha-rightn/3254683#3254683) $$1-\frac{x^2}{2}\leq \cos{x}\leq e^{-\frac{x^2}{2}}, x \in \left[0,\frac{\pi}{2}\right]$$ or for $n\geq1$ $$0<\cos{\frac{1}{n}}\leq e^{-\frac{1}{2n^2}}...
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
You were on the right track. First, note that $$\cos(1/n)=1-\frac1{2n^2}+O(1/n^4)$$ Second, we have $$\begin{align} n^3\log(\cos(1/n))&=n^3\log\left(1-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=n^3\left(-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=-\frac12n+O\left(\frac1n\right) \end{align}$$ Finally, $$\begin{align} e^{n^3\l...
A possible way to show convergence is to rewrite $$\cos \frac 1n = \cos \frac{2}{2n} = 1- 2\sin^2 \frac 1{2n} $$ and now use root test and the standard limits $\lim\_{t\to 0}(1-t)^{\frac 1t} = \frac 1e$ and $\lim\_{t\to 0}\frac{\sin t}{t}=1$: \begin{eqnarray\*}\sqrt[n]{\left(1- 2\sin^2 \frac 1{2n}\right)^{n^3}} & = ...
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
You were on the right track. First, note that $$\cos(1/n)=1-\frac1{2n^2}+O(1/n^4)$$ Second, we have $$\begin{align} n^3\log(\cos(1/n))&=n^3\log\left(1-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=n^3\left(-\frac1{2n^2}+O(1/n^4)\right)\\\\ &=-\frac12n+O\left(\frac1n\right) \end{align}$$ Finally, $$\begin{align} e^{n^3\l...
The ratio test works fine using your way $$a\_n=\cos ^{n^3}\left(\frac{1}{n}\right)\implies \log(a\_n)=n^3\log\left(\cos \left(\frac{1}{n}\right) \right)$$ $$\cos \left(\frac{1}{n}\right)=1-\frac{1}{2 n^2}+\frac{1}{24 n^4}+O\left(\frac{1}{n^6}\right)$$ $$\log\left(\cos \left(\frac{1}{n}\right) \right)=-\frac{1}{2 n^2}-...
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
Use comparison test, using the inequality mentioned [here](https://math.stackexchange.com/questions/3254573/nature-of-sum-left-cos-frac1n-alpha-rightn/3254683#3254683) $$1-\frac{x^2}{2}\leq \cos{x}\leq e^{-\frac{x^2}{2}}, x \in \left[0,\frac{\pi}{2}\right]$$ or for $n\geq1$ $$0<\cos{\frac{1}{n}}\leq e^{-\frac{1}{2n^2}}...
A possible way to show convergence is to rewrite $$\cos \frac 1n = \cos \frac{2}{2n} = 1- 2\sin^2 \frac 1{2n} $$ and now use root test and the standard limits $\lim\_{t\to 0}(1-t)^{\frac 1t} = \frac 1e$ and $\lim\_{t\to 0}\frac{\sin t}{t}=1$: \begin{eqnarray\*}\sqrt[n]{\left(1- 2\sin^2 \frac 1{2n}\right)^{n^3}} & = ...
3,695,815
A uniform limit of continuous functions is continuous. In other words, if $f\_n$ is a sequence of continuous functions that uniformly converges to $f$, then $f$ is continuous. However, I'm wondering what if $f\_n$ is a sequence of uniformly continuous functions that converge pointwise to a function $f$? Can we say any...
2020/05/28
[ "https://math.stackexchange.com/questions/3695815", "https://math.stackexchange.com", "https://math.stackexchange.com/users/780083/" ]
Use comparison test, using the inequality mentioned [here](https://math.stackexchange.com/questions/3254573/nature-of-sum-left-cos-frac1n-alpha-rightn/3254683#3254683) $$1-\frac{x^2}{2}\leq \cos{x}\leq e^{-\frac{x^2}{2}}, x \in \left[0,\frac{\pi}{2}\right]$$ or for $n\geq1$ $$0<\cos{\frac{1}{n}}\leq e^{-\frac{1}{2n^2}}...
The ratio test works fine using your way $$a\_n=\cos ^{n^3}\left(\frac{1}{n}\right)\implies \log(a\_n)=n^3\log\left(\cos \left(\frac{1}{n}\right) \right)$$ $$\cos \left(\frac{1}{n}\right)=1-\frac{1}{2 n^2}+\frac{1}{24 n^4}+O\left(\frac{1}{n^6}\right)$$ $$\log\left(\cos \left(\frac{1}{n}\right) \right)=-\frac{1}{2 n^2}-...
35,805,582
I have the following code, but I get a "Object Required" error on line `Set CellRange = wks.Range(srange).Select`. I have tried many things, but cannot figure it out. I want to set background colors on a selected range based on a particular cell value. ``` Function RowColor() Application.Volatile Dim wks As ...
2016/03/04
[ "https://Stackoverflow.com/questions/35805582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1717647/" ]
As per my comment, which has gotten too much acclaim, change this: ``` Set CellRange = wks.Range(srange).Select ``` To: ``` Set CellRange = wks.Range(srange) ``` Remove the `.Select`. One does not set a range object using the `.Select` funstion. Simply set the range object to the range.
Scott in the comments is correct: remove the .Select at the end. Selecting cells does not return anything.
24,800,601
I have a layout with image view . On SWIPE LEFT of layout I want to call a new activity. ``` Intent right_intent = new Intent(); right_intent.setClass(this, mainScreenClass.class); right_intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(right_intent); ``` I am able to do this but calling of new activity...
2014/07/17
[ "https://Stackoverflow.com/questions/24800601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1619306/" ]
The object `x` does exist inside the function since it is the name of the parameter. If you modify the function ``` f <- function(...) { xchar <- deparse(substitute(...)) exists(xchar) } ``` you can see the expected output: ``` f(x) # FALSE ```
You may want to just search the global environment ``` f <- function(x) { xchar <- deparse(substitute(x)) exists(xchar,where=globalenv()) } ``` in which case you get: ``` > f(y) [1] FALSE > f(f) [1] TRUE > f(x) [1] FALSE > f(z) [1] FALSE > f(mean) [1] TRUE ```
3,050,335
I am planning to use Amazon EC2 host only for MemCache.My web application ll be residing on shared hosted server and will be communicating to Ec2 for querying Memcache. How would be the performance of this setup. Regards, Mugil.
2010/06/16
[ "https://Stackoverflow.com/questions/3050335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365941/" ]
Don't want to criticize your choice of architecture, but it sounds like you're misplacing your priorities. Memcache doesn't need a huge box to run on; it just needs as much memory as you're willing to feed it. The benefits of it are from the speed it offers while pushing and pulling information to/from it. Putting your...
That doesn't sound like a good idea, your memcached calls are going to go over the internet (as opposed to when you use ec2 for your web app, then your memcached calls are just within the amazon datacenter and very fast (or even on the same machine)). If you're going to get an EC2 instance, you should run your web ap...
41,458,528
I have a case where I want to migrate on-prem servers to Azure, but I should still have the local IPs pointing to these VMs. I mean by the local IPs the country-range of IPs since these VMs should be accessed using country IPs for regulatory reasons. I heard that this is possible, but I have no idea what type of resou...
2017/01/04
[ "https://Stackoverflow.com/questions/41458528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5222921/" ]
**NAT** is a method of remapping one IP address space into another by modifying network address information in Internet Protocol (IP) datagram packet headers while they are in transit across a traffic routing device. You can setup a site-to-site VPN between on-prem and Azure Vnet, then deploy a server on-prem run as...
It is possible, but with some complications and constraints: 1. You can run these servers/VMs in Azure using their public IP addresses. You need to create the Virtual Network using these address ranges, but it is possible. The catch here is that these public IP addresses are only accessible via cross premises connecti...
1,969,812
I want a field in a table of SQL Server 2008 to contain a preset number of string values for user to be able then to select one value from a dropdown listbox in my WPF front-end app. Is it possible only through assigning a numeric int type in a SQL Server table field and then doing all the stuff through C# front-end c...
2009/12/28
[ "https://Stackoverflow.com/questions/1969812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
Make a table containing your possible values and reference the field to that table with a `FOREIGN KEY`: ``` CREATE TABLE possible_strings (string_val NVARCHAR(100) PRIMARY KEY) INSERT INTO possible_strings VALUES ('First value of the list') INSERT INTO possible_strings VALUE ('Second value of the list') A...
I have done what you are thinking by creating a lookup table in the database and a corresponding Enum type in C#. The danger is that your Enum and the database table will eventually get out of sync when the code is modified. Also, Enum types aren't going to let you use nice readable names in your app. I have solved th...
1,969,812
I want a field in a table of SQL Server 2008 to contain a preset number of string values for user to be able then to select one value from a dropdown listbox in my WPF front-end app. Is it possible only through assigning a numeric int type in a SQL Server table field and then doing all the stuff through C# front-end c...
2009/12/28
[ "https://Stackoverflow.com/questions/1969812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199722/" ]
There are two different ways you could do this (well, two that come to my mind). Neither are specific to Sql Server. First, is to create a table which holds the values that go into the dropdown. This would be a very simple table such as **DayOfWeek** Name varchar(9) PK and then reference it in other tables via a...
I have done what you are thinking by creating a lookup table in the database and a corresponding Enum type in C#. The danger is that your Enum and the database table will eventually get out of sync when the code is modified. Also, Enum types aren't going to let you use nice readable names in your app. I have solved th...
47,684,832
I'm trying to write a generic function that creates a default value and iterates through its internal "buffer." All this happens within the function with no arguments nor return values. I seem to have the lifetimes declared incorrectly and I am having a hard time setting them correctly for this to work. Here is an exa...
2017/12/06
[ "https://Stackoverflow.com/questions/47684832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2081133/" ]
I believe that what you are attempting is currently impossible. To start with, your error message is because **the caller** is specifying the lifetime when passed to `start`: ``` fn start<'a, T: 'a>() ``` This doesn't make any sense because the caller *cannot* control the lifetime. For example, what if the call was...
Thanks to [Shepmaster](https://stackoverflow.com/users/155423/shepmaster) for pointing me in the right direction with HRTBs. After reading up on the topic, I was able to have the function itself provide the lifetime of `FooBarIter` and `FooBarIter::Item` instead. `FooBarIter` can now be borrowed and last until the end ...
94,203
Looking to add an action to `wp_head` but only if the user is in "theme customizer" mode. Does anyone know if there's a conditional for this?
2013/04/01
[ "https://wordpress.stackexchange.com/questions/94203", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/2527/" ]
You could use [`query_posts()`](http://codex.wordpress.org/query_posts) to set up a new loop in your page. Assuming that the posts you want are in the category 'Noticias', with a slug of 'noticias': ``` query_posts( 'category=noticias' ); if( have_posts() ) { get_template_part( 'loop', 'index' ); } wp_reset_query(...
You can simply use an iframe to wrap your query and place the iframe on any html or php page without having to touch your current page code.... See detail explanation on this link: <http://allnigeriansinspain.com/blog/show-wordpress-post-on-static-html-page/>
59,088,468
In Azure Cosmos I have selected partition key as City. But it is possible that this key can have a null also. In such a case. Will all the City with null be in one partition. How will the partition be distributed in this case?
2019/11/28
[ "https://Stackoverflow.com/questions/59088468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/584239/" ]
You can't call `Localizations.of` (which calls `inheritFromWidgetOfExactType`) synchronously inside of `initState`, because the widget tree is still being built in that moment and you can't access inherited widget. You can call it using asynchronous callback: ```dart Timer.run(() { AppLocalizations.of(this.context);...
I didn't solve the problem explicitly, but I set up a workaround. First of all, I created a provider whose job was simply to convert a context into a concrete instance of `CoreLocalisation`. It used this class in the plugin: ```dart class CoreLocalisationProvider { final CoreLocalisation Function(BuildContext) of; ...
63,523
I am wondering if there is a more efficient route to take here. Using `AspNet.Identity` I would like to allow the user to sign in to the same text box using either their username`or email. I went ahead and addressed this issue in the`AccountController Login ActionResult`. I run the check before calling: ``` var resul...
2014/09/22
[ "https://codereview.stackexchange.com/questions/63523", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/29395/" ]
I added some formatting to that nested ternery to try to understand what it's doing, and it still took me a while! ``` model.Username = (db.Users.Any(p => p.UserName == model.Username)) ? model.Username : (db.Users.Any(p => p.Email == model.Username)) ? db.Users.SingleOrDefault(p => p.Email == mode...
Slightly shorter: ----------------- ``` using (var db = new ApplicationDbContext()) { model.Username = (db.Users.Any(p => p.Email == model.Username)) ? db.Users.SingleOrDefault(p => p.Email == model.Username).UserName : (db.Users.Any(p => p.UserName == model.Username)) ? model.Username : ...
63,523
I am wondering if there is a more efficient route to take here. Using `AspNet.Identity` I would like to allow the user to sign in to the same text box using either their username`or email. I went ahead and addressed this issue in the`AccountController Login ActionResult`. I run the check before calling: ``` var resul...
2014/09/22
[ "https://codereview.stackexchange.com/questions/63523", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/29395/" ]
I know this is an old ticket, but I think I might have an approach that uses only one round trip to the database. ``` using (var db = new ApplicationDbContext()) { string myPhone = String.Join("", model.UserName.Split('(', '-', ')')); ApplicationUser myUser = (ApplicationUser)db.Users....
Slightly shorter: ----------------- ``` using (var db = new ApplicationDbContext()) { model.Username = (db.Users.Any(p => p.Email == model.Username)) ? db.Users.SingleOrDefault(p => p.Email == model.Username).UserName : (db.Users.Any(p => p.UserName == model.Username)) ? model.Username : ...
63,523
I am wondering if there is a more efficient route to take here. Using `AspNet.Identity` I would like to allow the user to sign in to the same text box using either their username`or email. I went ahead and addressed this issue in the`AccountController Login ActionResult`. I run the check before calling: ``` var resul...
2014/09/22
[ "https://codereview.stackexchange.com/questions/63523", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/29395/" ]
I know this is an old ticket, but I think I might have an approach that uses only one round trip to the database. ``` using (var db = new ApplicationDbContext()) { string myPhone = String.Join("", model.UserName.Split('(', '-', ')')); ApplicationUser myUser = (ApplicationUser)db.Users....
I added some formatting to that nested ternery to try to understand what it's doing, and it still took me a while! ``` model.Username = (db.Users.Any(p => p.UserName == model.Username)) ? model.Username : (db.Users.Any(p => p.Email == model.Username)) ? db.Users.SingleOrDefault(p => p.Email == mode...
39,429
Why is sourdough called 'sourdough'? Is it because it is sour to the taste, or for a different reason?
2013/11/14
[ "https://cooking.stackexchange.com/questions/39429", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/1859/" ]
Yes, a well cultured sour dough is actually sour. The bacteria in the culture, lactobacilli, emit lactic acid as a waste product of their metabolism, making the dough acidic and sour.
Just to clarify (and build on a previous comment): "sourdough bread" generally has anything from a subtle hint of sourness to a strong sour tang. However, the word "sourdough" is also used in bread-making to refer to natural yeast cultures in general, which can be used to produce many types of bread, including those w...
20,367,185
I installed Eclipse ADT but the virtual Android 4.4 keeps renaming apk downloads to txt. I would love to rename them but can't install a file manager to do that because it's an apk too! I wasn't having this problem with another version of SDK manager/android 4.2.2. What's the best workaround?
2013/12/04
[ "https://Stackoverflow.com/questions/20367185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/990618/" ]
As Chris Stratton suggested, use adb install, on Windows it can be found in ...\Android\android-sdk\platform-tools as described here <http://www.howtogeek.com/125769/>
I faced the same situation with Genymotion. The root of problem was in config of WWW server. MIME type of .apk file was text/plain. From Wikipedia: The MIME type associated with APK files is application/vnd.android.package-archive. Setting additional MIME type helped me: apk=application/vnd.android.package-archive
20,367,185
I installed Eclipse ADT but the virtual Android 4.4 keeps renaming apk downloads to txt. I would love to rename them but can't install a file manager to do that because it's an apk too! I wasn't having this problem with another version of SDK manager/android 4.2.2. What's the best workaround?
2013/12/04
[ "https://Stackoverflow.com/questions/20367185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/990618/" ]
As Chris Stratton suggested, use adb install, on Windows it can be found in ...\Android\android-sdk\platform-tools as described here <http://www.howtogeek.com/125769/>
Go to settings turn on unknown sources. Then use your browser find aptoide install it .use it to install firefox then download apk files this will work
20,367,185
I installed Eclipse ADT but the virtual Android 4.4 keeps renaming apk downloads to txt. I would love to rename them but can't install a file manager to do that because it's an apk too! I wasn't having this problem with another version of SDK manager/android 4.2.2. What's the best workaround?
2013/12/04
[ "https://Stackoverflow.com/questions/20367185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/990618/" ]
As Chris Stratton suggested, use adb install, on Windows it can be found in ...\Android\android-sdk\platform-tools as described here <http://www.howtogeek.com/125769/>
After few experiments i found out that apk is changed to txt due to hosting settings. Unfortunately there is no file manager on android emulator - so you can't rename file. So your can find webserver that make it possible to download apk file correctly.
20,367,185
I installed Eclipse ADT but the virtual Android 4.4 keeps renaming apk downloads to txt. I would love to rename them but can't install a file manager to do that because it's an apk too! I wasn't having this problem with another version of SDK manager/android 4.2.2. What's the best workaround?
2013/12/04
[ "https://Stackoverflow.com/questions/20367185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/990618/" ]
I faced the same situation with Genymotion. The root of problem was in config of WWW server. MIME type of .apk file was text/plain. From Wikipedia: The MIME type associated with APK files is application/vnd.android.package-archive. Setting additional MIME type helped me: apk=application/vnd.android.package-archive
Go to settings turn on unknown sources. Then use your browser find aptoide install it .use it to install firefox then download apk files this will work
20,367,185
I installed Eclipse ADT but the virtual Android 4.4 keeps renaming apk downloads to txt. I would love to rename them but can't install a file manager to do that because it's an apk too! I wasn't having this problem with another version of SDK manager/android 4.2.2. What's the best workaround?
2013/12/04
[ "https://Stackoverflow.com/questions/20367185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/990618/" ]
After few experiments i found out that apk is changed to txt due to hosting settings. Unfortunately there is no file manager on android emulator - so you can't rename file. So your can find webserver that make it possible to download apk file correctly.
Go to settings turn on unknown sources. Then use your browser find aptoide install it .use it to install firefox then download apk files this will work
1,255
Given an integer $n$ and set of triplets of distinct integers $$S \subseteq \{(i, j, k) \mid 1\le i,j,k \le n, i \neq j, j \neq k, i \neq k\},$$ find an algorithm which either finds a permutation $\pi$ of the set $\{1, 2, \dots, n\}$ such that $$(i,j,k) \in S \implies (\pi(j)<\pi(i)<\pi(k)) ~\lor~ (\pi(i)<\pi(k)<\pi(j)...
2012/04/13
[ "https://cs.stackexchange.com/questions/1255", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/69/" ]
Here's a naive algorithm. It relies ultimately on brute force, but may perform okay sometimes. Each constraint $(\sigma\_{m\_i}, \sigma\_{m\_j}, \sigma\_{m\_k}) \in S \implies i < k \wedge \neg(i < j < k)$ consists of two conjuncts; let's call them type-$A$, $i < k$, and type-$B$, $\neg(i < j < k)$. Each type-$B$ con...
Here is a partial answer: If you remove the constraint $ i \lt k$ on each triple then your problem becomes the Non-Betweeness problem which is $NP$-complete and there are no known efficient algorithms for such problems. But with $i \lt k$ constraint, it may force some nice structure which can be exploited to find a po...
14,213,816
I know I can use `$.each` to apply the same event handler to two different jQuery objects. I'm surprised it was not possible to have a cleaner syntax such as: ``` var $span = $('span'); var $div = $('div'); var clickHandler = function () { $(this).toggleClass('red'); } $($span, $div).on('click', clickH...
2013/01/08
[ "https://Stackoverflow.com/questions/14213816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707381/" ]
You can use CSS syntax for multiple selectors - the comma `,`: ``` $('span, div').on('click', clickHandler); ``` Or if you have variables containing the elements, you can use `add()` ``` $span.add($div).on('click', clickHandler); ```
You can also use jQuery's [`.add()`link](http://api.jquery.com/add/) method to *extend* a wrapped set ``` $span.add( $div ).on( 'click', clickHandler ); ```
14,213,816
I know I can use `$.each` to apply the same event handler to two different jQuery objects. I'm surprised it was not possible to have a cleaner syntax such as: ``` var $span = $('span'); var $div = $('div'); var clickHandler = function () { $(this).toggleClass('red'); } $($span, $div).on('click', clickH...
2013/01/08
[ "https://Stackoverflow.com/questions/14213816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707381/" ]
``` $span.add($div).on('click', clickHandler) ``` Should do what you want, per the [`add()` docs](http://api.jquery.com/add). 1. `$($span, $div)` is being interpreted as `$span`'s which are descendants of `$div`. 2. `$([$span, $div])` expects the array elements to be `DOMElements`, not jQuery objects (I've always wi...
You can also use jQuery's [`.add()`link](http://api.jquery.com/add/) method to *extend* a wrapped set ``` $span.add( $div ).on( 'click', clickHandler ); ```
14,213,816
I know I can use `$.each` to apply the same event handler to two different jQuery objects. I'm surprised it was not possible to have a cleaner syntax such as: ``` var $span = $('span'); var $div = $('div'); var clickHandler = function () { $(this).toggleClass('red'); } $($span, $div).on('click', clickH...
2013/01/08
[ "https://Stackoverflow.com/questions/14213816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707381/" ]
You can also use jQuery's [`.add()`link](http://api.jquery.com/add/) method to *extend* a wrapped set ``` $span.add( $div ).on( 'click', clickHandler ); ```
seems to me you have an issue with understanding selectors not handlers, like the others suggested above: use; ``` $('span, div') ```
14,213,816
I know I can use `$.each` to apply the same event handler to two different jQuery objects. I'm surprised it was not possible to have a cleaner syntax such as: ``` var $span = $('span'); var $div = $('div'); var clickHandler = function () { $(this).toggleClass('red'); } $($span, $div).on('click', clickH...
2013/01/08
[ "https://Stackoverflow.com/questions/14213816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707381/" ]
``` $span.add($div).on('click', clickHandler) ``` Should do what you want, per the [`add()` docs](http://api.jquery.com/add). 1. `$($span, $div)` is being interpreted as `$span`'s which are descendants of `$div`. 2. `$([$span, $div])` expects the array elements to be `DOMElements`, not jQuery objects (I've always wi...
You can use CSS syntax for multiple selectors - the comma `,`: ``` $('span, div').on('click', clickHandler); ``` Or if you have variables containing the elements, you can use `add()` ``` $span.add($div).on('click', clickHandler); ```
14,213,816
I know I can use `$.each` to apply the same event handler to two different jQuery objects. I'm surprised it was not possible to have a cleaner syntax such as: ``` var $span = $('span'); var $div = $('div'); var clickHandler = function () { $(this).toggleClass('red'); } $($span, $div).on('click', clickH...
2013/01/08
[ "https://Stackoverflow.com/questions/14213816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707381/" ]
You can use CSS syntax for multiple selectors - the comma `,`: ``` $('span, div').on('click', clickHandler); ``` Or if you have variables containing the elements, you can use `add()` ``` $span.add($div).on('click', clickHandler); ```
seems to me you have an issue with understanding selectors not handlers, like the others suggested above: use; ``` $('span, div') ```
14,213,816
I know I can use `$.each` to apply the same event handler to two different jQuery objects. I'm surprised it was not possible to have a cleaner syntax such as: ``` var $span = $('span'); var $div = $('div'); var clickHandler = function () { $(this).toggleClass('red'); } $($span, $div).on('click', clickH...
2013/01/08
[ "https://Stackoverflow.com/questions/14213816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/707381/" ]
``` $span.add($div).on('click', clickHandler) ``` Should do what you want, per the [`add()` docs](http://api.jquery.com/add). 1. `$($span, $div)` is being interpreted as `$span`'s which are descendants of `$div`. 2. `$([$span, $div])` expects the array elements to be `DOMElements`, not jQuery objects (I've always wi...
seems to me you have an issue with understanding selectors not handlers, like the others suggested above: use; ``` $('span, div') ```
47,738,138
When trying to add a `Content Page` to the solution in visual studio, the following error occurs: ``` Exception of type 'System.Exception' was thrown. The project system has encountered an error. Did not find new element in the hierarchy for item `Views\MyPage.xaml`. The item would have been added with type "Page". ...
2017/12/10
[ "https://Stackoverflow.com/questions/47738138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2929954/" ]
As a dirty workaround until this gets fixed, adding the files "manually" to the project gets the job done. With Visual Studio closed, 1. copy/paste existing (working) \*.xaml and \*.xaml.cs files (rename them as you please) 2. open the newly pasted files with a text editor (not VS) and rename the contents to your cho...
Apparently, if you go into the VS2017 installer and install the Universal Windows Platform (UWP) development workload, this fixes the issue.
47,738,138
When trying to add a `Content Page` to the solution in visual studio, the following error occurs: ``` Exception of type 'System.Exception' was thrown. The project system has encountered an error. Did not find new element in the hierarchy for item `Views\MyPage.xaml`. The item would have been added with type "Page". ...
2017/12/10
[ "https://Stackoverflow.com/questions/47738138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2929954/" ]
As a dirty workaround until this gets fixed, adding the files "manually" to the project gets the job done. With Visual Studio closed, 1. copy/paste existing (working) \*.xaml and \*.xaml.cs files (rename them as you please) 2. open the newly pasted files with a text editor (not VS) and rename the contents to your cho...
[Make sure you have StackLayout instead of ContentPage.Content in your .xaml files that throw this exception on VS.](https://i.stack.imgur.com/A75Fo.png)
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
this should do what you want.. to see them ``` for (var lang in languages) alert(lang + ' : ' + languages[lang].labels.language_names[0]); ``` to put them in the DOM ``` var $select = $('selector to your select element'); for (var lang in languages) $select.append('<option value="'+lang+'">' + languages[lang]....
You can use the "for" ``` for (var key in languages) { alert(key); } ```
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
You can use the "for" ``` for (var key in languages) { alert(key); } ```
If you're using [jquery](http://jquery.com), then you can do this actually: ``` $.each( languages, function(k, v){ alert( "Key: " + k + ", Value: " + v ); // value is your particular language object based on k variable }); ``` :)
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
this should do what you want.. to see them ``` for (var lang in languages) alert(lang + ' : ' + languages[lang].labels.language_names[0]); ``` to put them in the DOM ``` var $select = $('selector to your select element'); for (var lang in languages) $select.append('<option value="'+lang+'">' + languages[lang]....
``` var data = new Array(); for(var lang in languages) { data[lang] = languages[lang]; } ```
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
``` var data = new Array(); for(var lang in languages) { data[lang] = languages[lang]; } ```
If you're using [jquery](http://jquery.com), then you can do this actually: ``` $.each( languages, function(k, v){ alert( "Key: " + k + ", Value: " + v ); // value is your particular language object based on k variable }); ``` :)
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
this should do what you want.. to see them ``` for (var lang in languages) alert(lang + ' : ' + languages[lang].labels.language_names[0]); ``` to put them in the DOM ``` var $select = $('selector to your select element'); for (var lang in languages) $select.append('<option value="'+lang+'">' + languages[lang]....
Did you try: ``` languages['af'].labels.language_names[0] ``` It will return Afrikaans
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
Did you try: ``` languages['af'].labels.language_names[0] ``` It will return Afrikaans
If you're using [jquery](http://jquery.com), then you can do this actually: ``` $.each( languages, function(k, v){ alert( "Key: " + k + ", Value: " + v ); // value is your particular language object based on k variable }); ``` :)
3,966,199
this is might be a very basic question, but seems like it's not easy to find the answer. I have a Json, more or less is like: ``` languages = { "aa":{"iso639-2T":"aar","family":"Afro-Asiatic","labels":{"language_names":["Afar"],"native_names":["Afaraf"]}}, "ab":{"iso639-2T":"abk","family":"Northwest Caucasian","labels...
2010/10/19
[ "https://Stackoverflow.com/questions/3966199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/286080/" ]
this should do what you want.. to see them ``` for (var lang in languages) alert(lang + ' : ' + languages[lang].labels.language_names[0]); ``` to put them in the DOM ``` var $select = $('selector to your select element'); for (var lang in languages) $select.append('<option value="'+lang+'">' + languages[lang]....
If you're using [jquery](http://jquery.com), then you can do this actually: ``` $.each( languages, function(k, v){ alert( "Key: " + k + ", Value: " + v ); // value is your particular language object based on k variable }); ``` :)
57,628
Before installing Mountain Lion and using iCloud for the first time, I would like to know how it can be configured. My iMac has three standard user accounts and one admin account. If I understand correctly the [John Siracusa review](http://arstechnica.com/apple/2012/07/os-x-10-8/12/), the install procedure asks for an...
2012/07/26
[ "https://apple.stackexchange.com/questions/57628", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/577/" ]
That apple ID applies only to the user account that is created during the setup process. If you look in System Preferences, you'll notice the following option called "Apple ID", under a test account I created: ![Setting an iCloud account](https://i.stack.imgur.com/vEr7n.png) Additionally, when logging into the new te...
One aspect of iCloud can only be active for one account per hardware device. **Find My Mac** is *exclusive* - no matter how many accounts or even how many OS installs you run (say booting from multiple OS - Lion externally and Mountain Lion internally), only one iCloud account gets to find your Mac's location. Apart f...
55,494,280
In angular 7, I am getting an error while using Http POST. But when I try to use that error value in if condition, the if condition is not executed, always else part is getting executed. angular with node js (MEAN) ``` errorParametre: any ; this.http.post(`${this.uri}/compare`, {obj , err}) .subscribe(res => ...
2019/04/03
[ "https://Stackoverflow.com/questions/55494280", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11305281/" ]
you can use resolve for the angular router. E.g. Make a class APIResolver like ``` import { Injectable } from '@angular/core'; import { APIService } from './api.service'; import { Resolve } from '@angular/router'; import { ActivatedRouteSnapshot } from '@angular/router'; @Injectable() export class APIResolver imple...
You can refer to this [link](https://angular.io/api/core/OnInit) to use OnInit ``` @Component({selector: 'my-cmp', template: `...`}) class MyComponent implements OnInit { ngOnInit() { you call the service that you want to execute } } ```
293,346
I have both windows 7 and xp installed. If there was only xp, I would go ahead and boot up the xp installation disc and re install the hal.dll file from the recovery console. Problem is I have also windows 7 installed, and I'm thinking that I will also be unable to boot windows 7 once xp is fixed. Please help.
2011/06/05
[ "https://superuser.com/questions/293346", "https://superuser.com", "https://superuser.com/users/23950/" ]
There are different versions of the hal.dll, XP installation chooses the correct version based on your hardware configuration in the bios. So yould need to know which hal.dll to copy into XP, Most PC's use one of the Hal's marked with a bullet below. <http://support.microsoft.com/kb/309283> > > "Standard PC," Non-AC...
My thoughts are that your boot.ini for XP is not pointing to the right partition, not necessarily that the hal.dll is wrong. You will get that error in that case. <http://support.microsoft.com/kb/330184> <http://www.youtube.com/watch?v=jvMkt9fkHCI>
37,816,635
In Openlayers it was possible to turn certain features on or off depending on the zoom level. I have not found the same functionality in OpenLayers 3 despite looking through the documentation. Does anyone know how to do this? This is the feature I'm placing on the map and `ol.style.Text` is what I would like to display...
2016/06/14
[ "https://Stackoverflow.com/questions/37816635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557112/" ]
The vector layer example demonstrates the use of a style function for resolution dependent styling: <http://openlayers.org/en/latest/examples/vector-layer.html> Here is a simplified version: ``` var layer = new ol.layer.Vector({ source: new ol.source.Vector(), style: function(feature, resolution) { var text =...
This is what I ended up with to show labels but keep a constant style underneath... ``` style: function (feature, resolution) { var text = resolution * 100000 < 10 ? response.FieldList[key].Acres : ''; if (text != "") { styleCach...
87,355
I’m on lesson 4 of the Fast AI "Deep Learning for Coders" course, and have been back through the same lesson a few times now but I don’t think I’m quite getting a few things. I want to have an understanding of what’s going on before moving on. This lesson is on MNIST - and Jeremy is recognising 3s vs 7s. So he has 120...
2020/12/30
[ "https://datascience.stackexchange.com/questions/87355", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/109630/" ]
The explanation follows from understanding what a ROC curve is made of. First, a reminder: a ROC curve represents the performance of a soft binary classifier, i.e. a classifier which predicts a numerical value (usually a probability) which represents the likelihood of the instance to be positive. The points of a ROC ...
Nothing to add to @Erwan's answer, but an animated example :). [![enter image description here](https://i.stack.imgur.com/OdCFo.gif)](https://i.stack.imgur.com/OdCFo.gif) In ROC curves, each point is constructed from a threshold that defines the True Positive Rate (TPR) and the False Positive Rate (FPR). So: * verti...
27,406,332
I've got a table full of substrings, and I need to select all substrings, which are in the search string. Basically it would be the mirrored form of a where-condition: ``` WHERE "SearchString" LIKE "%"+ currentColumnValue +"%" ``` I know, that this is not possible, but for performance reasons I don't want to iterat...
2014/12/10
[ "https://Stackoverflow.com/questions/27406332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1255674/" ]
You can do ``` where 'SearchString' like concat('%', columnValue, '%'); ``` This will be very slow as it would do a table scan and a like-compare on each line, but the result is correct. <http://sqlfiddle.com/#!2/e2b066/1>
> > You can try this > > > ``` $value = //your value ' select * from tb_name where col_name like %".$value."% ' ```
20,703,875
I'm making a desktop app in Swing. Here's the problem: I have two tables - `suppliers` and `items`. ``` supplier supplierid(PK,AI),name,address,telephone item itemid(PK,AI),supplier_supplierID(FK),name ``` Questions: * how do I insert in `supplier` and `item` tables at the same time? Does foreign key in `item...
2013/12/20
[ "https://Stackoverflow.com/questions/20703875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3015531/" ]
That depends on how you're trying to access your database. Using a ORM like Hibernate and similar will do the most of the work for you because it's handling dependencies between Entities. If you access your DB using plain JDBC, well you should insert the "rows" manually in the correct order. So you should insert the s...
You have to add the parent row (supplier) first, and then the item. Otherwise you will get an error. When you add the supplier you use the new supplier\_id as the value for the item.
20,703,875
I'm making a desktop app in Swing. Here's the problem: I have two tables - `suppliers` and `items`. ``` supplier supplierid(PK,AI),name,address,telephone item itemid(PK,AI),supplier_supplierID(FK),name ``` Questions: * how do I insert in `supplier` and `item` tables at the same time? Does foreign key in `item...
2013/12/20
[ "https://Stackoverflow.com/questions/20703875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3015531/" ]
That depends on how you're trying to access your database. Using a ORM like Hibernate and similar will do the most of the work for you because it's handling dependencies between Entities. If you access your DB using plain JDBC, well you should insert the "rows" manually in the correct order. So you should insert the s...
This code is not the best but it works , first of all first insert some data in your primary table then you get that primary id you replace it with the 7 in the foreign key position in this code . so once it works then find a way to deal with the foreign key I did not work on it ``` try { String ur...
7,010,733
I need an index on some text columns to increase spped of queries. I not really sure whether I can use FTS or not. I have in my column something like that: 34565A43B2423FRR34AQ and I am searching in that way: ``` WHERE column ~* '5A43B' ``` and I'm expecting that this value will be found. But the table is big (about...
2011/08/10
[ "https://Stackoverflow.com/questions/7010733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552121/" ]
FTS won't work for this, a string like this can't be parsed into tokens. There is an extension that can do the trick: [wildspeed](http://www.sigaev.ru/cvsweb/cvsweb.cgi/wildspeed/README.wildspeed?rev=HEAD;content-type=text/plain). You have to install this module in the database before you can use it. The index might be...
If you rewrite your query by changing POSIX regular expression to LIKE/ILIKE, you can use [pg\_trgm](http://www.postgresql.org/docs/current/static/pgtrgm.html) extension. Such as: ``` WHERE column ~~* '%5A43B%' ```
623,231
I just got a quick question regarding `dwm`, how can I switch the places of two windows, so window A is switched with window B or is it even possible to move windows around? Because I just like to have my main windows open up on the left side of the screen, so I can easily look at them. The problem is that they someti...
2020/12/06
[ "https://unix.stackexchange.com/questions/623231", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/-1/" ]
Figured it out myself, by default mod + Return switches the master and stack.
To move a windows in DWM: Hold your *modkey* + left mouse button
7,511
According to the [roadmap](https://roadmap.cardano.org/en/) Cardano has (or will have) five eras. Byron, Shelley, Goguen, Basho and Voltaire. What block height did Cardano change from one era to the next?
2022/03/04
[ "https://cardano.stackexchange.com/questions/7511", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/4029/" ]
Byron (Genesis) (09/27/2017) - Epoch 1, Block 1? Shelley (07/29/2020) - Epoch 208, Block 4490511 Goguen (if you consider Alonzo HFC the start of Goguen) (09/12/2021) - Epoch 290, Block 6236060 Basho and Voltaire are currently in development. Important to note: the Cardano eras are rough pictures of where developmen...
On mainnet: * Byron started at epoch 0. * Shelley started at epoch 208. Hopefully someone else can fill in the rest.
7,511
According to the [roadmap](https://roadmap.cardano.org/en/) Cardano has (or will have) five eras. Byron, Shelley, Goguen, Basho and Voltaire. What block height did Cardano change from one era to the next?
2022/03/04
[ "https://cardano.stackexchange.com/questions/7511", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/4029/" ]
This is the best resource I've found online. [![Era Boundaries](https://i.stack.imgur.com/yblrP.png)](https://i.stack.imgur.com/yblrP.png) [Source](https://cardanosolutions.github.io/kupo/#section/Era-Boundaries)
On mainnet: * Byron started at epoch 0. * Shelley started at epoch 208. Hopefully someone else can fill in the rest.
7,511
According to the [roadmap](https://roadmap.cardano.org/en/) Cardano has (or will have) five eras. Byron, Shelley, Goguen, Basho and Voltaire. What block height did Cardano change from one era to the next?
2022/03/04
[ "https://cardano.stackexchange.com/questions/7511", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/4029/" ]
This is the best resource I've found online. [![Era Boundaries](https://i.stack.imgur.com/yblrP.png)](https://i.stack.imgur.com/yblrP.png) [Source](https://cardanosolutions.github.io/kupo/#section/Era-Boundaries)
Byron (Genesis) (09/27/2017) - Epoch 1, Block 1? Shelley (07/29/2020) - Epoch 208, Block 4490511 Goguen (if you consider Alonzo HFC the start of Goguen) (09/12/2021) - Epoch 290, Block 6236060 Basho and Voltaire are currently in development. Important to note: the Cardano eras are rough pictures of where developmen...
7,511
According to the [roadmap](https://roadmap.cardano.org/en/) Cardano has (or will have) five eras. Byron, Shelley, Goguen, Basho and Voltaire. What block height did Cardano change from one era to the next?
2022/03/04
[ "https://cardano.stackexchange.com/questions/7511", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/4029/" ]
Byron (Genesis) (09/27/2017) - Epoch 1, Block 1? Shelley (07/29/2020) - Epoch 208, Block 4490511 Goguen (if you consider Alonzo HFC the start of Goguen) (09/12/2021) - Epoch 290, Block 6236060 Basho and Voltaire are currently in development. Important to note: the Cardano eras are rough pictures of where developmen...
You are looking for the [`/network/eras` Blockfrost endpoint](https://docs.blockfrost.io/#tag/Cardano-Network/paths/%7E1network%7E1eras/get).
7,511
According to the [roadmap](https://roadmap.cardano.org/en/) Cardano has (or will have) five eras. Byron, Shelley, Goguen, Basho and Voltaire. What block height did Cardano change from one era to the next?
2022/03/04
[ "https://cardano.stackexchange.com/questions/7511", "https://cardano.stackexchange.com", "https://cardano.stackexchange.com/users/4029/" ]
This is the best resource I've found online. [![Era Boundaries](https://i.stack.imgur.com/yblrP.png)](https://i.stack.imgur.com/yblrP.png) [Source](https://cardanosolutions.github.io/kupo/#section/Era-Boundaries)
You are looking for the [`/network/eras` Blockfrost endpoint](https://docs.blockfrost.io/#tag/Cardano-Network/paths/%7E1network%7E1eras/get).