id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_28500 | mydb=# CREATE EXTENSION postgis;
I get the following error:
ERROR: could not open extension control file "/usr/local/Cellar/postgresql/9.3.1/share/postgresql/extension/postgis.control": No such file or directory
Is this a problem with my paths? If so, how do I fix it? I found that my postgresql is located here:
admi... | |
doc_28501 | I'm trying to make a scoreboard page in .NET MVC 5 consisting of a simple table with rows containing values retrieved from a MySQL database.
Each row in the database table represents a unique player along with his various stat values. I've created a model to represent each player, PlayerRow, and am passing a List<Playe... | |
doc_28502 | #include <iostream>
#include <fstream>
#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/binary_iarchive.hpp>
#include <armadillo>
#include <boost/serialization/split_member.hpp>
BOOST_SERIALIZATION_SPLIT_FREE(arma::mat)
namespace boost {
namespace serialization {
template<class Archive>
void sav... | |
doc_28503 | So in order to create rounded corners I'm following this guide.
this is what my image.json contains:
{
"jobs" :
{
"common" :
{
"let" :
{
"RESPATH" : "source/resource/custom"
},
"cache" :
{
"compile" : "../cache"
}
},
"image-clipping" :
{
"extend" : ["common"],
"slice-i... | |
doc_28504 | Long a = 123L;
long b = 123;
System.out.println("a equals b?: " + (a == b));
The result is true although comparing two Long objects would be false (because it compares their reference). It is Java converting Long object into its primitive value because detects == operator against another primitive object?
A:
It is J... | |
doc_28505 |
A: Not quite an answer to your question, but I have some tips:
*
*If you write your own client, don't trust the IETF RFC. Microsoft
hasn't been scrupulous in its adherence to the spec. And be sure to
test with Unicode file/folder names, all major versions of Windows,
and so on.
*Don't write your own client. :-)
*... | |
doc_28506 | I now have a ManagerThread that starts WorkerThreads to compute the neibhbors of each cell. So one WorkerThread is started for each cell right now. How can I re-use an existing thread that has completed its work?
The Thread Pool Pattern seems to be the solution, but I don't understand what to do to prevent the thread f... | |
doc_28507 | example:
colA colB colC
100 - [text input] = [calculated result]
880 - [text input] = [calculated result]
720 - [text input] = [calculated result]
130 - [text input] = [calculated result]
...
I'm sure this is fairly easy to do with Javascript, but I've looked and can't find a simple answer. I'm not ... | |
doc_28508 | Please see the relevant code below:
purchasesTable.jade
.panel.panel-default.userTable
.panel-heading.tableStatementHeader Purchases
.panel-body
div()
table.row-border.hover(datatable='ng', dt-options='purchasesCtrl.dtOptions', dt-columns='purchasesCtrl.dtColumns')
purchasesTable.controller.js
(funct... | |
doc_28509 | I am getting this error on form submit in node js. only in post upload issue, another merchant upload is successfully done but an issue is only in this portion. why I am getting connection close issue in the only post uploading
var form = new FormData();
form.append('data', JSON.stringify(req.body.request));
form... | |
doc_28510 | For instance we have a script that we run which converts the name and/or address lines to proper upper/lower case. This code goes through an entire table and analyzes/fixes each row. There are others, that do things like parse and standardize the address and even duplicate detection...
We're thinking of migrating the... | |
doc_28511 | It works quite well (after I fixed some namespaces). But when I open the Message Queuing tool (built in Windows) and try to examine the message body, it looks quite strange:
00 01 00 01 04 02 24 6E ......$n
65 74 2E 6D 73 6D 71 3A et.msmq:
2F 2F 6C 6F 63 61 6C 68 //localh
6F 73 74 2F 70 72 69 76 ost/priv
61 74 65 2F 6... | |
doc_28512 | if ( (screen.width < 800) && (screen.height < 600) ) {
window.location = 'mobilesite';
} else {
window.location = 'desktopsite';
}
But i am worried about the new retina displays. I think this approach is not going to work. (I have not a retina display device to test it)
I decide not to use a differentiation b... | |
doc_28513 | Is there some kind of timeout that I could change or maybe it's some kind of an optimised mode of usage I could turn off? I tried increasing CPU memory but still the same thing happens all the time.
I pinged the external IP:
PING <EXTERNAL_IP> (<EXTERNAL_IP>) 56(84) bytes of data.
64 bytes from <EXTERNAL_IP>: icmp_seq=... | |
doc_28514 | class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(... | |
doc_28515 | There is an ImageButton inside this view.
Here is a little map to this button:
LinearLayout -> SwitchLayout -> RelativeLayout -> RelativeLayout -> ImageButton
At some point I want to get the tag attached to the SwitchLayout, but all I have is the reference to the ImageButton.
I've tried to look for an ID, but it seems ... | |
doc_28516 | OracleConnectionStringBuilder sb = new OracleConnectionStringBuilder();
sb.DataSource = "localhost";
sb.UserID = "user";
sb.Password = "password";
OracleConnection conn = new OracleConnection(sb.ToString());
conn.Open();
I also use this code to do any statements:
OracleDataAdapter sd = new OracleDa... | |
doc_28517 | curl -v https://api.sandbox.paypal.com/v1/payments/payment \
-H "Content-Type:application/json" \
-H "Authorization:Bearer <authkey>" \
-d '{"intent":"sale","redirect_urls":{"return_url":"https:\/\/devtools-paypal.com\/guide\/pay_paypal\/curl?success=true","cancel_url":"https:\/\/devtools-paypal.com\/guide\/pay_p... | |
doc_28518 | jQuery(document).ready(function(){
jQuery("<div id ='container'><iframe src='http://www.google.com'></iframe></div>").dialog({modal:true,title:"Title",width:800,height:600});
});
Any idea? I'm becoming mad with the css widths and heights.
A: This is ok for you.
jQuery(document).ready(function(){
jQuery("<di... | |
doc_28519 |
*
*NUMBER_OF_PROCESSORS = 2
*PROCESSOR_ARCHITECTURE = AMD64
*PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 85 Stepping 7, GenuineIntel
I’ve searched various forums and stumble upon six different CPU models using the same identifier above:
*
*Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
*Intel(R) Core(TM) i9-1... | |
doc_28520 | Code:
new_sheets = [sorted(i) for i in new_sheets]
Input:
[['64', '65', '0'], ['86', '94', '94', '64'], ['99', '111', '103', '90'], ['36', '48', '47', '100']]
Output:
[['0', '64', '65'], ['64', '86', '94', '94'], ['103', '111', '90', '99'], ['100', '36', '47', '48']]
Am I missing something?
A: Because they are not... | |
doc_28521 | <select name="mydropdown">
<label for="category">category:</label>
{% for c in cats %}
<option value={{ c.title }} name="category"> {{ c.title }} </option>
{% endfor %}
</select>
The form has more fields to it:
<div>
<label for="title">Title:</label>
{{ e_form.title }}
</div>
....
The option ... | |
doc_28522 | actionsListing *View = [[actionsListing alloc] init];
[self.navigationController pushViewController:View animated:YES];
[View release];
What will i do thanks.
A: That code is fine - you're doing everything correctly.
Are you testing in the simulator or on a device? If it's the simualtor, don't. The simulator has a di... | |
doc_28523 | Just a list of paths would do, but if there's a way to get more information about each item (expiry etc), then all the better.
A: As far as I remember Cache is a singleton and there is only one instance of it per app domain. OutputCache uses it too and it's nothing more than just a Response.Cache. So I think cached pa... | |
doc_28524 | class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
exclude = ('user',)
widgets = {
'first_name': forms.TextInput(attrs={'maxlength':100, 'required': True}),
'last_name': forms.TextInput(attrs={'maxlength': 100, 'required': True}),
'... | |
doc_28525 | ||
doc_28526 | div_t div(int numer, int denom);
typedef struct _div_t
{
int quot;
int rem;
} div_t;
But C,C++ have / and % operators.
My question is: "When there are / and % operators, Is div function useful?"
A: div() filled a pre-C99 need: portability
Pre C99, the rounding direction of the quotient of a / b with a negative o... | |
doc_28527 | var body = messages[j].getPlainBody()
body =
HOSTNAME=hummingbird
UPTIME=90 days, 23 hours, 12 minutes
LASTREBOOT=12/14/2016 20:45:17
C-USED=638056792064
C-FREE=361226694656
D-USED=
D-FREE=
And I'd like to create an array holding this information, e.g.
var server = {hostname: "hummingbird", uptime: "90 days, 23 hours... | |
doc_28528 | I tried using css -webkit-text-security: disc; but it did not work.
A: One way i can think of is to handle onkeydown event of the input field by reassigning the input value to something else other than the typed key.
| |
doc_28529 | I'd like to combine them using rbind. If I knew the names, I could easily just rbind(d1,d2...) but can't do that since I have to combine a different number of data frames each time.
So lags=rbind(pattern("lags_2_Y*")) didn't work.
I can get the list of the generated lag names into a vector like so: lag_names=ls(pattern... | |
doc_28530 | If you load my WIP page http://www.omakadesign.com in Firefox, you will see a butterfly pattern at the bottom of the menu, but if you load it in Safari, the menus are completely rectangular.
The relevant line appears in main.css (221) and looks like:
clip-path: url("../img/menu-news.svg#news-clip");
There seems to... | |
doc_28531 | namespace WindowsFormsApplication33
{
public partial class Form1 : Form
{
double H = 1.00794;
double He = 4.002602;
double Li = 6.941;
double Be = 9.012182;
...
These are just all my doubles, now what i want a button to do:
private void button1_Click(object sende... | |
doc_28532 | def case class RT[String](topic: String, children: List[RT[String]])
And now I have the following function with recursion:
def func(tree: RT[String]): List[String] = {
tree.children match {
case Nil=> List(tree.topic)
case child =>
val subTrees = child.map(rt => func(rt))
subTrees.foldLeft(List(... | |
doc_28533 | This is the code:
import sys
import threading
def threaded(fn):
def wrapper(*args, **kwargs):
thread = threading.Thread(target=fn, args=args, kwargs=kwargs, daemon=True)
thread.start()
return thread
return wrapper
@threaded
def answer():
time.sleep(2)
sys.stdin.write('to be inp... | |
doc_28534 |
var rowCount=0;
function createit(){
rowCount++;
var tds=$("#addrowtd").closest('tr').children().each((a)=>{
//how to get the ids of tds here
console.log(a);
});// this outputs addrowtd ,how to get a2 ,b2 and c2 of this row
//console.log(tds)
var newRow = $("<tr>");
var cols = "";
//I want to i... | |
doc_28535 | I want to be able to pass in a userid and get a list all entities ordered by my recent timestamp.
There is also the complication of pagenated responses. I would like the sorting to happen before.
A: AWS AppSync allow you to specify scanIndexForward as a property in the request mapping template. You can specify true ... | |
doc_28536 | df2 = data.frame(Id = c(2, 4, 6, 7), State = c(rep("Alabama", 2), rep("Ohio", 2)))
df_sum <- anti_join(df1,df2, by = "Id") %>% bind_rows(df2)
Is there an easy way to make the result of the anti_join so that only rows of df1 are present in the result. So for example the row with the Id 7 is dropped in the resulting da... | |
doc_28537 | Where things go off track is when trying to access the PUT api endpoint from within Angular. Accessing the GET endpoint is no problem, and retrieving and displaying data works smoothly. However, after considerable reading and searching, I am stll unable to properly access the PUT endpoint and update the high score dat... | |
doc_28538 | Thank You in advance.
A: If your frame rate is something that cannot be expressed as a finite decimal number (or precisely expressed in a floating point number), which the value 30.0683333 looks like, it may be up to the browser to decide how to represent them. What is the frame rate of the video? Could it be 30fps by... | |
doc_28539 | This is my example.py file. It only has one resolver that raises an error.
from graphql import (GraphQLSchema, GraphQLObjectType, GraphQLField, GraphQLString, graphql_sync, )
def resolve_fail(*args, **kwargs):
raise ValueError("Some error")
schema = GraphQLSchema(
query=GraphQLObjectType(
name='Root... | |
doc_28540 | However, while the macro expands properly with #lang racket, it fails when implemented with my new language.
For example, here is the recursive definition of a simple macro f which expands to its last argument:
;; my-lang.rkt
#lang racket
(provide #%datum
#%module-begin
define-syntax
(for-sy... | |
doc_28541 | import java.awt.*;
public class CGLinesGrid extends JFrame {
public CGLinesGrid () {
super ("Exercise 4");
setSize (500, 500);
setVisible(true);
}
public void paint (Graphics g) {
for (int i = 1; i<=9 ; i++) {
g.drawLine(70, 30+i*40, 390, 30+i*40); ... | |
doc_28542 | GUI dispaly these results by paging with 1000 records one page, so when server calculated the results
by using data from db, the server should stored the results in db/memory/file to support paging.
These methods will not so good when there are lots of requests from GUI. Is there another paging strategy
to solve this p... | |
doc_28543 | Picking one is clearly easy to do with the following code:
i = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
startActivityForResult(i, PICK_CONTACT_REQUEST );
Now I want to create a new contact. I tried to use that code but it doesn't trigger the activity result:
i = new Intent(Intent.ACTION_INSERT);
i.setType... | |
doc_28544 | Taking the iris dataset as an example, I want to plot one column against another, something simple using qplot or preferably ggplot
However, using qplot I get this:
and using ggplot2, I get the error:
I don't think I need the reactive function as I'm not subsetting the dataset, just extracting columns to plot.
server... | |
doc_28545 | Thank you guys a lot!
A: You should create the index after entering into the mongodb terminal
command is:
db.YOUR_COLLECTION_NAME.createIndex({COLUMN_NAME: -1})
After this, your index is created.
| |
doc_28546 |
I am using genfromtxt
genfromtxt("data.txt",missing_values="#",filling_values=0)
but I keep getting the following error
raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #25 (got 1 columns instead of 5)
I have tried to fill the missing values as can be seen in the code above but keeping ... | |
doc_28547 | SELECT * FROM database.table WHERE field3 REGEXP '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$';
When I run the same query through a python script it returns results that are not IP Addresses.
query = ("SELECT * FROM database.table WHERE field3 REGEXP '^(([... | |
doc_28548 |
A: I'm only aware of one way to do this. First, find the UID and GID of the process by constructing the path /proc/ + the PID. For example /proc/4261. You then stat() that path and get its UID and GID. Then, you stat() the file you want to check for read access and check whether the UID/GID of the process has read per... | |
doc_28549 |
A: Assuming you are not using Weka Explorer and are coding this yourself, something like this should help you make an instance (in this code str1-str4 is your SQL result strings)! Note: This code requires you to load an .arff file with at least a couple of instances that are the same as what your new instances will be... | |
doc_28550 |
How would I emulate this modal type (both the modal and the labelled icons)? I'm using VueJS and Vue Material but I've got a strong feeling this is outside of the scope of either.
A: You can probably use flexbox to create a table-like layout, with rows and columns of <span>s with the image, and then a centered <p> un... | |
doc_28551 | https://developer.android.com/distribute/best-practices/develop/64-bit#test_your_app_on_64-bit_hardware
When trying to use adb to "force" one library, I have this problem :
$ adb install --abi armeabi-v7a zzz.apk
zzz.apk: 1 file pushed. 2.3 MB/s (7359404 bytes in 3.087s)
Error: Unknown option: --abi
What is installed ... | |
doc_28552 | mp.prec = 53
time_begin = time.time()
print "mpmath results:"
print clsin(2,3.1415926535897327)
print "time1:"
print (time.time() - time_begin)
time_begin = time.time()
print "gsl results:"
print gsl_sf_clausen(3.1415926535897327)
print "time2"
print (time.time() - time_begin)
The results are below:
mpmath results:
4.... | |
doc_28553 | The table structure is as follows:
id
timestamp
domain
ip
useragent
Every device has a unique IP address. In the table, I have multiple entries belonging to the same device.
I want to be able to count the number of records grouped by IP address and save this in a new table (called table2) which has the following stru... | |
doc_28554 | I am using bootstrap v3.3.4 and jquery v2.1.2. I have placed Jquery script before the bootstrap.min.js.
<!DOCTYPE html>
<html>
<head>
<title>Shaunta's Botique</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<met... | |
doc_28555 | targets: [
.target(
name: "LibCore",
path: "lib/core/"
),
.target(
name: "LibAppData",
dependencies: ["LibCore"],
path: "lib/appdata/",
swiftSettings: [.define("appdata")]
),
I want to insert a new .target() right below the opening targets: [
This works using awk i... | |
doc_28556 | @Component
public class FooImpl implements Foo {
Log log = LogFactory.getLog(this.getClass());
@Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY)
Bar bar;
public void bindBar(Bar bar) {
log.info("bar bound: "+bar);
}
public void unbindBar(Bar map) {
log.info("bar unboun... | |
doc_28557 | My objective is to make a single request to the listFinancialInstitutions() only after having the token store set.
And what's currently happening is that the request is made two times, the first one with the initial value of empty string and then the second time with the result of the response.
What am I missing to obt... | |
doc_28558 |
Fatal error: Call to a member function SetPageProperty() on null in
/home/rootname/www/site/site_op/index.php on line 26
$APPLICATION->SetPageProperty("description", "text");
class $APPLICATION is NULL.
what could be the problem ?
A: $APPLICATION is not a class. It's an instance of CMain and it is global variable.... | |
doc_28559 | AttributeError: 'list' object has no attribute 'shape'
| |
doc_28560 | import urllib
import mechanize
from bs4 import BeautifulSoup
import datetime
def searchAP(searchterm):
newlinks = []
browser = mechanize.Browser()
browser.set_handle_robots(False)
browser.addheaders = [('User-agent', 'Firefox')]
text = ""
start = 0
while "There were no matches for your sea... | |
doc_28561 | I now need to transition the height so that when the user presses Enter, the div would grow slowly.
Here's the animation I'm looking for (but when the user creates a new line rather than on focus):
And here's my (probably naive) attempt:
CSS:
div[contenteditable]{
border: 1px solid black;
max-height: 200px;
... | |
doc_28562 | PS: I am new to PHP and Wamp Server environment. Thanks!
<?php
$connect = mysqli_connect("localhost", "root", "gold", "shopping") or die
("Please, check the server connection.");
$email_address = $_POST['emailaddress'];
$password = $_POST['password'];
$repassword = $_POST['repassword'];
$completename = $_POST['complete... | |
doc_28563 | Currently, I store the clients co-ordinate position in a MySQL database, and update that position using AJAX, roughly 30 times per second.
Other clients positions are also polled roughly 30 times per second.
My problem however, is that this seems to be causing an hour long IP lockout for the client, which I assume is a... | |
doc_28564 | exec("ffmpeg -i input.mp3 -codec:a libmp3lame -b:a 128k output().mp3 2>&1",
$output, $exit_code);
if ($exit_code!= 0) {
$data['message'][] = "Error";
}
print_r($output);
print_r($exit_code);
exit;
After running this code show error code 2.
The output is an empty array and also exit_code is 2 and not creat... | |
doc_28565 | Of course, when I write a large program, I break it up hierarchically into smaller functions. Is there any way to do this with a large HTML file?
Basically I'm looking for a template system, where the content to be inserted into the template is just more HTML that's optionally (here's the important part) located in the... | |
doc_28566 | In user space, I can mount the hugetlbfs file system, and then allocate huge pages using mmap (see, e.g., https://blog.kevinhu.me/2018/07/01/01-Linux-Hugepages/). Is there a similar way to do this in kernel space?
I'm aware that I could allocate them in user space first, and then pass them to the kernel using get_user_... | |
doc_28567 | dstream.transform(_.zipWithIndex).map(_.swap)
This will result in a DStream like:
// key: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 || 0 | 1 | 2 | 3 | 4 || 0
// val: a | b | c | d | e | f | g | h | i || j | k | l | m | n || o
(where the double bar || indicates the beginning of a new RDD).
What I finally want to hav... | |
doc_28568 | I've tried using the importhtml and importxml functions and they didn't work.
=importhtml("https://website","table",1) <-- Did not work
The error I'm getting is
#N/A - Could not fetch URL
A: no, that is not possible. in order to import data into Google Sheets, the source website needs to be public and not behind a ... | |
doc_28569 | // App.js
import React from 'react';
import addName from "util";
function App() {
const [name, setName] = React.useState("")
function handleUpdate(evt) {
setName(evt.target.value);
}
async function handleAddName(evt) {
await addName(name);
}
return <div>
<p><input type='text' value={name} on... | |
doc_28570 | I'd like to figure out how to make the other subnav items hide or scroll up when a different subnav is opened.
What am I doing wrong here?
<div id="nav_mob">
<div id="nav-toggle"><span></span></div>
<div class="dropdown_mob">
<ul>
<a class="dropdown_btn">
<li>Overview</li>
</a>
<div cl... | |
doc_28571 | app.use(error)
app.use('/',express.static('static'))
app.get('/',(req,res)=>{
//res.sendFile(path.join(__dirname,'./index.html'))
res.sendFile(path.join(__dirname,'../frountend/index.html'))
})
I have also trying multiple different ways of writing the app.use like...
app.use('/',express.static(path.join(__dirname,... | |
doc_28572 | foreach ($result_single as $row2)
{
if($row2->type == 'text') {
echo "<li id='item-".$row2->rank."' class='list_item'>";
echo "<textarea rows='2' id='".$row2->single_id."' cols='90' name='field[]' data-kind='text' >".$row2->content."</textarea>";
echo "</li>";
echo '<br />';
}
if($row2->t... | |
doc_28573 | The PROBLEM is that, this time is not working, and i don't know how, i've tried so many things and i don't know why my img doesn't resize to the size i want
Let me show you the code
So, this is the way i did it
return (
<UserPhotosHero>
<ContainUserPhotos>
{specificPhotos &&
specificPhotos... | |
doc_28574 | I have seen some samples where a PublishSubject is being used to relay data or commands from a ViewModel to an activity. But the problem with this is a VM can survive configuration changes, and when the subscription to the VM's PublishSubject is handled by the ususal approach of adding to a CompositeDisposable and clea... | |
doc_28575 | def __init__(self,term):
self.term = term
self.url ='https://www.google.com/search?q={0}&source=lnms&tbm=nws'.format(self.term)
response = requests.get(self.url)
This code can only get the contents of the first page searched by keywords. I wonder how can I change my code to get second, third or even more p... | |
doc_28576 | You can see some information below:
I created Twitter app in my account and users authorize my app. Can I automatically subscribe these users to me? I tried to read Twitter API but I didn't find solution for my problem.
Could you help me?
| |
doc_28577 | Can anyone guide me why my application load balancer is behaving like it?
I am using ELB type health checks and below are settings of my target group health check
Protocol : HTTP
Port : 80
Healthy threshold : 2
Unhealthy threshold : 10
Timeout : 10
Interval : 150
Success codes : 200
A: This is a normal behavior. Grace... | |
doc_28578 | fun main(args: Array<String>) {
val somePair: Pair<Any?, Any?> = "items" to listOf("1","2a")
var W=somePair.second as List<Int>
println(W)
}
output:[1, 2a]
"2a" is not Int , but the type of W is List, why no exception throw?
A: Compiling your code gives the following warning:
Unchecked cast: Any? to Lis... | |
doc_28579 | public function getServiceConfig()
{
return array(
'factories' => array(
'Application\Model\VehiclesTable' => function($sm) {
$tableGateway = $sm->get('VehiclesTableGateway');
$table = new VehiclesTable($tableGateway);
return $table;
... | |
doc_28580 | Create a single page angular application and use the following API to retrieve sports results and sort into a table of results that are displayed. Each sport result contains several data and always includes the publication time.
Method: POST
Content-Type: application/json
Url: https://ancient-wood-1161.getsandbox.com:... | |
doc_28581 |
"Object doesn't support this property or method".
The HTML code is:
function sumar() {
var elems = document.getElementsByClassName('verdana14 toAdd');
var myLength = elems.length;
total = 0;
for (var i = 0; i < myLength; ++i) {
if (elems[i].value!="") {
total += parseInt(elems[i].value,10);
}
}
... | |
doc_28582 | <Ontologyowl:Student rdf:about="ehsanm">
<Ontologyowl:studyMemberOf>
<Ontologyowl:Project rdf:about="crs000021"/>
</Ontologyowl:studyMemberOf>
I have 2 Questions here:
Is it right to put individuals of each class, in a separate RDF file?
When relating these two individuals, am I making another node of... | |
doc_28583 | @interface AppDelegate : NSObject <NSApplicationDelegate> {
IBOutlet NSTextField *dynamicTitle;
NSMutableString *title;
NSBox *dynamicSection;
NSView *Sect1_View;
NSView *Sect2_View;
NSView *Sect3a_View;
NSView *Sect3b_View;
NSView *Sect3c_View;
NSView *Sect4_View;
}
@property (assign) IBOutlet NSWindow *window;
@prope... | |
doc_28584 | (() => {
console.log('IIFE 1');
})();
But I've found here that also the following (really short) form works:
As a bit of extra credit there's an even shorter way to write IIFEs in
ES6 which is to use the new function context syntax all on its own
like so:
{
console.log('IIFE 2');
}
Why only {} is enought?
... | |
doc_28585 | select sys_guid() from dual;
to populate itself.
I'm using RAD 8.5.1 and its JPA features to generate my entities based off what's in the db.
Here's my entity:
@Entity(name="vguid")
@Table(name="V_GUID")
public class VGuid implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Col... | |
doc_28586 | When my app is killed with taskmanager (or by iOS because of memory pressure) and a significantLocationChange or GeoFence happens, my whole app is started by iOS and my callback method is called.
First question here is: what state am I in? Even the UI is partly loaded so I'm kind of foreground, but since there is nothi... | |
doc_28587 | >> parameters_SGD = {'clf__l1_ratio': np.linspace(0,1,30), 'clf__alpha': np.logspace(-5,-1,5), 'clf__penalty':['elasticnet'], 'clf__class_weight': [None, 'balanced'],'clf__loss':['log','hinge']}
>> pipe_SGD = Pipeline([('scl', StandardScaler()),('clf', linear_model.SGDClassifier())])
>> grid_search_SGD = GridSearchCV(e... | |
doc_28588 | I need to change header height dynamically in code. Any suggestions?
A: In your tableview's delegate, you have to use
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return /*desired height*/;
}
EDIT
According to your comment, if you don't want to change your interfac... | |
doc_28589 | ||
doc_28590 | Primes class (main):
public class Primes {
/**
* The queue holding candidates we want to check for primality.
*/
private BlockingQueue<Integer> candidateQueue;
/**
* The queue holding primes we want to print before inserting into the result set.
*/
private BlockingQueue<Integer> primesQueue;
... | |
doc_28591 | <Preference
android:title="webpage">
<intent android:action="android.intent.action.VIEW"
android:data="www.google.com"/>
</Preference>
...using that XML, but what I realized was I can't manipulate cookies with an intent that just opens an external page. I needed a webview but I'm uncertain how I c... | |
doc_28592 | Eg:
.positive{
color:#46a546;
}
.positive:after{
content: "\25b2";
}
.negative{
color:#F00;
}
.arrow:after{
content: "\25bc";
}
<span class="positive"> hi </span>
<span class="positiveArrow"> hi </span>
<span class="negativeArrow"> hi </span> //what i have
<span class="positive arrow"> hi </span>
<span cl... | |
doc_28593 | But no matter what I try, I always get the standard error. Please Help.
CREATE OR REPLACE FUNCTION add_flight(
PLAN_ID INT,
AIRLINE_ID INT,
STATUS_ID INT)
RETURNS void AS $BODY$
BEGIN
INSERT INTO flight.flightgplan VALUES(
PLAN_ID,
AIRLINE_ID,
STATUS_ID);
IF airline_id > 8 THEN RAISE EXCEPTION... | |
doc_28594 | This code, from documentation:
Rectangle {
id: container
width: 600; height: 200
Rectangle {
id: rect
width: 500; height: 500
MouseArea {
anchors.fill: parent
drag.target: rect
drag.axis: Drag.XAxis
drag.minimumX: 0
d... | |
doc_28595 | <html class="gr__racinng_applledaily_com_hk" style='overflow: initial;">
<head> ... </head>
<body data-gr-c-s-loaded="true">
<!-- Google Tag Mananger (noscript) -->
<noscript> ...</noscript>
<!-- End Google Tag Mananger (noscript) -->
<div data-v-6223d6a8 id="app" class="web"> ... </div>
</body>
</html>
By using
from ... | |
doc_28596 | http://code.google.com/p/google-api-ruby-client/source/browse/service_account/analytics.rb?repo=samples
however, I have been trying to get it working but it just keeps on giving, no matter how hard I try ! Here is the error I keep on getting
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/signet-0.4.5/lib/signet... | |
doc_28597 | I need to ensure that user profile photos are up to date as soon as a user updates their profile photos. I see three options that I can do to update profile photos and ensure that website users get the latest image as soon as profile photos are revised. Of these approaches, is one better than the other in terms of ensu... | |
doc_28598 | $formdata = 'category_frm1=Individual&demo_frm1=10009&value_frm1=West&solrname_frm1=dem_last_name&name=Last Name';
I have tried these things but am not getting what's needed returned.
echo str_ireplace('_frm','',$formdata);
echo preg_replace('/\d+/', '', $formdata );
This is what I am trying to accomplish... | |
doc_28599 | int Rock = 0;
int Paper = 1;
int Scissors = 2;
int PlayerChoice (int PlayerC){
NSLog(@"Player chooses %i", Rock || Paper || Scissors);
return 0;
}
int ComputerChoice (int rockpaperscissors){
return arc4random_uniform(2);
NSLog(@"Computer chooses ");
}
int main(int argc, const char * argv[])
{
`@... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.