id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23518100 | public class WriteToCharBuffer {
public static void main(String[] args) {
String text = "This is the data to write in buffer!\nThis is the second line\nThis is the third line";
OutputStream buffer = writeToCharBuffer(text);
readFromCharBuffer(buffer);
}
public static OutputStream writeToCharBuffer(String dat... | |
doc_23518101 | I found some configuration but still not working for me, do you guys know how to configure it correctly?
I saw this https://serverfault.com/questions/494669/setting-up-a-reverse-proxy-to-cache-images post; however is not clear for me that it will cache only static content, seems that it will cache any 200 response.
Tha... | |
doc_23518102 | for(var i = 1;i<37;i++)
{
Independent_Bet_Shape = new createjs.Shape()
Independent_Bet_Shape.graphics.beginFill("#FFFFFF").drawRect(0,0,Independent_Bet_Width,Independent_Bet_Height);
Independent_Bet_Shape.alpha=0.8
Independent_Bet_Shape.cache(0,0,Independent_Bet_Width,Independent_Bet_Height)
Indepe... | |
doc_23518103 | The background-color property applied is instead, overshadowed by the image. See my code below
.hottest .hottestImage
{
width: 100%;
height: 350px;
}
.hottest .hottestTitle
{
background-color: rgba(54,179,166, 0.6);
width: 100%;
height: 100%;
text-align: center;
margin-... | |
doc_23518104 |
A: Have you tried something like this in your xml (RecyclerView):
android:fadingEdge="vertical|horizontal"
android:fadingEdgeLength="50dp"
android:requiresFadingEdge="vertical|horizontal"
And, you need to remove your bottom margin, otherwise your fading edges wouldn't look as you wish.
A: You can use in RecyclerVi... | |
doc_23518105 | for ex; 5 rows from a query result which has 50 rows
i try like as follows but it errors
select * from (select * from emp where alphabet='A' order by sal desc) order by rand() limit 5;
u can wonder that why he needs sub query, i need 5 different names from a set of top 50 resulted by inner query.
A: SELECT * FROM t
... | |
doc_23518106 | <body><p>Some text <em>before</em> image<img src="" width="" height=""/>some text <b>after</b> image</p></body>
After processing it should look like this:
<body><p>Some text <em>before</em> image</p><img src="" width="" height=""/><p>some text <b>after</b> image</p></body>
How can I add the p elements to the text bef... | |
doc_23518107 | FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add(".jpg");
StorageFile file = await picker.PickSingleFileAsync();
if (file != null)
{
grid.Background = new ImageBrush
{
ImageSource = new BitmapImage(new Uri(file.Path, UriKind.Absolute))
};
}
But, after I pick the image I want... | |
doc_23518108 | I have had a search but I cannot seem to find anything.
A: Yup
@media only screen and (min-device-width : 1025px) and (max-device-width : 1024px) {
/** STYLES FOR SMALLER SCREENS HERE **/
body { padding:0px; }
}
A: Im not sure but I feel like it would come automatically as long as scrolling isn't disabled for ... | |
doc_23518109 | Bellow, my server.js
// Load Node modules
var express = require('express');
const bodyParser = require('body-parser');
const path = require('path');
const ejs = require('ejs');
var falaUser = require("./routes/falaUser");
//Config files
process.env['NODE_CONFIG_DIR'] = __dirname + '/config/';
console.log("Usando "+pro... | |
doc_23518110 | Help Please
#include <iostream>
using namespace std;
struct collegian{
char name[10];
char lastname[15];
int id;
int scores;
int roll;
};
int main(){
struct collegian s[2];
int i;
int j;
cout << "1. Enter First & Last Name\n";
cout << "2. Enter Collegian Number\n";
cout <<... | |
doc_23518111 | function changeContent() {
$('#msHotTopics').load('msHotTopics.jsp');
}
parent jsp
<!------------------- Home page content ----------------------->
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td style="padding: 12px 20px 20px 20px;width: 100%;" valign="top">
<widget:searchEntry action... | |
doc_23518112 | the nature of answer might get in form of radio, checkboxes, drop-down or plain text.
I want to do this through SQL database. it will get the question from Master table and answer Option(s) from detail table and dynamically designs the activity layout accordingly.
Is that possible or is there any other way to do the s... | |
doc_23518113 | i use content observer to apply call log updates.
problem is content observers on change method isn't called on outgoing calls and just is called on incoming and missed calls.
please help about problem also show me best way to update call log and show it inside recyclerview.
here is my content observer class and how i ... | |
doc_23518114 | I have a set of instructions that completely fills a page and I need it to always print on the second page of my report. My report consists of Page Header and Details section, both which always fill one page.
I have the instructions set as the Report Footer and my report prints as I want it to when I have just one rec... | |
doc_23518115 | requirements/base.txt
# Django
# ------------------------------------------------------------------------------
django==3.1 # pyup: < 3.1 # https://www.djangoproject.com/
Does upgrading Django version in the project would create a problem ?
A: Reading the official documentation it doesn't seem to have any compatib... | |
doc_23518116 |
W:\android-studio-projects\sharedid\app\build\intermediates\merged_manifests\flavor_customer1Debug\processFlavor_customer1DebugManifest\merged\AndroidManifest.xml:49:
error: resource string/MyAppName (aka
com.customer1.app:string/MyAppName) not found.
error: failed processing manifest.
...
My gradle contains this
... | |
doc_23518117 | When i try to connect to mysql instance (that is running) i get the following error:
Errore di connessione al database [database] :
org.pentaho.di.core.exception.KettleDatabaseException:
Error occurred while trying to connect to the database
La classe di driver 'org.gjt.mm.mysql.Driver' non è stata trovata,
... | |
doc_23518118 | My target is to create similar layout:
Disclaimer: This should be relative layout just because i need add some other elements which position depends on this two.
This is my code:
var layout = new RelativeLayout();
var box = new BoxView { BackgroundColor = Color.Olive, WidthRequest = 50, HeightRequest = 50 };
var labe... | |
doc_23518119 | Scenario:
I have about 20 sub-spreadsheets with links to external sources. The number of links per spreadsheet varies from about 500 to 10,000. A master spreadsheet calls macros to open each sub-spreadsheet in turn and update the links.
Each sub-spreadsheet has a dashboard that tells me how many links remain to be upd... | |
doc_23518120 | I have read that I should use a HandleRef or SafeHandle, and I'm going to go with HandleRef.
My question is, since internal calls do not have automatic marshalling, can I just change IntPtr to HandleRef in the extern function and keep the C/C++ function as is, or do I have to do something else?
Something like this:
//C... | |
doc_23518121 | Here's how it looks:
I tried to change the text color, change size, change background color, add some padding, but section still doesn't show the text.
So here's where I implement the FlatList:
import React, { Component } from 'react';
import { FlatList } from 'react-native';
import { connect } from 'react-redux';
im... | |
doc_23518122 | from datetime import datetime as dt
dt.strptime('2018 30', '%Y %j') == dt.strptime('2018 22', '%Y %j')
False
dt.strptime('2018 8', '%Y %m') == dt.strptime('2018 10', '%Y %m')
False
dt.strptime('2018 30', '%Y %W') == dt.strptime('2018 22', '%Y %W')
True # wrong
The actual value returned for a specific %W is not usef... | |
doc_23518123 | select d.searchpack,d.context, d.day,d,txnid,d.config, c.sgtype from ds3resultstats d join
context_header c on (d.context=c.contextid) where (d.day>='2012-11-15' and d.day<='2012-11-25' and c.sgtype='Tickler' and d.config like
'%people%') GROUP BY d.context limit 10;
FAILED: Error in semanti... | |
doc_23518124 | I have 15 categories that the user can chose from, if none is selected, display all items. Rather than doing AND .. AND .. AND 15 times if nothing is selected, is there a smarter way for this?
This will work for one category selection:
$cate = mysql_query("SELECT * FROM `posts` ORDER BY `id` ASC"); ... | |
doc_23518125 | import pygraphviz as p
def main():
A=p.AGraph()
A.add_edge(1,2)
A.layout(prog="dot")
A.draw("1.png")
if __name__ == '__main__':
main()
wokrs fine locally, but when launched via Heroku bash it returns IO Error:
Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot eps fig gv imap... | |
doc_23518126 | So the question is how to make it remember the checked items after the get applied ?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace AppNumber302
{
public partial class ... | |
doc_23518127 | a FusedLocationProviderClient
However the current horizontal accuracy I'm getting is between 5m and 15m for longitude and latitude while the vertical accuracy is often up to 50m out.
Not sure if it makes a difference but the the test device is an HTC U11?
I've updated google play service location com.google.android.gms... | |
doc_23518128 | Now I want to provide the values for other programs but I do not want to write the values in a file. Writing to a file would occur very often and would thus strain the SD-card of my RaspberryPi.
The other programs must only read and not write the values.
Please can some one tell me if I have a chance to write the comp... | |
doc_23518129 | JFrame1.java:
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
public class JFrame1 extends JFrame {
static JFrame1 frame1 = new JFrame1();
public static void main(String[] args) {
EventQueue.i... | |
doc_23518130 | { // For example, the files explorer decides which files and folders to show
// or hide based on this setting.
// Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options).
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"*... | |
doc_23518131 | $userManager = $this->container->get('fos_user.user_manager');
//$userAdmin = $userManager->createUser();
$userAdmin = new UserAdmin();
$userAdmin->setUsername('francis');
$userAdmin->setEmail('francis@francis.com');
$userAdmin->setEnabled(true);
$userAdmin->setRoles(array('ROLE_ADMIN'));
$userManager->updateUser($u... | |
doc_23518132 | xmlns="urn:x-xxx:r2:reg-doc:1551-fad.110.05:en:*">
<meta-data><?Pub Dtl?>
<confidentiality class="xxx-internal"/>
<doc-name>XXX</doc-name>
<doc-id>
<doc-no type="registration">XXX</doc-no><language
code="en"/><rev>A</rev>
<date><y>2013</y><m>04</m><d>22</d></date>
</doc-id>
<company-id>
<business-unit></business-unit>
... | |
doc_23518133 | INFO[0000]logging.go:39 myfolder/logging.Info()
If I wrap the log function like this, for instance:
package logging
import (
"fmt"
"github.com/sirupsen/logrus"
"os"
"path"
"runtime"
)
var (
log *logrus.Logger
)
func init() {
log = logrus.New()
log.SetReportCaller(true)
log.Format... | |
doc_23518134 | $postString = '{
"key": "xxx",
"message": {
"html": "this is the emails html content",
"text": "this is the emails text content",
"subject": "this is the subject",
"from_email": "email@email.com",
... | |
doc_23518135 | SELECT *
FROM `table1`
WHERE (date = '2021-01-31')
MINUS
SELECT *
FROM `table2`
WHERE (date = '2021-01-31')
example of result (around 15 columns). I just want to get the lines that are present in table1 but not in table2.
campaign date conversions ....
a 2021-01-31 8374474
b 2021-01-31 948383
c 2021-01-31 3948484
A:... | |
doc_23518136 | $args = apply_filters('woocommerce_related_products_args', array(
'post_type' => 'product',
'ignore_sticky_posts' => 1,
'no_found_rows' => 1,
'posts_per_page' => $posts_per_page,
'orderby' => $orderby,
'post__in' => $related,
'post__not_in' => array($product->id)
) );
Any idea how to modi... | |
doc_23518137 | I will be also glad for some git repository with these technologies for inspiration.
A: You must to notice to the these notes:
*
*If you want to use AngularJs you can add your angular javascripts to the every html files and use it.
*]f you want to use Angular 2+, it is difference than AngularJs because Angular 2+ ... | |
doc_23518138 | (champs1 (champs6 donnee_o donnee_f) [(champs2 [] (champs3 _YOJNJeyyyyyyB (champs4 donnee_x)) (debut 144825 25345) (fin 244102 40647)), (champs2 [] (champs3 _FuGNJeyyyyyyB (champs4 donnee_z)) (debut 796443 190570) (fin 145247 42663))] [] []).
( Annotated For readability ):
(champs1
(champs6 donnee_o donnee_f)
... | |
doc_23518139 | but how to allow this list to be searched by "@" User_Mention too?
this is my try but it does not work:
var searchText = ""
var body : some View{
List(observedData.datas.filter{
$0.msg.lowercased().contains(searchText.lowercased()) || searchText.lowercased() == "" ||
$0.name.lowercased().conta... | |
doc_23518140 |
function num() {
var number = prompt("Enter number");
document.getElementById("number").innerHTML = number;
}
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td,
th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {... | |
doc_23518141 |
A: This is not possible Client-side Blazor works only in browser and interop is only with browser JS, since it is browser who run WASM and JS inside themselves.
Previously you can theoretically integrate some NodeJS inside ASP.NET Core application using NodeServices, but they are would be obsolete in .NET Core 3. See ... | |
doc_23518142 |
@Local
interface AInter{
//...
}
class A implements AInter{
//...
}
@Local
interface BInter extends AInter{
//...
}
class B implements BInter {
//...
}
In Backing:
@Inject
BInter binter; //It's work fine
But If i tried
@Inject
AInter aInter; //But if i try to access A interface from my backing.
It showed warning li... | |
doc_23518143 | import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Test {
public static void main(String[] args) {
Logger log = LoggerFactory.getLogger(Test.class);
log.info("Hello World");
}
}
The program generates following output:
2011-11-01 13:06:05 Test main
INFO: Hello World
How to get rid... | |
doc_23518144 | I updated to Haskell Platform 2011.2.0.1 and GHC 7.0.3 and now it works!!
I have the following haskell file named "webscrap2.hs". I can execute "runghc webscrap2.hs" and it works fine. However when I compile the file I get an error.
webscrap2.hs
import Text.HTML.TagSoup
import Network.Curl (curlGetString, URLString)... | |
doc_23518145 | <mat-expansion-panel [routerLinkActive]="['is-active']" [expanded]="true">
<mat-expansion-panel-header>
<mat-panel-title>
Nav Item
</mat-panel-title>
</mat-expansion-panel-header>
<mat-list-item *ngFor="let navLink of navLinks" routerLink="{{ navLink.routerLink }}"
[routerLinkAc... | |
doc_23518146 | I have manually create GUID by using JavaScript code.
function guid() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' + s4() + s4() + s4();
}
But am seeing typescript have AAGUI... | |
doc_23518147 | I have tried UIDocumentPickerViewController with documentTypes as kUTTypePDF and kUTTypeImage. But it only opens the files directory with iCloud drive and on my iPhone directory.
let docPicker = UIDocumentPickerViewController(documentTypes: [kUTTypePDF as String, kUTTypeImage as String], in: .import)
Is there any way... | |
doc_23518148 | I couldn't find any constraint that can take care of this.
I heard aspect ratio can do this. But I tried It doesn't seem to work.
How it is generally achieved?
A: Use concept of aspect ratio with AutoLayout to update your view with respect to height & width. Use multiplier to update aspect ratio. Here are snap of aspe... | |
doc_23518149 | To do so:
1/ I took two shapefiles (you can download them here: https://www.dropbox.com/sh/hzsdklnmvjg4hsz/AAATHLV0pkJXDvSqyRIBlVl_a?dl=0)
2/ I sew them according to : R cran: sf Sew two MULTILINESTRING/LINESTRING
3/ try to create the associated polygons according to that: Sf package: Close a polygon fom complex shape
... | |
doc_23518150 | At Console :
npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log/package.json'
npm WARN ENOENT ENOENT: no such file or directory, open 'Proj_Dir/node_modules/grunt-legacy-log-utils/package.json'
npm ERR! enoent ENOENT: no such file or directory, rename 'Proj_Dir/node_modu... | |
doc_23518151 | I would like to export those charts into pdf. But when I try I don't have them, I only have my static html like the h5
You can see in the example bellow, the canvas part is empty and then loaded using Chart.js.
<div id="stats">
<div class="card mb-4">
<div class="card-body">
<h5 ... | |
doc_23518152 | error:
"idpiframe_initialization_failed"
details:
"Not a valid origin for the client: http://www.heaolumassage.com has not been whitelisted for client ID 245143078821-1reoo9h3ch0334pi6sddp52cnnotl316.apps.googleusercontent.com. Please go to https://console.developers.google.com/ and whitelist this origin for your proje... | |
doc_23518153 | I have the file inspinia.js and application.js in :-
app / javascript / pack
Try to integrate it in the following ways:
import 'inspinia'
require ("inspinia")
and in some other ways that didn't help me either.
If someone has already done it or knows how to do it, I would appreciate your help.
A: Well, you said that... | |
doc_23518154 | type A = { __typename: 'A', foo: true }
type B = A & { __typename: 'B' }
type C = A & { __typename: 'C' }
type X = B | C;
const x: X = { __typename: 'B', foo: true }
You can play around with it here: http://www.typescriptlang.org/play/#code/C4TwDgpgBAglC8UDeUD6rSQHYEMC2EAXFAOQwkA0UAZgPa3HABOArtAL4BQm0AQgrCgAyZGgzgIu... | |
doc_23518155 | import pandas as pd
import xlsxwriter
from openpyxl import load_workbook
def dataholder(data1,data2,data3):
df = pd.DataFrame({'Col1':[data1],'Col2':[data2],'Col3':[data3]})
with pd.ExcelWriter('data_hold.xlsx', engine='openpyxl') as writer:
df.to_excel(writer,sheet_name='Sheet1')
wri... | |
doc_23518156 | We used to insert with a stored procedure and that was working fine. However, we switch to EF6 recently and we found when there are more intensively insertion, the operations more likely end up with an exception:
Messsage:An exception has been raised that is likely due to a
transient failure. If you are connecting t... | |
doc_23518157 | I've read somewhere that in order to do that I should add the view controller to be an observer of the UITextFieldTextDidChangeNotification notification. However I'm just not sure when to do that. I've considered several options.
*
*In the -loadView method. However, since I'm loading my view using a XIB, I think i ... | |
doc_23518158 | first one was generated by the compiler (visual studio 2010) IDR_POPUP_EDIT. i just added there two additional buttons and it just worked. second one i wanted to create from scratch, so i prepared the IDR_PGRC menu resource, which has identical properties and has 2 buttons.
In case when there was click on the right sid... | |
doc_23518159 | However, I am not exactly sure how to do this.
I basically just need to build the following using Dynamic LINQ
var result = from s in Customers
select new[] {
s.Surname,
s.FirstName,
Convert.ToString(s.CustomerI... | |
doc_23518160 | The question is this: What is The Rails Way™ to set the default order on the model so that the Line Items appear in the correct order, according to 'dot-based numeric order'.
Presume a simple case:
class LineItem < ActiveRecord::Base
validates :line_item, :presence => true, :uniqueness => true
end
and that :line_ite... | |
doc_23518161 | In this case, the image quality suffers considerably when compared to the rendering of a single image.
You can see this quirk by running the following code snippet. Initially, both images are rendered quite poorly. But, if you click on one of them, it will become hidden, and the quality of the other image will improve ... | |
doc_23518162 |
A: You can use Reflector Pro (trial available) for debugging third party assemblies. It allows dynamic decompilation inside Visual Studio and setting breakpoints on decompiled sources.
| |
doc_23518163 | student and course_log
I have Students already in students table, I need to insert into course_log for each student a standard course (UNI 101) that all have to take or have take.
So if there are 10 students there will be 10 entries in the course_log table for each student with course UNI 101
I was thinking of using a... | |
doc_23518164 |
An Ajax call to a database returns the count of properties in real time which are satisfied by the query:
$query = "
SELECT
*
FROM
first_page_data
WHERE
((((acos(sin((".$lat."*pi()/180)) * sin((`geo_lat1`*pi()/180))+cos((".$lat."*pi()/180)) * cos((`geo_lat1`*pi()/180)) * cos(((".$lon."- `geo_lon1`)* pi()/180))))... | |
doc_23518165 | ini_set('display_errors', 'On');
ini_set('html_errors', 0);
And I got an error in script this.php
Notice: Undefined index: filter in /(...)/this.php on line 217
Line 217 is not even from the called function... it's an empty line with nothing in it.
Sometimes I run some echos in a perfect logical flow condition (in th... | |
doc_23518166 | ClientError: An error occurred (ValidationException) when calling the CreateTrainingJob operation: 1 validation error detected: Value 'ml.t2.medium' at 'resourceConfig.instanceType' failed to satisfy constraint: Member must satisfy enum value set: [ml.p2.xlarge, ml.m5.4xlarge, ml.m4.16xlarge, ml.p3.16xlarge, ml.m5.larg... | |
doc_23518167 | NO, match: a <- This is correct
YES, match: 123 <- This is correct
YES, match: 1,23 <- This is NOT correct
YES, match: 1.23 <- This is NOT correct
YES, match: 1,234 <-This is correct
YES, match: 1234 <-This is correct
The goal of my rexexp is to allow for a currency to be entered in an html form field (whole... | |
doc_23518168 | Here is my Main Class: (I apologize for posting so much code)
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXMLLoader;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.lay... | |
doc_23518169 | #include <stdio.h>
#include <string.h>
int main() {
char* arg[] = {
"Hello",
NULL,
NULL,
NULL
};
strcat(arg[0], " World");
}
This returns abort trap.
What am I doing wrong?
A: You are trying to rewrite a string literal with:
char* arg[] = { "Hello", ..... }; // "Hell... | |
doc_23518170 | $el
.doThis
.end()
.find( "a" ).first().removeClass( someClass );
I need to include a check for condition o.direction == "horizontal" and if the condition is true, I need to toggle instead of remove
However I can't get it to work. Trying like this:
$el
.doThis
.end()
.find( "a" ).first().toggleCl... | |
doc_23518171 | 'use strict';
const tls = require('tls');
console.log('Hello World!');
var certs = {};
const socket = tls.connect(
{ host: '192.168.1.23', port: 8080, rejectUnauthorized: false },
() => {
certs = socket.getPeerCertificate();
},
);
console.log('Outside');
console.log(JSON.stringify(certs));
console.log('Goo... | |
doc_23518172 |
let folderUrl = URL(fileURLWithPath: Bundle.main.resourcePath!)
do {
let songPath = try FileManager.default.contentsOfDirectory(at: folderUrl, includingPropertiesForKeys: nil, options: .skipsHiddenFiles)
for song in songPath{
let mySong = song.absoluteString
if mySong.c... | |
doc_23518173 | The solution I can think of right now is to poll the main app every 5 seconds and get the latest records.
But I want to avoid the time-gap of 5 seconds, and instead have a real-time data coming on my UI.
I have seen such systems in action, but I am unable to find a solution to this.
Any pointers/advice/hints/suggestion... | |
doc_23518174 | this.db.collection("ContentText").find("authors");
but my output is undefined
Can someone point out the error?
A: Try this:
this.db.collection("ContentText").distinct("author");
A: Try this:
this.db.collection('<collection_name>').find(<queryObject>,{author:1});
This query will return you array of authors with _id... | |
doc_23518175 | I have a page that's made up of 3 subsections, let's call them A, B, and C. Certain actions cause each of these to refresh via AJAX, so I want to have them each have a controller action that allows any of them to render individually, without the page chrome.
The way I've structured this right now is with a controller ... | |
doc_23518176 | I have tried converting the float to string and still the result is NAN. Is there another way to store float value to the JLabel?
***I Have tried the String.valueOf() but this the result is NAN.
int size = priority.size();
float avgtaf= 0.00f, avgta = 0.00f;
int []ta = new int[size];
for(int i = 0 ; i < size; i... | |
doc_23518177 | ScriptManager.RegisterStartupScript(this.GetType(), "Set","get("Test();",true);
Could someone please explain how this could be used to pass data?
A: This isn't a get or set in JavaScript, this is a startup script that will run when the DOM loads client-side. It's a basic JavaScript call to a method named get that rec... | |
doc_23518178 | I want to know the sum of the xor on all combinations of two integers in the two different subsets.
for example,
if n == 3:
i want to know the value of:
a1^b1 + a1^b2 + a1^b3 + a2^b1 + a2^b2 + a2^b3 + a3^b1 + a3^b2 + a3^b3
is there a way to this efficiently do this in a similar way as with + and x
i.e. 1*2 + 1*3 + 2*2... | |
doc_23518179 | The current code looks like this :
PowerPoint.Shape sendQuestion = slide.Shapes.AddTextbox(Office.MsoTextOrientation.msoTextOrientationHorizontal, slideWidth - 200, slideHeight - 50, 200, 50);
sendQuestion.Name = "sendQuestion";
sendQuestion.TextFrame.TextRange.InsertAfter("Send Question");
sendQuestion.ActionSettings[... | |
doc_23518180 | Here is my function to set the variable:
function loadAdmin()
{
//Set new session and save user id to variable
if (!isset($_SESSION)) {
session_start();
}
$app = \Slim\Slim::getInstance();
$token = $app->request->headers->get('token');
$token_exists = getToken_Validate()... | |
doc_23518181 | I am using the following code
$('.datepicker').datetimepicker({
format: 'DD/MM/YYYY'
});
<div class="input-group date datepicker">
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
@Html.TextBoxFor(model => model.DateOfBirth, new { @class = "form-... | |
doc_23518182 | View myView = getLayoutInflater().inflate(R.layout.my_view, my_activity_layout);
And now I want to center myView in the regular layout
I tried this
RelativeLayout.LayoutParams layoutParams =
(RelativeLayout.LayoutParams)myView.getLayoutParams();
layoutParams.addRule(Rel... | |
doc_23518183 | My database is created thus:
CREATE DATABASE IF NOT EXISTS TestDB
DEFAULT CHARACTER SET utf8mb4
DEFAULT COLLATE utf8mb4_general_ci;
USE TestDB;
SET sql_mode = 'STRICT_TRANS_TABLES';
CREATE TABLE IF NOT EXISTS MyTable (
(...)
Body LONGBLOB NOT NULL,
(...)
);
When I try to insert raw byte data to this description fie... | |
doc_23518184 | What typically goes into the default: case of a switch statement inside a Factory Method?
Example below...
class Factory
{
function getObject($param)
{
switch ($param)
{
case 'a':
return new A();
case 'b':
return new B();
defau... | |
doc_23518185 |
WARNING in src/war/angular/src/app/app-routing.module.ts is part of
the TypeScript compilation but it's unused. Add only entry points to
the 'files' or 'include' properties in your tsconfig.
package.json
"dependencies": {
"@angular/animations": "^9.0.0-next.4",
"@angular/cdk": "^8.1.4",
"@angular/common": "^9.0... | |
doc_23518186 | func (b *Bucket) Gets(k string, rv interface{}, caso *uint64) error {
data, _, cas, err := b.GetsRaw(k)
if err != nil {
return err
}
if caso != nil {
*caso = cas
}
return json.Unmarshal(data, rv)
}
The problem is that I don't know how to create a slice of rv, since I don't know ... | |
doc_23518187 | my code is:
private void btnAutoSearch_Click(object sender, EventArgs e)
{
panel_Search.Visible = true; // Not Working
Cursor.Current = Cursors.WaitCursor;
string ipBase = getIPAddress();
string[] ipParts = ipBase.Split('.');
ipBase = ipParts[0] + "." + ipParts[1] + "." + ip... | |
doc_23518188 | Thanks in advance
A: From the command line, you can use something like the following:
tf.exe merge /discard <path to the file to exclude>
That will update the merge history as if the file had been already merged, so it won't continue appearing in the merge candidates list.
| |
doc_23518189 | For example :
def test(x,y,ret='both') :
s = x + y
m = x * y
if ret = 'both' : return s, m
if ret = 'sum' : return s
if ret = 'mult' : return m
Also sometimes I want to have Aspect type behavior where I inject debugging code, which may also change the return types/num-of-vals
Is there a standard Programming ... | |
doc_23518190 | Thanks
Dimitris
A: Nope, I wouldn't do that. I'd think about maintaining two dictionaries, Label -> HashSet<Resource> and Resource -> HashSet<Label>. This will give you fast lookup in both directions. Obviously you should encapsulate this.
Also, whatever you do, you shouldn't embed it in your Resource. It's a resource... | |
doc_23518191 | #define TO_STRING(...) #__VA_ARGS__
#define QUOTE(...) TO_STRING(__VA_ARGS__)
#define KEY1 "Key1"
#define KEY2 "Key2"
#define KEY3 "Key3"
#define LEN1 32
#define LEN2 32
const char * cNVKeysMetaData = QUOTE(
{
"Area1":[
{
"key":KEY1,
"maxLength":LEN1,
"type":"s",
... | |
doc_23518192 | [['Wolfe Lane Community Garden', 'X', 'XXX', 'XX',
'XXXXX', 'XX', 'XXX', '0.05', 'XXXX'], ...]
I only want to extract the first element and the eighth element. How can I use list comprehension to do it? Or a filter function?
I need to use list comprehension.
A: Sounds like you want the first and eighth element i... | |
doc_23518193 | http://www.elabs.se/blog/66-using-websockets-in-native-ios-and-android-apps
but project is for android studio and i dont know how i can import dependencies and other files in correct place.
please tell me how i can use websocket?
i don't want to use socket instead of websocket because of my friend write all things in p... | |
doc_23518194 | If the result is already in the MainSession, I get the exception:
NHibernate.NonUniqueObjectException : a different object with the same identifier value was already associated with the session: 1, of entity: BI_OverlordDlsAppCore.OfeDlsMeasurement
when I attempt to re-attach, using the Lock method.
This happens even t... | |
doc_23518195 | 1.1.1.1 a.com
2.1.1.1 b.com
1.3.1.1 c.com
1.1.5.1 d.com
1.2.1.1 e.com
now I want to replace this ip from another text, not the same width, like 111.222.111.222, is also store in a rect text.
I know that Ctrl+v can do rect select, but how to do copy and paste?
A: Ctrl-V, as you said, to select, then 'y' to "yank... | |
doc_23518196 | With #if 1 the compilation fails with following error log whereas with if 0 the compilation is OK.
Full error log:
Output of x86-64 gcc 11.2 (Compiler #1)
<source>: In function 'void remove(std::vector<T>&, size_t)':
<source>:8:3: error: need 'typename' before 'std::vector<T>::iterator' because 'std::vector<T>' is a de... | |
doc_23518197 | for Routing i use the HashLocationStrategy.
Thats my RewriteRule:
Does anybody know why it dont works?
RewriteCond %{SERVLET_PATH} !-f
RewriteRule ^/ui/(.*)$ /ui/index.html#$1 [NE,R]
It should take something
localhost:8081/ui/#/projectlist (Refreshing throws 404 Error)
to
localhost:8081/ui/index.html#projectlist
so th... | |
doc_23518198 | According to this developer.android.com.
Android view is:
This class represents the basic building block for user interface
components. A View occupies a rectangular area on the screen and is
responsible for drawing and event handling. View is the base class for
widgets, which are used to create interactive UI compone... | |
doc_23518199 |
A: You could use this library for unzipping on iOS.
If you check their documentation, you can see this method for unzipping:
SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath)
Also they have an example here.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.