id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_13200 | How can I make it seamless and easy to configure. When on Test environment, I want to return different urls as compared to dev environment.
struct URLConfigurations {
static var loginURL: URL {
// get the environment
let environment = ProcessInfo.processInfo.environment["ENV"]
... | |
doc_13201 | I have a TLabel on Form1 which an onclick event which calls Form2.show;
What I am trying to do, if figure out how I can make form2 show 5px below the label centered between the label :) Form2 is small and just shows some options.
I can use the mouse position but it's not quite good enough.
I was thinking something like... | |
doc_13202 | In the search page, there is a form that is set to POST. There are many hidden fields and other fields I don't want in the URL. So, I don't want to do a GET.
I do want the search query in the URL. So after clicking the search button, the resulting search results page needs to have a URL like /search?query=hello
To ge... | |
doc_13203 | It gives an incorrect extension type (xlsx) and says it may be corrupted.
There is no whitespace before my <?php tag and there is no closing tag at all. No changes have been made to the file and the downloads were working otherwise. Is there a reason this would occur now? Is it possible it has to do with the output buf... | |
doc_13204 |
A: Deploy Flink on K8s uses the Standalone mode, you just need to add HA config to your flink-conf.yaml:
high-availability: zookeeper
high-availability.zookeeper.quorum: localhost:2181
high-availability.zookeeper.path.root: /flink
high-availability.cluster-id: /cluster_one # important: customize per cluster
high-avail... | |
doc_13205 | System.Data.SqlClient.SqlConnection.ClearPool(connection);
Even OleDbConnection has (or had) a method: ReleaseObjectPool(), that seemed to do about the same thing.
But I am using the base DbConnection and I cannot find an equivalent way to free connections/resources. Is there a way?
A: There is no provider-agnostic... | |
doc_13206 | Here's my code:
$result=mysql_query("SELECT * from inventory order by item_name");
$ctr=0;
while($inventory=mysql_fetch_array($result))
{
$print=$inventory['item_name'];
$cquantity=$inventory['quantity'];
$selected=array();
$selected[$ctr]=$print;
?>
<option value="<?php echo "$selected[$ctr]";?>"> <?php echo $print... | |
doc_13207 |
And also I want to achieve this task so if there is any alternative way please tell me
A: So I figured it out we can simple add this code in LineChartData to remove these titles data:
titlesData: FlTitlesData(
show: false,
),// to disable all tiles in graph
you can also disable required t... | |
doc_13208 | Error : Invalid template interpolation value
Cannot include the given value in a string template: string required.
here is the code:
locals{
lambda = [
{
function_name = "lambda1"
title = "Error"
},
{
function_name = "lambda1"
title = "Error1" ... | |
doc_13209 | def before_action
if session[:expires_at].nil?
logger.info "Operation is legal"
session[:expires_at] = Time.current + 3.seconds
elsif Time.current > session[:expires_at].to_time
logger.info "Operation is legal"
session[:expires_at] = Time.current + 3.seconds
else
logger.in... | |
doc_13210 | Profile:
ID NAME
---------
1 COMP
2 SEGM
3 PERS
Category:
ID NAME
---------
1 NEWS
2 IMGS
3 PEPL
Content:
ID NAME IDCAT
---------------
1 HI 1
2 CAT 2
3 DOG 2
4 MAN 3
5 TUT 2
Access:
ID IDCONT IDPRF
--------------
1 3 1
2 5 2
3 3 2
4 2 2
5 ... | |
doc_13211 | But TurboPower LockBox 3 has some interoperability issues.
Please check the post by LockBox 3 author here for details :
http://lockbox.seanbdurkin.id.au/tiki-view_forum_thread.php?comments_parentId=363&topics_offset=1
And a similar post on Stackoverflow
Secure keypair encryption solution in Delphi & PHP?
In LockBox 3,... | |
doc_13212 | I know that it it theoretically possible with a simple iframe, but that would result in CORS errors on almost any page. Are there any working options or is a browser feature only possible within a real nativ Andoird / iOS app?
Many thanks in advance!
Jil
A: With Expo (React Native), you can use the Web Browser compone... | |
doc_13213 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(giveApples());
function giveApples() {
$("#appleTree").html("apples");
}
</script>
</head>... | |
doc_13214 | Example: i want to match below lines
private List<String> test;
private HashMap<String, HashMap<String, String>> test1;
I am trying the Pattern
(private|public|protected) [A-Za-z]{1,}<([A-Za-z]* *\W*[A-Za-z]\W*)> *[A-za-z]*;
| |
doc_13215 | Using react-native-push-notifications.
| |
doc_13216 | Now I'm adding cell with this:
$objPHPExcel->setActiveSheetIndex(0)->setCellValue("A1", $text);
Found this, but doesn't work:
$RichText = new PHPExcel_RichText();
Probably it something easy, just I didn't find.
A: Take a look at section 4.6.37 of the developer documentation describing rich text, and also the 05featu... | |
doc_13217 | How can I hide the characters as user gives input?
I am not using a PasswordBox because the defined InputScope is "Number" which is not possible in a PasswordBox.
While searching for a solution on the internet I found the only way by customizing the TextBox with the help of an UserControl.
Is there any easier way ... | |
doc_13218 | See my code below:
'''
hosts: all
gather_facts: false
vars:
port_list: []
vars_prompt:
- name: SwitchPort
prompt: "Please enter port name(format e.g, Ethernet1/1,Ethernet2/1)"
tasks:
- name: add port items to port_list
set_fact:
p... | |
doc_13219 | services:
app1:
(...)
networks:
- my_network
db:
(...)
networks:
- my_network
networks:
my_network:
name: my_network
And docker-compose2.yml
services:
app2:
(...)
networks:
- my_network
db:
container_name: "db2"
(...)
networks:
my_network:
... | |
doc_13220 | Picture upload to folder on hard disk, but not showing in editor. Console show 404 Error.
Please, give me advice how to fix it?
Thank you!
settings.py
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = STATIC_URL + "grappelli/"
X_FRAME_OPTIONS = 'SAMEORIGIN'
SUMMERNOTE_THEME = ... | |
doc_13221 | tf.random.shuffle()
What is the use of shuffling a tensor in a neural network model ??
A: Off the top of my head, here is an example usage:
Imagine you are passing the validation_split parameter (or similar) to the model. This parameter always splits the data in the same way.
But, if your data is ordered, e.g. by type... | |
doc_13222 | System.Diagnostics.Process.Start("Template.xlt", "Editable=True")
But I don't know the correct switch in Excel. This is the same as right-clicking on an .xlt and choosing "Open", whereas the default action is "New".
Thanks.
A: Process.Start("Excel.exe", @"C:\Users\Master\Desktop\Book1.xltx");
(Looks like in VB you j... | |
doc_13223 | Now I have three different values Finance ,IT,HR .As per my understanding based on different values Cosmos will
create logical partition .In that case we have three partition -Finance ,IT,HR .
I want to create different Azure Function consumer on those three logical partition keys. can you please help if its possib... | |
doc_13224 | My Gemfile is configured thus:
gem 'paperclip', '~> 4.3.0'
gem 'aws-sdk', '< 2'
I've googled the problem and I'm sure the bucket and required keys are configured as they should be. Below is the error message.
2015-10-10T15:42:22.470342+00:00 app[web.1]: (1.4ms) BEGIN
2015-10-10T15:42:22.538108+00:00 app[web.1]: ... | |
doc_13225 | # bitrate, width, and height, you may want to change this
BR=512k
WIDTH=432
HEIGHT=240
input=${1}
# strip off the file extension
output=$(echo ${input} | sed 's/\..*//' )
# works for most videos
ffmpeg -y -i ${input} -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -s ${WIDTH}x${HEIGHT} -vcodec libx264 -b ${BR} -flags ... | |
doc_13226 | In both projects I have links where I call other project like
<ul class="dropdown-menu" role="menu">
<li><a href="http://localhost:8001/Myprofile">My profile</a></li>
<li class="divider"></li>
<li><a href="http://localhost:8001/MyProjects">My projects</a></li>
<li class="divider"></li>
<li><a href="http://lo... | |
doc_13227 | I am using a MVC pattern and also have separate file for routes.
I am trying me make a Controller class, in which a method calls another method declared within it. But I cannot seem to be able to do this. I get "Cannot read property '' of undefined".
index.js file
let express = require('express');
let app = express();... | |
doc_13228 | public class Deepcloning implements Cloneable
{
public Shallowcloning shallowcopy;
public Deepcloning() {
}
public Shallowcloning getShallowcopy() {
return shallowcopy;
}
public void setShallowcopy(Shallowcloning shallowcopy) {
this.shallowcopy = shallowcopy;
}
public Str... | |
doc_13229 | tz = pytz.timezone('Asia/Taipei')
dt = datetime.datetime.now()
loc_dt = tz.localize(dt)
Try A:
loc_dt.isoformat()
>> '2015-09-17T10:46:15.767000+08:00'
Try B:
loc_dt.strftime("%Y-%m-%dT%H:%M:%S%z")
>> '2015-09-17T10:46:15+0800'
The latter one is almost perfect except it's missing the colon in the timezone part. How ... | |
doc_13230 | THIS IS MY CLASS OBJECT
class Knjiga
{
public string Naslov;
public string Avtor;
public int StStrani;
public int LetoIzdaje;
public bool NaVoljo;
public Knjiga(string aNaslov, string aAvtor, int aStStrani, int aLetoIzdaje, bool aNavoljo)
{
Naslov = aNaslov;
Avtor = aAvtor;... | |
doc_13231 | For example, index.html on server contains
<input type="number" name="userChunkSize" value="1024">
Here, I don't want to send the value statically harcoded in index.html, but instead this value should be read from an ini file having the below lines, located at the same place in server as index.html
[index.html]
value... | |
doc_13232 | const { data: entities, isFetching: isEntitiesLoading } = useGetEntitiesQuery();
const { data: systems, isFetching: isSystemsLoading } = useGetSystemsQuery();
const filteredSystems = useMemo(() => {
if (!entities || !systems) return [];
const activeSystemIds = [
...new Set((entities || [])?.map(ite... | |
doc_13233 | Container id: container_1422288303092_0045_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
at org.apache.hadoop.util.Shell.run(Shell.java:455)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:702... | |
doc_13234 | Here is attached example
Here we can see box 3,4 is overlapping, 10,11 is overlapping and box 7 is inside box 6. So I want to remove box which are 80% overlapping or 80% inside other box.
Here are the coordinates
boxes=[(0, (156.52566528320312, 411.3934326171875, 508.0946350097656, 445.0401611328125)),
(1, (153.34573... | |
doc_13235 | Interestingly, if you resize the broswer window at all, the background snaps into proper place (not the bullets are in a fixed width container so I am not resizing the bullets here). If I comment out the PIE.htc line in my CSS the bullet shows up properly, but I need the rounded corners. See this image.
Relevant code... | |
doc_13236 | For example:
<spinner small> would produce a spinner of size 50px x 50px
<spinner large> would produce a spinner of size 300px x 300px
Is there any way in which this can be done?
So far, I have a standard spinner with code:
component.html
<div class="loader middle"></div>
component.css
.loader {
border: 16px solid... | |
doc_13237 | <mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<bean class="com.redhat.obpa.controller.interceptor.CORSInterceptor">
</bean>
</mvc:interceptor>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<!-- <mvc:exclude-mapping path="/**"/> -->
<mvc:exclude-... | |
doc_13238 | Or can I get a allocated chunks list?
A: gdb itself doesn't have any special knowledge of whatever allocators your program might be using. So, there is no gdb command to get this information.
For glibc in particular, you can install the gdb-heap extension. This is a set of Python scripts that add some commands to gd... | |
doc_13239 |
*
*When i run application using FinderSync Extension (like DemoFinderSync) look at the blue popup in the below image, in that case Extension is added in the System Preference with Check mark and called that principal class "FinderSync.m" as well.
*When i run application using my Application Scheme (like DemoAp... | |
doc_13240 | When the AJAX request is received by the server, the process on the server loads the HTML in WordPress and builds a hierarchy of WordPress Pages similar to the hierarchy of paragraphs in the Word document.
Everything works fine with a document of 1 or 3 pages, but with documents of more than 10 pages, I always get an e... | |
doc_13241 | I am implementing an ExapndableListView, the first group has children to have a layout consisting of those 3 : TextView, ImageView, ImageView.
now, when a child is clicked i set the visibility of one of the two imageviews using v.findViewById().setVisibility(), and its working good as i imagined. The problem is when t... | |
doc_13242 | Example:
function makeRequest(body): Observable<any> {
return someAsyncRequest(body);
}
array.forEach((entry) => {
makeRequest(entry);
});
// This is just an example how the setup is. This code does not work.
// What I need is a queue like feature in RxJs to append requests and wait before the previous one is... | |
doc_13243 | But with buttons on each side. So here is my html
<div class="flip-container">
<div class="flip">
<div class="side front">
<p>front</p>
<button class="front-flip-button">flip</button>
</div>
<div class="side back">
<p>back</p>
<button class="ba... | |
doc_13244 | My request look like:
GET /test?id=ID-12
I get the 403 error with message like:
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
The Canonical String for this request should have been
'GET
... | |
doc_13245 | since the asterisks are not letters or digits, I am unsure on how to search for these delimiters properly.
This is my SQL so far:
select
regexp_extract(col_name, '(~FC\\*).*(\\*Y~)', 1) as "pattern_found"
from db.table
where id = 123456789
limit 1
data returned:
pattern_found
--------------
~FC*
(~FC\\*) in Impa... | |
doc_13246 | How can I use my RefineByBasicTaskType class for multiple types?
public class RefineByBasicTaskType<T> extends AbstractRefinement<T> {
private BasicTaskType basicTaskType;
public Predicate addCriteriaQuery(CriteriaQuery<T> criteria, CriteriaBuilder builder, Root<T> taskRoot) {
if (T instanceof Task) {
... | |
doc_13247 |
*
*My model is "Customer" entity POJO.
*I have got a DAO object "CustomerDAO", its method "saveCustomer(c)" contains the code interacting with Hibernate;
*Then I created a "CustomerService with a "saveCustomer(c)" method who simply pass the customer object to the dao for saving;
*Finally there are "CustomerContr... | |
doc_13248 | index.php
<img src="get_captcha.php" alt="" id="captcha" />
<br clear="all" />
<input name="code" class="smoothborder" type="text" id="code" required="required" onblur="checkcode(this.value)">
<div id="wrong" class="error" style="display: none;">Wrong Captcha</div>
</div>
<img src="refresh.jpg" ... | |
doc_13249 | Client ( ID, PhoneNumber, Name, LastName, etc...)
After researching on DynamoDB, I came up with the solution of having a table for the clients and having an index hash key for the ids with a lot of throughput for read and write since querying based on this attribute will be the most common task. Then, I created a glob... | |
doc_13250 | public async Task<SaveStatus> Save(Foo foo,out int param)
{
.......
MySqlParameter prmparamID = new MySqlParameter("pParamID", MySqlDbType.Int32);
prmparamID .Direction = ParameterDirection.Output;
sqlCommand.Parameters.Add(prmparamID);
try
{
await sqlConnection.OpenAsyn... | |
doc_13251 | Here is what I am attempting now - is there a better method?
df_3 = pd.merge(df1, df2, on = ['identifier'], how = 'left', indicator = 'Exist')
df_3['Exist'] = np.where(df_3.Exist == 'both', True, False)
df_3 = df_3[df_3['Exist'] = True]
The problem is, when I filter df_3 on 'True', there are thousands of duplicates, w... | |
doc_13252 | I have tried this loop, but it doesn't work. Does anyone have any solution?
for(i in 1:length(nc)){k <- c(nc[[i]]$filename)}
A: Not sure if it is what you want, but you could append k while using:
k <- append(nc[[i]]$filename)
After you initialized k in your for-loop
| |
doc_13253 | <html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="x-ua-compatible" content="IE=9">
<frameset rows="85,*" frameborder="No" framespacing="0">
<frame name="head" src="menu/head.jsp" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
<frameset cols="190,*">
<frame name="menu" src="menu/menu.j... | |
doc_13254 |
I want to remove the option '_Primary Care' (has option value 1), how do I go about doing this? I can clear all selected options by doing:
$('#categories-ids').val(null).trigger('change');
But I am not sure how to remove just one value.
A: You can use
$("#categories-ids option[value='1']").remove();
A: https://jsf... | |
doc_13255 | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.a... | |
doc_13256 | My string:
var format = 'ASDFG#@!$QWER';
I'm using this code:
format.replace(/[^a-zA-Z0-9 ]/g, ' ')
It replaces single special characters with single space. I want to replace all consecutive special characters with single space.
A: You can use + to indicate one or more or something. So in your case you would use:
... | |
doc_13257 | #include <stdio.h>
#include <stdlib.h>
int main()
{
int i, j;
int *p = (int *)malloc(sizeof(*p));
printf("Hello World! I have created a dynamic array of 20x30 integers! \n");
for (i = 0; i <= 19; i++)
{
p[i] = (int )malloc(sizeof(int*));
printf(" %2d ", i);
for (j = i + 1;... | |
doc_13258 | I needed a pop up calendar and didn't like the javascript based ones I found.
I wrote my own Web User Control thinking that would be best. (I still have some issues with it). I used a textbox, image button and the asp.net calendar control.
The control works reasonably well, but not being an HTML/ASP programmer when I... | |
doc_13259 | This is what i have:
the dates all on column A and Concatenate numbers at number B.
9/10/17 13:30:00 1234,4567,8910
9/11/17 12:34:00 0987,6543,21
what i want to get:
9/10/17 13:30:00 1234
9/10/17 13:30:00 4567
9/10/17 13:30:00 8910
9/11/17 12:34:00 0987
9/11/17 12:34:00 6543
I took my reference f... | |
doc_13260 | Say the file C:\Program Files (x86)\thirdparty\thirdparty.xml contains the line:
False connection: True
How can I change that to:
False Connection: False
A modified version of the xml top lines
I cannot give the actual xml values as they are company controlled
<?xml version="1.0" encoding="UTF-8"?>
<!--Default XML... | |
doc_13261 | I am using this method to list the drafts:
wp.posts().auth().param( 'context', 'edit' ).param( 'status', 'draft' )
But I keep getting this error:
{ code: 'rest_invalid_param',
message: 'Invalid parameter(s): status',
data: { status: 400, params: { status: 'Status is forbidden.' } } }
Here's where I've commented o... | |
doc_13262 | when I click on a button, only the relatives divs should be shown.
The first script i made to make this work, was with one function for each button,
but since I'll have to add a lot more of buttons, I'd like to have only one function, and update it once added a new button.
here's a code similar to that part of the webp... | |
doc_13263 | I'm looking to achieve this:
*
*Arrow position is defaulted to pointing down when page loads (no sort is occurring at this stage)
*Click on Arrow this will point upwards sorting table results as ascending
*Click on Arrow again this will point downwards sorting table results as descending
Right now my code does thi... | |
doc_13264 | AFter creating the directory and cloning the git repository, I need to run ./osx_or_cygin_kick_off to begin the installation process.
This is the error message I am getting:
$ ./osx_or_cygwin_kick_off
./automation/rvm/rvm_install: line 2: $'\r': command not found
./automation/rvm/rvm_install: line 3: syntax err... | |
doc_13265 | <nav mat-tab-nav-bar>
<a mat-tab-link routerLink="">Product Shop</a>
<a mat-tab-link routerLink="Login">User Login</a>
<a mat-tab-link routerLink="Registration">User Registration</a>
</nav>
I can switch between the Tabs and the router link works!
In the registration tab I created a button which should navigate... | |
doc_13266 | I'd like to add an image to each page of the game. For example, this:
const textNodes = [
{
id: 1,
text: 'you walk down the road blah blah',
options: [
{
text: 'Take the goo',
setState: { blueGoo: true },
nextText: 2
},
{
text: 'Leave the goo',
nex... | |
doc_13267 | <div class="form-group">
<label>Movie</label>
@Html.DropDownListFor(m => m.Movies, new MultiSelectList(Model.Movies, "id", "name"), "Select Movie", new { @class = "form-control"})
</div>
Source Code From Google Chrome:
<select class="form-control" id="Movies" name="Movies"><option value="">Select Movie</option... | |
doc_13268 | Lang C++ java python All
Corp Name
ASW ASW 0.0 7.0 8.0 15
Cristiano NaN NaN 8.0 8
Michael NaN 7.0 0 7
Facebook Facebook 8.0 1.0 5.0 14
Piter 8.0 NaN NaN 8
Cristiano N... | |
doc_13269 | How to solve this?
$('#btn_publier').click(function (e) {
var formdata = new FormData(document.getElementById('post'));
var file_data = $('#IMG_CDV').prop('files')[0];
formdata.append('file', file_data);
$.ajax({
url: '../wp-content/plugins/Carnet_voyages/publier.php',
type: 'post',
data: formdata... | |
doc_13270 | SELECT
count(ut.id) AS total
, ( SUM(internal_account) - SUM(( SELECT
SUM( ub.bill_summs )
FROM
u_billing ub
WHERE
ub.bill_types = 'correction'
AND ub.contract_id = ut.contract_id
)) ) AS summ
FROM
u_transactions ut
WHERE
ut.nulled ... | |
doc_13271 | However, on any and all subsequent calls HTTPService does not accurately retrieve the data; rather it always retrieves the first data set. I've confirmed that the web service is providing accurate data, both from web browsers and a ruby ws client script.
My code is below; any ideas on what could be the problem?
private... | |
doc_13272 | Currently I am using an external json file and using get.JSON to call it, but is there a way to include the json data in the same file as the html and javascript and also call it instead of (or in addition to) using get.JSON
A: it's possible
formData = {
param1: "param1"
}
$.ajax({
type: 'GET',
contentType... | |
doc_13273 | [Error: socket hang up] code: 'ECONNRESET'
My code for file sending is,
var http = require('http');
var request = require('request');
var fs= require('fs');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World\n");
}... | |
doc_13274 | Add to the end:
var allStatuses = this.state.statusData;
var newStatuses = allStatuses.concat([data.statuses]);
this.setState({statusData: newStatuses});
What I want to do is change the "concat" to something that will put data.statuses to the front and not the end.
A: If you want to modify the original array, use Arr... | |
doc_13275 | reducer:
import React from 'react'
const reducers=(state={posts:[{}]}, action)=>{
switch(action.type){
case 'post':
return{
...state,
posts: [...state.posts, {content: action.content}]
}
default:
return state
}
}
export default ... | |
doc_13276 | Let M = 1234567890 & N = 2345678901
And answer is : 987654304
Thanks in advance .
A: Reexamining the Problem
Here is a simple solution in Ruby, which inspects each integer from the interval [m,n], determines the string of its digits in the standard base 10 positional system, and counts the occuring 0 digits:
def brute... | |
doc_13277 | Although JIRA supports MantisBT issue migration, it only supports from MantisBT version 1.1.8 onward. And I am stuck!!!
I tried to upgrade MantisBT to latest 1.2.11 (using MySql 5.5) by doing the following steps:
- export my old MantisBT MySQL database into a sql file.
- import this sql file into MySql 5.5
- when I tr... | |
doc_13278 | BufferedReader br = new BufferedReader (new FileReader("medicine.txt"));
while(line= br.readLine() != null) {
System.out.print("line+"br.readLine()):
}
A: Maybe you should split your line with the character ','
while(line = br.readLine() != null) {
String[] splittedLine = line.split(",");
System.out.prin... | |
doc_13279 | > db.User.insert({email: "hell33o@gmail.com", "_id" : BinData(3,"iKyq6FvBCdd54TdxxX0JhA==")})
WriteResult({
"nInserted" : 0,
"writeError" : {
"code" : 11000,
"errmsg" : "E11000 duplicate key error index: placetobe.User.$email_text dup key: { : \"com\", : 0.6666666666666666 }"
}
})
when we have the index creat... | |
doc_13280 | What I loved about it is that I could mark useful locations in the code without the editor forcing me to alter the the structure of the code, e. g. by defining a function.
Is there anything similar in VS code to customize the behaviour of Ctrl+T (Go to symbol in workspace) or Ctrl+Shift+O (Go to symbol in editor) witho... | |
doc_13281 | Note: The ajax call is towards the bottom of the file. I included the entire file in case there were any questions relating to it.
Note 2: I have tried .on('click'..., .onclick, and .click. I have tried using a div to point to the buttons, I have tried using various ways to reference the button, and I have tried prev... | |
doc_13282 |
A: I have found the solution, Sencha Touch inspects the DOM adding the next prefix ".x-ie" to the classes or graphic components like buttons for example, with this code added to the specific styles rules you can be able to customize classes or ID´s for our best friend Internet Explorer automatically.
| |
doc_13283 | var first = paragraph[0].innerHTML = " "
but can't figure out why the following line of code won't make the paragraph disappear:
document.getElementsByClassName("para")[0].innerHTML.style.visibility = "hidden";
A: you don't need innerHTML, use
document.getElementsByClassName('para')[0].style.visibility = 'hidden';
A... | |
doc_13284 | For example, in my schema I have this field:
field :account_status, :integer
So in my functions I want to know the meaning of the integer values 1,2,3 to translate too:
1 = VALID
2 = PENDING_CONFIRMATION
3 = CANCELLED
What options do I have?
The ones I can think of are:
def is_valid?(account)
account.account_status... | |
doc_13285 | I have just installed nginx on to Mac OS X Yosemite and can access the 'Welcome to nginx' screen at localhost:80
I want to be able to set up a local development environment on local.ingledow.co.uk but when I visit that URL, it redirects me to my live site: david.ingledow.co.uk.
I did have a wildcard URL forwarder with ... | |
doc_13286 | ||
doc_13287 | from tqdm.auto import tqdm
import os
from datasets import load_dataset
dataset = load_dataset('oscar', 'unshuffled_deduplicated_ar', split='train[:25%]')
text_data = []
file_count = 0
for sample in tqdm(dataset['train']):
sample = sample['text'].replace('\n', ' ')
text_data.append(sample)
if len(text_dat... | |
doc_13288 | 11-20
9:30-20:00
8-20
7-16,30
9.30-9.50
I wonder if there is any way to convert them all to the format HH.HH-MM-MM.
For example 11-20 should be converted to 11.00-20.00.
A: How about this:
$str = '11-20 9:30-20:00 8-20 7-16,30 9.30-9.50';
$result = preg_replace_callback('~([\d:,.]+)~', function($i) {
$i[1] = str_r... | |
doc_13289 | I've used this code
Change Cart total price in WooCommerce
and customized it with this function:
add_action( 'woocommerce_calculate_totals', 'action_cart_calculate_totals', 10, 1 );
function action_cart_calculate_totals( $cart_object ) {
if ( (is_admin() && ! defined( 'DOING_AJAX')) || WC()->cart->is_empty() )
... | |
doc_13290 |
A: Before v0.14 they were part of main ReactJs file, but as in some cases we may not need both, they separate them and it starts from version 0.14, that way if we need only one of them, our app gonna be smaller due to using only one of those:
var React = require('react'); /* importing react */
var ReactDOM = require(... | |
doc_13291 | How to make this piece of code working?
JsFiddle: http://jsfiddle.net/bartuz/08e0L9j2/2/
It seems example above does work in Firefox only... what about other browsers?
A: This will depend on your web browser. In the latest version of Firefox, it works fine. However, it doesn't work in the latest version of Internet E... | |
doc_13292 | client app installed on windows 10, when one client connection started then seconds client connection Start method goes hang, and if I disconnected one client then seconds one able to connect,
SignalR server have IIS Windows 10 table, Atom Processor.
So is there any connection limit for this and or configuration relat... | |
doc_13293 | views.py
def testing(request):
picture_page = "http://geology.com/world/world-map.gif"
opener1 = urllib2.build_opener()
page1 = opener1.open(picture_page)
my_picture = page1.read()
filename = "my_image" + picture_page[-4:]
fout = open(filename, "wb")
fout.write(my_picture)
fout.close()
myfile = urllib2.urlopen("http://... | |
doc_13294 | I have used Service class for background thread.I have also created a method to change the scene but I am not able to understand where and when to call mehod.
public class MainController implements Initializable {
int responseCodeFromServer;;
// creating background thread
private Service<Void>backgroundThr... | |
doc_13295 | If the key is matched with any buttons in the JPanel, it will print out that key and make that button disabled.
My code is something like:
private void formKeyPressed(java.awt.event.KeyEvent evt) {
Component[] comp = numpanel.getComponents();
for (int i = 0;i<comp.length;i++) {
... | |
doc_13296 | how it looks
Here is how helperText setup:
<TextField
helperText={invalid && error}
/>
After validation, the error message will appears with the help of helperText. Then the textField will be shift up.
Is there any way I can make the error message does not affect the height of the textField?
I am really apprec... | |
doc_13297 |
function getOffsetRect(elem) {
var box = elem.getBoundingClientRect()
var body = document.body
var docElem = document.documentElement
var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop
var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft
var... | |
doc_13298 | How do I express I.e equation 3.1 with Scipy?
A: You have to implement a system ODE function
def sys(t,u):
x,y,z1,z2 = u
v1 = z1/(p1*z2)-1
v2 = 1-y/p6
return p0*v1, p2*(x/p3-1)+p4*v1, p7*z1*v2, (p7-p5*z2/z1)*z2*v2
#integrate to jump
sol1 = solve_ivp(sys,(t0,td),u0,**options)
# implement the jump
x,y,... | |
doc_13299 | //getting a list of names from database
public List<String> populateList(){
List<String> ItemsList = new ArrayList<String>();
DatabaseHelper openHelper = new DatabaseHelper(this);
SQLiteDatabase sqliteDatabase = openHelper.getReadableDatabase();
// We need a a guy to read the database ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.