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
38,517,754
I would like to check whether a record exists or not. Here is what I've tried: FormMain.java ``` public class FormMain extends FragmentActivity{ public Button list,export,exit, resume; public String longitude,latitude,estate,block,ha; private Intent i; private SQLiteDatabase database; MySQLiteHe...
2016/07/22
[ "https://Stackoverflow.com/questions/38517754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6531112/" ]
Is this your full code? Because the following line should produce an exception but your don't seem to be catching it? ``` String query = "SELECT estate,block,ha FROM " + TABLE_TIKOS+" ORDER BY MAX(id)"; ``` This will result in a > > Query Error: misuse of aggregate: max() Unable to execute statement > > > To...
``` "SELECT MAX(id),estate,block,ha FROM " + TABLE_TIKOS + " where id=MAX(id)" ```
1,361,285
Every time I startup I now have to press ctrl + alt + f3 and type something along the lines of `sudo systemctl start gdm3` if I don't do that then my pc will just be stuck on the bios logo and nothing else. This is the tutorial I followed <https://trendoceans.com/how-to-remove-the-kde-plasma-environment-in-ubuntu/> ...
2021/09/01
[ "https://askubuntu.com/questions/1361285", "https://askubuntu.com", "https://askubuntu.com/users/1412215/" ]
I faced similar type of problem. This is happened because of missing the **Install** in your **gdm3.service** file. To solve this, firstly you have to go `/lib/systemd/system/` directory and then open the **gdm3.service** file at any editor. As like: `sudo nano gdm3.service`. After adding: > > [Install] > > Wante...
Open a terminal and type `sudo systemctl set-default graphical.target` then reboot and you sgould go straigjt to a desktop. If you want to go back then `sudo systemctl set-default multi-user.target` to take you straight to the console on boot. And if all else fails `sudo apt-get install ubuntu-desktop...
706,605
I want to know that converting from degree to radian and radian to degree is just understandable. But what is the purpose of expressing degree in term of minutes and seconds.. I know that there are 60 seconds in 1 minute and 60 minutes in one degree.. But still i am just wondering that where it is applicable to express...
2014/03/10
[ "https://math.stackexchange.com/questions/706605", "https://math.stackexchange.com", "https://math.stackexchange.com/users/129121/" ]
There's one situation in which minutes and seconds are remarkably useful: doing celestial navigation without a calculator. It turns out that the circumference of the earth at the equator is just about 360 \* 60 miles; it's close enough that folks defined the "Nautical mile" to be about 7/6 of a land-mile, so that there...
About 5000 years ago, the Babylonians used a base-60 system for integers and fractions. The use of minutes and seconds to divide both hours and angles derives from this. There is no inherent superiority to using minutes and seconds over using decimals. The use of minutes and seconds of arc in modern pedagogy is probab...
27,114,065
As you may know, many things changed in OpenCV 3 (in comparision to the openCV2 or the old first version). In the old days, to train SVM one would use: ``` CvSVMParams params; params.svm_type = CvSVM::C_SVC; params.kernel_type = CvSVM::POLY; params.gamma = 3; CvSVM svm; svm.train(training_mat, labels, Mat(), Mat(), ...
2014/11/24
[ "https://Stackoverflow.com/questions/27114065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1700390/" ]
with opencv3.0, it's definitely different , but not difficult: ``` Ptr<ml::SVM> svm = ml::SVM::create(); // edit: the params struct got removed, // we use setter/getter now: svm->setType(ml::SVM::C_SVC); svm->setKernel(ml::SVM::POLY); svm->setGamma(3); Mat trainData; // one row per feature Mat labels; svm->train...
I was porting my code from OpenCV 2.4.9 to 3.0.0-rc1 and had the same issue. Unfortunately the API has changes since the answer was posted, so I would like to update it accordingly: ``` Ptr<ml::SVM> svm = ml::SVM::create(); svm->setType(ml::SVM::C_SVC); svm->setKernel(ml::SVM::POLY); svm->setGamma(3); Mat trainData;...
27,114,065
As you may know, many things changed in OpenCV 3 (in comparision to the openCV2 or the old first version). In the old days, to train SVM one would use: ``` CvSVMParams params; params.svm_type = CvSVM::C_SVC; params.kernel_type = CvSVM::POLY; params.gamma = 3; CvSVM svm; svm.train(training_mat, labels, Mat(), Mat(), ...
2014/11/24
[ "https://Stackoverflow.com/questions/27114065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1700390/" ]
with opencv3.0, it's definitely different , but not difficult: ``` Ptr<ml::SVM> svm = ml::SVM::create(); // edit: the params struct got removed, // we use setter/getter now: svm->setType(ml::SVM::C_SVC); svm->setKernel(ml::SVM::POLY); svm->setGamma(3); Mat trainData; // one row per feature Mat labels; svm->train...
I know this is an old post, but i came across it looking for the same solution. This tutorial is extremely helpful: <http://docs.opencv.org/3.0-beta/doc/tutorials/ml/introduction_to_svm/introduction_to_svm.html>
27,114,065
As you may know, many things changed in OpenCV 3 (in comparision to the openCV2 or the old first version). In the old days, to train SVM one would use: ``` CvSVMParams params; params.svm_type = CvSVM::C_SVC; params.kernel_type = CvSVM::POLY; params.gamma = 3; CvSVM svm; svm.train(training_mat, labels, Mat(), Mat(), ...
2014/11/24
[ "https://Stackoverflow.com/questions/27114065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1700390/" ]
I was porting my code from OpenCV 2.4.9 to 3.0.0-rc1 and had the same issue. Unfortunately the API has changes since the answer was posted, so I would like to update it accordingly: ``` Ptr<ml::SVM> svm = ml::SVM::create(); svm->setType(ml::SVM::C_SVC); svm->setKernel(ml::SVM::POLY); svm->setGamma(3); Mat trainData;...
I know this is an old post, but i came across it looking for the same solution. This tutorial is extremely helpful: <http://docs.opencv.org/3.0-beta/doc/tutorials/ml/introduction_to_svm/introduction_to_svm.html>
21,411,320
I have lots of Doubles in my program (notice the capital D) and I was thinking of a possible caching mechanism. By looking at the Double constructors / factories, none is actually implementing a "cache" (like the way Integer, works, for example when using `valueOf`). I was thinking to implement such a cache by using ...
2014/01/28
[ "https://Stackoverflow.com/questions/21411320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1204464/" ]
Your problem is that any possible caching mechanism will use far more memory and processor power than you are ever likely to save. Just think of your example - creating the String, doing the map look-up, garbage collecting the String, etc. That's a lot more work than just creating a new Double. The HashMap itself wi...
Aside from very few values (1.0, 0.0 jump to mind) there isn't such a overwhelming clustering of occurance for small integer values like there is for Integer, so its very hard to come up with a cache that has a reasonable hit rate for common applications. Second, its *not* simple to cheaply detect if a Double represen...
3,273
I asked [a question](https://politics.stackexchange.com/questions/27518/why-have-the-states-of-greece-and-macedonia-failed-to-solve-the-naming-dispute-a) last night, and it was received pretty well, to the point that it managed to get into the Hot Network Question (HNQ) list. But as a result of this, a moderator protec...
2018/01/22
[ "https://politics.meta.stackexchange.com/questions/3273", "https://politics.meta.stackexchange.com", "https://politics.meta.stackexchange.com/users/19236/" ]
While this was protected by a moderator (more privileges than a mere user), it's worth noting that normally you can't just run around protecting questions. Typically they need some low quality answers by new users to meet that threshold (and if enough of those are deleted via review, [Community](https://politics.stacke...
> > I feel that protecting it was not strictly necessary, in the sense that all answers posted so far are on-topic, and none have been deleted. > > > This is what pro-active means, and could be taken as evidence that this policy was working. But there is one answer by a newcomer and it has attracted significant ...
3,273
I asked [a question](https://politics.stackexchange.com/questions/27518/why-have-the-states-of-greece-and-macedonia-failed-to-solve-the-naming-dispute-a) last night, and it was received pretty well, to the point that it managed to get into the Hot Network Question (HNQ) list. But as a result of this, a moderator protec...
2018/01/22
[ "https://politics.meta.stackexchange.com/questions/3273", "https://politics.meta.stackexchange.com", "https://politics.meta.stackexchange.com/users/19236/" ]
I've unprotected the question. Having it protected while it was featured in the HNQ list (and was attracting poor answers) was reasonable. Now that it dropped off the list, however, there's little reason to keep it protected. I also took this opportunity to unprotect a handful of other old questions. That said, I a...
> > I feel that protecting it was not strictly necessary, in the sense that all answers posted so far are on-topic, and none have been deleted. > > > This is what pro-active means, and could be taken as evidence that this policy was working. But there is one answer by a newcomer and it has attracted significant ...
3,273
I asked [a question](https://politics.stackexchange.com/questions/27518/why-have-the-states-of-greece-and-macedonia-failed-to-solve-the-naming-dispute-a) last night, and it was received pretty well, to the point that it managed to get into the Hot Network Question (HNQ) list. But as a result of this, a moderator protec...
2018/01/22
[ "https://politics.meta.stackexchange.com/questions/3273", "https://politics.meta.stackexchange.com", "https://politics.meta.stackexchange.com/users/19236/" ]
I've unprotected the question. Having it protected while it was featured in the HNQ list (and was attracting poor answers) was reasonable. Now that it dropped off the list, however, there's little reason to keep it protected. I also took this opportunity to unprotect a handful of other old questions. That said, I a...
While this was protected by a moderator (more privileges than a mere user), it's worth noting that normally you can't just run around protecting questions. Typically they need some low quality answers by new users to meet that threshold (and if enough of those are deleted via review, [Community](https://politics.stacke...
37,297,829
Is it possible to create a BluetoothLEDevice from a DeviceInformation object? I've tried using the DeviceInformation's Id property in BluetoothLEDevice .FromIdAsync however that just throws errors ``` public static async Task<BluetoothLEDevice> DeviceFromDeviceInfo(DeviceInformation x) { try { ...
2016/05/18
[ "https://Stackoverflow.com/questions/37297829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1924457/" ]
I'm running into the same issue with a Heart Rate Device. With a regular Bluetooth (not LE) device your code should work once it's connected. However, with BTLE the goal is to discover the device without the user having to pair it first. I don't have an answer for that part. Using Windows 8.1 it wasn't possible [MSDN F...
So long as the device you are trying to access is paired, you should be able to access it. I'm not sure why you're modifying the `Id`. To create the device all you need is: ``` DeviceInformation deviceInfo = __; BluetoothLEDevice device = await BluetoothLEDevice.FromIdAsync(deviceInfo.Id); ```
31,550
We need to create a couple of dozen forms on SharePoint 2010 and would like to use ASP.NET and Visual Studio 2010 for this task. The forms need to have the same look-and-feel. The current forms are in various versions of ASP.NET as well as classic ASP and lack a common platform and have various look-and-feel. From wha...
2012/03/14
[ "https://sharepoint.stackexchange.com/questions/31550", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/4023/" ]
You are missing the `ElementFile` element. From what you've described, your feature.xml should look something like this: ``` <?xml version="1.0" encoding="utf-8"?> <Feature Title="YourFeature" Description="YourFeature" Id="GUID" Scope="Site" Version="1.0.0.0" Hidden="FALSE" DefaultResourceFile="core" xmlns="htt...
I would check your ddf file. Here is the preview from one of my projects ``` ;.OPTION Explicit .Set CabinetNameTemplate="Test.wsp" .Set DiskDirectoryTemplate="..\TargetFolderForWsp(bin)" .Set CompressionType=MSZIP .Set UniqueFiles=Off .Set Cabinet=On ;******************************* manifest.xml %BuildPath%\Test.dll...
15,398,515
I would like to determine if the same team name (that is outputted with the variables `$home_team['team_name']` and `$away_team['team_name']`) appears more than once inside the ``` if ($game_date_converted == $next_monday) ``` statement. If the team name does appear more than once (for example, if it appears twic...
2013/03/13
[ "https://Stackoverflow.com/questions/15398515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1102291/" ]
You must query the database. If you would have the following db architecture: ``` users id name email active -- ---- ----- ------ 1 alex a@a.a 0 ``` You might do the following ``` if( ! User::where_email($email)->only('active')) // Adapt the where to your needs echo "User not acti...
Send a link to the users email with a secret key, the key has to be unique, such as a hash of their email address with your application secret key as a salt. Have an endpoint that this link points to which checks that the link is valid using the procedure I mentioned above. If the key you generate matches the one in th...
15,398,515
I would like to determine if the same team name (that is outputted with the variables `$home_team['team_name']` and `$away_team['team_name']`) appears more than once inside the ``` if ($game_date_converted == $next_monday) ``` statement. If the team name does appear more than once (for example, if it appears twic...
2013/03/13
[ "https://Stackoverflow.com/questions/15398515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1102291/" ]
``` if (Auth::attempt(array('email' => $email, 'password' => $password, 'active' => 1))) { // The user is active, not suspended, and exists. } ``` [Authenticating Users](http://laravel.com/docs/security#authenticating-users) In Laravel 5.3 you might want to overwrite `Illuminate\Foundation\Auth\AuthenticatesUser...
You must query the database. If you would have the following db architecture: ``` users id name email active -- ---- ----- ------ 1 alex a@a.a 0 ``` You might do the following ``` if( ! User::where_email($email)->only('active')) // Adapt the where to your needs echo "User not acti...
15,398,515
I would like to determine if the same team name (that is outputted with the variables `$home_team['team_name']` and `$away_team['team_name']`) appears more than once inside the ``` if ($game_date_converted == $next_monday) ``` statement. If the team name does appear more than once (for example, if it appears twic...
2013/03/13
[ "https://Stackoverflow.com/questions/15398515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1102291/" ]
``` if (Auth::attempt(array('email' => $email, 'password' => $password, 'active' => 1))) { // The user is active, not suspended, and exists. } ``` [Authenticating Users](http://laravel.com/docs/security#authenticating-users) In Laravel 5.3 you might want to overwrite `Illuminate\Foundation\Auth\AuthenticatesUser...
Send a link to the users email with a secret key, the key has to be unique, such as a hash of their email address with your application secret key as a salt. Have an endpoint that this link points to which checks that the link is valid using the procedure I mentioned above. If the key you generate matches the one in th...
980,082
I am changing my C++ project, which was earlier in VC6 and now being migrated to VS 2008, to use MSXML 6 instead of the earlier MSXML 3. When the code was in VC6 we were using MSXML3 by importing it ``` # import "msxml3.dll" ``` This was replaced with ``` # import "msxml6.dll" ``` After this when I compile the p...
2009/06/11
[ "https://Stackoverflow.com/questions/980082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/117531/" ]
Have a look at [the MS docoumentation on MSXML](http://msdn.microsoft.com/en-us/library/ms757018(VS.85).aspx). They suggest that importing the .dll as you have will create a couple of .thl and .tli files. Make sure you've deleted those. Make sure any include directories point to the right place. Make absolutely cert...
I'd try renaming msxml.h and doing a build. That should show you what file is including msxml.h.
980,082
I am changing my C++ project, which was earlier in VC6 and now being migrated to VS 2008, to use MSXML 6 instead of the earlier MSXML 3. When the code was in VC6 we were using MSXML3 by importing it ``` # import "msxml3.dll" ``` This was replaced with ``` # import "msxml6.dll" ``` After this when I compile the p...
2009/06/11
[ "https://Stackoverflow.com/questions/980082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/117531/" ]
Check the syntax of the #import directive. You can rename imported elements using rename attribute on import directive (or rename\_namespace). It will resolve conflicts with duplicated elements. See here: [in MSDN](http://msdn.microsoft.com/en-us/library/298h7faa(VS.80).aspx) Sometimes change of the inclusion order (...
I'd try renaming msxml.h and doing a build. That should show you what file is including msxml.h.
248,001
I would like to tell my friend to stop dating men who are so superficial, but state it in a positive way. Please help me complete the sentence: "You should date men who are more \_\_\_\_\_\_\_\_\_\_." So far the only word I've been able to come up with is "real" which seems ambiguous and lacks gravitas.
2015/05/22
[ "https://english.stackexchange.com/questions/248001", "https://english.stackexchange.com", "https://english.stackexchange.com/users/53593/" ]
Pretty common antonyms in this context, both for the literal denotation and figurative connotation, are: 1. **deep** 2. **profound** 3. **serious** 4. **thoughtful** In particular the first two, *deep* and *profound*, carry the literal dictionary definition (per Google): > > noun, literary: 1. *the vast depth of th...
Sticking to your context, you could use *mature*, *wise*, or *sensible*, among others. In your sentence, I would personally use mature.
248,001
I would like to tell my friend to stop dating men who are so superficial, but state it in a positive way. Please help me complete the sentence: "You should date men who are more \_\_\_\_\_\_\_\_\_\_." So far the only word I've been able to come up with is "real" which seems ambiguous and lacks gravitas.
2015/05/22
[ "https://english.stackexchange.com/questions/248001", "https://english.stackexchange.com", "https://english.stackexchange.com/users/53593/" ]
Pretty common antonyms in this context, both for the literal denotation and figurative connotation, are: 1. **deep** 2. **profound** 3. **serious** 4. **thoughtful** In particular the first two, *deep* and *profound*, carry the literal dictionary definition (per Google): > > noun, literary: 1. *the vast depth of th...
If you want to be more specific than the generalities of "deep" or "real", it may depend on what exactly you mean by superficial. If you mean that the men are superficial with regard to themselves (that is, they are primarily concerned with their own image), then you may recommend men who are **introspective**. If yo...
248,001
I would like to tell my friend to stop dating men who are so superficial, but state it in a positive way. Please help me complete the sentence: "You should date men who are more \_\_\_\_\_\_\_\_\_\_." So far the only word I've been able to come up with is "real" which seems ambiguous and lacks gravitas.
2015/05/22
[ "https://english.stackexchange.com/questions/248001", "https://english.stackexchange.com", "https://english.stackexchange.com/users/53593/" ]
Pretty common antonyms in this context, both for the literal denotation and figurative connotation, are: 1. **deep** 2. **profound** 3. **serious** 4. **thoughtful** In particular the first two, *deep* and *profound*, carry the literal dictionary definition (per Google): > > noun, literary: 1. *the vast depth of th...
thorough |ˈTHərō| adjective complete with regard to every detail; not superficial or partial: planners need a thorough understanding of the subject. • performed or written with great care and completeness: officers have made a thorough examination of the wreckage. • taking pains to do something carefully and completely...
248,001
I would like to tell my friend to stop dating men who are so superficial, but state it in a positive way. Please help me complete the sentence: "You should date men who are more \_\_\_\_\_\_\_\_\_\_." So far the only word I've been able to come up with is "real" which seems ambiguous and lacks gravitas.
2015/05/22
[ "https://english.stackexchange.com/questions/248001", "https://english.stackexchange.com", "https://english.stackexchange.com/users/53593/" ]
Sticking to your context, you could use *mature*, *wise*, or *sensible*, among others. In your sentence, I would personally use mature.
If you want to be more specific than the generalities of "deep" or "real", it may depend on what exactly you mean by superficial. If you mean that the men are superficial with regard to themselves (that is, they are primarily concerned with their own image), then you may recommend men who are **introspective**. If yo...
248,001
I would like to tell my friend to stop dating men who are so superficial, but state it in a positive way. Please help me complete the sentence: "You should date men who are more \_\_\_\_\_\_\_\_\_\_." So far the only word I've been able to come up with is "real" which seems ambiguous and lacks gravitas.
2015/05/22
[ "https://english.stackexchange.com/questions/248001", "https://english.stackexchange.com", "https://english.stackexchange.com/users/53593/" ]
Sticking to your context, you could use *mature*, *wise*, or *sensible*, among others. In your sentence, I would personally use mature.
thorough |ˈTHərō| adjective complete with regard to every detail; not superficial or partial: planners need a thorough understanding of the subject. • performed or written with great care and completeness: officers have made a thorough examination of the wreckage. • taking pains to do something carefully and completely...
84,838
As you could see from the image below i want to understand what is the -V in a switching power supply unit and where i can use it? ![enter image description here](https://i.stack.imgur.com/kY7OE.jpg)
2013/10/09
[ "https://electronics.stackexchange.com/questions/84838", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/29966/" ]
The V- is the more-negative terminal of the DC output. Line (`L`) and Neutral (`N`) are the AC mains inputs. The ground (`⏚`) symbol is for protective earth. The DC outputs are the `+V` and `-V`, where V- is the more negative connection. The DC outputs *may* be floating, relative to the protective earth input. This ...
+V signifies the output terminal that is the most positive and -V is the most negative terminal voltage. The marking "-V" is used because the output is isolated from incoming power circuits and calling it 0V or ground could be confusing. So if you put your meter across +V and -V you'd measure 24V and this is adjustabl...
66,656,530
I need to get last of the five days from month like: ``` 1-5 = 5 6-10 = 10 ... 26-30/31 = 30/31 (here can be 6 days depending on the month) ``` I've prepared function like ``` create or replace function getfirstdayoffive() returns date as $$ select date_trunc('month', current_date - 5)::date + (least(ceil(extract(d...
2021/03/16
[ "https://Stackoverflow.com/questions/66656530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12968035/" ]
try following function: ``` CREATE OR REPLACE FUNCTION public.days_in_month(d date) RETURNS integer LANGUAGE sql AS $function$ SELECT date_trunc('month', $1::timestamp + interval '1 month')::date - date_trunc('month', $1::timestamp)::date; $function$ ```
hmm for now I've got something like : ``` create or replace function getlastdayoffive(parm_date_in date default current_date) returns timestamp language sql immutable strict as $$ with last_of_mon(eom) as ( select date_trunc('month', parm_date_in) + interval '1 month - 1 day' ) select case when extra...
66,656,530
I need to get last of the five days from month like: ``` 1-5 = 5 6-10 = 10 ... 26-30/31 = 30/31 (here can be 6 days depending on the month) ``` I've prepared function like ``` create or replace function getfirstdayoffive() returns date as $$ select date_trunc('month', current_date - 5)::date + (least(ceil(extract(d...
2021/03/16
[ "https://Stackoverflow.com/questions/66656530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12968035/" ]
Determine the last date of the month, then extract day. If the day is 31 then return minus 6 days, else return minus five days. That assumes you want the last 5 days for Feb. But then except for Feb you could just return the 25th of the month as that is what minus 5 for months with 30 days and minus 6 for days 31 alway...
hmm for now I've got something like : ``` create or replace function getlastdayoffive(parm_date_in date default current_date) returns timestamp language sql immutable strict as $$ with last_of_mon(eom) as ( select date_trunc('month', parm_date_in) + interval '1 month - 1 day' ) select case when extra...
22,561,600
in this SkillIds array if i found duplication name then i need to remove that names.. ``` var SkillIds = []; $('#SkillSets table tr :checked').each(function () { SkillIds.push($(this).data("id")); }); $('#textarea').val(SkillIds.tostring()); ```
2014/03/21
[ "https://Stackoverflow.com/questions/22561600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2873697/" ]
Try [$.unique()](https://api.jquery.com/jQuery.unique/) > > Sorts an array of DOM elements, in place, with the duplicates removed. > > > ``` $('#textarea').val($.unique(SkillIds).tostring()); ``` --- Or you can use [$.inArray()](https://api.jquery.com/jQuery.inArray/) ``` $('#SkillSets table tr :checked').eac...
You can do the following: ``` var SkillIds = []; $('#SkillSets table tr :checked').each(function () { var id = $(this).data("id"); if( SkillIds.indexOf(id) == -1 ){//if element is not in array SkillIds.push(id); } }); $('#textarea').val(SkillIds.toString());//typo here tostring() should be toStri...
45,087,951
I am having an error when I perform queries in firebase, my code for query looks like this: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_perfil); txtNome = (TextView) findViewById(R.id.txtNomePerfil); txtCpf = (TextView) fi...
2017/07/13
[ "https://Stackoverflow.com/questions/45087951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8301802/" ]
You're most likely getting an error because `cpf` is null when you use it as a child in `mReferenceplaca`. This happens because Firebase downloads data asynchronously and your code lines are executed synchronously. Therefore, by the time this line `mReferencePlaca.child("Funcionario").child(cpf).child("placa")` is exec...
To solve your problem, just declare `nome`, `cpf` and `placa` Strings inside the coresponding `onDataChange()` methods, otherwise is null, due the asynchronous behaviour. As an example, please use this code: ``` public void onDataChange(DataSnapshot dataSnapshot) { String nome = dataSnapshot.getValue(String.class...
45,087,951
I am having an error when I perform queries in firebase, my code for query looks like this: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_perfil); txtNome = (TextView) findViewById(R.id.txtNomePerfil); txtCpf = (TextView) fi...
2017/07/13
[ "https://Stackoverflow.com/questions/45087951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8301802/" ]
To solve your problem, just declare `nome`, `cpf` and `placa` Strings inside the coresponding `onDataChange()` methods, otherwise is null, due the asynchronous behaviour. As an example, please use this code: ``` public void onDataChange(DataSnapshot dataSnapshot) { String nome = dataSnapshot.getValue(String.class...
``` private FirebaseAuth mAuth; private FirebaseAuth.AuthStateListener mAuthListener; ``` In the onCreate() method, initialize the FirebaseAuth instance and the AuthStateListener method so you can track whenever the user signs in or out. ``` mAuth = FirebaseAuth.getInstance(); mAuthListener = new FirebaseAuth.AuthS...
45,087,951
I am having an error when I perform queries in firebase, my code for query looks like this: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_perfil); txtNome = (TextView) findViewById(R.id.txtNomePerfil); txtCpf = (TextView) fi...
2017/07/13
[ "https://Stackoverflow.com/questions/45087951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8301802/" ]
To solve your problem, just declare `nome`, `cpf` and `placa` Strings inside the coresponding `onDataChange()` methods, otherwise is null, due the asynchronous behaviour. As an example, please use this code: ``` public void onDataChange(DataSnapshot dataSnapshot) { String nome = dataSnapshot.getValue(String.class...
not sure if this solution will be helpful for others. background : I was setting firebase path value with intent parcel. Solution : resolved this issue by updating androidmenifest as adding '**singleInstance**' ``` <activity android:name=".yourActivity" android:launchMode="singleInstance" ...
45,087,951
I am having an error when I perform queries in firebase, my code for query looks like this: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_perfil); txtNome = (TextView) findViewById(R.id.txtNomePerfil); txtCpf = (TextView) fi...
2017/07/13
[ "https://Stackoverflow.com/questions/45087951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8301802/" ]
You're most likely getting an error because `cpf` is null when you use it as a child in `mReferenceplaca`. This happens because Firebase downloads data asynchronously and your code lines are executed synchronously. Therefore, by the time this line `mReferencePlaca.child("Funcionario").child(cpf).child("placa")` is exec...
``` private FirebaseAuth mAuth; private FirebaseAuth.AuthStateListener mAuthListener; ``` In the onCreate() method, initialize the FirebaseAuth instance and the AuthStateListener method so you can track whenever the user signs in or out. ``` mAuth = FirebaseAuth.getInstance(); mAuthListener = new FirebaseAuth.AuthS...
45,087,951
I am having an error when I perform queries in firebase, my code for query looks like this: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_perfil); txtNome = (TextView) findViewById(R.id.txtNomePerfil); txtCpf = (TextView) fi...
2017/07/13
[ "https://Stackoverflow.com/questions/45087951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8301802/" ]
You're most likely getting an error because `cpf` is null when you use it as a child in `mReferenceplaca`. This happens because Firebase downloads data asynchronously and your code lines are executed synchronously. Therefore, by the time this line `mReferencePlaca.child("Funcionario").child(cpf).child("placa")` is exec...
not sure if this solution will be helpful for others. background : I was setting firebase path value with intent parcel. Solution : resolved this issue by updating androidmenifest as adding '**singleInstance**' ``` <activity android:name=".yourActivity" android:launchMode="singleInstance" ...
60,415
I know that some champions are completely dedicated to one of them, such as ryze to mana, however for other champions is it a case by case basis?, based on who they are laning against?, based on player skill, or, of course, based on the champion?
2012/04/01
[ "https://gaming.stackexchange.com/questions/60415", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/22950/" ]
Who you're laning against does not affect what your kit scales with. Needing CDR is dependent on your abilities and their cooldowns. Needing AP is dependent on your ratios. Needing mana is dependent on your mana pool numbers and mana costs. Your opponent, depending on their playstyle and champion, dictates if you ne...
I do it based on the champion. For example for morgana I go movement speed quints, for champs like ahri and tf I go flat ap quints for easier last hitting. And when I am expected to lose lane I like to rune magic resist red and blues.
60,415
I know that some champions are completely dedicated to one of them, such as ryze to mana, however for other champions is it a case by case basis?, based on who they are laning against?, based on player skill, or, of course, based on the champion?
2012/04/01
[ "https://gaming.stackexchange.com/questions/60415", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/22950/" ]
Who you're laning against does not affect what your kit scales with. Needing CDR is dependent on your abilities and their cooldowns. Needing AP is dependent on your ratios. Needing mana is dependent on your mana pool numbers and mana costs. Your opponent, depending on their playstyle and champion, dictates if you ne...
It depends on your play style. There are so many different types of AP Champions that can be played so many different ways. For example I personally play Ahri two ways Move speed/CDR which is my kiting build and Health/AP which is my jump in the middle of the fight and melt faces build. Or if you need to counter a ta...
42,615,892
I'm very new to Java, and to programming in general. I'm working on the following code using the NetBeans IDE: ``` package ShoutBox; import java.util.Scanner; public class ShoutBox { public static void main(String args[]){ ShoutBox shoutbox = new ShoutBox(); } Scanner input = new Scanner(System.in); ...
2017/03/06
[ "https://Stackoverflow.com/questions/42615892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7663666/" ]
The reason why it doesn't run is because packages in java (and class names) are case-sensitive. You should declare package as `package shoutbox` instead. By naming conventions, you should always name your packages in lowercase (your folders that denote packages should be done likewise), and you would always capitaliz...
I ended up creating a completely new file and placed the Main method in that, and separated the rest of the code into three files. It ran just fine after that.
2,967,811
I am using a datatable loaded via JSON with date like this : 2010-06-03 With Opera and Chrome I have the correct date displayed as 06/03/2010. With Firefox Windows (even in safe mode, without any plug-in), I get a NaN/NaN/NaN. If I use the debug console, I see a valid date, but in Firefox Windows I can see a "Invalid d...
2010/06/03
[ "https://Stackoverflow.com/questions/2967811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8404/" ]
Turns out that "2010-06-03" does not return an valid Date object (at least in FF/Win). For cross-browser compatibility, be sure your value is in a format acceptable to the Date constructor: <https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date>
Depending on your situation, another way to solve this is to include an actual date constructor in your "JSON" data. Once you do so, it's no longer standard JSON and you'll need to eval it on the browser. Eg ``` {'duration': 75, 'end_time': new Date(Date.UTC(2008,11,23,17,45,00,0)), 'start_time': new Date(Date.UTC(2...
2,967,811
I am using a datatable loaded via JSON with date like this : 2010-06-03 With Opera and Chrome I have the correct date displayed as 06/03/2010. With Firefox Windows (even in safe mode, without any plug-in), I get a NaN/NaN/NaN. If I use the debug console, I see a valid date, but in Firefox Windows I can see a "Invalid d...
2010/06/03
[ "https://Stackoverflow.com/questions/2967811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8404/" ]
Turns out that "2010-06-03" does not return an valid Date object (at least in FF/Win). For cross-browser compatibility, be sure your value is in a format acceptable to the Date constructor: <https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date>
Jenny's reference is good but in case you don't want to dig, you should pass: "YYYY,MM,DD" into the YUI parser to get it to work in FF/Win as well as Chrome.
2,967,811
I am using a datatable loaded via JSON with date like this : 2010-06-03 With Opera and Chrome I have the correct date displayed as 06/03/2010. With Firefox Windows (even in safe mode, without any plug-in), I get a NaN/NaN/NaN. If I use the debug console, I see a valid date, but in Firefox Windows I can see a "Invalid d...
2010/06/03
[ "https://Stackoverflow.com/questions/2967811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8404/" ]
Jenny's reference is good but in case you don't want to dig, you should pass: "YYYY,MM,DD" into the YUI parser to get it to work in FF/Win as well as Chrome.
Depending on your situation, another way to solve this is to include an actual date constructor in your "JSON" data. Once you do so, it's no longer standard JSON and you'll need to eval it on the browser. Eg ``` {'duration': 75, 'end_time': new Date(Date.UTC(2008,11,23,17,45,00,0)), 'start_time': new Date(Date.UTC(2...
2,371,313
I'm currently having a problem with the following equation $$\frac{2x - 5}{2y^2 - 50} +\frac{4}{3y^2 - 13y - 10}$$ However, I cannot add the equation with a calculator. What is the answer? Some examples or tips will be helpful! I would like to hear from you! PS. If possible some step to step for the following equati...
2017/07/25
[ "https://math.stackexchange.com/questions/2371313", "https://math.stackexchange.com", "https://math.stackexchange.com/users/467110/" ]
As noted in the comments the given expression is not an equation, because we don't have an equality that can be verified (or not) by some value of $x$ and/or $y$. You can write the expression in a simpler form noting that the denomiators can be factorized as: $$ 2y^2-50=2(y^2-25)=2(y-5)(y+5) $$ $$ 3y^2-13y-10=3y^2+2y-...
If you want to add the two fractions, compute the least common multiple of $2(y^2-20)$ and $3y^2-13y-10=(y-5)(3y-2)$: $$\frac{2x-5}{2(y^2-25)}+\frac4{(y-5)(3y-2)}=\frac{(2x-5)(3y-2)+8(y+5)}{2(y^2-25)(3y-2)}=\frac{6xy-4x-9y+50}{2(y^2-25)(3y-2)}.$$
66,598,674
I'm searching for a way to have a function of my template class which accepts as a parameter a member of the template (it could be either one of its arguments or functions). model.h ``` template <class T> class Model { public: Model(){} void relate(int T::*, int ){} }; ``` main.cpp ``` #include "model.h" ...
2021/03/12
[ "https://Stackoverflow.com/questions/66598674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1788762/" ]
Your instantiate a `Model<element*>` hence this: ``` void relate(int T::*, int ){} ``` is (just hypotheically): ``` void relate(int element*::*, int) {} ``` Its a "pointer to member of a pointer type". If you instantiate a `Model<element>` your code works fine. Alternatively you can use `std::remove_pointer<T>`.
EDIT: suddenly I'm figuring out... I used a poiter as a template... but the game changes now... ``` int main(int argc, char *argv[]){ Model<element> model; element e; model.relate(&element::getA(), 0); // <- call to non static-member error model.relate(&element::getB(), 0); // <- call to non stati...
6,161
When my son was under 11 months old, he ate a lot, but I don't know what changed when he reached 1 year old. It seems like he doesn't like to eat. When we give our son food, sometimes he tries to taste or eat it a little, but then refuses to eat it. I heard from a neighbor that the he may be bored with the food, so we ...
2012/09/26
[ "https://parenting.stackexchange.com/questions/6161", "https://parenting.stackexchange.com", "https://parenting.stackexchange.com/users/1122/" ]
If he won't eat he's probably not hungry. Around one their growth slows down and they eat a bit less, and if he's still getting breast fed then he's probably getting enough calories from that he doesn't need solid food. So if you want him to eat: * Stop breast feeding and bottle feeding so he will be hungry for solids...
Ellyn Satter's Division of Responsibility in Feeding is extraordinarily helpful here. For toddlers through adolescents it is: > > * The parent is responsible for what, when, where > * The child is responsible for how much and whether > > > Parents' feeding jobs: > > > * Choose and prepare the food > * Provide reg...
479,138
I'm trying to set up SSH tunneling on a remote web server to another MySQL server so that the database can be browsed easily with MySQL Query Browser. I'm following this page but cannot connect to the MySQL server. <http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/> What I've done: 1. ...
2012/09/24
[ "https://superuser.com/questions/479138", "https://superuser.com", "https://superuser.com/users/161044/" ]
Friend download program called DriverEasy he identifies automatic for all you drivers, without having to specify model is automatic
Find the serial from the BIOS. Then search Google to find the model using the serial for HP.
479,138
I'm trying to set up SSH tunneling on a remote web server to another MySQL server so that the database can be browsed easily with MySQL Query Browser. I'm following this page but cannot connect to the MySQL server. <http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/> What I've done: 1. ...
2012/09/24
[ "https://superuser.com/questions/479138", "https://superuser.com", "https://superuser.com/users/161044/" ]
Maybe you will find help in this document: [How Do I Find My Model Number or Product Number?](http://h10025.www1.hp.com/ewfrf/wc/document?lc=en&cc=us&docname=c00033108) > > HP provides a type of model name near the keyboard or screen, but this name or number is probably not sufficient to get proper support for your c...
Find the serial from the BIOS. Then search Google to find the model using the serial for HP.
50,843,062
i want redirect to "/user". i write but this not work. how to correctly redirect to the right page ``` onClick = (e) => { this.setState({ errorLoad: false}); getPlayerInfo(this.state.id).then(data => { if(data.success == false) { this.setState({ errorLoad: true}); ...
2018/06/13
[ "https://Stackoverflow.com/questions/50843062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7902255/" ]
Solved by changing images folder permissions to 777 instead of 755
I had the exact same message > > Could not open lock file etc > > > In my LocalSettings.php I commented out $wgUploadDirectory , that according to the documentation at [mediawiki documenation for $wgUploadDirectory](https://www.mediawiki.org/wiki/Manual:$wgUploadDirectory) will make it necessary to also redefine...
7,629,905
> > **Possible Duplicate:** > > [load content from external page into another page using ajax/query](https://stackoverflow.com/questions/4560183/load-content-from-external-page-into-another-page-using-ajax-query) > > > May be I just don't get something. I want to get html page from other site, let it be <http...
2011/10/02
[ "https://Stackoverflow.com/questions/7629905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/733596/" ]
One of the main sources of efficiency in quicksort is [locality of reference](http://en.wikipedia.org/wiki/Locality_of_reference), where the computer hardware is optimized so that accessing memory locations that are near one another tends to be faster than accessing memory locations scattered throughout memory. The par...
The cost of find() is more harmful to quicksort than mergesort. Merge sort performs more "short range" operations on the data, making it more suitable for linked lists, whereas quicksort works better with random access data structure.
7,629,905
> > **Possible Duplicate:** > > [load content from external page into another page using ajax/query](https://stackoverflow.com/questions/4560183/load-content-from-external-page-into-another-page-using-ajax-query) > > > May be I just don't get something. I want to get html page from other site, let it be <http...
2011/10/02
[ "https://Stackoverflow.com/questions/7629905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/733596/" ]
The cost of find() is more harmful to quicksort than mergesort. Merge sort performs more "short range" operations on the data, making it more suitable for linked lists, whereas quicksort works better with random access data structure.
It is more memory efficient, that's why. Speed wise, it is slower. Linked lists have to iterate, through each element to get to the desired element, the only elements that can be accessed directly are the first element and the last element, in the case of a doubly linked list and this will make the addition and deletio...
7,629,905
> > **Possible Duplicate:** > > [load content from external page into another page using ajax/query](https://stackoverflow.com/questions/4560183/load-content-from-external-page-into-another-page-using-ajax-query) > > > May be I just don't get something. I want to get html page from other site, let it be <http...
2011/10/02
[ "https://Stackoverflow.com/questions/7629905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/733596/" ]
One of the main sources of efficiency in quicksort is [locality of reference](http://en.wikipedia.org/wiki/Locality_of_reference), where the computer hardware is optimized so that accessing memory locations that are near one another tends to be faster than accessing memory locations scattered throughout memory. The par...
It is more memory efficient, that's why. Speed wise, it is slower. Linked lists have to iterate, through each element to get to the desired element, the only elements that can be accessed directly are the first element and the last element, in the case of a doubly linked list and this will make the addition and deletio...
177,140
Please recommend some books on panel data analysis for time series at master level. Also, sound lecture notes would be helpful. I don't have any knowledge about this topic, I'm a beginner.
2015/10/15
[ "https://stats.stackexchange.com/questions/177140", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/35988/" ]
The problem is lack of external validation. You need to have a list of joint first-last name dyads to assess this problem. Simply generating names according frequency is too naive. You make errors, such as how female last names in Russia are conjugated with an "a", Anna Karenina's husband was Mr. *Karenin*. First or la...
Without the joint distribution all you can do is to draw independently from first and last names. However, here's an idea on how to get the joint distribution. Draw a sample of first and last name, use their marginal frequencies, of course. Next, search LinkedIn or other social network by the combo: first + last name,...
177,140
Please recommend some books on panel data analysis for time series at master level. Also, sound lecture notes would be helpful. I don't have any knowledge about this topic, I'm a beginner.
2015/10/15
[ "https://stats.stackexchange.com/questions/177140", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/35988/" ]
The problem is lack of external validation. You need to have a list of joint first-last name dyads to assess this problem. Simply generating names according frequency is too naive. You make errors, such as how female last names in Russia are conjugated with an "a", Anna Karenina's husband was Mr. *Karenin*. First or la...
I think names look realistic if the first name "goes well" with the last name. This is, after all, a big part of how parents select the name for their child; they say the full name out loud and see if it sounds "nice". Violating this "sounds nice" property is what gives away fake names. The good news is that humans ca...
177,140
Please recommend some books on panel data analysis for time series at master level. Also, sound lecture notes would be helpful. I don't have any knowledge about this topic, I'm a beginner.
2015/10/15
[ "https://stats.stackexchange.com/questions/177140", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/35988/" ]
Without the joint distribution all you can do is to draw independently from first and last names. However, here's an idea on how to get the joint distribution. Draw a sample of first and last name, use their marginal frequencies, of course. Next, search LinkedIn or other social network by the combo: first + last name,...
I think names look realistic if the first name "goes well" with the last name. This is, after all, a big part of how parents select the name for their child; they say the full name out loud and see if it sounds "nice". Violating this "sounds nice" property is what gives away fake names. The good news is that humans ca...
74,369,545
I have created a login screen with textformfield for email id and password using flutter. Also, I have added the validation to check these fields. The code is as below; ``` import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContex...
2022/11/09
[ "https://Stackoverflow.com/questions/74369545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14400294/" ]
you need the interface of the contract too. If you do not have a contract code and you want to call contract methods but if you do not have the code how would you know which methods to call? ``` interface InterfaceA { function count() external view returns (uint256); function increment() external; } ``` you ...
You cannot get the "object", unless your intent is to get the bytecode of the contract. In that case `some_function_goes_here` is `fooAddress.code`. MySmartContract is really just an address under the hood. It's a convenient way to specify the ABI protocol for that address. Without it, if you wanted to call a function...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
> > Please, understand me in a right way - I'm not position myself as pro-Trump/pro-democrat - it is inner deals of foreign country for me, like a chess party. But this is just interesting question, I think - as things start going fast. > > > Given this, I’m going to take a step back here and look at a fundamental...
Many other answers point out that impeachment is a political process and does not need to establish a crime in the way that a regular trial with possible imprisonment would. I write to point something else out. Quoting the OP, > > Also, and it is notable, I think, DOJ rejected starting an investigation on it. This m...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
It's honestly still too early to tell, but all indications are that the publication of the call memorandum has not stopped calls for impeachment. Democrats have found the memo itself troubling enough. Elizabeth Warren [tweeted](https://twitter.com/ewarren/status/1176870628915388416) this in response to the release: > ...
> > Does this ruin the basis for impeachment or not?" > > > No. With respect to trial by the Senate following impeachment Hamilton said: "The subjects of its jurisdiction are those offenses which proceed from the misconduct of public men, or, in other words, from the abuse or violation of some public trust." Fede...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
It's honestly still too early to tell, but all indications are that the publication of the call memorandum has not stopped calls for impeachment. Democrats have found the memo itself troubling enough. Elizabeth Warren [tweeted](https://twitter.com/ewarren/status/1176870628915388416) this in response to the release: > ...
Not Really ========== Remember, impeachment is a **political** process. The House could impeach for any reason it wants (it does NOT have to be for illegal activity). The catch for the House is that they have to stand for election every 2 years, so if you're going to impeach a sitting President, you'd better make sure...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
> > Please, understand me in a right way - I'm not position myself as pro-Trump/pro-democrat - it is inner deals of foreign country for me, like a chess party. But this is just interesting question, I think - as things start going fast. > > > Given this, I’m going to take a step back here and look at a fundamental...
Not Really ========== Remember, impeachment is a **political** process. The House could impeach for any reason it wants (it does NOT have to be for illegal activity). The catch for the House is that they have to stand for election every 2 years, so if you're going to impeach a sitting President, you'd better make sure...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
Not Really ========== Remember, impeachment is a **political** process. The House could impeach for any reason it wants (it does NOT have to be for illegal activity). The catch for the House is that they have to stand for election every 2 years, so if you're going to impeach a sitting President, you'd better make sure...
> > Recently, White House administration releases phone call record from > the Trump-Zelenskiy phone talk - which was (as I understand) a trigger > to start an impeachment. > > > This is actually incorrect, as I understand it. What has been triggered is an [impeachment investigation](https://www.vox.com/2019/9/2...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
It's honestly still too early to tell, but all indications are that the publication of the call memorandum has not stopped calls for impeachment. Democrats have found the memo itself troubling enough. Elizabeth Warren [tweeted](https://twitter.com/ewarren/status/1176870628915388416) this in response to the release: > ...
Edit: Because I got into the weeds a bit, to answer the question, in the United States, Impeachment is not a legal matter but a political matter (which is what the DOJ handles). In fact, the Supreme Court of the United States has held that Impeachment is not subject to judicial review because it's not a right of the ju...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
> > Please, understand me in a right way - I'm not position myself as pro-Trump/pro-democrat - it is inner deals of foreign country for me, like a chess party. But this is just interesting question, I think - as things start going fast. > > > Given this, I’m going to take a step back here and look at a fundamental...
> > Recently, White House administration releases phone call record from > the Trump-Zelenskiy phone talk - which was (as I understand) a trigger > to start an impeachment. > > > This is actually incorrect, as I understand it. What has been triggered is an [impeachment investigation](https://www.vox.com/2019/9/2...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
> > Please, understand me in a right way - I'm not position myself as pro-Trump/pro-democrat - it is inner deals of foreign country for me, like a chess party. But this is just interesting question, I think - as things start going fast. > > > Given this, I’m going to take a step back here and look at a fundamental...
It's honestly still too early to tell, but all indications are that the publication of the call memorandum has not stopped calls for impeachment. Democrats have found the memo itself troubling enough. Elizabeth Warren [tweeted](https://twitter.com/ewarren/status/1176870628915388416) this in response to the release: > ...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
It's honestly still too early to tell, but all indications are that the publication of the call memorandum has not stopped calls for impeachment. Democrats have found the memo itself troubling enough. Elizabeth Warren [tweeted](https://twitter.com/ewarren/status/1176870628915388416) this in response to the release: > ...
> > Recently, White House administration releases phone call record from > the Trump-Zelenskiy phone talk - which was (as I understand) a trigger > to start an impeachment. > > > This is actually incorrect, as I understand it. What has been triggered is an [impeachment investigation](https://www.vox.com/2019/9/2...
45,953
### Background **2019-07-25** US President [Donald Trump](https://en.wikipedia.org/wiki/Donald_Trump) had a phone call with Ukrainian President [Volodymyr Zelensky](https://en.wikipedia.org/wiki/Volodymyr_Zelensky) that is central to the recent [Trump–Ukraine controversy](https://en.wikipedia.org/wiki/Trump%E2%80%93...
2019/09/26
[ "https://politics.stackexchange.com/questions/45953", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/20263/" ]
It's honestly still too early to tell, but all indications are that the publication of the call memorandum has not stopped calls for impeachment. Democrats have found the memo itself troubling enough. Elizabeth Warren [tweeted](https://twitter.com/ewarren/status/1176870628915388416) this in response to the release: > ...
Many other answers point out that impeachment is a political process and does not need to establish a crime in the way that a regular trial with possible imprisonment would. I write to point something else out. Quoting the OP, > > Also, and it is notable, I think, DOJ rejected starting an investigation on it. This m...
938,395
The number x is a positive integer < 100. When x is divided by 7, the remainder is 2, and when x is divided by 10 the remainder is 8. What is the value of x? Is there a formula to solve this type of problem? I could guess numbers but that would take time. If there isn't a formula, could you show me the fast way to gue...
2014/09/19
[ "https://math.stackexchange.com/questions/938395", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Less a formula than a strategy. Since the number has a remainder of 8 when divided by 10, it ends with an 8. When the number is divided by 7, is has a remainder of 2; so there is a multiple of 7 which, when we add 2 to it, it gives a number that ends in 8. What multiple of 7 < 100 ends in 6? 56; so our number is 58.
The usual way to deal with this is the [Chinese Remainder Theorem](http://en.wikipedia.org/wiki/Chinese_remainder_theorem). But this is what I did. The second piece of information tells us that $x$ ends with an $8$. Subtracting $2$, what is a multiple of $7$ that ends in $6$? Well $56$ works. So $x = 58$ is one soluti...
938,395
The number x is a positive integer < 100. When x is divided by 7, the remainder is 2, and when x is divided by 10 the remainder is 8. What is the value of x? Is there a formula to solve this type of problem? I could guess numbers but that would take time. If there isn't a formula, could you show me the fast way to gue...
2014/09/19
[ "https://math.stackexchange.com/questions/938395", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
$$x<100$$ $$x \equiv 2 \pmod 7 \Rightarrow x=2+7k, k \in \mathbb{Z} (\*)$$ $$x \equiv 8 \pmod {10} \overset{(\*)}{\Rightarrow} 2+7k \equiv 8 \pmod {10}\\ \Rightarrow 7k \equiv 6 \pmod {10}$$ We check which of the numbers $1, \dots, 9$ satisfies the above relation. For $k=1$, the relation is not satisied. For $k=2$...
The usual way to deal with this is the [Chinese Remainder Theorem](http://en.wikipedia.org/wiki/Chinese_remainder_theorem). But this is what I did. The second piece of information tells us that $x$ ends with an $8$. Subtracting $2$, what is a multiple of $7$ that ends in $6$? Well $56$ works. So $x = 58$ is one soluti...
938,395
The number x is a positive integer < 100. When x is divided by 7, the remainder is 2, and when x is divided by 10 the remainder is 8. What is the value of x? Is there a formula to solve this type of problem? I could guess numbers but that would take time. If there isn't a formula, could you show me the fast way to gue...
2014/09/19
[ "https://math.stackexchange.com/questions/938395", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Less a formula than a strategy. Since the number has a remainder of 8 when divided by 10, it ends with an 8. When the number is divided by 7, is has a remainder of 2; so there is a multiple of 7 which, when we add 2 to it, it gives a number that ends in 8. What multiple of 7 < 100 ends in 6? 56; so our number is 58.
This is one fairly quick way to solve this problem. ``` When x is divided by 7, the remainder is 2 ``` $x \equiv 2 \pmod 7$ $x = 2 + 7t$ for some $t.$ ``` when x is divided by 10 the remainder is 8 ``` $x \equiv 8 \pmod{10}$ $2 + 7t \equiv 8 \pmod{10}$ $7t \equiv 6 \pmod{10}$ (Note $3 \cdot 7 = 21 = ...
938,395
The number x is a positive integer < 100. When x is divided by 7, the remainder is 2, and when x is divided by 10 the remainder is 8. What is the value of x? Is there a formula to solve this type of problem? I could guess numbers but that would take time. If there isn't a formula, could you show me the fast way to gue...
2014/09/19
[ "https://math.stackexchange.com/questions/938395", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
$$x<100$$ $$x \equiv 2 \pmod 7 \Rightarrow x=2+7k, k \in \mathbb{Z} (\*)$$ $$x \equiv 8 \pmod {10} \overset{(\*)}{\Rightarrow} 2+7k \equiv 8 \pmod {10}\\ \Rightarrow 7k \equiv 6 \pmod {10}$$ We check which of the numbers $1, \dots, 9$ satisfies the above relation. For $k=1$, the relation is not satisied. For $k=2$...
This is one fairly quick way to solve this problem. ``` When x is divided by 7, the remainder is 2 ``` $x \equiv 2 \pmod 7$ $x = 2 + 7t$ for some $t.$ ``` when x is divided by 10 the remainder is 8 ``` $x \equiv 8 \pmod{10}$ $2 + 7t \equiv 8 \pmod{10}$ $7t \equiv 6 \pmod{10}$ (Note $3 \cdot 7 = 21 = ...
41,970,758
Some projects include multiple crates, which makes it a hassle to run all tests manually in each. Is there a convenient way to recursively run `cargo test` ?
2017/02/01
[ "https://Stackoverflow.com/questions/41970758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432509/" ]
Update: since adding this answer 1.15 was released, adding `cargo test --all`, will compare this with a custom script. --- This shell-script runs tests recursively on a git repository for all directories containing a `Cargo.toml` file (easy enough to edit for other VCS). * Exits on the first error. * Uses `nocapture...
You could use a shell script. According to [this answer](https://stackoverflow.com/a/2282701/2851815), this ``` find . -name Cargo.toml -printf '%h\n' ``` Will print out the directories containing `Cargo.toml`, so, composing this with the rest of the standard shell utils yields us ``` for f in $(find . -name Cargo....
41,970,758
Some projects include multiple crates, which makes it a hassle to run all tests manually in each. Is there a convenient way to recursively run `cargo test` ?
2017/02/01
[ "https://Stackoverflow.com/questions/41970758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432509/" ]
You could use a shell script. According to [this answer](https://stackoverflow.com/a/2282701/2851815), this ``` find . -name Cargo.toml -printf '%h\n' ``` Will print out the directories containing `Cargo.toml`, so, composing this with the rest of the standard shell utils yields us ``` for f in $(find . -name Cargo....
I cannot test it right now, but I believe you can use `cargo test --all` to do that.
41,970,758
Some projects include multiple crates, which makes it a hassle to run all tests manually in each. Is there a convenient way to recursively run `cargo test` ?
2017/02/01
[ "https://Stackoverflow.com/questions/41970758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432509/" ]
You could use a shell script. According to [this answer](https://stackoverflow.com/a/2282701/2851815), this ``` find . -name Cargo.toml -printf '%h\n' ``` Will print out the directories containing `Cargo.toml`, so, composing this with the rest of the standard shell utils yields us ``` for f in $(find . -name Cargo....
You could use the cargo workspace feature. [This crate](https://github.com/matthiasbeyer/imag) collection uses it in combination with a `Makefile`, which can be used to compile each crate on its own. (The workspace feature helps to not compile common dependencies multiple times)
41,970,758
Some projects include multiple crates, which makes it a hassle to run all tests manually in each. Is there a convenient way to recursively run `cargo test` ?
2017/02/01
[ "https://Stackoverflow.com/questions/41970758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432509/" ]
Update: since adding this answer 1.15 was released, adding `cargo test --all`, will compare this with a custom script. --- This shell-script runs tests recursively on a git repository for all directories containing a `Cargo.toml` file (easy enough to edit for other VCS). * Exits on the first error. * Uses `nocapture...
I cannot test it right now, but I believe you can use `cargo test --all` to do that.
41,970,758
Some projects include multiple crates, which makes it a hassle to run all tests manually in each. Is there a convenient way to recursively run `cargo test` ?
2017/02/01
[ "https://Stackoverflow.com/questions/41970758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/432509/" ]
Update: since adding this answer 1.15 was released, adding `cargo test --all`, will compare this with a custom script. --- This shell-script runs tests recursively on a git repository for all directories containing a `Cargo.toml` file (easy enough to edit for other VCS). * Exits on the first error. * Uses `nocapture...
You could use the cargo workspace feature. [This crate](https://github.com/matthiasbeyer/imag) collection uses it in combination with a `Makefile`, which can be used to compile each crate on its own. (The workspace feature helps to not compile common dependencies multiple times)
40,932,699
Is there a way to force MATLAB to use `single` precision as default precision? I have a MATLAB code, whose output I need to compare to C code output, and C code is written exclusively using `floats`, no `doubles` allowed.
2016/12/02
[ "https://Stackoverflow.com/questions/40932699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202172/" ]
Short answer: You can't. Longer answer: In most cases, you can get around this by setting your initial variables to single. Once that's done, that type will (almost always) propagate down through your code. (cf. [this](http://www.mathworks.com/matlabcentral/newsreader/view_thread/170061) and [this](http://www.mathwork...
You can convert any object `A` to single precision using `A=single(A);` [The Mathworks forums](http://mathworks.com/matlabcentral/answers/47142-how-to-set-matlab-precision-to-single#answer_57613) show that in your case: `system-specific('precision','8');` should do it. Try this in the console or add at the top of your...
55,993,302
I have the following models: ```rb class Course < ApplicationRecord belongs_to :super_course, inverse_of: :courses ... end class SuperCourse < ApplicationRecord has_many :courses, dependent: :nullify, inverse_of: :super_course ... end ``` This two models relate each other as the following: a `SuperCourse` g...
2019/05/05
[ "https://Stackoverflow.com/questions/55993302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7023504/" ]
`char`s and `short`s are promoted to `int` when doing arithmetic. The `(signed char)n` cast doesn't help since the result is immediately promoted right back up to `int` for the multiplication. Here are the implicit conversions made explicit: ``` int x = (int)v - (int)'0' * (int)(signed char)n; ```
The expression `v - '0' * (signed char)n` is grouped as `v - ('0' * (signed char)n)` Both arguments `'0'` **and** `(signed char)n` are converted to `int` types prior to the multiplication. There is nothing you can do to stop that. That total is subtracted from `v` which is also promoted to an `int`. This yields `-26...
14,562,192
Using MVC. I have a button. Button drawing is in view. The button action should be in controller, right? How do I add action to the button? From view, no reference should be kept of controller (for MVC), then how to set action. Should the button be made public and accessed by controller? Or, button should be drawn i...
2013/01/28
[ "https://Stackoverflow.com/questions/14562192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1559227/" ]
yes it will! MS stuffs are not dependencies of POI lib. Otherwise, all applications with Poi supported must be deployed to a Windows machine, what a nightmare!
`Apache POI` generates spreadsheets using `HSSFWorkbook` class and you can then save them as in `ODF` or `XLS` format. ``` File file = File.createTempFile(filename, ".XLS"); //Creating output stream to empty file FileOutputStream fos = new FileOutputStream(file); HSSFWorkbook workbook = new HSSFWorkbook(); HSS...
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
sudo pip install boto3 installs it to your global pip. Explained here: [Unable to install boto3](https://stackoverflow.com/questions/33388555/unable-to-install-boto3) You can activate your venv, install boto3 without sudo and start python: ``` $ source path/to/your/ENV/bin/activate $ pip install boto3 $ python ``` ...
Globally for my mac, this worked ``` sudo pip install --ignore-installed six boto3 ```
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
sudo pip install boto3 installs it to your global pip. Explained here: [Unable to install boto3](https://stackoverflow.com/questions/33388555/unable-to-install-boto3) You can activate your venv, install boto3 without sudo and start python: ``` $ source path/to/your/ENV/bin/activate $ pip install boto3 $ python ``` ...
I have faced the same issue and also not using virtual environment. easy\_install is working for me. I am using Ubuntu 16.04 and my python version is 2.7 ``` easy_install boto3 ```
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
sudo pip install boto3 installs it to your global pip. Explained here: [Unable to install boto3](https://stackoverflow.com/questions/33388555/unable-to-install-boto3) You can activate your venv, install boto3 without sudo and start python: ``` $ source path/to/your/ENV/bin/activate $ pip install boto3 $ python ``` ...
Try to activate your virtual environment > > source bin/activate > > > Then try connecting installing boto3 > > pip install boto3 > > >
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
sudo pip install boto3 installs it to your global pip. Explained here: [Unable to install boto3](https://stackoverflow.com/questions/33388555/unable-to-install-boto3) You can activate your venv, install boto3 without sudo and start python: ``` $ source path/to/your/ENV/bin/activate $ pip install boto3 $ python ``` ...
Sometimes botocore is also needed, so install boto3 and botocore.
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
Globally for my mac, this worked ``` sudo pip install --ignore-installed six boto3 ```
I have faced the same issue and also not using virtual environment. easy\_install is working for me. I am using Ubuntu 16.04 and my python version is 2.7 ``` easy_install boto3 ```
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
Globally for my mac, this worked ``` sudo pip install --ignore-installed six boto3 ```
Try to activate your virtual environment > > source bin/activate > > > Then try connecting installing boto3 > > pip install boto3 > > >
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
Globally for my mac, this worked ``` sudo pip install --ignore-installed six boto3 ```
Sometimes botocore is also needed, so install boto3 and botocore.
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
Try to activate your virtual environment > > source bin/activate > > > Then try connecting installing boto3 > > pip install boto3 > > >
I have faced the same issue and also not using virtual environment. easy\_install is working for me. I am using Ubuntu 16.04 and my python version is 2.7 ``` easy_install boto3 ```
36,392,806
Installed the boto3 and upgraded it to the latest release. I tried the easy install pip for installation. I have multiple versions of python installed so I even tried installing in virtualenv venv. But I get the same error: "No module named boto3". ``` pip install boto3 python Python 2.7.11 (default, Mar 10 2016, 14:...
2016/04/04
[ "https://Stackoverflow.com/questions/36392806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810551/" ]
Try to activate your virtual environment > > source bin/activate > > > Then try connecting installing boto3 > > pip install boto3 > > >
Sometimes botocore is also needed, so install boto3 and botocore.
29,167,735
I would like to input the gathered strings from a scanner, then put them into a String[] the problem i'm having is I cant find a way to input them in a few statements. I don't want to have any loops, because I do not want to have the message asking for a name to repeat 20 times over. I want to take 20 names typed in wi...
2015/03/20
[ "https://Stackoverflow.com/questions/29167735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4121420/" ]
Try this: ``` .Where(it => !(it.isDeleted ?? false)); ```
``` .Where(it => it.isDeleted == (bool?)false); ```
29,167,735
I would like to input the gathered strings from a scanner, then put them into a String[] the problem i'm having is I cant find a way to input them in a few statements. I don't want to have any loops, because I do not want to have the message asking for a name to repeat 20 times over. I want to take 20 names typed in wi...
2015/03/20
[ "https://Stackoverflow.com/questions/29167735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4121420/" ]
Try this: ``` .Where(it => !(it.isDeleted ?? false)); ```
There is an GetValueOrDefault method which returns a default value when the value is null: ``` var details = dc.SunriseShipment .Where(it => !it.isDeleted.GetValueOrDefault(false)); ```
29,167,735
I would like to input the gathered strings from a scanner, then put them into a String[] the problem i'm having is I cant find a way to input them in a few statements. I don't want to have any loops, because I do not want to have the message asking for a name to repeat 20 times over. I want to take 20 names typed in wi...
2015/03/20
[ "https://Stackoverflow.com/questions/29167735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4121420/" ]
There is an GetValueOrDefault method which returns a default value when the value is null: ``` var details = dc.SunriseShipment .Where(it => !it.isDeleted.GetValueOrDefault(false)); ```
``` .Where(it => it.isDeleted == (bool?)false); ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
Still using map with only a few tweaks. ``` array.map(x => ({...x, attr2: x.attr2.split('.').pop()} )); ```
You could create a new array and change the wanted property. ```js let array = [{ attr1: 123, attr2: "a.end" }, { attr1: 123, attr2: "b.start" }]; array = array.map(({ attr2, ...o }) => ({ ...o, attr2: attr2.split('.').pop() })); console.log(array); ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
Your code actually works fine, if slightly inefficient due to using [`Array#map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) where you should be using [`Array#forEach()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach). T...
You could use `forEach` ```js arr=[{ "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", }] arr.forEach(o=>{var n=o.attr2.split(".")[1];o["attr2"]=n}) console.log(arr) ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
As an alternative to other answers, you can use RegExp ```js const ret = [{ attr1: 123, attr2: 'a.end', }, { attr1: 23, attr2: 'b.start', } ].map(({ attr2, ...otherArgs }) => ({ ...otherArgs, attr2: attr2.replace(/^.*\./g, ''), })); console.log(ret); ```
You could use `forEach` ```js arr=[{ "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", }] arr.forEach(o=>{var n=o.attr2.split(".")[1];o["attr2"]=n}) console.log(arr) ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
Still using map with only a few tweaks. ``` array.map(x => ({...x, attr2: x.attr2.split('.').pop()} )); ```
As an alternative to other answers, you can use RegExp ```js const ret = [{ attr1: 123, attr2: 'a.end', }, { attr1: 23, attr2: 'b.start', } ].map(({ attr2, ...otherArgs }) => ({ ...otherArgs, attr2: attr2.replace(/^.*\./g, ''), })); console.log(ret); ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
The lint error says `no-return-assign` which means [Assignment in return Statement is disallowed](https://eslint.org/docs/rules/no-return-assign). The below will make the linter happy. **Note:** Doing this will not affect the original array.`result` will be a new array with attr2 as expected. ``` let result = arr.map...
You could use `forEach` ```js arr=[{ "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", }] arr.forEach(o=>{var n=o.attr2.split(".")[1];o["attr2"]=n}) console.log(arr) ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
The lint error says `no-return-assign` which means [Assignment in return Statement is disallowed](https://eslint.org/docs/rules/no-return-assign). The below will make the linter happy. **Note:** Doing this will not affect the original array.`result` will be a new array with attr2 as expected. ``` let result = arr.map...
try this arr.map ((item) => {return item.attr2 = item.attr2.split('.').pop()}) maybe your linter didn't accept the way you wrote it
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
Your code actually works fine, if slightly inefficient due to using [`Array#map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) where you should be using [`Array#forEach()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach). T...
The Map is an array high order function that returns a NEW array based on what you tell it to do! item.attr2 = item.attr2.split('.').pop() this right here is an assignment you cant set this to a new array in an arrow function *cuz some linters will throw an error* instead you will create a new array that has the new...
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
Your code actually works fine, if slightly inefficient due to using [`Array#map()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) where you should be using [`Array#forEach()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach). T...
Your codes works for me. I think your linter causes the error. But you can use `forEach`, your object will be update thanks of ref pointer. This will be more performing, because when you use `map` method, it generate a new array. Thanks of `forEach` you will update your exist array object. Js: ``` const arr = [{ "a...
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
try this arr.map ((item) => {return item.attr2 = item.attr2.split('.').pop()}) maybe your linter didn't accept the way you wrote it
You could create a new array and change the wanted property. ```js let array = [{ attr1: 123, attr2: "a.end" }, { attr1: 123, attr2: "b.start" }]; array = array.map(({ attr2, ...o }) => ({ ...o, attr2: attr2.split('.').pop() })); console.log(array); ```
63,056,105
I have an array of objects as such ``` { "attr1": 123, "attr2": "a.end", }, { "attr1": 123, "attr2": "b.start", } ``` I'm trying to remove the first part of the attr2 string up to and including the '.' I've tried using ``` arr.map ((item:any) => item.attr2 = item.attr2.split('.').pop()) ``` but I'm getting t...
2020/07/23
[ "https://Stackoverflow.com/questions/63056105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1712638/" ]
Still using map with only a few tweaks. ``` array.map(x => ({...x, attr2: x.attr2.split('.').pop()} )); ```
try this arr.map ((item) => {return item.attr2 = item.attr2.split('.').pop()}) maybe your linter didn't accept the way you wrote it
32,718,326
I have created the following angular service for the purpose of making the API calls. ``` (function (module) { module.service('APIService',function ($http, $q) { console.log("Reached APIService") var deferred = $q.defer(); this.getData = function (requestURL) { console.log("Reac...
2015/09/22
[ "https://Stackoverflow.com/questions/32718326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5316255/" ]
Just try this, You need to `return` to the http result. ``` this.getData = function (requestURL) { console.log("Reached APIService @GET", requestURL); return $http.get(requestURL) }; ```
Looks like you have to disable cache explicitly within $http call. ``` $http.get({ url: requestURL, cache: false }) ```
32,718,326
I have created the following angular service for the purpose of making the API calls. ``` (function (module) { module.service('APIService',function ($http, $q) { console.log("Reached APIService") var deferred = $q.defer(); this.getData = function (requestURL) { console.log("Reac...
2015/09/22
[ "https://Stackoverflow.com/questions/32718326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5316255/" ]
Since the service is a singleton, you only have a single instance of the deferred object. Once resolved, it will keep being resolved, so the next time you call, getData, it will return immediately. You could move: ``` var deferred = $q.defer(); ``` inside both your getData and postData function. Or you could just...
Looks like you have to disable cache explicitly within $http call. ``` $http.get({ url: requestURL, cache: false }) ```
32,718,326
I have created the following angular service for the purpose of making the API calls. ``` (function (module) { module.service('APIService',function ($http, $q) { console.log("Reached APIService") var deferred = $q.defer(); this.getData = function (requestURL) { console.log("Reac...
2015/09/22
[ "https://Stackoverflow.com/questions/32718326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5316255/" ]
Since the service is a singleton, you only have a single instance of the deferred object. Once resolved, it will keep being resolved, so the next time you call, getData, it will return immediately. You could move: ``` var deferred = $q.defer(); ``` inside both your getData and postData function. Or you could just...
Just try this, You need to `return` to the http result. ``` this.getData = function (requestURL) { console.log("Reached APIService @GET", requestURL); return $http.get(requestURL) }; ```
32,718,326
I have created the following angular service for the purpose of making the API calls. ``` (function (module) { module.service('APIService',function ($http, $q) { console.log("Reached APIService") var deferred = $q.defer(); this.getData = function (requestURL) { console.log("Reac...
2015/09/22
[ "https://Stackoverflow.com/questions/32718326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5316255/" ]
Just try this, You need to `return` to the http result. ``` this.getData = function (requestURL) { console.log("Reached APIService @GET", requestURL); return $http.get(requestURL) }; ```
You are using an *anti-pattern* by creating your own promises when `$http` already returns a promise. Get rid of `$q` altogether in this service and simply return `$http` ``` this.getData = function (requestURL) { console.log("Reached APIService @GET", requestURL); return $http.get(requestURL).then(function (...
32,718,326
I have created the following angular service for the purpose of making the API calls. ``` (function (module) { module.service('APIService',function ($http, $q) { console.log("Reached APIService") var deferred = $q.defer(); this.getData = function (requestURL) { console.log("Reac...
2015/09/22
[ "https://Stackoverflow.com/questions/32718326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5316255/" ]
Since the service is a singleton, you only have a single instance of the deferred object. Once resolved, it will keep being resolved, so the next time you call, getData, it will return immediately. You could move: ``` var deferred = $q.defer(); ``` inside both your getData and postData function. Or you could just...
You are using an *anti-pattern* by creating your own promises when `$http` already returns a promise. Get rid of `$q` altogether in this service and simply return `$http` ``` this.getData = function (requestURL) { console.log("Reached APIService @GET", requestURL); return $http.get(requestURL).then(function (...
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
> > It bothered me too much while updating node version from 8.1.0 to > 10.14.0 > > > Here is what worked for me: 1. Open terminal (`Ctrl`+`Alt`+`T`). 2. Type `which node`, which will give a path something like `/usr/local/bin/node` 3. Run the command `sudo rm /usr/local/bin/node` to remove the binary (adjust the...
Try the following commands: ```none $ sudo apt-get install nodejs $ sudo apt-get install aptitude $ sudo aptitude install npm ```