id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_28000 | This is the array:
let country: string[] = [ 'AR', 'ES'];
This is the object:
let objJson = [
{
"codCountry": "AR",
"desCountry": "ARGENTINA"
},
{
"codCountry": "CO",
"desCountry": "COLOMBIA"
},
{
"codCountry": "ES",
"desCountry": "SPAIN"
}];
This is the loop:
for (let getO of objJ... | |
doc_28001 | Can I access functions within jQuery's document.ready wrapper from an iframe somehow? I know it is a scope issue, but how would I access myFunction if it were within jQuery's document.ready wrapper from a same domain iframe?
Thanks!
A: No, you can't. Just put them outside the local scope of $.ready, preferably namespa... | |
doc_28002 | Old server still runs www.myDomain.com (primary DNS points to 'old' IP)
All web and databases content are already copied to the new server. Web content is in /home/myDomain/public_html
I own myTestDomain.com and set DNS in new server for it (Primary NS in new server).
What's the simplest way to check myDomain.com behav... | |
doc_28003 | for (int i = 0; i < image.getHeight(); i++)
{
for (int j = 0; j < image.getWidth(); j++)
{
pixels[k]=(byte) (image.getPixel(j, i));
pixels2[k]=unsignedToBytes(pixels[k]);
k++;
}
}
... | |
doc_28004 | I have tried X*(X^25) but this does not return the correct value.
If it matters, this is the formula to find inflation, so the actual formula I'm using is:
X*(1.01^25)
*
*X is equal to the amount of money being calculated
*1.01 is equal to 1% inflation
*25 is equal to the number of years, which needs to be 25 in ... | |
doc_28005 | Please see my below SQL query.
SELECT
A.[business_line]
FROM
[EU_OTH_REG].[dbo].[TBL_EU_OTH_TXN_REG_RSDS] A
INNER JOIN
[EU_OTH_REG].[dbo].[TBL_EU_OTH_REG_MST_LOOKUP] B ON B.code = A.product_substance_type
The output to this query is
<collection><object parentid="ce57cc75-3966-478f-bf25-5e3abf716f96" paren... | |
doc_28006 |
mstring: .asciiz "0123456789"
nstring: .asciiz "abcdefghij"
istring: .asciiz "--------------------"
endl: .asciiz "\n"
# i want to print istring=0a1b2c3d4e5f6g7h8i9j
.text
.globl __start
__start:
la $t1, mstring
la $t2, nstring
la $s1, istring
addi $t3,$zero,0 #cou... | |
doc_28007 | $(document).ready(function(){
/* This code is executed after the DOM has been completely loaded */
$(document).ready(function(){
/* This code is executed after the DOM has been completely loaded */
/* The number of event sections / years with events */
var tot=$('.event').length;
$('.... | |
doc_28008 | today
and setTime for 8:00 AM
Example if i want to set snack for 8:00 am
I am try but got 'Invalid Date'
let breakFastFormatedTime: any = new Date();
breakFastFormatedTime = moment().set({"hour": 8, "minute": 0}).format('YYYY-MM-DD hh:mm A');
I am also try with
const day = moment('2020-01-01');
day.set({ hours:... | |
doc_28009 | error
Controller
public class MyController : ControllerBase
{
private readonly IAppAmbientState appAmbientState;
private readonly IMediator _mediator;
public MyController (
IAppAmbientState ambientState,
IMediator mediator
)
{
appAmbientState = ambientState;
_me... | |
doc_28010 | Primary keys must not be changed and they must be unique.
So I added another variable for compare.
And I override isEqual(:) function.
class Model: Object {
@objc dynamic var key = ""
@objc dynamic var id = ""
override static func primaryKey() -> String? {
return "key"
}
override func isEq... | |
doc_28011 | I wanted to use a couple of pages to access the model so the site looked better, so split the controls out onto separate views and added a corresponding viewmodel for each, so my project looks like this
-Model
--CustomerModel
-ViewModel
--CustomerNameVM
--CustomerAddressVM
-View
--CustomerNameView
--CustomerAddressView... | |
doc_28012 | I know you can set up VSTS' policies to trigger a build when there is a pull request but this is useless if you cant specify that the branch the PR is being made from should be the one that would need to be built. (I don't want master to build for example, I want my new code to build).
I know you could set up another "... | |
doc_28013 | a = ["Jake", "John", "Eric"]
b = ["John", "Jill"]
c = set([])
d = set([])
for i in range (len(a)):
c.add(a[i])
for y in range (len(b)):
d.add(b[y])
print c.difference(d)
import sets
e= sets.Set(a)
print e
f = sets.Set(b)
print f
print e.difference(f)
Outcome
set(['Jake', 'Eric'])
Set(['Jake', 'Eric'])
Th... | |
doc_28014 |
A: UIApplication.sharedApplication().openURL(NSURL(string : "tel://9999999999")) will do the trick. I reccommend spending some more time searching next time before you ask a question as this has been asked several times.
| |
doc_28015 | I need to get the IdentityId of the user that has been created, how can I do that?
Here is my code:
'use strict';
var AWS = require('aws-sdk');
var region = 'eu-west-1'
var sqs = new AWS.SQS({region : region});
var s3 = new AWS.S3({region : region});
var util = require('util');
let awsAccountId = 'xx';
let queueName = ... | |
doc_28016 | .exec(ws("1").sendText("1").check("..."))
.exec(ws("2").sendText("2").check("..."))
.exec(ws("3").sendText("3").check("..."))
The problem with that is that the checks arrive at different times and they cause test failures. Using a blocking check via wsAwait is not possible because of the requirements.
What I would li... | |
doc_28017 | I recently started to create my production environment for the LDAP server. The production server is running in Atlantic.net Cloud environment on a dedicated server. I did the install of DS with no problems. But when I try to start DS I get the following error:
/opt/apacheds-2.0.0-M10/bin/apacheds: 1: eval: /opt/apache... | |
doc_28018 |
*
*Box marked 1/2/3 are images. There could be max 5 images and dimensions are not predictable. They are marked with classes: .img-0; .img-1; .img-2; etc...
I tried with the code below but when viewed on a large viewport the images overlap because they are in the same grid area.
.panel-body {
display: grid;
g... | |
doc_28019 | I am trying to get data from our MYOB file into SQL server. I have found the below code however it won't retrieve any data (I think I need to enter username and password as parameters but I'm not sure how).
Following is my code (with the company file information removed)
Declare @Object as Int;
Declare @ResponseText as... | |
doc_28020 | $result = mysql_query("SELECT * FROM animals WHERE hand= " .$_SESSION['SESS_HAND']. ");
But always shows "Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING"
A: Always escape string variables :
$result = mysql_query("SELECT * FROM animals WHERE hand= '" .
mysql_real_escape_string($_SESSION['... | |
doc_28021 | I have old Code use microsoft.owin.security.jwt And I found Anther code Using system.identitymodel.tokens.jwt I don't know how to choose between the two libraries.
I use:
*
*MVC, framework in 4.5.
*store Token and refresh token in Database
Can anyone please tell me when I use them?
| |
doc_28022 | @RequestMapping(value = "/accountholders/{cardHolderId}/cards/{cardId}", produces = "application/json; charset=utf-8", consumes = "application/json", method = RequestMethod.PUT)
@ResponseBody
public CardVO putCard(@PathVariable("cardHolderId") final String cardHolderId,
@PathVariable("cardId") final String card... | |
doc_28023 | I have one host that sends insane amounts of data (600gb a day), and i want write this logs to multiple files instead of one.
This is because of Splunk that read this file for indexing purposes, cant utilize multiple pipelines (aka. multiple CPU threads) on the same file, and this causes an bottleneck.
I was thinking a... | |
doc_28024 | StartScreen.js
import {signInWithFacebook, FacebookAuthProvider, signInWithPopup} from 'firebase/auth'
import { auth, facebookProvider } from '../firebase'
const signInWithFacebook = () => {
signInWithFacebook(auth, facebookProvider)
.then((re) =>{
console.log(re);
})
.catch((err)=>{
... | |
doc_28025 | Batch file:
"C:\Program Files\R\R-3.2.3\bin\Rscript.exe" CMD BATCH "C:\Users\<my username>\Documents\R\Script Testing\script.R"
pause
R script:
write.csv("hello", "automatic_output.txt")
This script works when I run it in R, but when I try to run the .bat, I get this error:
Fatal error: cannot open file 'CMD': No su... | |
doc_28026 | The issue is, if at any point the application errors, it writes to the laravel.log file and kills the script, as php does.
So for example, I have a custom log library like so
<?php
namespace App\Libraries\Logs;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Log;
class CustomLogsLibrary {
public fun... | |
doc_28027 | The problem is that when I pass the result to a when block it does not match the values even though I believe it should, as when I log the result in the task that creates it, or even assign it to a parameter and log it in downstream tasks it has the expected contents.
Pipeline without the when block executes no problem... | |
doc_28028 | while sending the urlib2 request os is choosing the source ip and port by default,
The requirement is we need to set a different port for each request using urllib2.
please refer to the attached highlighted source port captured from the pcap.
A: Alternatively you can use the requests library
import library
page = requ... | |
doc_28029 | I know how to make the AJAX call and do the append after the object, but what I can't seem to figure out is how to get one ID, run the AJAX call, and once that's done move on to the next ID, and repeat until there is no more left.
Here's a sample of my HTML:
<select id="thingsList">
<optgroup label="Name1">
... | |
doc_28030 |
A: You can configure an AWS lambda function using java as its runtime environment to get triggered using AWS SNS. More info can be found here.
A: In general, pub/sub systems always require subscriptions to receive messages.
However, Amazon SNS supports delivering messages to platform application endpoints (for deliv... | |
doc_28031 | I followed the instructions here:
https://www.youtube.com/watch?v=pO5Ry_GLC60&t=582s
Project works when you follow this video.
After the video I used PageFactory.
I'm instead of Abstract class I wrote BasePage class, I made a new class that contains @ Before, @ After and method for webdriver.
When I run the test error ... | |
doc_28032 | https://developer.apple.com/documentation/arkit/arsessionconfiguration/worldalignment
A: ARCore only supports case Gravity. The origin is always the initial position of your device with a left-handed coordinate system as +y is the upwards direction.
You can always create and anchor an object and put all your content ... | |
doc_28033 |
*
*I create a model for each type of entity.
*When I create a new entity, I simply copy the model data.
As a result, the entity creation function has been reduced to this:
def create_entity(self, pos_x, pos_y, obj):
if obj not in self.main.model.model_enemy:
entity = self.main.model.model_enemy["0000"... | |
doc_28034 | This is going to be used in master detail scenarios (or even seach scenarios) where we want immediate loading of first selected item and the last after user stops changing selection.
This would prevent the debounce time to be injected when the user navigates slowly but also prevent bursts of changes.
If debounce operat... | |
doc_28035 | So my workflow to identify that is to check two metrics: up and scrape_samples_scraped
I'm pretty sure, that if that both metrics has value 0 for quite long period, then they really are dead...
So I have write two promql queries:
sum_over_time(up[5d]) == 0
sum_over_time(scrape_samples_scraped[5d]) == 0
I'm not sure if ... | |
doc_28036 | Now I want to move that folder incl. all it's content somewhere else. My code so far:
import time
import datetime
import shutil
ts = time.time()
st = datetime.datetime.fromtimestamp(ts).strftime('%Y%m%d')
def copyDirectory(src, dest):
try:
shutil.copytree(src, dest)
# Directories are the same
exce... | |
doc_28037 | I have the algorithm working in pure C and converted it to CUDA.
The results are fine, and I am now in the process where of optimizing my code.
I profile the time that the kernel takes to get the results back, using a simple
clock_t start, end;
double cpu_time_used;
start = clock();
. . . my memcopies and my kernel ... | |
doc_28038 | This is my current code:
function reverse(str) {
str = str.split("").reverse().join("");
str = str.split(" ").reverse().join(" ");
console.log(str)
};
reverse("This is fun, hopefully.")
The result of the above function is sihT si ,nuf .yllufepoh
while I am trying to to get it like sihT si nuf, yllufepoh.... | |
doc_28039 | Dataset
Here is an exemple of dataset
df = pd.DataFrame(
{'vals': np.where(np.arange(35) < 30, np.arange(35), np.nan)},
index=pd.date_range('2021-01-01', freq='12H', periods=35))
vals
2021-01-01 00:00:00 0.0
2021-01-01 12:00:00 1.0
2021-01-02 00:00:00 2.0
2021-01-02 12:00:00 3.0
2021-01-03 00:00:00... | |
doc_28040 | tagTextS :: IOSArrow XmlTree String
tagTextS = getChildren >>> getText >>> arr stripString
parseDescription :: IOSArrow XmlTree String
parseDescription =
(
deep (isElem >>> hasName "div" >>> hasAttrValue "id" (== "company_about_full_description"))
>>> (arr (\x -> x) /> isElem >>> hasName "p") >. (!! 0) >>> ta... | |
doc_28041 | from sympy.parsing.sympy_parser import parse_expr
print parse_expr('expm1(x)').diff('x')
gives
Derivative(expm1(x), x)
How can I get sympy identifying expm1 as symbolic function, so that I get the same result as
print parse_expr('exp(x) - 1').diff('x')
which gives exp(x)?
A: Since there is no built-in expm1 in SymP... | |
doc_28042 | Now I want a back button to appear - I do not need any customization at present, just the ability to catch the click and default ios look for whatever plaform the app is running (Since Swift that is ios7+).
In viewDidLoad() I have written
outletCatalogNavItem.backBarButtonItem = UIBarButtonItem(title: "test", style .pl... | |
doc_28043 | Thanks.
I tried to alter my model but when I migrated the changes an error occured.
it was a long error but the last line was this.
File "C:\\Users\\ALI SHANAWER.virtualenvs\\PiikFM-App-Backend-O_dKS6jY\\Lib\\site-packages\\MySQLdb\\connections.py", line 254, in query \_mysql.connection.query(self, query) django.db.uti... | |
doc_28044 | latitude = float(input("Enter a latitude between 0(Equator) and 90(Pole)="))
if latitude <= 90 :
def sal_of_seawater(latitude):
salinity = latitude*(-1/45) + 36
return salinity
print(sal_of_seawater)
The output should be a value between 34 and 36 but instead this is outputted
function... | |
doc_28045 | Inside this web control got a Text Box i.e txtName
I add this Web Control into my web page call register.aspx
<%@ Register Src="~/controls/uc_Register.ascx" TagPrefix="ecommmbs" TagName="uc_Register" %>
<hr />
<ecommmbs:uc_SummaryCart runat="server" ID="uc_SummaryCart" />
<hr />
i want to get the value from txtName.tx... | |
doc_28046 | I just want to update the interval of a blinking led in real time, based on the user input. Here is my server code:
const express = require('express');
const bodyParser = require('body-parser');
const five = require('johnny-five');
const app = express();
const board = new five.Board();
app.use(bodyParser.json());
app... | |
doc_28047 | dbo.People
PersonId : int (PK)
FirstName : string
MiddleInitial: string
LastName : string
DateOfBirth: datetime
PaybandId : int (FK)
dbo.Paybands
Id : int (PK)
Name : string
So I've created an ASP.NET Web API service for my backend and using HTML/CSS and AngularJS for my front-end. I'm able to pull, display and edit ... | |
doc_28048 | I plan to use Cursor.observeChanges in order to achieve that. I have two major constraints:
*
*I don't want to publish all the documents fields
*I want to use some of the unpublished fields to create new ones. For example, I have a field item where I store an array of item _id. I don't want to publish it, but I wan... | |
doc_28049 | I'm trying to validate CSV file contents, just to see if it looks like the expected valid CSV data. I'm not trying to validate all possible CSV forms, just that it "looks like" CSV data and isn't binary data, a code file or whatever.
Each line of data comprises comma-separated words, each word comprising a-z, 0-9, and ... | |
doc_28050 | Or also is there any method to access the mediastore data through a database and not with the content provider?
Thank you.
A: But I think that you can use joins with content providers. If you make two queries, you can join them by using CursorJoiner. I am using it and it works good.
Snippet from Android docs:
CursorJo... | |
doc_28051 | Traceback (most recent call last):
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x10945f950>
Traceback (most recent call last):
File "/Users/MAK/Envs/lifemed3/lib/python3.7/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/Users/MAK... | |
doc_28052 | then one of my php page should grab the all the file name in that folder
i have googled but so far the file name returned is only the page the user browsering
thanks
A: There are many ways of retrieving folder content like glob, scandir, DirectoryIterator and RecursiveDirectoryIterator, personaly I would recommend you... | |
doc_28053 | api:
function getRegionsData() {
const header = {
headers: {
"tokenid": localStorage.getItem('token'),
"username": localStorage.getItem('username'),
}
};
const url = baseurl + '/getStatesDistrictsTalukasAndVillages';
con... | |
doc_28054 | when it click it will go home page, mean's start page. I don't want to instantiateViewController. I want fist initialise page will come. how I can do this. I don't want to dismiss page. because it's take many click to go home page
I was try this
self.dismiss(animated: true, completion: {});
self.navigationController... | |
doc_28055 | In this code i attempted this but it is wrong?!
filename = 'UserInfo.txt'
openfile = open(filename, "r")
UserData = openfile.readline()
def displayMenu():
print (UserData)
status = input("Are you a registered user? y/n? ")
if status == "y":
... | |
doc_28056 | SQL Server database should be around 50-70Gb.
There are some examples on internet (script schema) but I didn't find anything concluding about data.
A: You can use my Exportsqlce tool to create .sql files in sqlite format from a SQL Server database. Then run them using sqlite3.exe
Download command line tools from http... | |
doc_28057 | This works as expected if I compile using -O1 or lower; with -O2 or higher, my foreach loop (in main at the bottom) gets completely optimised away and nothing is printed. Why does this happen, what have I done wrong? Here's my code:
template<typename T>
struct _range {
T a;
T b;
_range(T a, T b):
a... | |
doc_28058 | The callback is set after the black fades box so i'm not sure why this is happening. The events are suppose to happen simultaneously. Is my code wrong?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xm... | |
doc_28059 | Any suggestions?
A: You want the diff between the branch and the remote branch:
git diff origin/my-branch my-branch --name-only
(assumes your remote is called origin in this case.)
A: Based on answers to the question mentioned in comments, and git diff docs, the command should be:
$ git diff --name-only @{push}...HE... | |
doc_28060 | $config['full_tag_open'] = '<div class="pagination"> <span class="page_no">Page 1 of 30</span> <ul class="pag_list">';
it work fine but i want to use php code in this in place of page 1 of 30. like this->
$config['uri_segment'] =4;
$config['full_tag_open'] = '<div class="pagination"> <span class="page_no">Page ."$... | |
doc_28061 | AccountNo<-c(11223344,11223344,11223344,1133399,1133399,127788,127788)
transactiondesc<-c("BUY","BUY","SELL","SELL","SELL","BUY","BUY")
I want to the code to see for an account if it has both BUY and SELL (regardless of the number of BUY and SELL)
expected output:
AccountNo<-c(11223344,11223344,11223344,1133399,113339... | |
doc_28062 | i have a class "Customer" (customer.php) which has methods "display_registration_form()" and "add_cutomer()". the method "display_registration_form()" has code for the form to echo in order to display that form.
when user fills and submit that form, i need to send the data to "add_cutomer()" method which has SQL to ad... | |
doc_28063 | I have 3 tables
Workers_Day, Workers_Night, Total
In workers_Day table:
ID, Name, Day_one, Day_two
In workers_Night table:
ID, Name, night_one, night_two
the fields will be filled with 1 or 0 (0 being absent and 1 being working)
and TOTAL
ID, Name, Total_days_working, Total_nights_Working, Total
I want to insert d... | |
doc_28064 | After the upgrade, VS2013 is no longer able to open the project. Is there anyway for me to have VS2013 recognize the project type?
Alternatively, is there a different way to maintain a number of non-compiling assets in a VS2013 project? (These assets could be .PHP/.CSS/.CS/.XML/.HTML/.DLL and other files)
| |
doc_28065 | I have this code in my app which does work looking up data from webserver.
The result shows a count of 100 but the NSMutableArray is nil after [myTable reloadData].
How can I solve it?
Scenario
Page1: a search engine, will pass value to another view
Page2: receive value from [Page1] then pass to instance sendData. Get ... | |
doc_28066 | If I style my tag, of course the thumbnails get the styling too and all of them have similar issues displaying the shadow.
here's the css (apologies if I'm not using this correctly, im new here!)
img {
padding:0px;
margin:0px;
border:medium solid black;
box-shadow: 10px 10px 5px #888;
}
TIA
Rob
A: yo... | |
doc_28067 | Doing something like:
display(df1)
display(df2)
Shows them one below another:
I would like to have a second dataframe on the right of the first one. There is a similar question, but it looks like there a person is satisfied either with merging them in one dataframe of showing the difference between them.
This will n... | |
doc_28068 | System.out.println("Which city would you like to find the weather for?");
try (Scanner s = new Scanner(System.in)) {
city = s.nextLine();
}
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder().uri(URI.create("http://api.openweathermap.org/data/2.5/w... | |
doc_28069 | I currently have this:
data <= "000" & DATA_IN & "00000";
Which works perfectly, but I want to be able to select the place where the data is placed with generics (or maybe in the future dynamically).
I tried:
data <= ((15 - (start_from_output-1)) DOWNTO (15 - (start_from_output-1) - (channels_in_use-1)) ... | |
doc_28070 | Thanks in advance.
public class GUIquery extends JFrame {
JFrame frame;
static JGraph jgraph;
final mxGraph graph = new mxGraph();
final mxGraphComponent graphComponent = new mxGraphComponent(graph);
public GUIquery() {
super("Test");
GraphD();
imgbtn();
}
public v... | |
doc_28071 | Each categorical column should be changed to multiple Boolean columns.
I have a column with categorical values, e.g.:
ID col1
1 A
2 B
3 A
I'm looking for a way to pivot this table, and have an aggregated function telling me whether this ID has value A or B:
Result:
ID col1A col1B
1 1... | |
doc_28072 | DebugInformationFormat="0"
GenerateDebugInformation="FALSE"
Preventing generation of pdbs allows us to increase the parallelization of the CIS compile. However, this method seems hacky and occasionally fails - is there a better method?
The only alternative I can think of is adding a configuration called RELEASE_NOPDB,... | |
doc_28073 | java.lang.ClassCastException: com.example.BellasHBG.LocationService cannot be cast to com.google.android.gms.location.LocationListener
but I don't know how to resolve. Removing keyword abstract does not fix the problem. This is new to me, and I'm not that knowledgeable of java so any help is appreciated. The error s... | |
doc_28074 | as in
@Value("${some.property}")
public void setSomething(String param) {
... do something with param
}
What is that annotation doing there?
A: Basically it tells Spring's AutowiredAnnotationBeanPostProcessor to call the setSomething method with the resolved value of some.property as the argument... but only if... | |
doc_28075 |
The following constraints must hold among the used values of the other properties:
'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' = width of containing block...
..If all of the above have a computed value other than 'auto', the values are said t... | |
doc_28076 | The file will most likely be in use, I just want to be able to find the file and retrieve its name and location to perform a connection.
OpenFileDialog works until I select the file, then it has a popup that says "File in Use". I don't want it to check for that, just return the filename.
A: It seems that setting the ... | |
doc_28077 | *
*Why does emotion-js appear to share the props from seperate component instances?
<Button isDisabled={'true'} />
<Button />
const Button = styled.button`
background-color: ${props => props.isDisabled !== 'true' ? 'green' : 'grey'};
`;
export default (props) => {
return (<Button>Hello</Button>);
}
Expectat... | |
doc_28078 | The onChange handler looks like this:
// First I get the current state
const [persons, setPersons] = useState(service.persons);
The API returns the following for persons (an array of objects):
contacts (2) [{…}, {…}]
0: {person_company: "Google", person_name: "John Doe"}
1: {person_company: "Facebook", person_name: "J... | |
doc_28079 | If this is possible, how would one start to implement the solution using the Python gData library (as a desktop application, not a web app)?
| |
doc_28080 | I'd prefer to be able to deliver a new version of a site without kicking off users - is there a way to minimise the chance that users will get kicked off? [apart from the obvious one of waiting for a time of low-usage]
If I moved from InProc to Session State I guess this might do the trick - but is there any other meth... | |
doc_28081 | App.User.adapter = Ember.CustomAdapter.create();
So if the CustomAdapter's code appears after the above statement I get the [Uncaught TypeError: Cannot call method 'create' of undefined] error.
App.User.adapter = App.CustomAdapter.create();
App.CustomAdapter = Ember.Adapter.extend({
// custom
});
Is there a way ... | |
doc_28082 | and I submit form, i want my drop down list to have selected value,
not to be on default value again.
I try like this, but not working:
<?php echo $form->dropDownList($model, 'code', $countriesIssuedList, array('name'=>'countriesIssued'), $select = array($_POST['countriesIssued']));?>
Also i would like to add a firs... | |
doc_28083 | select NVL2(CRBP.FPDATE(LAM.ACID),
CRBP.FPDATE1(LAM.ACID),
CRBP.ODSANCDATE(GAM.ACID)) from
tbaadm.lam, TBAADM.GAM
where gam.acid = lam.acid
and gam.acid = 'VM12990'
This does not return any value.
But when I execute :
select CRBP.FPDATE (LAM.ACID) from tbaadm.lam where lam.acid = 'VM129... | |
doc_28084 | text= "What recent discussions she has had with the Secretary of State for Work and Pensions on the effect of that Department’s welfare policies on women."
The question is, How to find these Test_wrds in text and bold them in different colours as well as count them how many times Test_wrds appeared in Para. So I am e... | |
doc_28085 |
*
*a pop up which is asking to input number
*when i am typing the number my text box is not visible. - keyboard appearing on screen
*Once i click on Done , my text is appearing. - keyboard closed
pop up i have used is stateless widget.
below is my code .
FocusNode _nodeText1 = FocusNode();
KeyboardActionsCo... | |
doc_28086 | // index.js
const path = require('path')
const express = require('express')
const exphbs = require('express-handlebars')
const port=3000
const ipfilter = require('express-ipfilter').IpFilter
const ips = ['::1','::ffff:127.0.0.1','::ffff:103.146.251.86']
const app = express()
app.use(ipfilter(ips, { mode: 'allow' }))
... | |
doc_28087 | The problem now is with mobile URLs from Google, as you know Blogger gas certain structure for mobile version of pages which adds ?m=0 or ?m=1 to the end of URL, and this gives 404 error inside WordPress now.
For example:
the old URL: http://www.example.com/2017/01/page.html
The new URL: https://example.com/page/
I've ... | |
doc_28088 | const name = {
type: 'String',
regEx: /^[\w\d]+$/,
optional: false
};
const nationalId = {
type: 'String',
regEx: /^[\w\d]+$/,
optional: true
};
schema = new SimpleSchema({
firstName: name,
lastName: name,
nationalId
});
I have tested that the schema works by passing non-String values or leaving o... | |
doc_28089 | How can I make NERDTree update the current file in tree automatically whenever I switch files?
A: This should do it, but be aware that the frequent updates make switching buffers quite slow:
:autocmd BufEnter * if &filetype !=# 'nerdtree' | NERDTreeFind | wincmd p | endif
The conditional avoids triggering a find if t... | |
doc_28090 | One of my functions creates some buttons with given labels, from a list of tags, when I select a cell from a QTableView. But when I select another cell, sometimes the list of the tags is empty (and must be). So I'd like to clear my layout of the old buttons, to display nothing if there is no tag in the list. But here t... | |
doc_28091 |
11-07 22:48:08.376: D/AndroidRuntime(5325): Shutting down VM
11-07 22:48:08.376: W/dalvikvm(5325): threadid=1: thread exiting with uncaught exception (group=0x4162d700)
11-07 22:48:08.384: E/AndroidRuntime(5325): FATAL EXCEPTION: main
11-07 22:48:08.384: E/AndroidRuntime(5325): java.lang.RuntimeException: Unable... | |
doc_28092 | <?xml version="1.0" encoding="utf-8" ?>
<feed xmlns:s="http://feed.example.com/services" xmlns="http://www.w3.org/2005/Atom">
<title type="text">org select - with 'Field' in name</title>
<id>http://feed.example.com/orga/srvic/name/Field</id>
<rights type="text">Copyright 2015</rights>
<updated>2010-05-09</updated> ... | |
doc_28093 | SoftBlink(label, Color.FromArgb(30, 30, 30), Color.Red, 2000, true);
private async void SoftBlink(Control ctrl, Color c1, Color c2, short CycleTime_ms, bool BkClr)
{
var sw = new Stopwatch(); sw.Start();
short halfCycle = (short)Math.Round(CycleTime_ms * 0.5);
while (true)
{
await Task.Delay(1... | |
doc_28094 | http://plnkr.co/edit/jbk3pGr7nfpplEvCKOMx?p=preview
The contenteditable element is not focused. Now the first button sets the caret in the contenteditable element to the end. (The second button focuses the element). In firefox 25, setting the caret does not focus (set active) the element; in Chrome 31 it does. How can ... | |
doc_28095 | STM32F767ZI
nucleo board
(Client) to a desktop computer (Server), using ethernet and lwip with
FreeRTOS
on
STM32CubeIDE.
The nucleo board is connected with ethernet cable to a wired broadband router, to which the desktop computer is also connected.
In a terminal running under Ubuntu, I am sending a ping message as:
$ ... | |
doc_28096 |
This is my expected result table after use pivot function
Thanks for help ^___^
A: I'm not sure why group by got into your mind, but here is a working example of what you are trying to achieve.
select * into #temp from
( values
(1,'A','AV'),
(1,'B','BV'),
(1,'C','CV'),
(2,'A','AV'),
(2,'B','BV'),
(2,'C','CV'... | |
doc_28097 | USER:
| USERID | USERNAME | USERTYPEID |
USERTYPE:
| USERTYPEID | USERTYPENAME |
So clearly USERTYPEID is a foreign key that a user use to refer to usertype. The JAVA implementation is as such:
I have a class User and a class UserType, where looks like:
public class User {
private int id;
private UserType ut;
... | |
doc_28098 | How to show the progress of code in parallel computation in R?
is there a way to get progressbar in doParallel?
Update:
below is a minimal reproducible example
library(foreach)
library(doParallel)
mc <- detectCores()
cl <- makeCluster(mc)
registerDoParallel(cl)
result <- foreach(i = 1:100) %dopar% {
rnorm(10000... | |
doc_28099 | @XmlRootElement(name="foo")
public class Foo {
@XmlElement(name = "id")
private Bar variable;
@XmlElement
private String name;
}
and class Bar
public class Bar {
@XmlElement
private String id;
}
and I want to get an XML file like
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<foo>
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.