id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_8500 | var anObject = {aProperty:true}; // this is just an example.
console.log('anObject.aProperty: ' + anObject.aProperty); <-- typed it twice.
I type the name of the variable into a string followed by typing the same thing again to reference the value.
It seems like an unnecessary duplication to write the same thing twi... | |
doc_8501 |
*
*Parse the CSV file in the browser, make an AJAX call to server for every row.
*Upload the CSV file and let the server parse and insert it into DB
I know it is a too open question, given that no technology or hardware is specified. Anyway, what's better for the web server's performance? Getting thousands of co... | |
doc_8502 | form --
<div class="row clone">
<?php echo $form->labelEx($modelYoutubeVideo,'embed_code'); ?>
<?php echo $form->textField($modelYoutubeVideo,'embed_code',array('size'=>50,'maxlength'=>50)); ?>
<?php echo $form->error($modelYoutubeVideo,'embed_code'); ?>
<?php echo $form->labelEx($modelYoutubeVideo,'d... | |
doc_8503 | this comes in the following format:
I need the information inside: Agents, Itinerarie, Legs, Segments
here is my action:
export function fetchLocals() {
return (dispatch) => {
dispatch({type: GET_LOCATIONS_START});
axios.get('http://localhost:3001/api')
.then(function(response) {
... | |
doc_8504 | <?xml version="1.0" encoding="utf-8"?>
<xs:schema id="MySchema"
targetNamespace="http://tempuri.org/MySchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/MySchema.xsd"
xmlns:mstns="http://tempuri.org/MySchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MyDo... | |
doc_8505 | i used this code to import library :
from pymouse.windows import PyMouse
but this error shows :
from win32api import GetSystemMetrics
ImportError: No module named
'win32api'
where is the problem? i am not sure that i install the library fine ! can you show how to install it on windows ?
A: The win32api module... | |
doc_8506 | | id | phone_no | join_date | city | blood_gp |
+----+------------+------------+------------+----------+
| 1 | 80077672xx | 1997-07-19 | Delhi | NULL |
| 2 | 80077642xx | 1998-07-19 | New Delhi | NULL |
| 3 | 80477642xx | 1999-07-19 | Mumbai | NULL |
| 4 | 80077654xx | 1997-05-31 | Ko... | |
doc_8507 | <!-- FORM START -->
<form action="checkscript.php" method="get">
<!-- Input text box with styling over image -->
<input type="text" style="position:relative; left:8px; top:-75px; font-family:arial; font-size:32px; background-color:transparent; height:44px; width:268px; border:none; font-weight:bold;... | |
doc_8508 |
A: Take a look at FindFirstVolume, FindNextVolume and FindVolumeClose. Here is a complete example from MSDN: Displaying Volume Paths.
A: Well, you could call GetLogicalDrives(), which will give you a bitmask of used/unused drives:
Return Value
If the function succeeds, the return value is a bitmask representing the ... | |
doc_8509 | I stopped my ec2 instance, but when i restarted it, the images are not showing and also its taking a long time to load the content of word press too.
This happened earlier also but that time i thought might be due to latency issue, but its happening again and again.
I tried to restart the RDS instance too, but didn't g... | |
doc_8510 | import matplotlib.pyplot as plt
in Pycharm Community 2016.1.4 using Anaconda version 3.5.1, I get this error:
from PyQt4 import QtCore
SystemError: initialization of QtCore failed without raising an exception
What is wrong here? I havent found anything via google or here on SO that is the same as my problem.
A: I wo... | |
doc_8511 | I first ran this and saved the model.
vw -d housing.vm --loss_function squared -f housing2.mod --invert_hash readable.housing2.mod
Examining the readable model:
Version 7.7.0
Min label:0.000000
Max label:50.000000
bits:18
0 pairs:
0 triples:
rank:0
lda:0
0 ngram:
0 skip:
options:
:0
^AGE:104042:0.020412
^B:15834... | |
doc_8512 | The error I'm getting is (firebug), which appears to complain about the entire index.html file, is:
The Jade code is short. It is an index.jade file which extends a layout.jade file which includes in all the js files:
extends ../includes/layout
block main-content
section.content
div(ng-view)
h2 some regular... | |
doc_8513 | I have just started out using PhoneGap and I am trying to build a simple app that allows you to take a picture and show it back to you. I have been able to do this using the cordova camera plugin that launches the camera app on the device. however I would like to implement the app that launches a full screen camera as ... | |
doc_8514 | <dl>
<dt>
<label for="voidedCheck">Voided Check:</label>
</dt>
<dd><br><input type="file" style="font-size:16px; height:25px;width:240px" capture="camera" accept="image/*" id="voidedCheck" name="voidedCheck" /></dd>
</dl>
http://jsfiddle.net/hswbL/1
I've tried running it through a couple validators - HTML and Javascri... | |
doc_8515 | HTML
<div class="container-fluid">
</div>
CSS
.container-fluid{
background-image: url('G://etc/vvo/practice/img/bora1.jpg');
}
why drive G:? im practicing my coding during working hours and at home thats why the location is drive g
A: .container-fluid{
background-image: url('../img/bora1.jpg');
}
If the ima... | |
doc_8516 | Once you do , print the position found at (starting with 1) , the line and column index, also specify the number of times the element was found.
The problems with my program : it prints several times bad numbers before the final printf that shows the correct location. If the location of the searched is at the start it ... | |
doc_8517 | gvRFPCorpCode is the name of my gridview
private void fillCorpCode()
{
DataSet ds = new DataSet();
data.gRowId = this.txtROWID.Text;
ds = data.GetCorpCode();
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
... | |
doc_8518 | I've removed the Xcode password from the keychain and synced my certificates to the second Apple ID I have. Oh god, the mess it made with my keys, and profiles. When I did this with my own Apple Id (Xcode 3) I had to do the whole thing manually and could name keys, etc like I wanted. I entered the second Apple Id (Xcod... | |
doc_8519 | I want to order it like A...Z, Å, Ä, Ö. Instead the order produced is A...Z, Ä, Å, Ö.
I tried to use localizedCompare, but did not get it to work. In this case Å and Ä was translated to 'A' and Ö to 'O'.
let songs = self.allSongs.sort { return $0.title.localizedCompare($1.title) == .OrderedAscending }
Any ideas on how... | |
doc_8520 | <Books>
<Book Num="1">
<Number>12335</Number>
<Year>2011</Year>
<Pages>400</Pages>
<CustomerID>1</CustomerID>
</Book>
<Book Num="2">
<Number>6954</Number>
<Year>2001</Year>
<Pages>40</Pages>
<CustomerID>2</CustomerID>
</Book>
</Books>
<Cust... | |
doc_8521 | Here is code
FrontendController
public function singlePost($slug)
{
$post= Post::where('slug', $slug)->first();
return view('single')->with('post', $post)
->with('title', $post->title)
->with('settings', Setting::first())
->with('categories', Category::take(4)->get());
}
single.bl... | |
doc_8522 |
A: This macro will perform the copy and leave the new workbook active:
Sub CheckVal()
If [B4] <> "" Then
Set r1 = Range("A4")
Workbooks.Add
r1.Copy Range("A4")
End If
End Sub
| |
doc_8523 | UPDATE: I found out that I was getting a webexception constantly because the webclient was timing out. I fixed this by increasing the max amount of connections according to this answer here. I was then getting exceptions for the connection not opening and I fixed it by using this answer here. I'm now getting connection... | |
doc_8524 | from flask import Flask, jsonify, request
from flask_restful import Api, Resource
...
class AddCharacter(Resource):
def post(self):
...
p.add_person()
# saves the character to a mongodb
p.save_person() #<-- causes a 500 error in postman when run through docker build and docker up
re... | |
doc_8525 | props: ['product']
This Product has some properties like: id, name etc.
Now, I want to get the category of this product with id via axios.
Is it possible? How?
My try:
mounted () {
axios
.get('/categoryofaproduct/', {
params: {
id: this.product.id
}
})
.then(response => {
con... | |
doc_8526 | and i want to print out all the modules for the same subject
the csv file looks like this csvfile
currently my code looks like:
import csv
subject = "Biology"
subject_module = []
with open("SubjectModules.csv", newline="") as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
subject_module_i... | |
doc_8527 | These are the unresolved imports:
import com.google.zxing.BarcodeFormat;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
import com.google.zxing.ResultPoint;
A: What a headache to see the classes in the download.zip's core folder but there is no "core.jar", so here's where to get t... | |
doc_8528 | Response.Write("Result: " + Page.PreviousPage.Request["idconcorso"] + "");
Well, I call pippo.aspx, and the result is Result:.
Than, I call from pippo.aspx the page pippo.aspx?idconcorso=1234 , and I aspect the result is again Result:, but in fact it print Result: 1234.
Than, I call from pippo.aspx?idconcorso=1234 the... | |
doc_8529 | Source.txt:
aaabbbb
1111111
2222222 (total 24000000 lines)
output1.txt (e.g.abc_20141125110001)
aaabbbb
1111111
output2.txt (e.g.abc_20141125110002)
aaabbbb
2222222
I have finished part of codes but seems not work. Please help to advise.
@echo off
Set /a file=100
Set /a line=1000
Set /a counter=0
Set firstline=Thi... | |
doc_8530 | During parsing, It shows the error "CannotResolveClassException:Envelope". But If I use
@XStreamAlias(Envelope)
It works fine.
How to tell Xstream to allow colon(":") in field name?
A: Its work for me:
import java.io.InputStream;
import org.junit.Test;
import com.thoughtworks.xstream.XStream;
import com.thoughtwor... | |
doc_8531 | I am building a simple app but the app requires the first thing shown is a splash screen of some sorts.
Upon tapping the only button on the SplashScreen, ideally it would load the rest of the app however I also want my app inside to work around a bottomNavBar.
I have done the Bottom Navigation Bar on my own and it work... | |
doc_8532 | package addPanel;
import java.sql.*;
import javax.swing.*;
import javax.swing.table.*;
public class panelShowData extends JPanel
{
Connection connection = null;
Statement statement = null;
ResultSet resultSet = null;
String url = "jdbc:mysql://localhost:3306/records";
String driver = "com.mysql.... | |
doc_8533 | If statement is true => select1 else => select2.
So I thought it should be something like this:
if (SELECT HOUR(CURTIME()) BETWEEN 0 AND 10)
then
SELECT `s` FROM `svs` WHERE `a`=1 OR `a`=2 //select1
else
SELECT `s` FROM `svs` WHERE `a`=1 //select2
But I don't know what am I missing( what am I doing wr... | |
doc_8534 | The rows in the List view should update every second. At first it works fine. However, when new rows are added with the '+' button, things begin to go sideways.
I made the rows tappable, so than when they are tapped, a @State variable changes to alter the color of text. Because this binding is detected properly, the vi... | |
doc_8535 | {
"en": {
"home": "Home"
},
"de": {
"home": "Startseite"
}
}
I would like to the get the value of "home" for "en" only
I can parse the string from local storage into JSON object like this
var value = $.parseJSON(window.localStorage.getItem("language_strings"));
But i dont know how to g... | |
doc_8536 |
error: no match for 'operator-' in '__last - __first'
sort(Result.poly.begin(), Result.poly.end(), SortDescending());
And here's SortDescending:
struct SortDescending
{
bool operator()(const term& t1, const term& t2)
{
return t2.pow < t1.pow;
}
};
Can anyone tell me what's wrong?
A: The stan... | |
doc_8537 | Update 1: added code to clear up things
<input type="text"
mdInput
[(ngModel)]="item.Price"
appMyPriceFormatter
placeholder="Price"
tabindex="5"
[disabled]="disableInputs">
Directive code:
import {Directive, ElementRe... | |
doc_8538 | So far I have the idea of how to sort the array, however I am struggling to overcome the fact that the input array is defined as constant. I cannot (or I don't know) how to create an auxiliary array with the content of the input one, so that I can sort this auxiliary one and then assign to the output array pAddrResultA... | |
doc_8539 | I want to update a widget more often than every 30 minutes (the minimum of the updatePeriodMillis attribute).
I know I should use AlarmManager for this, but all examples I've seen use the AlarmManager to call a Service that updates the widget. Why can it not call the AppWidgetProvider's onUpdate() method? If a second c... | |
doc_8540 | What may be the cause of this kind of deviation from few milliseconds to 30 or more seconds. And how to improve it.
The site is build upon ASP.net MVC3 and Microsoft SQL Server database.
A: What patterns are there i.e. are the same URLs always slow, and other URLs always fast, or does it just appear to be random?
Look... | |
doc_8541 | {
_id: objectID('593f8c591aa95154cfebe612'),
name: 'test'
businesses: [
{
_id: objectID('5967bd5f1aa9515fd9cdc87f'),
likes: [objectID('595796811aa9514c862033a1'), objectID('593f8c591ba95154cfebe790')]
}
{
_id: objectID('59579ff91aa9514f600cbba6'),
likes: [objectID('693f8c554aa95154cfebe146')]
}
]
}
How c... | |
doc_8542 | Using the example code from: http://docs.whmcs.com/API:JSON_Sample_Code
// The fully qualified URL to your WHMCS installation root directory
$whmcsUrl = "https://www.yourdomain.com/billing/";
// Admin username and password
$username = "Admin";
$password = "password123";
// Set post values
$postfields = array(
'us... | |
doc_8543 | // users
+----+-------+-----------------------+--------+
| id | name | email | active |
+----+-------+-----------------------+--------+
| 1 | peter | peter12@hotmail.com | NULL |
| 2 | jack | most_wanted@gmail.com | NULL |
| 3 | john | john_20016@yahoo.com | NULL |
+----+-------+--------... | |
doc_8544 | I have Xdebug configured in a container with PHP. Here is what appears in my php.ini from within this container :
xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.idekey=PHPSTORM
xdebug.remote_port=9000
xdebug.remote_host=10.0.75.1
# xdebug.remote_connect_back=1
My Windows IP as seen by docker seems to be 10... | |
doc_8545 |
"Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a
previous cell. Please review the code in the cell(s) to identify a
possible cause of the failure. Click here for more info. View Jupyter
log for further details."
Why is this ha... | |
doc_8546 | click on 'Print' button in JSF2 and open a pdf file for printing with the data from the xhtml page.
The below code opens a blank pdf file with no data. I want pdf to display data from xhtml page (URL)
JSF code:
JSF has some fields to display data
<h:commandButton id="printButton" value="Print" actionListener="#{myBean.... | |
doc_8547 | I want to read a log file in each line is a sequence number. Now I'd like to get all lines that have seq.no. greater or equal than $low = 111 and less or eqal than $high = 123 - can I do that with a Where-Object:
$LogEntries = Get-Content -Path $LogFile | Where-Object {
$f = $_ -maltch 'EntryNo=(\d+)\D'
... | |
doc_8548 | public void doPost(){
String batchId = Utility.getBatchId();
Post post = new Post(batchId, userId, message);
String postJson = Utility.toJson(post);
Chat.sendPost(url,postJson)
}
Unit testcase code for above method :
mockStatic(Utility.class);
... | |
doc_8549 | For example, these two lines
DIM a AS SINGLE
DIM d2 AS SINGLE
DIM e2 AS SINGLE
a = 32.174
d2 = 1! / (2! * 32.174 * 144!)
e2 = 1! / (2! * a! * 144!)
d2 becomes 1.07920125E-4 (floating point 0x38e2532d)
e2 becomes 1.0792013E-4 (floating point 0x38e2532e)
which are ever so slightly different. Can anyone help me unders... | |
doc_8550 | However, when trying to use the native SDK, there's a 2 year old bug that prevents it due to serialization errors[4].
What's the best way to use Gremlin & Python with CosmosDB? Should I give up on Gremlin altogether - and if so, what's the alternative solution?
[1]
https://learn.microsoft.com/en-us/samples/azure-s... | |
doc_8551 | I went to Environment -> Fonts and Colors. No matter what I change for the C++ fonts, these ones are always white. What display item should I be clicking to change them back to blue?
A: You can change the color for these keywords by going to
Tools -> Options.. -> Environment -> Fonts and Colors -> C++ Keyword - Contro... | |
doc_8552 | server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location /graphql/ {
proxy_pass http://localhost:18000/graphql;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/sha... | |
doc_8553 | define( {
setup() {
return { field: "empty" };
},
action( param /* { field: string } */ ) {
}
} )
edit: example ts playground
I've reduced the code as much as possible, but since I'm not sure if the part other than define can be improved, I've released the rest.
type DefinePluginOption<D> = {
... | |
doc_8554 | set.seed (12)
library(ggplot2)
dat = data.frame(a=runif(40,0,1),b=c('a','b','c','d','e'),c=c('Hi','Hello'))
ggplot(dat,aes(x=b,y=a,shape=factor(c))) + stat_summary(fun.data=mean_cl_normal)
The graph it creates has error bars that overlap so that it is hard to distinguish the limits. I've often seen graphs where the di... | |
doc_8555 | #icons {
position:fixed;
bottom:0;
}
I could always manually place them, but this means they cant be fixed like I need them too, and I would have to declare it for different browsers. Help?
Link to website: Roseannebarr.tumblr.com
Here is an example of my HTML
<div id="outer">
{block:Photo}
<img id="block" src="http:/... | |
doc_8556 |
A: In Google Cloud there are three types of credentials:
*
*API Keys.
*Service Account Credentials.
*User Credentials (OAuth 2.0).
API Keys do not apply to your use case. These credentials are used for Google services that do not require identity.
The example code that you are referencing uses (requires) Servic... | |
doc_8557 |
Unexpected element "Subdivision". The content of the parent element type must match "(Subdivision)".
I'm not sure what's causing the first one to work and the second one to error, I'm probably missing something but I can't figure out what it is.
Here's the XML code in question, somewhat trimmed:
<?xml version="1.0" e... | |
doc_8558 |
So I'm trying to change a single cell in an dataframe but by using set_value I can't use the position and need to use the index and if I got two equal indexes it will change both.
How can I change a single cell avoiding this?
Thank you,
A: To set by position, use .iloc, e.g.
df.iloc[0,0] = 2.
This modifies your dat... | |
doc_8559 | set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
# bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
Any ideas what I can do to change this? I'm running Linux Mint 19.3 Tricia.
A: wa... | |
doc_8560 | .PHONY: image-build
image-build: Dockerfile
docker build --tag foobar --file $< .
.PHONY: image-tag
image-tag: image-build
docker tag foobar foobar:latest
.PHONY: image-push
image-push:
docker push foobar:latest
I don't always want to run image-tag before image-push. However, if I do happen to run them t... | |
doc_8561 | Here is my code on the index.html
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inli... | |
doc_8562 | restarted wamp and updated with php laravel, but it keeps loading my stuff from a couple of days ago?
What am I doing wrong here?
A: Run composer dump-autoload
It regenerates the list of all classes that need to be included in the project.
This sort of problem caught me out early on when I added classes into my lara... | |
doc_8563 | create table Leave(
leaveId int primary key, noOfDays int, approverId varchar(50), requestorId varchar(50),
Foreign key (approverId) References Approver (approverId),
Foreign key(requestorId) References Requestor(requestorId)
);
These are the 2 tables create before creating leave table:
*
*create table Approver(a... | |
doc_8564 | class Super(object):
def method(self, x, y):
v = x + y
return v
class Sub1(Super):
def method(self, x, y):
v = x + y + 10 # the calcs are irrelevant, not a reliable way to determine if inherited
return v
class Sub2(Super):
def ownMethod(self):
return 'something'
Would there be anything dist... | |
doc_8565 | I don't know how many devices I'll have entered into mapList, so I need to get the length of the array, but I can't. Online in examples, codepens, jsfiddles, and the likes, I see similar code, which works correctly. I don't understand what I'm doing wrong.
Can someone explain why the length of it isn't incrementing wit... | |
doc_8566 | UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8))
Need help for creating function analogue.
A: There's no easy way to implement this behaviour in PHP as nameUUIDFromBytes relies on a 64-bit twos compliment integer for all its bitwise arithmetic, however PHP's integer are limited to the number... | |
doc_8567 | {
int index = 0;
boolean found = false;
while (index < accounts.size() && !found)
{
if ( accounts.get(index).getAccountNumber().equals(accountNumber))
{
found = true;
accounts.remove(accountNumber);
}
else
index++;
}
if (found =... | |
doc_8568 | <html>
<body>
<t
//List here
<tr>
<table>
<td>
so I want it to apear under the currently word that I am typing or even get the value of this word to put it in combobox and show the suggested words.
A: I still don't know the specifics of what you want, but here's something you could do:
1) Add a tooltip to the form.
2... | |
doc_8569 | class A {
};
class B {
};
class C : public A, public B {
};
When an instance of C is to be destroyed, in which order are the base classes A and B destroyed? Are there any rules for this?
A: There are rules (C++11 §12.4):
After executing the body of the destructor and destroying any automatic objects allocated within... | |
doc_8570 | So I want to create a new property to the entity that strips this tags and then search in DB with:
*
*In The Entity:
/**
* @var string
*/
private $full_description;
public function __construct()
{
$question_description = strip_tags($this->getQuestionDescription());
$probl... | |
doc_8571 | I want to insert images from a custom media manager (already implemented) at the cursor position inside the current editable region, just like the default image tool would do.
I have tried to follow the tutorials on developing my own tools, but my not so good knowledge of Coffee Script and JavaScript are holding me bac... | |
doc_8572 | Thanks.
CODE:
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Task 3</h1>
<p>This is my Traffic Light script</p>
<img id="light" src="./assets/red.jpg">
<button type="button" onclick="changeLights()">Change Lights</button>
<script>
var list = [
"./assets/red.jpg",
"./assets/redamber.jpg",
"./assets/green.... | |
doc_8573 | var a = function () {
};
var b = new String("test");
var c = {};
console.log(a.hasOwnProperty("prototype"));//true
console.log(b.hasOwnProperty("prototype"));//false
console.log(c.hasOwnProperty("prototype"));//false
console.log(a.hasOwnProperty("constructor"));//false
console.log(b... | |
doc_8574 | I have a table with all my customers. Its showing their name, postcode etc. But I also want to show the amount of open orders in the same table.
I got these tables mysql tables:
TABLE 1
Tablename: customer
Columns: customer_ID, postcode, customer_since, customer_name
TABLE 2
Tablename: status
Columsn: status_ID, status... | |
doc_8575 | class CustomPostForm(forms.ModelForm):
class Meta:
model = Post
fields = ['title', 'slug', 'lead', 'body', 'status', 'is_featured']
widgets = {'title': forms.TextInput(attrs={'dir': 'rtl'})}
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
form = CustomPostForm
This works fine... | |
doc_8576 | list = [{'title': u'Politics', 'id': 1L, 'title_url': u'Politics'},
{'id': 3L, 'title_url': u'Test', 'title': u'Test'}]
I'd like to remove the list item with title = 'Test'
What is the best way to do this given that the order of the key/value pairs change?
Thanks.
A: [i for i in lst if i['title']!= u'Test'... | |
doc_8577 | Original Table:
+---------+------+------+------+
| orderid | qty1 | qty2 | qty3 |
+---------+------+------+------+
| 1234 | 5 | 6 | 7 |
+---------+------+------+------+
I want to split to :
+---------+------+------+------+
| orderid | qty1 | qty2 | qty3 |
+---------+------+------+------+
| 1234 | 5 |... | |
doc_8578 | The issue I am having is reconciling the different lengths of Product Titles and descriptions being added to the site.
http://frnsh.co.uk is the site and can see the examples on the main page.
Took a look at the truncate method but it didn't seem to work for me.
What is the best way to deal with this problem?
A: I t... | |
doc_8579 | So, I want to active view from a viewport on sheet by user select and do some thing then deactive this view
And with any active view, how to know it is a viewport name on sheet.
Thank you for your helps
Ps.My English is not good.
A: The UIDocument.ActiveView property enables both getting and setting the current act... | |
doc_8580 | I am fairly sure my connection string is correct because I connected using sqlplus and am able to retrieve data. The server is an Amazon Linux server, however I have also tried to connect using a different server and get the error:
Is there any more set up that I need to do in either the server or the database server,... | |
doc_8581 | My model looks like this
protocol Commandable: Equatable {
var condition: Condition? {get set}
func execute() -> SKAction
}
And 3 structs which implement this protocol
struct MoveCommand: Commandable {
var movingVector: CGVector!
//MARK: - Commandable
var condition: Condition?
func execute... | |
doc_8582 | The current solution is that a random one is found/updated to be issued=true and sets its id as LAST_INSERTED_ID; then immediately afterwards it makes the select call to find where('id = LAST_INSERTED_ID()') which is unique per connection.
Since we're updating where issued=false to issued=true and [last inserted], tha... | |
doc_8583 | I tried passing the corresponding user's document reference by setting bundle arguments as shown below, but that didn't work. Please help, any hint/suggestion would be appreciated.
My Main Activity section:
auth = FirebaseAuth.getInstance();
//final FirebaseUser user = FirebaseAuth.getInstance().get... | |
doc_8584 | <input type="hidden" id="gclid_field" name="gclid_field" value="">
In order to capture the GCLID, I have the following Javascript below to pass the value of the function to the value of the hidden field:
function getParam(p) {
var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search);
return match &&... | |
doc_8585 | This is my method in C#.
[HttpPost]
[Route("ResetPassword")]
private void ResetPassword(Player player){
{
Javascript:
const continueBtn = document.getElementById("continueBtn");
continueBtn.onclick = () => {
const email = document.getElementById("lblEmail").innerHTML;
sendResetEmail(email);
}
async fu... | |
doc_8586 | wordsArray= [[NSMutableArray alloc] init];
A: You can try:
[wordsArray objectAtIndex:arc4random_uniform([wordsArray count])];
provided that the array is not empty.
Updated: use arc4random_uniform() for better stability. (Thanks Richard)
| |
doc_8587 | The messages:
{"product": {"name": "iphone", "active": True}}
{"price": {"amount": 100}}
{"product": {"name": "iphone", "active": True}}
When processing the messages I need to generate an error saying that the "product was already activated", I've tried to use the Singleton pattern but I don't think that it will work ... | |
doc_8588 | on interval of time.
CREATE TABLE R
(
OID_R NUMBER NOT NULL,
Price INTEGER NOT NULL,
f DATE NOT NULL,
HourStart DATE NOT NULL,
HuorFin DATE NOT NULL,
OID_E NUMBER ,
OID_S NUMBER ,
OID_P NUMBER NOT NULL
);
CREATE OR REPLACE TRIGGER TR_D
BEFOR... | |
doc_8589 | import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.core.StandardServer;
import org.apache.catalina.core.AprLifecycleListener;
import org.apache.catalina.LifecycleException;
import javax.servlet.ServletException;
public class EmbeddedTomcat {
private Tomcat tomcat;
private void startTomcat() t... | |
doc_8590 | below is the code.
var mssql = require('mssql');
var resultData='';
function getStyleData(){
var msSqlSettings = {
server : 'localhost',
port : '51663',
user : 'sa',
password : 'admin1234',
database : 'ComWriter.Temp002'
};
mssql.close();
mssql.connect(msSqlSe... | |
doc_8591 | See the code below.
Extension:
public class AffEngpdfExtension
{
public ID callersId;
private String transferUrl;
public String recipientEmail { get; set; }
public String ccEmail { get; set; }
public String bccEmail { get; set; }
public String subjectEmail { get; set; }
public String bodyEmail { get; set; }
public St... | |
doc_8592 | The problem is with the IF in there. Can you help?
Error
/* SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF FIND_IN_SET (10,vals) THEN
'Grey Link'
ELSE
SET ret_val = 'B... | |
doc_8593 | Expected O/P: 2 3 4
O/P getting: 2 3 4 0 5
import java.util.Scanner;
public class SinglyLinkedList {
SinglyLinkedList next,head,ptr;
int v;
void headcre()
{
head=new SinglyLinkedList();
ptr=head;
}
void linkcre(int n)
{
Scanner sc=new Scanner(System.i... | |
doc_8594 | struct Foo(T)
{
align(8) void[T.sizeof] data;
}
but
static assert(Foo!(int).data.alignof == 8);
fails, telling me the alignment is still 1 instead of 8.
Why is this, and how do I fix it, so that it works for any arbitrary alignment that is a power of 2 (not just 8)?
A: Browsing the DMD source, it looks like alig... | |
doc_8595 | Assuming the feed description in is in a variable such as "Sdescription".
CLARIFICATIONS: I've used an xml parser, the string for the description tag just has multiple images, all I need to know is how to remove all images from a string except the first one.
A: I don't think a regex is necessarily what you want. I'd p... | |
doc_8596 | Thanks in advance for anything!
A: Most of these tools are signature based with some additional heuristics in place. Same goes for detecting compilers (by detecting compiler startup code and other signatures). It's even easier to detect compiler then protectors since most protectors are morphing the part of code that ... | |
doc_8597 | 1. I have problem to find a way going one step back in 'do, while loop' if user do not enter correct command into console.
2. After doing that, I want to use Users input in switch loop, so the chosen command can be processed, but I am not sure what to put into brackets as a variable to test, because it does not recog... | |
doc_8598 |
A: The Java character classes do something like what you are looking for. They are the ones that start with \p here.
A: Python regexes offer limited support for Unicode features. Java is better, particularly Java 7.
Java supports Unicode categories. E.g., \p{L} (and its shorthand, \pL) matches any letter in any langu... | |
doc_8599 | Question 1
Should MyContext inherit System.Data.Entity.DbContext or Microsoft.Data.Entity.DbContext?
Question 2
Which of these would be the correct way of setting it up as a service, so that it can be injected in constructors?
private const string ConString = "myConnectionString";
public void ConfigureServices(IService... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.