id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23492600 | /
/customer-account
/web (Yii application lives here)
/gswp (Wordpress application lives here)
...
The .htaccess file in the root directory currently looks something like this:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^$ customer-account/web/$1 [L]
#... | |
doc_23492601 | I am getting different results in some of the mathematical operations.
I have included the javascript and java code below, but what happens is the Ma calculation results in 0.04195508514183418 in javascript and 0.04195511450680837 in java. I have printed off the inputs to the calculation and they are the same.
This is... | |
doc_23492602 | However, one of the steps requires to use CocoaPod to get the libraries. My React Native project doesn't work well with CocoaPod, I want to avoid it as much as possible. Is there a way to install the libraries manually without using CocoaPods?
Much appreciated if you can point me to some documentation or tutorials. Tha... | |
doc_23492603 | I am working on a django rest framework project and models may look like below
models
from django_hstore.hstore import DictionaryField
class Config(models.Model):
data = data = DictionaryField(db_index=True)
And i am trying to test a scenario based on Config model and does something like this
Tests
class ConfigT... | |
doc_23492604 | Here's my code:
if (!pDescription.getText().toString().isEmpty()) {
if (!pDuration.getText().toString().isEmpty()) {
if (!pPrice.getText().toString().isEmpty()) {
if (imageArray != null) {
if (imageArray.size() > 0) {
fo... | |
doc_23492605 | Any help would be appreciated, thanks.
// User.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders} from '@angular/common/http';
import { environment } from '../../environments/environment';
import { User } from './user.model';
@Injectable({
providedIn: 'root'
})
export class Us... | |
doc_23492606 | Mainpage:
$("#group_name").change(function(){
var groupname = $("#group_name").val();
var selectedGroup = 'gr_name='+ groupname;
$.post("selectedgr.php", {data: selectedGroup}, function(data){
$.each(data, function(){
$("#" + this).attr("checked","checked");
});
},"json");
... | |
doc_23492607 | Since we already know any class can not have multiple base classes and we also know all the classes(types) is ultimately derived from System.Object. So deriving any class from another class has already two classes (base classes) let's say
Class B{...}
Class D : B {...}
So conceptually Class D is derived from two diff... | |
doc_23492608 | I have considered wrapping my estimators in a BatchVoter (of my own design) that manages reading from the database in batches and keeps a list of models. Passing this to the XSeachCV and updating the parameter space dictionary so all keys lead with 'estimator__' might direct the the search to set the parameters of the ... | |
doc_23492609 |
Can anyone experience this earlier? If anyone is there help me on that.
Thanks,
Madhava
A: try updating your IDE and GIT plugin:
Git Eclipse version
It might work for you.
This is the eclipse version I use eclipse version
Check your git view in eclipse too
Git repository
You can associate your workspace with GITHUB D... | |
doc_23492610 | input {
twitter {
consumer_key => "XXX"
consumer_secret => "XXX"
oauth_token => "XXX"
oauth_token_secret => "XXX"
keywords => ["portugal", "game", "movie"]
ignore_retweets => true
full_tweet => true
}
}
filter {}
output{
stdout {
codec => dots
}
elasticsearch {
host... | |
doc_23492611 | MacOS Monterey, no available updates, Python 3.10.4
Problem:
I'm getting the error zsh: segmentation fault sudo python3 when I try to run this command sudo python3 '/Users/cyberstorm/Documents/Visual Studio Code/Terminal Adventure/mainCode.py' This command is trying to run the python file mainCode.py as in administrat... | |
doc_23492612 | The use case here is a C# (.NET) UI talking to an eventual Java back end implementation that will use the regex to match data.
Note that I only need to worry about matching, not about extracting portions of the matched data.
A: There are quite (a lot of) differences.
Character Class
*
*Character classes subtracti... | |
doc_23492613 | datastore = DatastoreFactory.get().create(DatastoreHelper.getOptionsfromEnv()
.dataset(datasetId).build());
Then I built and deployed the app (appcfg.sh -A <project> update target/appengine-try-java-1.0) and made a request and got the following error in the logs:
W 17:40:59.602 2015-05-20 200 0 B 4.12s ... | |
doc_23492614 | select regexp_substr('some stuff TOTAL_SCORE<518>some stuff OTHER_VALUE<456> foo <after>', 'TOTAL_SCORE<(\d{3})>', 1, 1, NULL, 1) from dual which can return a value for a single capturing group.
How can I instead return all the capturing groups as an additional column? (string concat of results is fine)
select regexp_s... | |
doc_23492615 | The debugger then breaks inside xlocale in std::local's destructor:
~locale() _THROW0()
{ // destroy the object
if (_Ptr != 0)
_DELETE_CRT(_Ptr->_Decref()); // breaks here with unhandled exception
}
The above code is being run, I believe, after my main function returns and exit( 0 ) is called somewhere. Here's my... | |
doc_23492616 | This is the redux state before I add a new post. You can see the old posts(The ones that were there before I added redux to my project)
This is after I add a new post. The data is correctly added to the redux store but all it shows is a blank card on the webpage
This is the code responsible for rendering the posts.
cla... | |
doc_23492617 | **sdtt02 [c_t2] 406: find /users/c_t2/ws/ -maxdepth 1 ! -name 'ws' ! -name 'binaries' ! -name 'delivery' ! -name 'cause' -ctime 1**
/users/c_t2/ws/Rlinp53.nic
/users/c_t2/ws/Rlinp55.nic
/users/c_t2/ws/new.sh
/users/c_t2/ws/file
/users/c_t2/ws/Rlinp53.nic%
/users/c_t2/ws/.linuxemuver.swp
sdtt02 [c_t2] 407: ls -lrt /use... | |
doc_23492618 | list = ['Mr. Adam Smith Junior', 'Anna Smith Jr.', 'Adam Jhon Smith', 'Smith Adam'];
str = 'Adam Smith Jr.';
// output: 'Mr. Adam Smith Junior'
I have tried by tokenizing words and for each of the item in list, it matches with 2tokens(Adam/Smith/Jr.). But my expected output is list[0]. So I need a solution to find th... | |
doc_23492619 | This is supposed to validate whether a car has already entered in a parking lot or not. If it hasn't it creates the row and in the vehicle table and creates the row in vehicle payment table. If this is not the case it just creates the row in in the vehicle payment table and updates the state to (meaning it's currently ... | |
doc_23492620 |
A: Found it. It's in the table FactCurrentWorkItem, field Microsoft_VSTS_Scheduling_CompletedWork.
| |
doc_23492621 | This image shows what I see:
But I should see this:
What can be wrong in the code below:
var scene = new THREE.Scene();
var material = new THREE.MeshBasicMaterial();
var loader = textureLoader = new THREE.TextureLoader();
var camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 1000);
v... | |
doc_23492622 | import org.apache.spark.sql.execution.streaming.MemoryStream
import scala.reflect.ClassTag
import scala.reflect.runtime.universe._
import io.delta.implicits._
case class EnrichedPerson(id: Int, name: String, age: Int, address: String)
case class BasePerson(id: Int, name: String, age: Int)
val data1: List[BasePerson] ... | |
doc_23492623 | <div class="activity--history-custom-dates-filter-container">
<label class="activity--header-element-label">From </label>
<input class="activity--history-custom-date-field
fid-datepicker--input activity-- history-custom-date-from-field hasDatepicker"
placeholder="mm/dd/yyyy" id="dp1416484110853">
<b... | |
doc_23492624 | So, .edmx file, there are auto generated classes UserProfile and Roles
public partial class UserProfile
{
public UserProfile()
{
this.webpages_Roles = new HashSet<webpages_Roles>();
}
public int UserId { get; set; }
public string UserName { get; set; }
public virtual ICollection<webpag... | |
doc_23492625 | HEre is my code:
protected void registerUser(Object src, EventArgs e)
{
Response.Write("you have connected to your .cs page add records");
get_connection();
try
{
connection.Open();
command = new SqlCommand("INSERT INTO subscribers (FirstName, LastName, Email,... | |
doc_23492626 | In the below given example I calculate means for the three month January, Feb. and March.
The answer to my question in that case is: N for January = 31, N for February = 29, N for March = 31. Is there a way to get that information about N for more complex data?
import pandas as pd
import numpy as np
#create dates as i... | |
doc_23492627 | A bit of context: I have multiple shards across multiple nodes (60 shards, 10 data nodes), all the nodes are using ES 2.3 and we're heavily using nested document - the example query doesn't use them, for simplicity.
I tried to resolve it by using the preference search parameter, with a custom value. The documentation s... | |
doc_23492628 | func main() -> Void {
return print(
half(80) >>= half >>= half
)
}
func half(_ a: Int) -> Int? {
return a % 2 == 0 ? Optional(a / 2) : Optional.none
}
main()
In another file, let's call it test.swift, I have:
precedencegroup BindPrecedence {
associativity: left
higherThan: NilCoalescingPr... | |
doc_23492629 | - (IBAction)blurPhoto:(id)sender {
//perform CPU intense blur
//fade blured image back in
[UIView transitionWithView: mImageView
duration:0.9f
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
mImageView.image = co... | |
doc_23492630 | I'd like to make [LOGO][A] ACTION_BAR [B][C] style. One button "A" is placed right-side of the logo (but left aligned) where normally title text is placed.
(Note that A,B,C are buttons)
Is there another way except to use setCustomView()? small changes but replacing whole actionbar view makes lot of works.
Maybe a kind ... | |
doc_23492631 | <input type="checkbox" class="cbox" id="cb_grid" role="checkbox">
To fetch the total number of rows selected
var totalRows = jQuery('#grid').jqGrid('getGridParam', 'selarrrow');
console.log(totalRows.length);
The snippet gives correct count of total rows selected individually, but if all rows are selected using Selec... | |
doc_23492632 | I'm using Win7 and latest PyCharm version.
First I had problems with the paths but after playing with them for a bit now they looks like this:
*
*Environment variables: DJANGO_SETTINGS_MODULE(djangotestone.settings)
& PYTHONUNBUFFERED(1)
*Working Directory:
\C\Users\Passanova\PycharmProjects\djangotestone\djangotes... | |
doc_23492633 | Here is my code
import random
import time
def UserInfo():
UserName = input ("Player 1 what is your name?\n")
return UserName
def Introduction(UserName):
time.sleep(.5)
print ("Hello " + UserName + ",\n")
time.sleep(1)
print ("You are an unfortunate soul\... | |
doc_23492634 | In cracking the coding interview 6th edition there is a problem:
Robot in a Grid: Imagine a robot sitting on the upper left corner of grid with r rows and c columns. The robot can only move in two directions, right and down, but certain cells are "off limits" such that the robot cannot step on them. Design an algorithm... | |
doc_23492635 |
A: WAIT_BLOCKED means that the thread has been scheduled out for being blocked on something, as opposed to a thread that would've been scheduled out due to preemption, in which case the state would be WAIT_FOR_CPU.
By itself, it doesn't tell us what exactly the thread is waiting for. It might be disk I/O or something ... | |
doc_23492636 |
*
*catids = 1, 2, 3
*subscriptions = 1, 1, 0 [ 0 = keep subscribed and 1 = unsubscribe for catids in this order]
*appuser_id = XXX
Now I have to update my subscription table according to data received. The schema is as follows:
--cat_id--appuser_id
1 | 10 |
2 | 10 |
3 | 10 ... | |
doc_23492637 | Now my cursor works fine, but I am having a hard time placing it inside a a function, how can I do this?
The function is supposed to have the same argument as the cursor.
Code:
DECLARE
CURSOR c_emp_salary (v_job_title VARCHAR2)
IS
SELECT employee_id, first_name, salary, min_salary FROM employees e JOIN jobs... | |
doc_23492638 | I can't see what I've done wrong here, but all of my results are doubled.
Here is my code:
$sql = $upc->prepare("SELECT `uid`, `model`, `biosmodel`, `upc`, `systemsku`, `brand`, `hardwareids`, `status`, `pendingHardware` FROM `builds` WHERE `uid`=:id");
$sql->bindValue(':id', $uid, SQLITE3_INTEGER);
$result = $sql->exe... | |
doc_23492639 | The first form is used to make a calculation (fieldvalue1 + fieldvalue2 = calculatedfield)
The second form is simply just to capture information (Name, Email, etc.)
The first form has no submit button, but the second form has a submit button. Currently, when the user fills in all the info and clicks submit, then only t... | |
doc_23492640 | I have a dataset where i would like to produce a matrix from a column. The matrix should have the value of 1 if the value in the column and its transposed state is equal and 0 if its not.
input:
id x1
A 1
B 3
C 1
D 5
output:
A B C D
A 1 0 1 0
B 0 1 0 0
C 1 0 1 0
D 0 0 0 1
I wou... | |
doc_23492641 | But here my main requirement is when i click table-list rows then if there is image file it must be shows or if there is video it must be play audio also have to play as like videos for this i have written some code here photos and videos are playing fine but audio files giving problem what did i do here wrong?
my code... | |
doc_23492642 | $(document).ready(function () {
$('.wrapper ul li').click(function() {
$(this).next(li).localScroll();
});
});
A: Accoding to the ScrollTo examples, you need to do this:
$(container).scrollTo(element);
e.g.
$(document).ready(function () {
$('.wrapper ul li').click(function() {
$(window).scro... | |
doc_23492643 | mat <- matrix(1:12, ncol = 3)
myList <- list(mat1 = mat, mat2 = mat, mat3 = mat, mat4 = mat)
I want to select a specific column from each of the matrices and do something with it. This will get me the first column of each matrix and return it as a matrix (lapply() would give me a list either is fine).
sapply(myList, f... | |
doc_23492644 | from pptx import Presentation
pres_path = "C:\\pres.pptx"
pres = Presentation(pres_path)
pres.slides[3].shapes[4].chart.series[0].values
(92.0, 330.0, 309.0, 313.0, 356.0, 421.0, 457.0)
pres.slides[3].shapes[4].chart.series[0].values = (1,2,3)
Traceback (most recent call last):
File "<input>", line 1, in <module>
... | |
doc_23492645 | here is my code for cari.java
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import co... | |
doc_23492646 | Thanks
A: Yes, using Windows API. I think that Windows Key is the same as Ctrl+Esc but I'm not sure.
using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
class InterceptKeys
{
private const int WH_KEYBOARD_LL = 13;
private const int WM_KEYDOWN = 0x0100;
... | |
doc_23492647 | What I want to do, is to not allow others sites from using my js/css files.
For example, the site www.other-domain.com can use this:
<img src="http://www.my-domain.com/ph/hello.jpg"/>
which i want to avoid it ( it can overload my server)
Is there a way to avoid loading my js/css/photos files to other domains ?
A: TL;... | |
doc_23492648 | I'm using methods
*
*+(float) calculateHeightOfTextFromWidth:(NSString*) text: (UIFont*)withFont: (float)width:(UILineBreakMode)lineBreakMode
*-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
In cellForRowAtIndexPath
float productNameHeight = [DetailsViewController cal... | |
doc_23492649 | Following is the code I wrote for the custom layer:
class BReLU(Layer):
def __init__(self):
super(BReLU, self).__init__()
def call(self, inputs):
for i, element in enumerate(inputs):
if i % 2 == 0:
inputs[i] = tf.nn.relu(inputs[i])
else:
... | |
doc_23492650 | For instance, a logger instance (Log4J or whatever). Do I have to manually initialize this and store it in the HttpSession? Is there a "best practice" way of doing this so that my logger is accessible to all/some resources?
A: Speaking strictly about the Logger, are you sure you want it to be stateful? Most projects ... | |
doc_23492651 | The following is the error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "HomeViewController" nib but the view outlet was not set.'
0 CoreFoundation 0x0130b5a9 __exceptionPreprocess + 185
... | |
doc_23492652 | Here is the error from the compiler:
An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll Additional information: Input string was not in a correct format.
Here is the code from where i am getting the error:
Console.Clear();
List<int> myCars = new List<int>();
Console.WriteLine("Enter th... | |
doc_23492653 | $ echo '{"start": 10, "end": 20}` > /tmp/out.json
$ jq .start /tmp/out.json
10
$ jq .end /tmp/out.json
error: syntax error, unexpected end, expecting $end
.end
^^^
1 compile error
This issue (https://github.com/stedolan/jq/issues/256) suggests using .["end"] as the selector but that doesn't seem to work either.
$ jq ... | |
doc_23492654 | Basically i am integrating google drive api with my current app to reduce the cost. But i want to notify user about the amount of storage used
A: Solution
According to the documentation a folder is a type of file that only contain metadata and is used for file organization.
It also states that: a folder is a file wit... | |
doc_23492655 | What I thought is get all profiles and search all admins into it:
foreach (var sid in Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList")
.GetSubKeyNames().Select(profile => new SecurityIdentifier(profile)))
{
if (sid.IsWellKnown(WellKnownSidType.AccountAdministratorSid... | |
doc_23492656 | Here is my link command command line (order like in the command line):
g++ -g -O2 -Wl,-rpath -o output file1.o libprivate_lib1.so -Lprivate_path -llib1 -ldl \
-lpthread -llib2 -lexpat -lgtest -lgtest_main -lboost_regex -lboost_filesystem -llzma \
-lcrypto private_lib2.so private_lib3.so -llib3
Here are some of the er... | |
doc_23492657 | Link to my GitHub project
In the file Driver.java, you can see that I have specified an exclusive ArgGroup. My understanding based on the documentation is that the default multiplicity is 0..1. The documentation states, "The default is multiplicity = "0..1", meaning that by default a group may be omitted or specified... | |
doc_23492658 | - (void)viewDidAppear:(BOOL)animated
{
_finalLogoCenter = self.logoImage.center;
// Logo Animation
[self logoAnimation];
}
- (void) logoAnimation
{
[UIView animateWithDuration:1.0
delay:0.0
options:UIViewAnimationOptionTransitionNone
... | |
doc_23492659 |
A: Just get proxy from your store and then change the url of that proxy.
var yourStore= Ext.getStore('storename');
var proxy = yourStore.getProxy();
proxy.setUrl("new Url");
| |
doc_23492660 | Payments
--------
10,
20
Items
------
5,
5,
10
In essence would return that the first payment (10) applied to the first two items and was exhausted. The second payment (20) applied to the third item and there was 10 left over. I'm able to accomplish this fine using cursors. Just curious if anyone had ... | |
doc_23492661 | Since the react part of the project uses react-router, it changes the url in the SPA. So if I go to /options in the app, it works, but if I were to enter the url and cold load from http://example.com/options, uwsgi returns a 404.
What is the proper thing to do to prevent this?
A: Regarding your second question,use ... | |
doc_23492662 |
The type 'a -> bool' does not support the 'equality' constraint,
Is there a way to get it to pre-evaluate the function so that I can use the return value?
Example:
let primelist n =
let rec prim n = function
| [] -> true
| x::xs when n % x = 0 -> false
| x::xs ... | |
doc_23492663 | What I have tried
I have tried many methods but some of them aren't about programming.
First, I tried to mess with udev. I can monitor the activities when a device is plugged and write filters. There used to be an option "ignore_device" that ignored the filtered devices. For example, to ignore all the devices that are ... | |
doc_23492664 | Here's what I have:
<button type="button" data-toggle="modal" data-target="targetModal">New</button>
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Game</th>
<tr>
<thead>
<table>
<div class="modal" id="addData" tabindex="-1" role="dialog" aria-hidden="true">
<div class=... | |
doc_23492665 | Any search on how to do that bring me to using Pandas to create a dic in memory.
I need to create a physical file name.py in my project, and inside to have a code:
data = [{key:value},{key:value},...] # from my csv. Can have any other structure like dics in dic
I can start with this :
df = pd.read_csv ('index/index.cs... | |
doc_23492666 | For that reason, I found pywhatsapp package in python but it requires WhatsApp client registration through yowsup-cli.
So I've run yowsup-cli registration -r sms -C 00 -p 000000000000 which resulted in the error below:
INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}
status: fail reason: old_... | |
doc_23492667 | FROM centos:7
RUN yum -y update && yum clean all
When building the image I get a warning about a missing public key:
warning: /var/cache/yum/x86_64/7/updates/packages/centos-release-7-9.2009.1.el7.centos.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for centos-release-7-9.2009.1.el7.ce... | |
doc_23492668 | // Monitor network connection
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
switch (status) {
case AFNetworkReachabilityStatusReachableViaWWAN:
case AFNetworkReachabilityStatusReachableViaWiFi:
DDLogInfo(@"AFNetworkReachabilityStatusReacha... | |
doc_23492669 | store VARCHAR(5),
CREATE TABLE store
(
id INT NOT NULL AUTO_INCREMENT,
short_name VARCHAR(5) NOT NULL,
name VARCHAR(30) NOT NULL,
address1 VARCHAR(50) NOT NULL,
address2 VARCHAR(20),
city ... | |
doc_23492670 | I know that equals() method is used to compare the values of Strings. Also I know that "==" is used to check the references. What it exactly means?
A: Imagine two cars, for a moment. Let's say they're a green Toyota Corolla and an orange Ferrari. You want to compare them--are they similar? Yes; they're both cars. ... | |
doc_23492671 | This is the following code:
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
from textblob import TextBlob
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analysis = TextBlob("TextBlob sure looks like it has some interesting
features")
print(analysis.tags)
On running it, ... | |
doc_23492672 | Here is my code
`OAuth.popup('twitter')
.done((result) => {
result.post('https://upload.twitter.com/1.1/media/upload.json', {
data: {
media_data: 'data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw/v739/f+8PD98fH/8mJl+fn/9ZWb8/PzWlwv///6wWGbImAPgTEMImIN9gUFCEm/gDALULDN8PAD6atYdCTX... | |
doc_23492673 | I have a table which is used to track changes in users' accounts.
Column a is the primary key for this accounthistory-table, column b is a foreign key which contains the primary key for an account from account-table, column c contains the username at the time of change, column d has timestamp from the time of the chan... | |
doc_23492674 | from pprint import pprint
import requests
from bs4 import BeautifulSoup
import lxml
import csv
import urllib2
def get_url_for_search_key(search_key):
for i in range(1,100):
base_url = 'http://www.thedrum.com/'
response = requests.get(base_url + 'search?page=%s&query=' + search_key +'&sorted=')%i
... | |
doc_23492675 | #!/usr/bin/env stack
-- stack --resolver lts-18.0 script --package somePackageFromGithub
module Main where
main :: IO ()
main = putStrLn "Hello World!"
Usually I would put this in the stack.yaml file as an extra dependency:
extra-deps:
- git: https://github.com/user/somePackageFromGithub.git
commit: "some hash"
B... | |
doc_23492676 | implementation('io.springfox:springfox-swagger2:2.8.0')
implementation('io.springfox:springfox-swagger-ui:2.8.0')
I have the below API in my controller class:
@RestController
... | |
doc_23492677 | An outline of how these filters are set up, can be found here, however, I can not work out how to isolate the string using RegEx. I believe it will need to be one filter per URL type.
The URLs follow this format:
/software/11F372288FA/pagename
/software/13F412C5FA/pagename/summary
/software/XIL1P0BFXCKM81/pagename2
I ... | |
doc_23492678 | I call it bad because it has hardcoded enters in some cells, and other cells which contain numbers formatted as text (with a prefix 0 which I need)
I have created two importmacros:
Sub LoadSheetCSV(fromsheet As String, sheetname As String)
'Load sheet
fromfile = DownDatafiles & "\" & fromsheet & ".csv"
Sheets.Add... | |
doc_23492679 | def f(y,x):
y[x]=[x*x]
if __name__ == '__main__':
pool = Pool(processes=4)
inputs = range(10)
y={}
result = pool.map(f,y,inputs)
The y returns {}. How can I make it work?
Thanks,
A: This looks like you are usin... | |
doc_23492680 |
Original Question:
I know that there's a way to display the LogCat for an Android device/emulator in Terminal on my Mac, but I'm not sure what the command is. This is mostly due to my incompetence with UNIX commands.
Here are my previous failures:
adb logcat
adb.exe logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb logca... | |
doc_23492681 | You can find orphaned users relatively easily by enumerating through the users and looking for an empty User.Login property:
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
public static IList<string> GetOrphanedUsers(Server smoServer, string database) {
Database db = s... | |
doc_23492682 |
<script type="text/javascript">
function showDialog(title, message) {
$("#WarrantCjisResponse").find("#dialogMessage").appendTo(message);
$("#WarrantCjisResponse").dialog();
}
</script>
<!-- button inside of a <ASP:Repeater> -->
<asp:Button id="QDPButton" type="button... | |
doc_23492683 | {'IMG_0003_1.tif': ['IMG_0004_1.tif', 'IMG_0005_1.tif'],
'IMG_0004_1.tif': ['IMG_0005_1.tif', 'IMG_0003_1.tif'],
'IMG_0005_1.tif': ['IMG_0004_1.tif', 'IMG_0006_1.tif'],
'IMG_0006_1.tif': ['IMG_0007_1.tif', 'IMG_0005_1.tif'],
'IMG_0007_1.tif': ['IMG_0006_1.tif', 'IMG_0008_1.tif'],
'IMG_0008_1.tif': ['IMG_0009_1.tif... | |
doc_23492684 | #include <fstream>
#include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
int weighted1 = 0;
int weighted2 = 0;
int weighted3 = 0;
int weighted4 = 0;
int weighted_average = 0;
const int MAX = 20;
int flag = 0;
int choice;
double sum = 0;
double average = 0;
char name [10];
char letter;
char file... | |
doc_23492685 | <button type="button" class="btn btn-primary" data-bind="click: showAllEvents ">events</button>
this.showAllEvents = function () {
//things to do
$("#table2").toggle(); // show and hide table2
};
Do you have any ideas?
A: I made this to toggle the tables - codepen
The important bits -
html
<div class="table... | |
doc_23492686 | print doc["coordinates"]
it returns:
{u'type': u'Point', u'coordinates': [-81.4531344, 28.5287337]}
But if I just want the individual longitudes and latitudes, I'm trying to extract it by:
print doc["coordinates" : [0][1]]
I get nothing printed.
Thanks
A: I am not familiar with mongoDB, but if that returned struct... | |
doc_23492687 | TcpListener server = new TcpListener(IPAddress.Any, 9999);
server.Start();
Console.WriteLine("Waiting for client connections");
TcpClient client = server.AcceptTcpClient();
Console.WriteLine("Client request accepted");
NetworkStream stream = client.GetStream();
StreamReader reader = new StreamReader(stream);
StreamWr... | |
doc_23492688 | but when I try compiling the code I just made with a batch compiler,
I get these errors:
Alert.java
AlertHandler.java
client.java
Compiler.bat code
javac -d bin -sourcepath src/*.java src/sign/*.java
pause
.classpath file
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>... | |
doc_23492689 |
A: Yeah, the picture connection appears to be read-only. However it wouldn't hurt to try sending an HTTP Post to /{event id}/picture and seeing if it's just an omission in their API documentation. My guess is that it is not available.
| |
doc_23492690 | <a>abc</a>
xyz
</div>
Given the above HTML structure, $divElement->nodeValue returns 'abc xyz', when I want to get 'xyz' only. $divElement->getAttribute('value') is empty.
How can I get 'xyz' without removing the <a> element?
A: Just iterate through the <div> and combine all text node:
http://3v4l.org/fnTAF... | |
doc_23492691 |
This is what I have:
public void addSeekBar(int topMargin, int leftMargin, int width, int height, final int myWidth) {
View st = new SeekBar(getBaseContext());
SeekBar slider = new SeekBar(st.getContext());
slider.setMax(9);
slider.setProgress(5);
slider.setOnSeekBarChangeListener(new OnSeekBarCh... | |
doc_23492692 | based on the answer from Thingamabobs below, the approach simply turns out to be making sure the elements you spawn are allocated to correct parents.
It is worthwhile to create a frame just to hold every scrollable element since you can't move widgets around between parents when using pack/place. So a common parents be... | |
doc_23492693 | (i changed the field and table names, but the logic of the query stays the same)
UPDATE
table_a
JOIN table_b on table_a.field1 = table_b=field1
JOIN table_c on table_b.field2 = table_c.field2
JOIN table_d on table_c.field3 = table_d.field3
JOIN table_e on table_d.field4 = table_e.field4
SET
table_a.date_field = DAT... | |
doc_23492694 | For example I want local IP address and port number of the devices running service '_googlecast._tcp.'.
Is there any way to achieve this in Flutter ?
Thanks in advance
A: Check multicast DNS package: A Dart package to do service discovery over multicast DNS (mDNS), Bonjour, and Avahi.
Essentially, create a mDNS Client... | |
doc_23492695 |
#include <string>
#include <vector>
#include <iostream>
int main(int argc, char* argv[]) {
std::string text = argv[1];
std::string patterns = argv[2];
boost::regex regex = boost::regex(patterns);
boost::smatch match;
std::cout << boost::regex_search(text, match, regex) << std::endl;
}
If ... | |
doc_23492696 | apiSlice
followUser
followUser:builder.mutation({
async queryFn({id,currUserId}):Promise<any>{
try{
let currUserDocRef = doc(db,`users/${currUserId}`);
updateDataFirebase(currUserDocRef,'following',id)
return {data:'ok'}
}
catch(err){
return {error:err}
}
... | |
doc_23492697 | pyinstaller --add-data 'static:static' --add-data 'views:views' myapplication.py --onefile --noconsole
Pyinstaller did not show any errors but when I launch the application, I got an error in the web browser saying the template is not found.
The application works fine without packaging.
Can someone point me to the r... | |
doc_23492698 | I have been working with this code, to auto-populate a list based on 2 others.
I have a client list, each client has a consultant, I needed to populate the team each client belonged to, and managed to do this using VLookUp application to relate consultant-manager-team.
So when we have a new consultant on board and has ... | |
doc_23492699 | I try to place Firebase push inside a loop but I think it's somehow not right to do so.
(web app here)
const array = [{title: 'one'},{title:'two'}, {title: 'three'}]
array.map(item => {
FirebaseRef.child(`boards/${boardId}/containers`).push(item)
})
A: The following, using the update() method, will work:
c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.