id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23502700 | Here's an example. This endpoint accepts the optional request parameter group which could be the ID or name of the group.
POST /sign-in/?group=[group_id_or_name].
Also accepted is HTTP basic auth for username and password.
Before the username and password validation check, the code checks if the group is valid and exi... | |
doc_23502701 | The code snippet is shown below:
//LatestBook.svelte
<script>
import { onMount } from "svelte";
let api='http://lumen';
let uri=api+'/books';
let book=[];
onMount(async () => {
const res=await fetch(uri);
const data= await res.json();
book=data;
console.log(book);
... | |
doc_23502702 | ILMerge.exe /t:winexe /out:ImageProcessingRelease.exe ImageProcessing.exe AForge.dll AForge.Imaging.dll AForge.Math.dll DevExpress.Data.v10.2.dll DevExpress.Utils.v10.2.dll DevExpress.XtraBars.v10.2.dll DevExpress.XtraEditors.v10.2.dll FreeImageNET.dll uk-UA\ImageProcessing.resources.dll ru-RU\ImageProcessing.resources... | |
doc_23502703 | Now, everything was so smooth, and this approach really serves the purpose I want. EXCEPT, only when I ran it in my Android mobile device, the loading of data to listview takes so much time (4.3 seconds) and this is not good.
Here are my attempts made so far but no avail:
*
*I tried to limit my TFDQuery to top 20, b... | |
doc_23502704 | So I think it makes sense to add indices to reduce the amount of data filtered by Spark.
How do native Cassandra secondary indices compare to Lucene's indices?
Many functionalities are not available with Cassandra alone, but what about things that you can do with both?
Is it better / does it make sense to only use Luce... | |
doc_23502705 | This is my current code:
- (BOOL) isDeleted:(int)i {
NSString *value = [NSString stringWithFormat:@"deleted.*.%i", i];
MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = [appDelegate managedObjectContext];
NSString *entityName... | |
doc_23502706 | Gemfile:
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass', '~> 3.3.6'
application.scss:
@import "bootstrap-sprockets";
@import "bootstrap";
application.js
//= require jquery
//= require jquery-ui
//= require bootstrap-sprockets
//= require jquery_ujs
//= require turbolinks
//= require_tree .
also, tried adding requi... | |
doc_23502707 | Room
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(vararg projectLocal: ProjectLocal): Completable
The FIRST approach to save data:
Observable.fromIterable(remoteProjects)
.map { project ->
...
mProjectMapper.mapRemoteToLocal(project)
}
... | |
doc_23502708 | The summarizing of the long format works fine but then I need to clean and convert the column names to make rows out of them.
How can this be achieved?
MWE with desired output:
require(data.table)
# Demo data
dt <- data.table("c" = c(1,2,3,1,1,2,3,2), "323.1" = c(1,2,3,4,1,3,4,8), "454.3" = c(1,3,2,4,5,6,7,8)) # Real ... | |
doc_23502709 |
A: This can be done using a fragment , fragments are reusable , and can be attached to multiple activities , there is a single xml and java file for a fragment, when you make changes of EditText in these files , changes will be made in all of your activities , So make a fragment and attach it to all of your Activities... | |
doc_23502710 | attachChild(new Sprite(0, 0, resourcesManager.menu_background_region, vbom));
The line above is my call to attach the sprite to the scene. menu_background_region is my ITextureRegion declared and initialized in my ResourcesManager class.
BitmapTextureAtlasTextureRegionFactory.setAssetBasePath("gfx/menu/");
menu_backgr... | |
doc_23502711 | git config --global protocol.version 2
But when I try
git pull
I get an error saying:
fatal: unknown value for config 'protocol.version': 2
My OS is Ubuntu 18.04. My friend on Ubuntu 16.04 did the same and it worked for him. Am I maybe missing some dependencies?
A: This feature appeared in Git 2.18
To try out prot... | |
doc_23502712 | https://github.com/Azure/azure-devtestlab/blob/master/Artifacts/windows-vsts-download-and-run-script/DownloadVstsDropAndExecuteScript.ps1
that I use to download VSTS build artifacts. The script works perfectly when I run it in powershell. It works flawlessly when I run it from Command Prompt like this
powershell.exe -E... | |
doc_23502713 | Let me explain... I am creating an application that will allow only some users to open in my application some files.
For a particular user, I want that tapping an item in mail app will be shown the popover "Open in MyApplication".
For the other ones, i don't want to show the pop up.
Is it possible?
I know that i can ma... | |
doc_23502714 | Is it possible to make the Android emulator screen curved?
Or, is there any other platform available where can support curved TV?
A: Curved display is not different from flat display to my knowledge. You don't need to add extra support for it.
If you want to change resolution for your emulator then go to Tools - ADV M... | |
doc_23502715 | Sub MultipleSolver()
Dim i As Integer
ActiveWorkbook.ActiveSheet.Activate
For i = 6 TO 132
SolverReset
SolverOk SetCell:="$AJ$" & i, MaxMinVal:=2, ByChange: ="$AA$" & i
SolverAdd CellRef:-"$AJ$” & i, Relation:=1,
CellRef:="$AK$" & i
SolverAdd CellRef:-"$AA$" & i, Relation:=-4, FormulaText:-"integer"
SolverSolve True
N... | |
doc_23502716 |
*
*CDN
*Cloud Run. It's problem too. Big response time http-requests and sometimes problems with static js, etc.
In the logs of the load balancer, it can be seen that the CDN (https) gives static from 2 to 20 seconds. This happens often, provided that a couple of people use the site. See screenshot 1 and screenshot... | |
doc_23502717 | I love jupyter, but also like the simplicity of the .Rmd syntax.
A: You could use ipymd, which enables saving notebooks as Markdown documents instead of in Jupyter Notebook format. I don't know enough about knitr to say if there is feature-by-feature compatibility, but it seems like a good start.
Notedown is another ... | |
doc_23502718 | 2015-03-20T12:00:00+0500
What I would like to do in the SQL equivalent is the following:
select date(timestamp), sum(orders)
from data
where time(timestamp) < time(now)
group by date(timestamp)
I know I need an aggregation but, for now, I've tried a basic search query below but I'm getting a malformed error:
{
"... | |
doc_23502719 | Is it possible that the search box will use a different keyboard then mine (exclude mine from the keyboards options)?
Thanks!!
Edit
I would like something like this and when someone will press the text box, one of his other installed keyboards will be used.
A: You need to Make a Custom EditText Class like this
public... | |
doc_23502720 | 08-15 21:43:19.905 12158-12494/com.nishad.a4liodemo E/libAR: [error] ARController::androidVideoPush1: ARVideoSource is not running.
08-15 21:43:19.969 12158-12495/com.nishad.a4liodemo E/libAR: [error] ARController::androidVideoPush1: ARVideoSource is not running.
08-15 21:43:20.089 12158-12158/com.nishad.a4liodemo I/Ca... | |
doc_23502721 | I'm still getting this privacy error
the issuer generate a certificate and all things is good
this is the ingress yaml:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
namespace: default
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/tls-acme: "tr... | |
doc_23502722 | However I want to get a plot via pipeline operators that end with plot() and later i want to have that content into a variable p
Can it be done?
| |
doc_23502723 | My problem is, that I am hitting OOME, and the app itself consumes 4GB. How can i lower memory consumption?
How I create my content:
public PDFBuilderItext5(InputStream templateSource) throws DocumentException, IOException {
templateBytes = readTemplateToBytes(templateSource);
// output = new ByteArrayOutp... | |
doc_23502724 | According to the documentation, there are two configuration for ckeditor cloudServices_uploadUrl and cloudServices_tokenUrl which I can't understand that why I need these.
Is there any way to save images directly into the database by providing API URL?
Below is the configuration for ckeditor which I'm using:
ckEditorCo... | |
doc_23502725 | The answer provided by @VoteyDisciple
var eventsArray = events ? [].concat(events) : [];
works great for me until events is a single variable with a value of zero. In that case, eventsArray will be empty. Here is my entire code:
var eventsArray = [];
if (!(Array.isArray(events))) {
eventsArray = events ? [].concat(e... | |
doc_23502726 | Not sure if this question is better suited for SO or SF...
PCI compliance requires annual rotation of keys. The definition of "rotation of keys" that I keep coming across is decrypting your data, then re-encrypting with a new key. Really? Everyone out there is decrypting / encrypting all their encrypted data every year... | |
doc_23502727 | Whenever i try to send an email i get an AbortProcessingException *Caused by: java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: ()void*
Any help will be greatly appreciated
Here is my code:
Email email = new SimpleEmail();
email.setHostName("smtp.googlemail.com");
email.setSmtpPort(465);
email.... | |
doc_23502728 |
*
*However, I'm unsure of how I would place the "View More, Email Us and the Send Message" buttons/icons to the bottom of the footer so they are inline without creating an alternative div that contains each separately.
*
*This is for visual aesthetic purposes, to be adaptable or responsive to the device it is ... | |
doc_23502729 | private void HandleBookLogic<T>() where T : Book , new()
{
LibraryList.Items.Add(new MyItems(new T(int.Parse(copyNumber.Text),
itemName.Text,
DateTime.Parse(TimePrinted.Text),
int.Parse(Guid.Te... | |
doc_23502730 | UPDATE `comments`
SET `comment_author_url` = REPLACE(`comment_author_url`, 'http://*.com','http://new.com')
A: The percentage sign (wildcard operator) % is what you are after.
Ps. the 'star' is called an 'asterisk'. :)
| |
doc_23502731 | for start a application with wsadmin I need the name of the server.
appManager = AdinControl.completeObjectName('type=ApplicationManager,process='+serverName+',*')
AdminControl.invoke(appManager,'startApplication',myAppName)
I know how to obtain the name server when the application is started but not when is s... | |
doc_23502732 | The first image is what my current app looks like, and I dont want that(this is the default)
I want my input text to look like this, like in the second pic
I want the top input text to be exactly align with the bottom text. How can I do that?
Here's my code below:
Column(
crossAxisAlignment: CrossAxisAlign... | |
doc_23502733 | In the fragment there is an import of ...databinding...FragmentBindig
..FragmentBinding appears in the java/generated folder.
But in my project I have not such files in the generated folder despite I added buildFeatures {viewBinding true } in the project build.gradle file....
Do you have any suggestions to help to... | |
doc_23502734 |
class child : public base{
**dummyfunction();**
}
now I am calling a function in which I am passing a child class object.
**child ob;**
function(**ob**);//calling a function
//function body
function(**base *object**)
{
**//here I want to access the function of child class. How can I do it???**
**for example... | |
doc_23502735 |
Severity: Core Warning
Message: PHP Startup: Unable to load dynamic library
'/opt/alt/php55/usr/lib64/php/modules/zlib.so' -
/opt/alt/php55/usr/lib64/php/modules/zlib.so: cannot open shared
object file: No such file or directory
Filename: Unknown
Line Number: 0
Backtrace:
A: You can use
error_reporting(0);
ini... | |
doc_23502736 | and asp.net MVC3 As a client
any idea why this code doesn't work
in my MVC Controller i have this action to get User Contacts
public ActionResult Contacts(int id)
{
var contacts = _proxy.GetContactsByUser(id);
var mcontacts = Mapper.Map<Contact[], MContact[]>(contacts);
... | |
doc_23502737 | My Django code is this
```#print('posting photo to facebook')
video_url = data.get('video_url')
container_url = "https://graph.facebook.com/" + page_id + "/media?media_type=VIDEO&\
video_url=" + video_url + "&caption=" + text + "&access_token=" + access_token
res = requests.post(container_url)
data ... | |
doc_23502738 | I'm looking for a way to override the default jasypt encrypted property prefix and suffix with a custom ones like "secure[...]".
Is there a way to achieve this?
A: If you use pure jasypt library it is required to write your own version of existing EncryptableProperties as default one supports only ENC( as prefix and )... | |
doc_23502739 |
*
*Class library with file Views\other.html set as embedded resource.
*Console app with Nancy self-hosting set up, bootstrapper and nancy module that simply responds to a GET by returning a view named "other.html" - the one defined in the other assembly.
Bootstrapper config:
protected override void ConfigureApplica... | |
doc_23502740 | int RTS_flag = TIOCM_RTS;
ioctl(fd, TIOCMBIS, &RTS_flag);
ioctl(fd, TIOCMBIC, &RTS_flag);
Suppose I want to control the RTS pin from a driver. Is it possible to "call" the driver holding the tty and ask it to control the pin for me? (Rather than figuring out the control registers of the specific device and reading/wr... | |
doc_23502741 | XMLUnit.setIgnoreWhitespace(true);
DetailedDiff detailedDiff = new DetailedDiff(XMLUnit.compareXML(expected, actual));
detailedDiff.overrideElementQualifier(new ElementNameAndAttributeQualifier());
List<Difference> allDifferences = detailedDiff.getAllDifferences();
But some tests don't ignore the whit... | |
doc_23502742 | main.js:
import Vue from 'vue'
import App from './App'
import Vuetify from 'vuetify'
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: () => ({
collapseOnScroll: true,
}),
})
App.vue:
<div id="app">
<v-app id="inspire">
<v-card class="overflow-hidden">
<v-app-bar
:collapse="!collapse... | |
doc_23502743 | But getting exception:
testlink.api.java.client.TestLinkAPIException: The xml-rpc call to
TestLink API method tl.reportTCResult failed. Result[0] =
{message=(reportTCResult) - Parameter platformname OR platformid is
required, but has not been provided, code=200}
code:
public static void reportResult(String Te... | |
doc_23502744 | I haven't found any examples of how to use scipy to calculate spearman rank correlation of more than 2 lists. Can I use scipy's stats.spearmanr to compare all the replicates in one command? I have the data stored in a string. Here is some of my code:
t_vals=[]
z_outline = []
z_outlines = []
header = None
for line in i... | |
doc_23502745 |
A: Programatically, I would use getrusage(), which allows you to measure single functions, and in a lot more detail than just time or top. For example:
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
int main (int argc, char *argv[])
{
struct rusage start;
struct rusage end;
getrusag... | |
doc_23502746 | What's the format of the parameter passed and am I wrong in assuming this is what it does?
I couldn't find documentation on the parameter anywhere.
Does anyone here ever used it before?
A: The syntax for that function is:
GM_registerMenuCommand (menuName, callbackFunction, accessKey)
*
*Where accessKey, if suppli... | |
doc_23502747 | Here's the code
import React, { useState, useEffect } from 'react';
import { Button } from '@material-ui/core';
import db from './firebase';
import Todo from './Todo';
import './App.css';
function App() {
const [todos, setTodos] = useState([]);
const [input, setInput] = useState('');
useEffect(() => {
db... | |
doc_23502748 | My current query looks like this:
SELECT
categories_adverts.category,
COUNT(adverts.id) AS numberOfAdverts
FROM adverts
LEFT JOIN categories_adverts
ON adverts.id_categories_adverts=categories_adverts.id
GROUP BY category ASC
I am struggling with including a WHERE clause which specificies that only those adver... | |
doc_23502749 | I was able to move an icon from the source and destination but the path is getting revealed only when the icon is moving.
I want the whole path to be shown at the beginning itself.
<!DOCTYPE html>
<html>
<head>
<title>Animated route</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
... | |
doc_23502750 | ||
doc_23502751 | {
"status":{
"sleep":"12333",
"wake":"3837"
}
}
After inserting it in Big Query, I am getting the field names as :
status_sleep and status_wake
I require the field names to be seperated by delimeters like '.' or any other delimeter
status.sleep and status.wake
Please suggest how ... | |
doc_23502752 | Does something like this exist? I've tried looking but I'm unfortunately not able to find it. Thanks in advance!
A: It may not be ideal for your purposes, but you might want to take a look at the Python bindings to KHTML that are part of PyKDE. One place to start looking is the KHTMLPart class:
http://api.kde.org/pykd... | |
doc_23502753 | {
"type" : "myData",
"condition" : {"projectid": 40}
}
How should my POST request be formed using Alamofire?
A: You need to simply create parameter Dictionary.
let parameters: [String:Any] = [ "type" : "myData", "condition" : ["projectid" : 40]]
Now pass this parameters dictionary with Alamofire.... | |
doc_23502754 |
Warning message: 'UIEdgeInsetsEqualToEdgeInsets' is deprecated: Use == operator instead
extension UIButton {
open override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
if UIEdgeInsetsEqualToEdgeInsets(self.touchAreaEdgeInsets, .zero) || !self.isEnabled || self.isHidden { //Ge... | |
doc_23502755 |
*
*tar cvzf - ./android_4.0.4_origen_final_full/ | split -b 2048m - android_4.0.4_origen_final_full.tar.gz
*cat android_4.0.4_origen_final_full.tar.gz* | tar -zxvpf - -C /work
A: I would suggest Googling "man tar", "man split" and "man cat" for details on options and such.
tar is a program (tar originally was shor... | |
doc_23502756 | curatio.webdb.getAllTodoItems = function(renderFunc) {
var db = curatio.webdb.db;
db.transaction(function(tx) {
tx.executeSql("SELECT * FROM tableA, tableB", [], renderFunc,
curatio.webdb.onError);
});
}
basically TableA has e.g. Name and Surname columns and ... | |
doc_23502757 | How do I reassign the value of the StaticResource defined in XAML to the data I just loaded?
XAML:
<Window.Resources>
<local:Container x:Key="Container"/>
</Window.Resources>
<Grid>
<ComboBox Name="Combo"
ItemsSource="{Binding Source={StaticResource Container}}"
HorizontalAlign... | |
doc_23502758 | try:
# create an INET, STREAMing socket
self.client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# now connect to the web server on port 80 - the normal http port
self.client.connect((host, port))
user = ['User.loginByToken', access_token]
self.client.sendall(u... | |
doc_23502759 | Consider:
x = {'key': 1};
if ( x.hasOwnProperty('key') ) {
//Do this
}
Is that the best way to do it?
A: hasOwnProperty "can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this method does not check down the object's prototype chain."... | |
doc_23502760 | It then returns TRUE is the sub-string is found in the cell, and FALSE if it is not found.
Here is the code for the UDF (named the contains function)
Function contains(substring As String, testString As String) As String
'testString = cell to be tested for substring
Dim result As Boolean
result = False
testString = UCa... | |
doc_23502761 | What I am wanting is to extract all layers and ultimately separate them into their own csv files. The nodes that I am wanting to retrieve are Name, Address, City, State, Zip. The closest that I have gotten with this is from the stack post Read multiple layers of KML file using R.
For this first attempt, my code loo... | |
doc_23502762 | I want to load node libraries like compose-records and wants to use them there.
Any idea??
| |
doc_23502763 | I want mechanism like if the first time request comes to handler ,it makes a request to server and then Cache whole datatable, so for upcoming request if the next requested productcode is exist in the datatable of cache, it should not go to server for fetching data again..it should check data of datatable only.
So can ... | |
doc_23502764 | I have made the following which works, but it won't allow for non-English characters. That is, if I put in some text like विकिपी then it matches as not being an alphabetical character which is not what I want.
[^a-zA-Z0-9'-]+$
I want to allow users to type in their username in whatever alphabet they want. So they coul... | |
doc_23502765 | In the Case Manager info center :
-Developing case management applications
-Java application development
-Configuring your environment to use Java API
It says that Jars are located at :
installation_directory/IBM/CaseManagement/CaseAPI/lib
Unfortunatly, i don't have installation_directory/IBM/CaseManagement/CaseAPI... | |
doc_23502766 | node_modules/mongoose/index.d.ts:1867:33 - error TS2339: Property 'Buffer' does not exist on type 'typeof globalThis'.
My NestJS is running properly under my development machine with below specification
Node version: v14.17.3
Base image when packaging docker image
Node version: v14.17.1
package.json
{
"dependencies... | |
doc_23502767 | Console is clear.
fs.writeFile('${__dirname}/config.json', JSON.stringify(config),(err) => {
if(err) console.log(err);
});
A: You can't persistently write files to Heroku's filesystem, which is ephemeral. Any changes you make will be lost the next time your dyno restart, which happens frequently (at least once ... | |
doc_23502768 | Using the Publish operator, the onError handler it is not called.
Private Shared Sub Test()
Dim source = Observable.Throw(Of Integer)(New Exception)
' Dim source = Observable.Range(0, 9)
Dim obs = source.Publish(Function(published)
Return Observable.
... | |
doc_23502769 | My real task is the following one: I have an environment with a compiler (clang) which I want to improve. Now I have some patch for clang that I applied and I want to rebuild the patched sources, but I also want to be sure that nothing changes from the vanilla build apart from my patch; in particular, that all the buil... | |
doc_23502770 | Problem: the resulting data is showing me averages for the month of "February-11", but there is no corresponding data for "February-11" in my source data. Why and how could the AverageIf function be showing me data for 'February-11' when there is not source data for 'February-11'. Any ideas why?
Example:
Excel Formul... | |
doc_23502771 | valgrind --leak-check=yes /path/to/binary args
It gives me the following output and quits. I am new to this and don't know how to interpret this further. Is there a way in which I can get valgrind to work with my binary.
==45051== Warning: set address range perms: large range [0x400000, 0x34853000) (defined)
==45051== ... | |
doc_23502772 | Any option?
A: Zip the modified and newly created files in the git repository
zip mychanges.zip $({ (git ls-files --others --exclude-standard) ; (git ls-files --modified)})
A: To do exactly what you requested (assuming you already committed and want to create an archive of the files changed by the last commit), you ... | |
doc_23502773 | $putbhp = str_replace("cc,A","cc,0bhp,A",$whites);
$putbhp = str_replace("cc,M","cc,0bhp,M",$whites);
A: $putbhp = str_replace(['cc,A', 'cc,M'], ['cc,0bhp,A', 'cc,0bhp,M'], $whites);
If you're stuck with an old version of PHP (< 5.4), substitute the array shorthand with array('val', 'val', 'etc')
Demo here - http:/... | |
doc_23502774 | "Retrieves the window handle to the active window attached to the calling thread's message queue."
I'm writing SketchUp plugins using its Ruby API. Currently trying to make some tweaks to some windows via the Win32. From the Ruby API I have very limited info about SU's window and thread. GetActiveWindow works fine as l... | |
doc_23502775 | Is this possible to programmatically scroll the window INSIDE a jquery ui dialog to the bottom?
A: Here is a function:
function ScrollTo(id){
// Scroll
$('divDialog').animate({
scrollTop: $("#"+id).offset().top},
'slow');
}
Just pass it the element id and it will scroll to there.
Like this:... | |
doc_23502776 | I have listed my findings below that will help people to look at first before deep diving into the above link with what is use case
A: Below is a list of parameters which I found helpful in tuning of the job, I will keep appending this with whenever I found out use case for a parameter
Parameter
What to look for
... | |
doc_23502777 | <?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://webit-computer-vision.p.rapidapi.com/describe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_... | |
doc_23502778 | url = 'https://www.fedex.com/en-us/shipping/fuel-surcharge.html#'
response = requests.get(url)
print(response.status_code)
soup = BeautifulSoup(response.text,"html.parser")
tables = soup.findAll('table',{"id":"international-table"})
how do i read tables into dataframes
A: The tag should be <div>, not <table>:
import ... | |
doc_23502779 | Out[4]: 'hello'
I want the output to instead be:
Out[4]: hello
What's the most elegant way to achieve this?
I am also using repr().rjust() later on to print a list of dictionaries into a neatly formatted table, and I notice the repr function also adds quotes which is annoying:
def print_dictionary(d): print repr(d['a... | |
doc_23502780 | import numpy as np
#here are two arrays to join together
a = np.array([1,2,3,4,5])
b = np.array([6,7,8,9,10])
#here comes the joining step I don't know how to do better
#QUESTION 1: How to form all permutations of two 1D arrays?
temp = np.array([]) #empty array to be filled with values
for aa in a:
for bb in ... | |
doc_23502781 | My data looks like this (no values less than zero):
[{"x":1341806400,"y":4},
{"x":1342411200,"y":0},
{"x":1343016000,"y":0},
{"x":1343620800,"y":7},
{"x":1344225600,"y":6},
{"x":1344830400,"y":73},
{"x":1345435200,"y":328},
{"x":1346040000,"y":0},
{"x":1346644800,"y":0},
{"x":1347249600,"y":0},
{"x":134785440... | |
doc_23502782 |
A: My workaround was to install Git Desktop for macOS (https://desktop.github.com/). Now that I am using this app to pull my changes (Fetch origin) I like the workflow and I may just stick with it.
| |
doc_23502783 | .labelbold {
padding-right: 0px;
padding-left: 0px;
font-weight: bold;
font-size: 12px;
padding-bottom: 0px;
color: #993333;
padding-top: 0px;
font-family: verdana
}
<script type="text/javascript">
var CurrentVal = '<%=strCurrentValue%>';
document.getElementById("vCurVal").innerHTML = C... | |
doc_23502784 | generic_Code
-fileOne.py
-fileTwo.py
repo two
Project One
-fileA.py
-fileB.py
repo three
ProjectTwo
-fileC.py
-fileD.py
The goal is I should be able to import classes from Generic_Code repo into files in project one and two. I am using Pycharm and a mac system. On Pycharm, I attached the three projects t... | |
doc_23502785 | I've called all the APIs and the result is same 403 error
I've tried it with postman also.
In the api route.js file i have this:
{
"method": "GET",
"path": "/data",
"handler": "data.find",
"config": {
"policies": []
}
Strapi server is localhost port:1337
A GET call from browser h... | |
doc_23502786 | I have 7 column and i use event DataGridCellEditEndingEventArgs for column index = 1-5.
Column with index 0 have check box and column with index 6 have button.
Button have image. Which show add/update/toupdate. I need to refresh image in button, after event DataGridCellEditEndingEventArgs and when I click on button. B... | |
doc_23502787 | $i=0;
$arr['LAM'] = preg_replace('/\s+/', 'D', $arr['LAM']);
print_r($arr);
///Array ( [id] => 123 [LAM] => D )
echo '_'.$arr['LAM'].'_';
///_D_
if($arr['LAM']!='D'){
$i++;
}
echo $i;
//1
Why $i==1?
A: This works as expected:
<?php
$i=0;
$arr = array('id' => 123, 'LAM' => ' ');
$arr['LAM'] = preg_replace('/\s+/',... | |
doc_23502788 | $test = array(190337172011 => 'Apple');
print_r($test);
Result:
Array ( [1358610987] => Apple )
Sometimes it even results in a negative number. Why does this happen? Is it a bug?
I am running PHP 5.3.10 on IIS.
A: The size of an integer is platform-dependent, although a maximum value of about two billion is the u... | |
doc_23502789 | LOAD DATA LOCAL INFILE 'C:\Users\kpacheco.AD\Desktop\Projects\Wellcare\Weekly01272014\FINANCIAL\ RECOVERY\ GROUP\ -\ CONTESTATION\ 20140129.CSV' INTO TABLE TRACKING_INSERT FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '' LINES TERMINATED BY '\r\n' ignore 1 lines;
A: If LOAD DATA INFILE statement was s... | |
doc_23502790 | ||
doc_23502791 | What is a simplest way to get the runtime length with command line, VBScript, or some other quick scriptable way on a Windows box?
Thanks.
A: The CMD line version of MediaInfo from Sourceforge can give you that IIRC.
| |
doc_23502792 | Can I automate this based on my header files (in c/c++) only? Or maybe it is not a good idea? Is there a software for locating the -L and -l parameters automatically? Is some table stored somewhere on the system about this on popular linux systems or even cygwin?
A: You should use pkg-config.
| |
doc_23502793 | I have been working with Microsoft Team foundation services where multiple projects can be added. Similarly i would like to have multiple projects under a single Git repository
Can you please provide me a solution to add my existing Mac Project code to existing Git repository?
| |
doc_23502794 | HTML:
<input name="qty" id="qty" type="text" value="10" size="3" >
<input name="qty" id="qty1" type="text" value="20" size="3" >
<input type="button" id="qtyplus" value="+" onclick="return false">
<input type="button" id="qtyminus" value="HELLO" onclick="return false">
Jquery:
<script type="text/javascript" src="... | |
doc_23502795 |
sqlcommand does not contain definition for Notification
using (SqlCommand command = new SqlCommand(query, connection))
{
command.Notification = null;
DataTable dt = new DataTable();
SqlDependency dependency = new SqlDependency(command);
}
Is pos... | |
doc_23502796 |
A: You can access the role ids through the /users/@me/guilds/{guild.id}/member API with the guilds.members.read scope and OAuth2 but don't think you can get the actual role object. I thought I could call /guilds/{guild.id}/roles to get a list of the roles and resolve the id but this thread suggests that its only avai... | |
doc_23502797 | HTML
<html>
<input type="checkbox"/>
<body>
...
</body>
</html>
CSS
input[type="checkbox"]:checked~body{
background:grey;
}
this code dosen't work as intended.So I want to know why this happens and is there any work around for this?
Thanks everyone for the replies
A: As a workaround, you can use another div to "sim... | |
doc_23502798 |
A: lock(obj) { ... } is just a syntactic sugar for
Monitor.Enter(obj);
try
{ ... }
finally
{
Monitor.Exit(obj);
}
and in C# 4.0 it was changed to
bool acquaired = false;
try
{
Monitor.Enter(obj, ref acquired);
...
}
finally
{
if (acquired)
{
Monitor.Exit(obj)
}
}
Now, prior to .Net ... | |
doc_23502799 | I keep my menu inside of the header file. Depending on a user choice, when clicked on one of the elements of the menu which look like this:
<li class="submenu">
<a href="#">
<i class="icon-tasks"></i>
<span>Timesheet</span>
<i class="arrow icon-chevron-right"></i>
</a>
<ul>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.