id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_19600 | error id: 559044
message: The receiver .... does not accept payments in this Currency
I was able to fix this by logging into the account and adding the currency (EUR) to balance currencies for the account.
now... I need to be able to detect when 'sellers' in the marketplace do not have EUR enabled, so that I can guide ... | |
doc_19601 | When I use xmlSaveFormatFile() to save the exact same compressed xmlDoc to a file (not to a buffer) and it saves it compressed. Is there any way at all to have a compressed buffer in memory using standard API functions?
Please advise.
| |
doc_19602 | self.likeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[self.likeButton addTarget:self action:@selector(didTapLikeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
[self.likeButton setTitle:@"Pray" forState:UIControlStateNormal];
[self.likeButton setTitleColor:[UIColor blackColor] forState:UIContro... | |
doc_19603 |
*
*mysqldb has been pip installed
*i can access mysql database from the command line with $ mysql -h $your_IP =P 3306 -u username -p
However, when I try and run python manage.py syncdb I get an error that ends with this:
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
... | |
doc_19604 | Parent component:
fetch(urlMakerNames)
.then((response) => response.json())
.then((responseJson) => {
var array = JSON.parse(responseJson.marker_names);
var options = array.map((opt, index) => {
console.log('opt = ' + opt + ', index = ' + index);
return '<option key="' + index + '" value="' + op... | |
doc_19605 | One of the solutions I have is send the json by URL parameter but I dont like see all the JSON in the browser.
This is my JS code:
$('#btnDetalleActivo')
.on('click',function() {
var data = $('#tablaActivo').bootstrapTable('getSelections')[0].dto;
... | |
doc_19606 | I remember that it was possible with fscommand in ActionScript 2 but it's not working in AS3.
I've searched everywhere but everyone is trying to close a popup or tab or window all in browser environment not a Flash app.
A: Why would use a .exe format when you can now export as3 application as AIR?
BUT
If you still wa... | |
doc_19607 |
A: You can define an extension method to pick a random element of any IEnumerable (including string arrays):
public static T RandomElement<T>(this IEnumerable<T> coll)
{
var rnd = new Random();
return coll.ElementAt(rnd.Next(coll.Count()));
}
Usage:
string[] messages = new[] { "good morning", "good afternoon"... | |
doc_19608 | I am trying to follow this tutorial (http://scikit-learn.org/stable/auto_examples/feature_selection/plot_feature_selection.html) but I am not sure if I am doing it right since the tutorial is using a small number of features while mine has tens of thousands after vectorization. And also the plt.show() shows a blank fig... | |
doc_19609 | def convert_to_binary(n):
if (-1.0 < n < 256.0):
number_list = []
while (n != 0):
rem = n % 2
number_list.append(rem)
n = n // 2
new_list = number_list[::-1]
print("".join(str(x) for x in new_list))
else:
print("Invalid input")
the e... | |
doc_19610 | 1 - Car = name - model - age
2 - User = name - city - phone
3 - Reservation = from_date - to_date
4- reservation_user = user_id - reservation_id
5 - car_user = user_id - car_id
In the view.blade I tried to show the user's info in a table and below that the user request car's descriptions ( he wants to buy) and belo... | |
doc_19611 | It seems like the standard library contains no functions for this purpose?
What is the canonical way of proving strings equal?
A: You can use the string_dec function, which decides (hence the suffix _dec) if two strings are equal. Incidentally, this name slightly violates the usual Coq naming style -- it should've bee... | |
doc_19612 | The template looks like this:
<Application.Resources>
<Style TargetType="{x:Type Button}">
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Name="... | |
doc_19613 | Any ideas/advice would be great, thanks!
//start of horizontal sections
gsap.registerPlugin(ScrollTrigger);
jQuery(document).ready(function(hz1) {
var allSections1 = hz1('.horizontal-section-buy-1');
allSections1.wrapAll('<div class="horizontal-container-buy-1"/>');
gsap.to(allSections1, {
xPercent: -10... | |
doc_19614 | enter image description here
Im really fuzzy about this and could use some help.
Thanks guys.
package lab4;
public class Person {
private String name;
public Person(){
}
public void setName(String n){
name = n;
}
public String getName(){
retur... | |
doc_19615 | class Merchant(
val id: Int = 0,
@Column("parent_id") var parentId: Option[Int] = None
) extends KeyedEntity[Int] {
def this() = this(0, Some(0))
}
in schema:
val merchants: Table[Merchant] = table[Merchant]
on(merchants)(m => declare(
m.id is autoIncremented
))
val parent2merchants = oneToManyRelation(me... | |
doc_19616 | Is it prohibited to use a OnSeekBarChangeListener outside main activity?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mp = new MediaPlayer();
timescroller = (SeekBar) findViewById(R.id.seekBar);
TimeScroll... | |
doc_19617 | User class:
@PrimaryKey
@NonNull
private String userid;
private String name;;
@TypeConverters(Object_Converter.class)
private ArrayList<Message> messages = new ArrayList<>();
The issue I'm having is updating the List of messages.
I'm currently using the default @Update method:
@Update
void updateUser(User user);
So ... | |
doc_19618 | I tried like this, but it brought me all SALARIES and ID:
SELECT JOB, MIN(SAL) FROM EMP
GROUP BY EMPNO, JOB;
And so it brings me only the lowest salary of all:
SELECT JOB, SAL
FROM SCOTT_EMP
WHERE SAL = (SELECT MIN(SAL) FROM EMP);
Can you help me?
A: If you just want one more column, you could use the... | |
doc_19619 | I heard about multithreading but when i look example its only for WPF form :/
Do you have an idea ?
$ErrorActionPreference = 'Continue'
function Clean {
do{
start-sleep 1
$richtextbox1.AppendText("------------STEP 1-----------`n")
} While ($i = "45")
}
function CreateForm {
Add-Type -AssemblyName System.Windo... | |
doc_19620 | my code is as follows
class Person {
constructor() {
this.id = 'id_1';
}
timers(){
const intervalObj = setInterval(() => {
console.log('interviewing the interval');
}, 3000);
}
}
var justAGuy = new Person();
justAGuy.timers()
justAGuy = null
A: Javascript is a garbage ... | |
doc_19621 | I'm a bit struggling with functions in JS.
The idea is that after the user clicks submit button, it checks if all the required fields have been filled out and if yes, it will trigger the loading animation.
The loading animation is supposed to be a status indicator in the meanwhile of sending the form and redirection to... | |
doc_19622 | for (Area a : areas) {
final SwitchPreference sp = new SwitchPreference(getActivity());
sp.setTitle(a.getName());
sp.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
... | |
doc_19623 | This association works fine defined here:
#teacher.rb
class Teacher < ActiveRecord::Base
has_and_belongs_to_many :students
validates :email, uniqueness: true
end
#student.rb
class Student < ActiveRecord::Base
has_and_belongs_to_many :teachers
validates :email, format: /\A[\w-\.]+@([\w-]+\.)+[\w-]{2,4}\z/
... | |
doc_19624 | I can produce the desired layout if I use the date to specify the color, but I feel there is likely a more 'correct' way to do this.
Thanks all!
library(tidyverse)
library(plotly)
randomdates <- sample(seq(as.Date('1999/01/01'), as.Date('2000/01/01'), by="day"), 12)
df <- data.frame( dates = rep(randomdates, ... | |
doc_19625 | I know how to do it manually but it's obviously not the right way. now the code looks like that:
Scanner scan = new Scanner(System.in);
String [] allStockCodes = new String [5];
int [] stockPrices = new int [5];
Stock s0 = new Stock ("TEVA", 100);
Stock s1 = new Stock ("APPLE", 45);
Stock... | |
doc_19626 |
Fig. 1
Fig. 2
A: According to this article from Android Developer you can allow users to switch easily among multiple IME subtypes by providing a switching key, such as the globe-shaped language icon, as part of the keyboard. Doing so greatly improves the keyboard's usability, and can help avoid user frustration. T... | |
doc_19627 | df = spark.read.json("/data/test.json")
df.write.format("com.databricks.spark.avro").save("/data/test.avro")
But I'm getting this error:
java.lang.NoSuchMethodError: org.apache.avro.generic.GenericData.createDatumWriter(Lorg/apache/avro/Schema;)Lorg/apache/avro/io/DatumWriter;
It makes no difference if I try interact... | |
doc_19628 | Tried to call int git_merge(git_repository *repo, const git_annotated_commit **their_heads, size_t their_heads_len, const git_merge_options *merge_opts, const git_checkout_options *checkout_opts); But second parameter git_annotated_commit should be constant. I am getting git_annotated_commit **out from method git_annot... | |
doc_19629 | match = re.match("^(?:.*(?:password\sis\s|password:\s)([a-zA-Z]*)\s.*)*$",a)
print match.groups()
i want the output to be ('GOD','G0D') but all i get is ('G0D')
i am trying to solve this with Regex only. the amount of times "password" can appear in the text can vary.
help would be very much appreciated.
A: I'd use ... | |
doc_19630 |
A: No, mybatis has no mechanism to do this automatically without you coding your sql maps to update the columns.
One alternative would be database triggers. I'm not certain I would recommend that though, we just code it in the sql maps.
You could code it in the SQL maps like this,
<insert id="someInsert">
in... | |
doc_19631 | this is my HTML code
<select id="number">
<option value="30">30</option>
<option value="60">60</option>
<option value="90">90</option>
</select>
<button type="button" value="test1" id="btnval" onclick="loadXMLDoc()">test1</button>
<button type="button" value="test2" id="btnval" onclick="loadXMLDoc()">test2... | |
doc_19632 | <Slider Grid.Column="2" Grid.Row="1" Minimum="2" Maximum="100"
AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="0"
Value="{Binding Path=Controller.MotorModel.SelectedMovementSpeed}" />
EDIT:
My initial assumption that the View should define the operator's limits was wrong. As FCin wrote, the V... | |
doc_19633 | mRecyclerView.setOnScrollListener(new RecyclerView.OnScrollListener()
{
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState)
{
super.onScrollStateChanged(recyclerView, newState);
}
@Override
public void onScrolled(RecyclerView r... | |
doc_19634 | This is shown in many other SO questions and tutorials - and since it works, I never worried about it.
But I'm sure there's a difference between them... what is it?
A: From the CLI docs, the --staging option:
--test-cert, --staging
Use the staging server to obtain or revoke test (invalid) certificates; equivalent to ... | |
doc_19635 | tensorflow
keras
imutils
numpy
opencv-python
matplotlib
scipy
But it is showing error?
what to do.
Tried restarting and all, but to no use. Please check
It is for a face mask detection tool project for me
Here's the thing
Code posted as SS as i dont know how to use this stack overflow lol
Code 1 Code 2
| |
doc_19636 | With Card Layout, changing panel is working but can't achieve a moving panel effect.
I don't know what it's called. I don't know if "dynamic" is the correct term for it.
So here's the link to help you guys understand my question better.
https://www.youtube.com/watch?v=0Y7cxgX4Suc
According to the description it's all ... | |
doc_19637 | When I using elements, I can the styles, computed, layout, event listeners, DOM breakpoints as you can see in this picture image about styles, computed, layout when click to elements
But when I click to Sources, it does not show styles, computed, layout, event listeners, DOM breakpoints as I want, you can see in this ... | |
doc_19638 | "Option 1" "Option 2" "Option 3" "Option 4"]
Question:
How to prevent printing 'Select Options' if user not selected any options in receiving email?
If user select first option ('Select Options'),it should not print as 'Select Options' in mail.
A: Change your select tag to the following
[select my_select class:input ... | |
doc_19639 | Connection String in app.config:
<add name="Crm" connectionString="Authentication Type=AD; Server=http://dev01/myorg; User ID=myorgdomain\sv-crm; Password=password123" />
CrmDataContext and GetEntities code:
var connection = new CrmConnection("Crm");
connection.ImpersonatedUser = Guid.Parse("1937F45C-8EB4-E011-8FE4-00... | |
doc_19640 | "C:\Program Files\ANSYS Inc\ANSYS Student\v194\Framework\bin\Win64\runwb2" -B -F "E:\MEngA\Ansys\IFD_PartA_Rev3.wbpj" -R "E:\MEngA\Results\sn07\script_partA.wbjn"
It needs the quote marks. Currently trying:
os.system('"C:\Program Files\ANSYS Inc\ANSYS Student\v194\Framework\bin\Win64\runwb2" -B -F "E:\MEngA\Ansys\IFD_P... | |
doc_19641 |
- source_compile:
archive: /var/cache/sources/nginx.tar.gz
configure:
prefix: /usr
I will probably
*
*Check source package. (If is url download it)
*Make a unique build directory.
*Unarchive source to build directory.
*configure && make && make install
So I want use ansible core module get_url... | |
doc_19642 |
"Uncaught Aws\ElasticTranscoder\Exception\ValidationException: AWS Error Code: ValidationException, Status Code: 400, AWS Request ID: dbf2833a-5375-11e4-a2d3-bb1da889e1d8, AWS Error Type: client, AWS Error Message: SegmentDuration '10' is not a valid option for preset 1351620000001-000001, because the container is not... | |
doc_19643 | This is the Encrypt method:
public static string Encrypt(string encryptString)
{
if (string.IsNullOrEmpty(encryptString))
return encryptString;
string EncryptionKey = "---";
byte[] clearBytes = Encoding.Unicode.GetBytes(encryptString);
using (Aes encryptor = Aes.Create())
{
Rfc2898D... | |
doc_19644 | My HTML, CSS and JavaScript codes are as follows:
function show_result(){
// console.log("show_result")
let c = document.querySelector("#c").value;
let mt = document.querySelector("#mt").value;
let ph = document.querySelector("#ph").value;
let ja = document.querySelector("#ja").value;
let csa ... | |
doc_19645 | def plot_degree_In(G):
in_degrees = G.in_degree()
in_degrees=dict(in_degrees)
in_values = sorted(set(in_degrees.values()))
in_hist = [list(in_degrees.values()).count(x) for x in in_values]
plt.figure()
plt.grid(False)
plt.loglog(in_values, in_hist, 'r.')
#plt.loglog(out_values, out_hi... | |
doc_19646 | a = [[7, 5, 1, 9, 4],
[20, 11, 15, 17, 16],
[23, 21, 24, 25, 30],
[36, 34, 32, 40, 31],
[44, 49, 42, 43, 50]]
and a dictionary like that:
dict_words = {"yes":42,"no":16,"good morning":9,"morning sir":34}
how can I iterate over the list and match the dictionary key-value pairs to reach my desired output as such:
a... | |
doc_19647 | This is my function:
testa = do
questions <- readFile "questionsQ.txt"
category <- readFile "category.txt"
print (myZip category (lines questions))
myZip :: [a] -> [b] -> [(a, b)]
myZip [] [] = []
myZip _ [] = []
myZip (x:xs) (y:ys) = [(x,y)] ++ myZip xs ys
questions.txt contains one question per row
c... | |
doc_19648 | a = [1,1,2,3,4,5]
b = [0,3,0,5,6,0]
c = [2,3,4,5,6,5]
d = [20,30,40,50,60,70]
So I use a defaultdict to store key,value pairs for a,b like:
one = defaultdict(list)
for k, v in zip(a, b):
one[k].append(v)
two = defaultdict(list)
for k, v in zip(c, d):
two[k].append(v)
Essentially, b is linked to c so I am tryin... | |
doc_19649 | So by what i understand, first the primary key will be partitioned by browse node id (i.e. laptop here), then we can have additional keys as sort key, but the problem is that if there are 6 filters there will be around 64 combinations that can be formed. I can select brand and processor, or maybe brand and graphics car... | |
doc_19650 | SELECT s0_.id AS id_0, s0_.name AS name_1, ST_AsText(s0_.wkt) AS
wkt_2, s0_.strategy AS strategy_3, s0_.type AS type_4, s0_.deleted_at
AS deleted_at_5, s0_.beach_id AS beach_id_6, s0_.pmp_id AS pmp_id_7
FROM stretch s0_
WHERE (s0_.pmp_id = ?) AND (s0_.deleted_at IS NULL)
ORDER BY s0_.name ASC
I imagine that this... | |
doc_19651 | Problem is, even though I have postback/viewstate enabled for these controls, the content of the textbox and state of the checkbox is not saved when I do this(when the user press the submit button).
WebClient myClient = new WebClient();
string myPageHTML = null;
byte[] requestHTML;
// Ge... | |
doc_19652 | I've hunted around but can't find a similar case so I wondered if anyone could help out?
Current query I'm using is:
ALTER TABLE `rsf96104_rsf_members`.`members`
CHANGE COLUMN `renewal_date` `renewal_date` DATE GENERATED ALWAYS AS (DATE_ADD( `joined` + INTERVAL `duration` YEAR)) STORED ;
Also tried with the '+'... | |
doc_19653 | myList = ('17.0.1.34', '17.1.182.21', '714'),('203.84.210.248', '27.111.228.3', '10310'),('202.73.40.45', '27.111.228.6', '18106'),...
I want to store it into a database (Django) that has three fields:
fieldOne = '17.0.1.34', '203.84.210.248','202.73.40.45', ....
fieldTwo = '17.1.182.21', '27.111.228.3', '27.111.228.6... | |
doc_19654 |
<table style="margin:0;padding:0" >
<tr>
<td style="width:5%;">Sl No.</td>
<td style="padding:5px; text-align: center; " > Description of Goods </td>
<td style="padding:5px; text-align: center; "... | |
doc_19655 |
*
*I am creating ID column
but while editing I am not getting the id value in my action class and if
I am setting editable is true then I wll get the value of ID column in my action class.So how can I get non editable filed value in action class.
*In the Edit and Save form I have select box, on change value of se... | |
doc_19656 | FGM = function (n,r,z){
x = r*sqrt(n)/(2*z)
Px = 1-pnorm(x)
}
re = 10000
data = data.frame(abs(rnorm(re,0,1)), abs(rnorm(re,0,1)), abs(rnorm(re,0,1)))
colnames(data) = c("n","r","z")
data$Px = FGM(data$n,data$r,data$z)
data$x = data$r*sqrt(data$n)/(2*data$z)
par(mar=c(4.5,4.5,1,1))
plot(data$x,data$Px, xlim = c(0,... | |
doc_19657 | The only way I can get composer create-project truckee/volunteer to work is to add the argument --stability=dev.
Edit #2:
I am the owner of the package, so it is not being required by any other.
Edit:
Without argument the following error occurs:
[InvalidArgumentException] Could not find package
truckee/volunteer... | |
doc_19658 | Class Auth(models.Model):
def wrap_has_perm(self, perm):
def wrap():
if self.is_staff and self.has_perm(perm):
return True
else:
return False
can_add_order = wrap_has_perm('finance.normal')
can_review_order = wrap_has_perm('finance.review')
... | |
doc_19659 | Submitting the form seems to be working in the sense of:
*
*The page isn't refreshing/adding parameters to the url
*Using for (var value of formData.values()) {console.log(value);} to check what values are being grabbed by formData, console.log shows the different input values
*response.status is showing 200
The... | |
doc_19660 | $nativeQuery = $em->createNativeQuery("SELECT u.*,l.* FROM `table1` u INNER JOIN `table2` l ON u.`x`=l.`y` WHERE l.`ub_id`='10'", $rsm);
given rsm as,
$rsm = new ResultSetMapping();
$rsm->addEntityResult('Models\objectname1(table1)', 'su');
$rsm->addFieldResult('su', 'x', 'xx');
$rsm->addFieldResu... | |
doc_19661 | How can I achieve that?
It's a nested Json with arrays and objects, and so I can't use the [(ngModel)] directly to correspond to the value in JSON.
ngOnChanges() is not getting fired once the @Input() receives it's value for the first time.
Is there any other way to get the main issue to work?
A: Input() object : any ... | |
doc_19662 | How do I rewrite the code in order to avoid the repetition of the block case 3:{code block A; break;}?
switch(i) {
case 1: {code block A; break;}
case 2: {code block b; break;}
case 3: {code block A; break;}
default: {code block default; break;}
}
How can I have combined code for case 1 and case 3?
A: S... | |
doc_19663 | Problem Demo
<div class="col-xs-4">
<table class="table">
<caption>Table Caption<a class="detail-link">large link placed at right</a></caption>
<thead>
<tr>
<th>Name</th>
<th>City</th>
<th>Pincode</th>
</tr>
</thead>
<tbody>
<tr>
<... | |
doc_19664 | Does CountDownLatch 'counts down the latch' (waits for completion of number of threads) as per the number of threads which are given at declaration?
Here is the code I tried to understand:
public class LatchExample implements Runnable {
private CountDownLatch latch;
private int id;
public LatchExample(in... | |
doc_19665 | I changed "Go to Settings » Discussion » untick Allow people to post comments on new articles" in admin panel.But not able to remove comments on blog page.I just need to display blogs on page not comment.
Would you please give me proper suggestion about how to hide/remove comments on blog page?
Any kind of help would b... | |
doc_19666 | Class Person
readonly public string Name;
readonly public string FamilyName;
readonly public string UserName;
private List<Person> Team = new List<Person>();
public Person Leader { get; private set; }
public bool HasTeam { get; private set; }
I am getting error on serializer because "Object has... | |
doc_19667 | I can figure out how to upload and connect my application to Firebase, but I am not sure if its possible for a shell script to do the remaining work.
Should I look into some other service to do this, or another method?
thank you for your help!
A: You can use a command line program called gsutil to upload and download... | |
doc_19668 | I have the following code:
for (key in datosMostrados) {
if (datosMostrados.hasOwnProperty(key)) {
// my logic goes here
}
}
I still get the error The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype guard-fo... | |
doc_19669 | CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': 'localhost:6379',
'OPTIONS': {
'PICKLE_VERSION': 1,
},
},
}
And I'm experimenting with it (new to Redis, want to understand it better). So, I go into my Django shell, and I do:
from django.core.... | |
doc_19670 | I'm tring to run update command but I I get error saying that timestamp is invalid:
files$update(
query = "{\"FileId\" : \"F0FFFBDA14E1D49547C24CD5150\" }",
update = "{ \"$set\" : {\"Contract\" : \"1\"},
\"$currentDate\" : {\"Updated\" : { \"$type\" : \"timestamp\" } } }")
Error: Invalid input ... | |
doc_19671 | I was able to reproduce this in debug mode by:
- launching the app
- using debug js remotely
- kill the application
- launching the app
And in release mode by:
- launching the app
- go in Parameters
- dev options
- enable don't keep activities
- launching the app again
If I try to reproduce this bug with the release me... | |
doc_19672 | The only difference is one allows anonymous, the other window authentication only. (as you cannot have both enabled at the same time)
Is it now possible to access variables or objects across these two applications?
I have a list of connected users which should be indepdendent of which application was used to authentica... | |
doc_19673 | have a parameter in their constructor that must be initialized. I would prefer to initialize them at construction time, because I think it would save time. How do I initialize an array of dynmaically allocated objects at allocation time, with a constructor that requires a parameter?
class Thingy{
private:
int* a;
p... | |
doc_19674 | def new_names(filename):
with open(filename) as f:
lines = f.read()
sted = lines.split('\n',1)[0]
dato = lines.split('\n',1)[1]
os.rename('qwghlm.txt',"{dato}_{sted}.txt")
return (filename)
print(new_names('qwghlm.txt'))
The task is to take the file `qwghlm.txt and get informati... | |
doc_19675 | public static string Replacements(string text)
{
string output = Regex.Replace(text, @"\b[a-zA-Z0-9.-_]+@[a-z][A-Z0-9.-]+\.[a-zA-Z0-9.-]+\b","email");
return output;
}
Lets say I want to put the replacement regex into a dictionary
static Dictionary<string, string> dict1 = new Dictiona... | |
doc_19676 | Sample data :
df = pd.DataFrame([["ores"], ["ores + more texts"], ["anything else"]], columns=['Symptom'])
def conditions(df5):
if ("ores") in df5["Symptom"]: return "Things"
df["new_column"] = df.swifter.apply(conditions, axis=1)
It's doesn't work because any("something") is always True
So i tried :
df['new_colu... | |
doc_19677 | My idea for creating this mouse was to use Motion_Event UP and MOVE to record your finger movement on the device screen, calculate the difference between your last and new x,y coordinates and send the difference to the PC so it would move the mouse in the same pattern
Now I have a few problems from the sending itself t... | |
doc_19678 | function getChecked(button, form)
{
var name;
for (i = 0; i < document.forms['CheckForm'].list.length; i++) {
name = "Check" + (i + 0);
if (document.forms['CheckForm'].list[i].checked == true) {
if (name == "Check0")
form.Check0.value = "2337667";
else if ... | |
doc_19679 | <?php
/**
* Display detail author of current post
* Use in single post
*
* @since 1.0
*/
?>
<div class="post-author">
<div class="author-img">
<?php if( function_exists('get_simple_local_avatar') ){
if( get_simple_local_avatar( get_the_author_meta( 'ID' ) ) ){
echo get_simpl... | |
doc_19680 | I created my project (build: ssr), loaded it on my server, started Node and called the page in the browser. It's going well. However, I can't find a way to activate https.
In the "server.ts" I tried the following:
const server = require('https').createServer(credentials, app);
server.listen(port, () => {
console.log(... | |
doc_19681 | I have a DataTable being returned via stored procedure. I'm then going through it and creating a delimited file based off of the information returned.
I've made it here without any issues.
My problem is taking my StringBuilder object and creating a CSV file with it and then sending it to the user to download. I can't c... | |
doc_19682 | I want to be able to parse them from ticker symbols like "USD".
I have implemented a currency trait which I want to have a compile time ticker symbol.
I want to iterate through all the types that implement Currency to check if their ticker symbol is equal to the string being parsed. If so, I want to return a type of th... | |
doc_19683 | I am doing this in ionic 2 and typescript.
Here is the info window content :
text2 = text2 + '<div id="wrapper">' + '<div id="sidebar" >' + '<h5 onclick()=" '+ this.goToDealPage(businessDetails.deals[a])+ ' ">'+ businessDetails.deals[a].deal.title +'</h5></div>'+ '<div id="content"><h4 class="realprice"><del>'+ busines... | |
doc_19684 | I tried using this command
C:\Users\User\Desktop>pyinstaller -F --add-data "config.ini;config.ini" vendsend.py
| |
doc_19685 | The file has 7 column numbers containing samples of a gyroscope and an accelerometer in the XYZ axis, such as:
0.02775096893310547 0.0 0.0 0.0 -0.021 0.001 1.018
0.043855905532836914 0.017453292519943295 0.3490658503988659 -3.490658503988659 -0.23800000000000002 -0.165 0.972
0.1978168487548828 0.8377580409572782 0.6283... | |
doc_19686 | I only need to call the RevokeAssignments() Method or the RevokeQueues() Method if there was a chkbx.CheckedChanged. So basically if you change the status of a check box, checked or unchecked It would recognize which ones were checked and are not anymore and then call these methods.
It's a C# Program, WINFORM in VS201... | |
doc_19687 | ["A","B","C","D","E"]
["1",false,null,"3","Hi"]
["2",true,"7676","2","Hello"]
...
["3",true,"222","4","Bye"]
I want it be of the following format:
{"A":"1", "B":false,"C":null,"D":"3","E":"Hi"}
{"A":"2", "B":true,"C":"7676","D":"2","E":"Hello"}
...
{"A":"3", "B":true,"C":"222","D":"4","E":"Bye"}
A: head = ... | |
doc_19688 | There are already several questions about "Core Data Migration & crash", mainly about memory usage and UI response.
Migrating large Core Data database crash
Out-Of-Memory while doing Core Data migration
Core Data causing app to crash while migrating
Core Data lightweight migration crash
For high memory peak, Apple sugg... | |
doc_19689 | <body>
<div id="fixed">
Fixed div
</div>
<div id="nonfixed">
<p>Non-fixed div</p>
<p>Non-fixed div</p>
<p>Non-fixed div</p>
</div>
</body>
And:
* { box-sizing: border-box; }
body {
margin: 0;
padding: 0;
}
#fixed {
position: static;
width: 100%;
... | |
doc_19690 | // SocketTypeT may be e.g. 'boost::asio::ip::tcp::socket'
template<class SocketTypeT>
class Socket : public SocketTypeT, public boost::enable_shared_from_this< Socket<SocketTypeT> > {
[...]
Within this class I have the following method 'writeAsync':
void writeAsync(const std::string& strData) {
... | |
doc_19691 | Something like
V <- rnorm(30)
gr = rep(seq(1,3),each=10)
df <- data.frame(V,gr)
min_num <- df%>%
group_by(gr)%>%
filter(rank(V,ties.method="min")==1)
returning this
V gr
(dbl) (int)
1 -1.134910 1
2 -1.598005 2
3 -1.317898 3
when I do
filter(V==min(V))
also returning the same result.... | |
doc_19692 | As I understand I need to use onchange() event and javascript code. Is that right?
Could you please advice?
Thank you.
A: It seems like you are just getting started with this. Yes, you are probably going to end up using javascript for this. You need to understand that javascript is used to
*
*Modify the DOM (i.e... | |
doc_19693 | How can I update the server code?
Issue: It might have a chance that someone is accessing a server or doing some CRUD.
It may impact the data and we have some payment-related things as well.
A: A reasonably easy and straight-forward way is a blue-green deployment. (Unlike what the Wikipedia article says, the instances... | |
doc_19694 | protected void Repeater_Load(object sender, EventArgs e)
{
Repeater Repeater = (Repeater)sender;
Repeater.DataSource = Enumerable.Range(GridView1.PageIndex + 1, 10);
Repeater.DataBind();
}
My Gridview has 21 page count all in all, but I want to display 10 page numbers per numbers click.
for example here, I... | |
doc_19695 | I have an app that, in the menu, displays 3 big images.
Each image takes the full height of the screen and 1/3 of the screen in width. However, when of the images is tapped the other two leave the screen making the selected one occupy 100% of the screen (in both height and width).
So, given this, I have 3 image views a... | |
doc_19696 | def fizzbuzz(n)
pool = []
(1..n).each do |x|
if x % 3 == 0
pool.push('Fizz')
elsif x % 5 == 0
pool.push('Buzz')
elsif x % 3 == 0 && x % 5 == 0
pool.push('FizzBuzz')
else
pool.push(x)
end
end
puts pool
end
fizzbuzz(10)... | |
doc_19697 | For example:
Items.find({tags : { $in : ['one','two','three']}}, function(err, docs) {
console.log(docs);
});
I want to find out though specifically which of the values from $in actually caused a match (was it one? two?) Is there a way in Mongo to do this?
Thanks!
A: There is neither a possibili... | |
doc_19698 | WebHosting ctrlWebhosting = (WebHosting)Page.LoadControl("~/Controls/" + nRow["ClientServiceList"]);
However, how do I cast to a WebHosting for example if from an item from teh database.
I thought about something like the following but it doesn't work:
DataRowView nRow = null;
switch (e.Item.ItemType)
{
case ListI... | |
doc_19699 | Now i want to install the whole project with composer install, but when i try it out, the symfony folders doesn't appear and i get the following error message:
[RuntimeException]
Could not scan for classes inside "app/AppKernel.php"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.