id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23532900 | I have been struggling to query this via JObject/JArray and wanted to know if there is a way to do it. Here is my JSON file that I am querying from:
"products":[{
"id":124534,
"handle": "Data1",
"variants":[
{
"barcode":null,
"sku":"M11-168-EN-NFNE-0",
"price":1.5
},
{
"barco... | |
doc_23532901 | Now i want those organizations to be deleted from xx_org whose org_id is not in xx_asg and the person id in xx_people who have a column value extra_info as 'ITEM_OTB'.
XX_ORG XX_PEOPLE XX_ASG
ORG_ID PERSON_ID ASG_ID
ORG_NAME P... | |
doc_23532902 | An example would be:
If i select the "Free International Shipping" the "Cash" paymend option must be removed or inactive.
A: I think you can do using observer. First of all you have to create one module(I'm assuming you already know how to create module)
In your config.xml from app>code>your_codepol>Namespace>module>e... | |
doc_23532903 | I know that I can do it through API, but wondering if there is a way to use query string parameters or something like that.
Wondering if there is a way to do that?
| |
doc_23532904 | I know that with $this->redirect() I can use $this->redirect(array(controller/action)), but is always showing the index action.
A: In your main.php, you should have these default rules in urlManager section:
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<... | |
doc_23532905 | Previously, the azure function is deployed as stand alone service. I can get a publishProfile. So I'm authorized to call
GET /admin/functions/{functionname}/keys
But in k8s, the call returns 401, because I can't get publishProfile. Is there anything equivalent to publishProfile in k8s?
A: When deploying your Azure F... | |
doc_23532906 | public class MainActivity extends Activity {
public static String dampfhammerData = "dampfhammerData";
SharedPreferences DampfhammerData;
public int nextCard;
public int lastCard = 0;
public int all=3;
public int buddy=3;
public int dampfhammer=3;
public int frauen=3;
public int links=3;
public int rechts=3;
public ... | |
doc_23532907 | Is there a way to protect app source code from being read?
| |
doc_23532908 | I have read about adding border to each cell, table row, etc. But I need to have a border (kind of a box) around some set of rows.
Lets assume that a table has 5 rows, but i want to enclose 3 rows in a separate box and the other 2 rows in a separate box.
I want to do it programmatically from java code behind; is it p... | |
doc_23532909 | filters the text and checks if that movie name is present in movies Array. I would like to display the result in resultContainer.
I am able to read the text entered in input box and pass it to SearchMovies function but not sure how to handle the promise resolve and reject.
How shall I use the output of promise and assi... | |
doc_23532910 | I suspect this involves the skipIf decorator, but I don't see what to check against. Through debugging, I can see that some of the unittest classes hold this info, but it's not passed to my code.
So far, I see two ways to sort of do this:
1) Have setUp() increment a counter per test. If the test is not the first one, s... | |
doc_23532911 | xtype: 'filefield',
id: 'image',
emptyText: '-- Choose Image --',
fieldLabel: 'Photo',
name: 'image',
anchor: "82%",
buttonText: 'Browse',
buttonConfig: {
iconCls: ''
},
change: function() {
// this is get component
var valueElement = Ext.getCmp("component_image_upload").getValue();
// function upload image full path ... | |
doc_23532912 | It says:
For this version, we use a standard HMAC-SHA512 signing. Append apikey and nonce to your request and calculate the HMAC hash and include it under an apisign header. Note: the nonce is not respected right now but will be enforced later.
$apikey='xxx';
$apisecret='xxx';
$nonce=time();
$uri='https://bittrex.com/a... | |
doc_23532913 | For Firefox and Chrome, when I use padding, this is added to the total width of the div. For IE, padding values are ignored so the CSS doesn't work uniformly. This seems to be a new development because they've always worked the same. EG
#header
{
width:280;
padding-left:10px;
padding-right:10px;
}
This gives ... | |
doc_23532914 | var downloadUrl = buildRequestUrl();
window.open(downloadUrl, '_self');
That is working fine, but I need to pass some custom headers with the request, so I am using ajax, like this:
$.ajax(downloadUrl, {
headers: { 'custom-header': 'custom-header-value'},
type: 'GET',
contentType: 'application/octet-stream'
... | |
doc_23532915 | As part of our build process, I would like to automate the generation of Excel files during the Visual Studio build. [Then, I will compare the file to an approved version to ensure no regression errors have occurred.]
I would prefer not to use RS.exe, as all report developers would not have SSRS installed. I am lookin... | |
doc_23532916 | This is how I am populating the ViewBag:
public IEnumerable<SelectListItem> GetGradeLevelItems(int selectedGradeLevelId = 0)
{
var allGradeLevels = _courseRepository.GetAllGradeLevels();
var gradeLevelItems = new List<SelectListItem>();
if (selectedGradeLevelId == 0) //if 0, we're creating a new course. Le... | |
doc_23532917 | Inside the auction show view, I am displaying a list off all bids with the regarding bidder (=User who have placed the bid). When placing a new bid, the user_id is successfully saved within the bid table.
I want to display the bidders name instead of his ID. (with @bidder = User.find(@bid.user_id))
bids_controller.rb:
... | |
doc_23532918 | An exception occurred while executing 'DROP INDEX IDX_E98F2859A074D5D7 ON contract':
SQLSTATE[HY000]: General error: 1553 Cannot drop index 'IDX_E98F2859A074D5D7': needed in a foreign key constraint
This is trivial to resolve according to another SO question. The table has:
KEY `IDX_E98F... | |
doc_23532919 | Therefore, I just added those two properties to my entity. I expected a crash, because of pending migrations, so I created an extra migration. Now, these changes I made don't show up in my Realm database on my filesystem.
The code I use to migrate is the following:
func migrate() {
let defaultPath = Realm.Configura... | |
doc_23532920 | In order to run the same program on Linux machine, which is an 8 core 32 GB machine, i FTPed the generated class files and scala + akka jars to the Linux machine.
the Linux machine is using Server Edition Java and windows machine is using Client edition Java.
When i run the same program on Linux machine with all the pa... | |
doc_23532921 | But When I call ABC I am losing XYZcontrol
What I want is
-On XYZ user selects option to load product data
-IF mismatch found XYZ calls ABC
-In ABC -user correct mismatch and closes ABC frame
Now I want my program should continue from where it called ABC
Currently It calls ABC and XYZ get executed How I can achie... | |
doc_23532922 | This works perfectly for a single post that has a custom post type (not "post" or "page"), but when I try to use the same script on a normal Wordpress "page", it runs the function as well (and sends the email), but then it throws a 404 error. The URL in the browser address bar is unchanged (shows the permalink of the p... | |
doc_23532923 | I've created an html form and I want to send data using ajax but it still
POST http://localhost/Home.php 500 (Internal Server Error)
In particular I want to create a button for every table in a database which I'm using for testing, when I push a button it will show all lines from the database (I've not implemented it... | |
doc_23532924 | Source:
public string insert_details(bisuness_object user_details)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("insert into tbl_rgsthome values(@firstname,@lastname,@emailid,@password,@addr... | |
doc_23532925 | Basically what i want to achieve is; when the power is 'on' (true), it will dispatch an action to display a blinking "-LOADING PRESETS-" for a short period of time like 2 seconds then fire another dispatch action to display the default settings like "Drums" that doesn't blink
When the power is off it will reset everyth... | |
doc_23532926 | vampire's curse
vampire lord
shadow vampire
I created a search form. It will search for cards that contains letters user typed. For example 3 values in my database. If user type "vampire" then press submit, it will show up the values.But it don't know how to compare value in database with a part of a string. Here m... | |
doc_23532927 | template<class C, class V, Test V::*>
class Test {
};
it gives me compiler error:
unknown type name 'Test'
It's a self-referencing template for now, which doesn't seem possible. What could possibly be done to make it work?
EDIT:
Here's what I'd need this for. I want to implement a bi-directional (think parent-child) ... | |
doc_23532928 |
*
*org1 with peer0.org1.com + 1 CA org1 + CLI org1 + orderer.example.com from ordererOrg on PC1
*org2 with peer0.org2.com + 1 CA org2 on PC2
It seems that my network is working, but once a chaincode is instantiated on a peer then invoked, the operation is not propagated. E.g I insert data into the ledger, the cha... | |
doc_23532929 | Kindly help on it
can we use MONTHD#2 | ....| MONTHD#15 to achieve it ?
| |
doc_23532930 |
*
*The report contains a group.
*The group header must print at the beginning of the group and also on a new page.
This is not a problem since I just have to tell it to "Reprint Header On Each Page". So far so good.
*The detail section is not allowed to split across a page.
*The group header must not print ... | |
doc_23532931 | Possible Duplicate:
OutOfMemoryError: bitmap size exceeds VM budget :- Android
In my application I load some little Bitmap(between 2k and 300k) that I affect to ImageViews, during the first launch of my App it works fine but when I quit it and relaunch it, I always have the OutOfMemoryError during a Bitmap creation.
... | |
doc_23532932 |
expected output = "Hello. My name is $xyz$. I am from $abc$.
# code
string = 'Hi. My name is #something1#. I am from #something2#. My company is #something3#.'
toReplace = {'something1':'xyz', 'something2': 'abc', 'something3': 'ttl'}
modified = list(string)
arr=[]
for i in range(len(string)):
if string[i]=='#':
... | |
doc_23532933 | So, My question is Can I use get method directly? means do i need to encode url or any other thing ??
I have checked it in modern browsers. It works just fine..
Thanks
Edit:
Urlencode is used when puting variables in url.
I am submitting my search form with method='get' Then I get variable and perform search query and ... | |
doc_23532934 | I'm wondering if I can setup the listbox once and use it on both pages, or if I need to setup a separate listbox on each page and manage both as the list box in one page changes?
A: You cannot pack/grid/place the listbox inside two different frames simultaneously.
However, you can re-pack/grid/place the listbox each ... | |
doc_23532935 | values of its items changes and I don't know how can I fix it.
my adapter code:
public class HeterogenousRecyclerviewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
private ArrayList<DataObject> mDataset;
Context context;
RecyclerView.ViewHolder viewHolder;
public HeterogenousRecyclerv... | |
doc_23532936 | E.g. the first time I load my app it works, and after making a code change the live reload displays a blank page, then it works, then a blank page and so on.
How do I find the cause of this? I've compared its routing setup to that of a project which works (a blank project) and they seem to work the same.
When it fails ... | |
doc_23532937 | here a minimal example:
import numba as nb
import numpy as np
@nb.njit()
def test(N,P,B,D):
for i in range(N):
a = D[i,:]
b = B[i,a]
P[:,i] =b
P = np.zeros((5,5))
B = np.random.random((5,5))*100
D = (np.random.random((5,5))*5).astype(np.int32)
print(D)
N = 5
print(P)
test(N,P,B,D)
print(P... | |
doc_23532938 | (print "test")
And when I pressed Shift+Ctrl+B I got this:
[Error 2]
[cmd: [u'lein', u'compile', u':all']]
[dir: D:\Document\ACM-ICPC\Code\PKU]
[path: C:\Windows\system32;C:\Windows;...]
[Finished]
so,how to run it?
A: I use SublimeREPL when developing Clojure on SublimeText. It works, it supports other languages (C... | |
doc_23532939 | Why is Devise redirecting instead of adding the user to the database? On the local machine everything is fine:
App 18981 stdout: Started POST "/en/sign_up" for ... at 2015-07-28 05:08:34 -0400
App 18981 stdout: Processing by Devise::RegistrationsController#create as HTML
App 18981 stdout: Parameters: {"utf8"=>"✓", "a... | |
doc_23532940 |
A: First set up your centered div with position relative
#centered-div{position: relative; width: 900px; margin: auto;}
Then set up your login button with position absolute
#login{position: absolute; left: 0; top: 50px;}
A: A simple answer would be to wrap both inside of an invisible container div with a width of 9... | |
doc_23532941 | void *tmp;
if( (tmp = realloc(myobject, sizeof(object) * newsize) != NULL)
myobject = tmp
I thought I'd make my code shorter by doing something like this (silly idea):
void GetSpace(void *ptr, size_t size_of_object, int newsize){
void *tmp = NULL;
if ((tmp = realloc(ptr, size_of_object * newsize) == N... | |
doc_23532942 | For example, I get the load average like so:
cat /proc/loadavg
Outputs:
0.18 0.48 0.46 4/234 30719
A: Try this command:
cat /proc/stat
This will be something like this:
cpu 55366 271 17283 75381807 22953 13468 94542 0
cpu0 3374 0 2187 9462432 1393 2 665 0
cpu1 2074 12 1314 9459589 841 2 43 0
cpu2 1664 0 1109 94471... | |
doc_23532943 |
A: You may create WebM video file with alpha channel using FFmpeg in command line.
I found an example here.
The following command (for example), generates synthetic video with 70% transparency:
ffmpeg -y -f lavfi -i testsrc=duration=5:size=320x240:rate=1 -vf format=rgba,colorchannelmixer=aa=0.3' -c:v libvpx-vp9 -crf... | |
doc_23532944 | import requests
import subprocess
import os
import urllib.request
from bs4 import BeautifulSoup
os.chdir("C:/Users/Excel/Downloads/")
request = requests.get("http://ottofrello.dk/malerierstor.htm")
content = request.content
soup = BeautifulSoup(content, "html.parser")
element = soup.find_all("img")
for img in element... | |
doc_23532945 | #include <string>
#include <iostream>
using namespace std;
int number_needed(string a, string b) {
for(int i=0;i<a.length();i++)
{
for(int j=0;j<b.length();j++)
{
if(a[i]==b[j]){
{
a[i]='\0';
b[j]='\0';
}
}
... | |
doc_23532946 | What does cin does? Is it character in? I have added comments to the lines I need help to understand. Basically the for loop and the printf command. Rest is all okay.Thanks in advance.
class Solution{
public static void main(String[] args){
Scanner cin=new Scanner(System.in);
System.out.println("===============... | |
doc_23532947 | Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/com.squareup.retrofit2/retrofit/pom.properties
File1: C:\Users\LouDoms\Documents\P... | |
doc_23532948 |
npm install -g @angular/cli npm ERR! code ELOOP npm ERR! syscall stat
npm ERR! path \UserFS\AppData\ npm ERR! errno -62 npm ERR! ELOOP: too
many symbolic links encountered, stat '\UserFS\AppData\'
npm ERR! A complete log of this run can be found in: npm ERR!
\UserFS\AppData\mjones\Application
Data\npm-cache_lo... | |
doc_23532949 | function decrypt(filename){
$.ajax({
type: "POST",
url: "app.php",
data: { action:'decrypt', filename: filename }
}).done(function( msg ) {
alert( "Data returned: " + msg );
});
return false;
}
... | |
doc_23532950 | However , I am facing troubles with it, since it's the first time I try to use the MVVM pattern.
I have a main window view, and 2 UserControls, that I want to switch using Buttons. Easy as it is, I am stuck with the the following code, which should work but nothing happen when I click on the button:
MainView.xaml
<Wind... | |
doc_23532951 |
A: I'm not sure I understand how your data is organized, but if you just want to check for equality (within a row) of Col. A and Col. E, returning the value in F if the values match, then a simple =IF(Condition, Result if True, Result if False) should work:
=IF(A1 = E1, F1, "")
A: If you need to look it up, it would ... | |
doc_23532952 | I have a database table with about 20 fields, one of which is a Yes/No field. I want to extract the Yes/No value using DLookup, however am receiving the following error:
Run-time error '3075':
Syntax error (missing operator) in query expression 'Enabled'.
The code I am using it:
MsgBox (DLookup("Enabled", "Numbers", "... | |
doc_23532953 | and to make it display in the console by [System.out.println].
How can I make it and see the bigger size "Hello" in the console of eclipse?
[java]
A: The console (and, in general, strings in Java and other languages) deals with "plain text". Plain text has no notion of text size or formatting. You cannot do that. You ... | |
doc_23532954 | Here i my view:
class MyCustomView < NSView
attr_accessor :menu
def initWithFrame(frame)
super(frame)
return self
end
def mouseDown(event)
puts "---"
puts menu.class.to_s
NSMenu.popUpContextMenu(menu, withEvent:event, forView:self)
puts "---"
end
end
And here is the output when I ... | |
doc_23532955 | For example:
export class Controller {
protected static response(res: Response, statusCode: number = 200, data: any, user: string = '', dev: string = '', code: number = 200, result: string = 'success'){
res.status(statusCode).send({
data: data,
message: {
user: '',
dev: ''
... | |
doc_23532956 | this.route('posts', function() {
this.route('index', { path: '/' })
this.route('show', { path: '/:post_path' }, function() {
this.route('people', { path: '/people' })
this.route('files', function() {
this.route('images', { path: '/images' })
this.route('videos', { path: '/videos' })
})
})... | |
doc_23532957 | addTimestamp(e);
}
function addTimestamp(e){
var row = e.range.getRow();
var col = e.range.getColumn();
if(col === 10 && row > 1 && e.source.getActiveSheet().getName() === "Phy-JEE-Eng- 208_206_53")
if(e.source.getActiveSheet().getRange(row,11).getValue()== ""){
e.source.getActiveSheet().getRange(row,11).se... | |
doc_23532958 | Any ideas?
<script>
> var counter = 1;
> var limit = 15;
> function addInput(divName){
> > if (counter == 15) {
> var el = document.getElementById('destroy');
> el.style.display = "none";
> > }
> > e... | |
doc_23532959 | There's a standart function to show modals, but i'm using a parameter to declare if this modal should show up in a specific size, and i'm calling this function with this parameter only in modals i want, but this style is remaining for the following modals.
This is the important parts of the function:
function mostrarMo... | |
doc_23532960 | s1 = {'val' : 0}
s2 = {'val': 10}
s3 = {'val': 5}
s4 = {'val' : 4}
s5 = {'val' : 6}
s6 = {'val' : 7}
s7 = {'val' : 3}
shapelets = [s1,s2,s3,s4,s5,s6,s7]
I want to get the max 5 numbers in the shapelets list, knowing that it contains a key of name "val" and to which a value is assigned.
The solution here resides in par... | |
doc_23532961 | Thanks!
A: It works perfectly to install it in VS community 2013
| |
doc_23532962 |
A: You have 2 options:
*
*Use <jsp:usebean>, let the bean fill itself in the constructor.
<jsp:useBean id="bean" class="com.example.Bean" />
...
<input name="foo" value="${fn:escapeXml(bean.foo)}">
<input name="bar" value="${fn:escapeXml(bean.bar)}">
The fn:escapeXml() is not mandatory for the functioning, but it'... | |
doc_23532963 | <?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<Parameter key="filePath" Value="C:\FilesToWatch"></Parameter>
</appSettings>
</configuration>
Then I did some research how to use this value in my HomeController and many people say that the ConfigurationManager is the solution so i tried t... | |
doc_23532964 | How can I to close/dismiss the ProgressHUD dialog programmatically? Because at the documentation it was using onPress to dismiss the dialog. What I want is to programmatically dismiss or close the dialog without onPress.
Thank you.
The library/package of the ProgressHUD dialog link below:
https://pub.dartlang.org/pack... | |
doc_23532965 | If they aren't equivalents, then what are the differences and how do they relate?
A: Gradle is not equivalent to the compiler. Compilers primarily meant for translating the high-level language(i.e. java) into machine code or other intermediate code representation like bytecode. wheres Gradle is a build system that pac... | |
doc_23532966 | I have a scrollable div (overflow), with divs inside of it. The scrolling use is intended for touchscreens.
I want the user to be able to scroll as he likes, but as soon as he stops scrolling, the first div that's entirely within the viewport of the parent div needs to stick to the top of the parent div.
Basically like... | |
doc_23532967 | Here is the code
<html>
<head>
<script type="text/javascript">
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;
}
checkflag = "true";
return "Uncheck All";
} else {
for (i = 0; i < field.length; i++) ... | |
doc_23532968 |
Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': An OffscreenCanvas could not be cloned because it was detached.
at main (http://localhost:8000/responsivetemplate/:47:14)
[index.html]
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equ... | |
doc_23532969 |
<context-param>
<param-name>myparam</param-name>
<param-value>myvalue</param-value>
</context-param>
A: I believe @Endpoint annotated class is managed by spring container if so , then you can Autowire ServletContext as below
class MyWS{
@Autowired(required = false)
private ServletCon... | |
doc_23532970 | We are not planning to approve all stages (some stages might take weeks to get approved or some will be never approved) because we don't want to promote every single build to production.
Is this an expected behavior? Are the agents released during the wait period?
See image below as en example. As you can see, we did n... | |
doc_23532971 | (this is pandas data frame)
{]1
import pandas as pd
df = pd.read_csv(r'C:\Users\ASUS\Downloads\bridges.csv' , header=None)
df.columns = ["IDENTIF", "RIVER", "LOCATION", "ERECTED","PURPOSE", "LENGTH", "LANES", "CLEAR-G","T-OR-D", "MATERIAL", "SPAN", "REL-L","TYPE"]
print(df)
A: Try
df = df.replace('?', "Null")
Or, y... | |
doc_23532972 | Below is my code :
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
o = win32com.client.Dispatch("Outlook.Application")
inbox = outlook.GetDefaultFolder(6)
messages = inbox.Items
for message in messages:
if message.Subject == "aaa":
print("Found me... | |
doc_23532973 | 12345631
L1234512
P12345
234556
19090912
J123456
Using Linq and .Net 3.5, I want to create a csv string for accounts starting with L or P and is of 6 characters. Following code creates a csv string but how to add the filter?
string[] accounts = accountList.Select(c => c.acctnbr).ToArray();
string csv = string.Join(","... | |
doc_23532974 | public static Statistic[] combineStatistics(Statistic[] rptData, Statistic[] dbsData) {
HashSet<Statistic> set = new HashSet<Statistic>();
for (int i=0; i<rptData.length; i++) {
set.add(rptData[i]);
}
/*If there's no data in the database, we don't have anything to add to the new array*/
... | |
doc_23532975 | Everything is working fine...content loads and fades In. I just don't know where and how to put the FadeOut part! So it Fades Out the current div, loads in the new content and then Fades that In!
Help?
$('.menu_home').click(function() {
var href = $(this).attr('href');
$('#pageContent').hide().load(href).fadeI... | |
doc_23532976 | I can get the box to appear using this code:
let errors = [];
let radiobutton = form.getAnswerText("sIsPersonLongTermNeeds");
if (radiobutton == "sIsPersonLongTermNeedsNo" ||
radiobutton == "sIsPersonLongTermNeedsUnknown"
) {
window.confirm("text");
}
But I don't know how to use the values (which I believe ar... | |
doc_23532977 | f = pd.read_csv("test.csv",delimiter=",")
df = pd.DataFrame(f)
if df.str.startswith('pjp-'):
df = df.replace(["pjp-*|"],[""])
print(df)
head(df)
Quantity code boxes
34 pjp-custom|3cex 10
20 pjp-cusm|4cex 8
12 pjp-ctom|5cex 6
40 pjp-custom|6cex 14
desired output
Quantity ... | |
doc_23532978 |
A: The App Engine Standard Environment in which you have deployed the application following the tutorial is a sandboxed environment and you cannot really access the instances and the filesystem where the application is deployed. Read this document to better understand how instances are managed.
On the other hand, App ... | |
doc_23532979 | I have a small bug which I can't seem to fix regarding the scrollview and setstate. I have a function that displays the search list under my search bar. It is an absolutely positioned element. The bug occurs when I try to scroll down on the scrollview and press on one of the items, instead of the scrollview remaining i... | |
doc_23532980 | Can someone please help me understand how i can use this?
A: I think you need to go up one level and look at tutorials first: http://docs.oracle.com/javase/tutorial/. Once you understand the basics of Java, then you can use the API reference to find the classes and methods you need.
| |
doc_23532981 | ?- position([[b,c,f],[a,d,g],[h,e]],c,P)
P=1
?- position([[b,c,f],[a,d,g],[h,e]],g,P)
P=2
?- position([[b,c,f],[a,d,g],[h,e]],b,P)
P=0
I've been looking at the nth0/3 predicate but I'm not sure if that is the right way to go about this. Any pointers would be highly appreciated.
I'm trying to find the position of each... | |
doc_23532982 | I have a list of vectors:
l <- list(c(1, 2), c(5, 10))
and I want to test whether a given vector --- for instance, c(1, 2) --- is in that list. I thought the "straightforward" approach would work:
c(1, 2) %in% l
but that returns
[1] FALSE FALSE
In the end I found the following solution:
any(sapply(l, function(x) { a... | |
doc_23532983 | let principal = document.getElementById("principal").value;
let rate = document.getElementById("rate").value;
let years = document.getElementById("years").value;
let interest = principal * years * rate / 100;
let year = new Date().getFullYear() + parseInt(years);
document.getElementById("result").innerHTML... | |
doc_23532984 | 12/26/2016 9A Christmas Day
3/25/2016 9A Good Friday
3/28/2016 AS Easter Monday
12/26/2016 AS St. Stephen's Day
3/25/2016 AS Easter Monday
1/1/2016 AS New Year's Day
12/26/2016 BE Christmas
1/1/2016 BZ New Year's Day
2/9/2016 BZ Carnival
5/26/2016 BZ Corpus Christ
4/21/2016 BZ Tiradente... | |
doc_23532985 | The TParallel.For loops are very simple:
TParallel.For(0, inImage.Height -1,
Procedure(ty : integer)
begin
SomeProcedure(ty);
end);
If I create a Delphi application with exactly the same code, everything works perfectly.
After doing a lot of research and debugging, it looks like there is a deadlock which is... | |
doc_23532986 | However, on WAS ND, we don't see the properties wl.analytics.queues or wl.analytics.queue.size available for either our MobileFirst project WAR, or the MobileFirst administration WAR.
How can we set these JNDI properties?
A: As of MobileFirst Platform v7.0, this JNDI is no longer available.
The process of forwarding l... | |
doc_23532987 | I need to be able to accept connections from c# running on another computer, I really don't care what technology I use as long as I can trigger javascript events on the "server" browser.
A: You can't start "real" webserver in a browser (e.i there is no API and you are not allowed for security reasons to bind to and li... | |
doc_23532988 | [WebMethod]
public string TrelloCallback()
{
//connect to database
//do stuff
//return "OK"
}
However this fails immediately, even if my code only consists of "return OK". I have used Applications such as Postman (https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomc... | |
doc_23532989 | Before adding the attribute [ApiExplorerSettings(IgnoreApi = true)]on my api actions I was able to see the models / schema in the swagger UI.
This is how I have configured swagger
Startup.cs
ConfigureServices
services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo
{
... | |
doc_23532990 | for(i=0; num>0; i++)
{
a[i]=num%2;
num= num/2;
}
I am working on decimal to binary conversion. I can convert themi want answer in 8 bits. And it gives me as, for example x =5, so output will be 101, but i want 00000101. Is there any way to append zeros in the start of array, without using any library.
A... | |
doc_23532991 |
A: It took me a while to find a way to install PHP 5.6 by using https://github.com/JVerstry/openshift-php-framework-stack , but the sad thing is that when I tried to install Laravel 5.1 based on it, it automatically used OpenShift's own PHP (5.3.3). Even I tried export my own PHP into path, the installation would stil... | |
doc_23532992 | public static void main( String[] args ) throws Exception {
JFileChooser fc = new JFileChooser();
int returnVal = fc.showOpenDialog(null);
if (returnVal == JFileChooser.APPROVE_OPTION) {
App.file = fc.getSelectedFile();
//This is where a real application would open the file.
System.o... | |
doc_23532993 | I would have though of having instances of all the forms in a static class and have the application loop through the status of all the forms each time the user hides a form and if all are hidden then exit the application. Is this a good way to do it?
A: Usually in this situation you would create a ApplicationContext ... | |
doc_23532994 | A
- static Map<String, A>
- String name
- String aInfo1
- String aInfo2
B
- static Map<String, B>
- String name
- String bInfo1
- String bInfo2
C
- A aObject
- B bObject
Now, in my XML, I define a list of tags for A objects and B objects and then I define tags for C objects which refer to A and B objects using there... | |
doc_23532995 |
A: You have to call the gdk_flush function to actually send the command to the server. Note that this is only needed because of the sleep call which you shouldn't use anyway (application becomes unresponsive during the time); had you used g_timeout_add, gdk would flush the X command queue automatically.
About making w... | |
doc_23532996 | I had renamed some of the files when I copied them over, so that could have something to do with it. Searching online I see people solved similar issues by using the file > read class files in IB, but IB is not standalone in new versions of xcode and this option doesn't appear on the xcode file menu.
Any ideas?
A: I k... | |
doc_23532997 | static public void starttimer() {
t1 = date3 - date;
progressbarstatus ();
starttimercd ();
timer = new CountDownTimer ( totalSeconds, 1000 ) {
@Override
public void onTick(long millisUntilFinished) {
if (isclicked = true) {
secondc = totalSeconds - millisUn... | |
doc_23532998 | how much time before the program lets say c# int and the database INT value no longer support each other, or how long before the INT value is used up, or how large is this auto generated id field for a database, lets say sqlite?
When you try to insert a new record, and the data base auto generated row id is used up, wh... | |
doc_23532999 | But mtools still give me this error:
Error converting to codepage 850 Invalid argument
Error setting code page
Cannot initialize 'A:'
why?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.