id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23512100 | I am on windows10 64 bit pc, having latest NWjs setup.
<script type="text/javascript">
// Create a new window and get it
// Open URL with default browser.
window.enterFullscreen()
// nw.Shell.openExternal('https://github.com/nwjs/nw.js');
// window.setResizable(false);
</script>
Do I need to impo... | |
doc_23512101 | let utterance = new SpeechSynthesisUtterance("Hello world! ");
speechSynthesis.speak(utterance);
which works!
However, I have this slight problem that the string "Hello World! " contains an emoji and when the SpeechSynthesis happens it actually speaks out the emoji, i.e. it would say "Hello world waving hand".
Is the... | |
doc_23512102 | I installed proxy like this:
$ wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64
$ mv cloud_sql_proxy.linux.amd64 cloud_sql_proxy
$ chmod +x cloud_sql_proxy
$ sudo mkdir /cloudsql; sudo chmod 777 /cloudsql
Problem is when I try to run proxy:
$ ./cloud_sql_proxy -dir=/cloudsql -instances=myproject:us-c... | |
doc_23512103 | finally i am searching if there are an easy way to edit this web sites or manage it
A: If you are using same server for all the 30 websites then you can have virtual host for each site and keep DocumentRoot same for all the domains.
What this will do is your domain name will be different but it takes same code from c... | |
doc_23512104 | Since, predis claims to be using consistent hashing, shouldn't this be the case that predis automatically detects which of the server is not responding ( & has failed), and distribute the keys stored on the failed server to the other working servers?
A: Predis does use consistent hashing, but it is left to you to ensu... | |
doc_23512105 | Here's my code. the result is not as good as the original quality..thanks...
QImage img(name);
QPixmap pixmap;
pixmap = pixmap.fromImage(img.scaled(width,height,Qt::IgnoreAspectRatio,Qt::FastTransformation));
QFile file(folder+"/"+name);
file.open(QIODevice::WriteOnly);
pixmap.save(&file, "jpeg",100);
file.close();
A... | |
doc_23512106 | Here's what I got in my virtualhost :
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:3333/
ProxyPassReverse / htttp://127.0.0.1:3333/
<Location />
Order allow,deny
Allow from all
</Location>
Basically I want to redirect every request to my nodejs appli... | |
doc_23512107 | Hide a div.
}
I am wondering if there is an easy way to detect if any key is pressed without an input.
A: Attach the keypress event in body or other element you want. Something like
<body onkeypress="myFunction()">
Or
document.body.addEventListener('keypress', myFunction);
Funciton Definition
function myFunction()... | |
doc_23512108 | File pdfDest = new File("output");
ConverterProperties converterProperties = new ConverterProperties();
HtmlConverter.convertToPdf(html, new FileOutputStream(pdfDest), converterProperties);
Following is sample HTML to reproduce the issue:-
<html>
<head>
<link rel="preconnect" href="https://fonts.gstatic... | |
doc_23512109 |
A: <%= %> emits a string, <% %> runs code.
On the pedantic side, you're writing an ERb template, not an HTML file--the syntax is the same whether it's a template for HTML, JS, or whatever.
The ERB docs provide additional (but not complete) information.
A: <%= %> will return value and display in your page. Assume that... | |
doc_23512110 |
Cannot resolve symbole 'R'
I got it in ALL of my previous activities too for no reason
Here is an example:
@SuppressLint("SimpleDateFormat")
public class Startbildschirm extends ActionBarActivity
{
final int PIC_CROP = 2;
static final int REQUEST_TAKE_PHOTO = 1;
@Overrid... | |
doc_23512111 | var nu = "123";
var splitit = ma.split("");
var splitit2 = nu.split("");
for (i=0; i<=splitit.length;i++) {
var bach = {splitit[i]:splitit2[i]};
}
alert(bach);
A: You probably want
var bach = {}; // create the object
for (i=0; i<=splitit.length;i++) {
bach[splitit[i]]=splitit2[i]; // set a propert... | |
doc_23512112 | - alert: BuildDurationExceeded
expr: jenkins_build_duration > 7200
annotations:
title: 'Build duration is too long at {{ $labels.instance }}'
description: 'Build time of job {{ $labels.job }} on {{ $labels.instance }} exceeded 2h.'
labels:
severity: 'high'
Below is one metric value that i... | |
doc_23512113 | I'd like to make my app more responsive so that when the window size drops below a certain width, to save space these buttons are moved into a Flyout and restyled as appropriate.
Edge browser does something like this with the Hub, Web Note, and Share buttons.
How can I do this? Is it possible just by using AdaptiveTrig... | |
doc_23512114 | function LoadResources(){
alert("In load socket");
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
var tiles= new Array();
var loadedCount=0;
for (x = 101; x <= 155; x++) {
var imageObj = new Image(); // new instance for each image
... | |
doc_23512115 | <input type="checkbox" name="userGroup" ng-model="selectedAll" ng-change="selectAll();"></input>
I'm initiating the selectedAll model to false in my controller. In my selectAll() function, I log the value of the flag. But it stays false, doesn't update when I check and uncheck the checkbox. Any reason and solution for... | |
doc_23512116 | For this purpose, I have used a pure JavaScript code that I am sharing below, but this is stopping all the scrolling even Up / Down too. I just want to stop Horizontal scrolling in touch screen.
I think that it will be done by offsetX or pageX, but I am not able to mix this with below code. Hoping that you can make th... | |
doc_23512117 | Structure wise this becomes something like this:
All this seems easy to do with Keycloak, we create confidential clients(one for each microservice) and enable resource management on them. However, there are quite some cases when different microservices (i.e., Keycloak clients) need to validate user's access scopes to ... | |
doc_23512118 | How to do achieve that?
A: You can try to use ajax to pass form data to OnPost handler,and then check ModelState and pass data to the view,if ModelState.IsValid,open the modal,here is a demo:
cshtml:
<form method="post" id="myForm">
<input name="name" value="test" />
<input type="button" value="submit" onclick... | |
doc_23512119 | I'm trying to search for videos in youtube.
In GCP I enabled Youtube Data API, generated key and set Referrer Restriction.
In Postman (or in browser - same result) I call GET method with the URL (got from API explorer)
https://content.googleapis.com/youtube/v3/search?part=snippet&q=angular&key=MY_API_KEY
and add... | |
doc_23512120 | Im stuck as I cant see anywhere that explains or an example how to capture the response when they only hit my feedback url with a GET.
if anyone has any ideas how to capture the full header body of what they are doing with a GET, I have captured the get headers into mysql as they hit it but nothing in there saying cont... | |
doc_23512121 | Any ideas why this is happening?
Update:
I know added the font-face directly to the svg. If I open the url for the svg image, it displays with the correct font, but, if I open the webpage with the svg embedded, it doesn't seem to show the correct font.... Any ideas?
Update (19/7/21): I found that even by targeting the ... | |
doc_23512122 | What would be the correct Java API equivalent of the following code:
DeferredElementNSImpl nodes = (DeferredElementNSImpl) node;
Node transactionID = nodes.getElementsByTagName("id").item(0);
Where node is of type org.w3c.dom.Node
A: You should cast node to org.w3c.dom.Element.
A: org.w3c.dom is not a Sun class. It... | |
doc_23512123 | id uid type
1 20 A
2 20 B
3 20 A
4 6 A
5 1 A
6 3 A
7 6 A
8 1 B
Scenario:
I want to group by type and sort it by id. I am using group by to group the uid.
Current Query:
SELECT
type,
GROUP_CONCAT(DISTINCT uid) AS users,
COUNT(type) AS typeCo... | |
doc_23512124 |
x = x + 1
Loop
In the above VBA code slice, I get a Run-time error '13': Type mismatch. stringOne is declared a String. I can eliminate Or "" and the loop works. I can eliminate stringOne and only have "" and the loop works. Only when I add the Or "" does the loop stop functioning. I've even swapped order, ... | |
doc_23512125 | public static void main(String[] args){
Confusing cf = new Confusing();
try{
cf.confuse();
}catch(Exception e){
System.out.println("Caught exception: " + e.getMessage());
}
}
public void confuse() throws Exception{
try{
throw new E... | |
doc_23512126 |
A: WordPress Plugins should do what you want, for example, WP-Polls is a polls plugins.
A: If you really want a full-blown portal system, WordPress is not the right foundation. WordPress is a blogging system primarily, so while you can extend it (and many people do), there's a limit on what makes sense. You wouldn't ... | |
doc_23512127 | when I run command npm run dev I successfully build the project:
After that I use php artisan serve to show the web in my browser which it does but NONE of the components show up.
When I check source code this is what the component renders:
but for some reason I can't see the component?
This is my app.js file:
/**
*... | |
doc_23512128 | I know that best practice would be to wrap the code in a try-catch block, but in my particular case I expose the driver's API to users so I don't have that level of control. Still, I need to catch potential exceptions happening in callbacks in order to send back relevant error messages.
EDIT: further explanations.
Thin... | |
doc_23512129 | <a href="#close" class="modalButton">Cancel</a>
I'd like to replace this with a JavaScript function (let's call it onCancel() ) so I can reset some values if needed in addition to closing the overlay. What is the JavaScript equivalent to "#close"?
A: You can't close an iFrame, you either have to remove or hide it. T... | |
doc_23512130 | , item
, sn
, num
FROM Product p
INNER JOIN Zol z
ON p.[num] = z.[item]
where p.num like "50-%"
Of course it was for testing purposes, so the only answer should be "50-56", but it's not returning me any results :/
A: The wildcard for MS Access in a LIKE is the non-standard *. So, try this:
SELECT c... | |
doc_23512131 | After that, I downloaded genome and gtf data from http://hgdownload.soe.ucsc.edu/downloads.html, https://genome.ucsc.edu/cgi-bin/hgTables?command=start.
But while running mouse(mm9) gtf, it does not work at all and shows the error:
[ERROR] Error while loading stats: Field 5 not found
java.lang.IllegalArgumentException... | |
doc_23512132 | I have a string...
string sTest = "This is my test string";
How can I (manually, without code) determine the SizeOf the string? What should it end up being? How do you get that size?
Second Part:
I have a class...
[StructLayout(LayoutKind.Sequential)]
public class TestStruct
{
public string Test;
}
I use it...... | |
doc_23512133 | So here is my scenario
*
*Qlik Tool will create Kafka Topic for each table and publish all data from sybase DB
*Each message in Topic has some meta data, and one of them will tell us whether its INSERT/UPDATE/DELETE
*On other hand we have to build consumer layer to pull data from each topic and update/sync up resp... | |
doc_23512134 | <?php
require_once 'sql.php';
$sqlConnexion = new mysqli($hn,$un,$pw,$db);
if($sqlConnexion->connect_error){
die ('Soucis de connexion SQL');}
$date = date("d/m/y G:i:s");
if(isset($_POST['zoneDeText'])){
$area = $_POST['zoneDeText'];
$queryone= "SELECT SortieTraitée FROM entry WHERE entréesUtilisateurs=?";
$inst... | |
doc_23512135 | I have 3 lists for 3 countries:
countries = ['Argentina', 'Brazil', 'France']
population = ['100', '900', '1400']
ranks = ['1', '2', '3']
result_list_of_dicts = [
{
'Country': 'COUNTRY',
'Rank': 'RANK',
'Population': 'POPULATION'
}
{
'Country': 'COUNTRY',
'Rank': 'RA... | |
doc_23512136 | ||
doc_23512137 | How I can mock such request.
My code:
useEffect inside component
useEffect(() => {
dispatch(setData())
}, [])
if(isDataLoadng) {
return <Spinner/>
}
return Component
Thunk action
import db from '../../indexedDB/db'
export const setData = createAsyncThunk(
`setData`,
... | |
doc_23512138 |
A: Many commercial and open source IPCs have Haskell bindings:
0MQ
Thirft
Messagepack
I have made the best experiences with Messagepack because it is quite light weight.
A: I've created a simple library to solve the most basic aspects of this problem: http://hackage.haskell.org/package/ipcvar
| |
doc_23512139 | Why does this code path for train_op work:
optimizer = tf.train.GradientDescentOptimizer( learning_rate=.001 )
train_op = slim.learning.create_train_op(total_loss, optimizer,
global_step=global_step)
slim.learning.train(train_op, log_dir,
init_fn=init_fn,
... | |
doc_23512140 | from sklearn.feature_extraction.text import CountVectorizer
vectorizer = CountVectorizer()
has tools to deal with punctuation, namely:
token_pattern = (?u)\\b\\w\\w+\\b
but how does it actually work? Can anybody provide a SIMPLE example, e.g. with grep or sed that makes use of that regular expression? Thanks.
A: Acc... | |
doc_23512141 | I have followed different tutorials and guides and have come to a solution that works well.
When accessing the JS client while not authenticated, I am redirected to the IdentityServer, where I can successfully log in and am redirected back to the JS client with my bearer token, which I then use to consume the API.
Th... | |
doc_23512142 | I am using Maven for the dependencies, but when importing I get the error: Cannot resolve symbol usermodel for example.
These are my imports:
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook... | |
doc_23512143 | I know how to Concatenate 5 specific Cells, and to find the last Row etc but i can't work out how to join them together.
Any Help or pointers would be greatly appreciated.
Thanks in advance.
A: The Join Function will concatenate a delimited string but the range of rows needs to be flipped with TRANSPOSE first.
Dim ws7... | |
doc_23512144 | manifest.json
{
"manifest_version": 2,
"name": "Test",
"content_scripts": [
{
"matches": ["http://stackoverflow.com/*"],
"js": ["content_script.js"]
}
]
}
content_script.js
console.log('hello world');
When I go to chrome-extension://<extension's id>/content_script.js, I see the correct con... | |
doc_23512145 | there's a Javascript code to check fields are not empty when submitting
I'm trying also to calculate the 2 fields and compare it with the result value
Here's the HTML :
<form method="post" id="contactForm" enctype="multipart/form-data" name="q_sign">
<input type="text" name="q_name" id="senderName"/>
<input type="text"... | |
doc_23512146 | It is better if it is possible using only Zend Validation/Form API. I am not considering client side (javascript/jQuery) solutions.
UPDATE :
I am using Form Row element like that
<div class="row">
<div><?php echo $this->formLabel($form->get('first_name')); ?></div>
<div><?php echo $this->formElement($form->ge... | |
doc_23512147 | The issue is as akamai serves pages from geographically near node hence there is no control/validation for cache creation. My question is,
A. How can I ensure purge happens in all nodes
B. How can I ensure while curling urls, cache is updated in all nodes.
C. Is there any better way of controlling cache in akamai?
A: ... | |
doc_23512148 | I made it using jQuery FileTree and everything works great, except one thing. After upload I refresh FileTree to show user that file is indeed in destination folder.
Unfortunately, if destination folder is not the main directory, but one of subdirs, user can see nothing, because directories are collapsed by default.
I... | |
doc_23512149 | select
yu.Soyad,
mt.ICD10Kodu,
count(mi.ID) as AASayisi
from
Muayene.Muayene mm
join Muayene.Ilac mi
on mm.ID = mi.MuayeneId
join Yetkilendirme.Users yu
on mi.CreatedBy = yu.ID
join Muayene.Tani mt
on mm.ID = mt.MuayeneId
where
mm.IsDeleted <> 1
and ... | |
doc_23512150 | I have figured out I can use scale_y_continuous(breaks=1:2, labels=c("a","b"), but it seems to change the order of things, which makes it hard to know exactly what I'm doing.
A: You only need a slight adjustment of this question: Customize axis labels
We can use a named vector instead of supplying breaks and labels se... | |
doc_23512151 | # create subset of four sets of indices
model.x_index = Set(initialize=[(a, i, j, y) for a in model.Biomass for i in model.SourceCounty for j in model.ProdCounty
for y in model.Year if model.TD[i, j] < 1000 and model.BP[a, i, y] > 0
and model.FP[a, i, y] <... | |
doc_23512152 |
A: I assume you mean the FileMaker API for PHP.
Yes, just install FileMaker Pro or preferably FileMaker Pro Advanced and get a full access or at least layout creation/edit access login to the database from your client. You need a license for FileMaker Pro or you can get a free trial to get started.
The API for PHP tal... | |
doc_23512153 | "
2012-06-22 03:06:25 INFO Mohd Tahar, Azrul Haza ExecuteSingleContext duration: 251.9628 - Page_Load\RefreshGridAction\GetOrderObjectByOrderID
2012-06-22 03:06:25 INFO Mohd Tahar, Azrul Haza ExecuteSingleContext duration: 195.32 - Page_Load\RefreshGridAction\GetOrderListByOrderID
"
and puts them down into a sepera... | |
doc_23512154 |
*
*1 >> 34 = 0,
*1 << 34 = 4 // circular shift
why such asymmetry ?
A: From JLS §15.19:
If the promoted type of the left-hand operand is int, only the five lowest-order bits of the right-hand operand are used as the shift distance. It is as if the right-hand operand were subjected to a bitwise logical AND opera... | |
doc_23512155 | MyBookLiveDuo1:/opt/program# ./program
-bash: ./program: cannot execute binary file
There is output of objdump:
MyBookLiveDuo1:/opt/program# objdump -a /bin/bash
/bin/bash: file format elf32-powerpc
MyBookLiveDuo1:/opt/program# objdump -a program
program: file format elf32-little
Can I execute such file on m... | |
doc_23512156 | @Html.DropDownListFor(model => model.AccessTimeBegin, new SelectList(new List<Object> {
new { value = "6/22/2009 1:00:00" , text = "01:00 AM" },
new { value = "6/22/2009 2:00:00" , text = "02:00 AM" },
new { value = "6/22/2009 3:00:00" , text = "03:00 AM" },
... | |
doc_23512157 | index.jade:
extends layout
block content
h1= title
p Welcome to #{title}
index.html
<!DOCTYPE html><html><head><title></title><link rel="stylesheet" href="/stylesheets/style.css"></head><body><h1></h1><p>Welcome to </p></body></html>
Is there a way to auto-indent the generated HTML ?
A: Ctrl + Al... | |
doc_23512158 | This is an example of what I'm doing now
langItem.Fields["Type"].Value = updateNode.SelectSingleNode("./Type").InnerText;
And this is what I'm looking at changing it to
if (langItem.Fields["Type"].Value != updateNode.SelectSingleNode("./Type").InnerText)
langItem.Fields["Type"].Value = updateNode.SelectSingleNode(... | |
doc_23512159 | Thanks and Regards!
A: The list of bundle is stored in the kernel.
You have to create a twig extension BundleExtension and pass the kernel as dependency:
<?php
namespace MyBundle\Twig\Extension;
use Symfony\Component\HttpKernel\KernelInterface;
class BundleExtension extends \Twig_Extension
{
protected $kerne... | |
doc_23512160 | This function is just dealing with one page in one new window. The page that it opens does contain the word I'm looking for, but when I run it, returns with string not found.
function open_win() {
var wnd = window.open("http://www.bartleby.com/123/32.html");
if (wnd.find("morning")){
alert("string foun... | |
doc_23512161 | I'm trying to get the total revenue ('revenue_day_total') for every day but the following query, which includes OVER and PARTITION, returns the same value for 'revenue_day_total' for different dates (row 1 in window function).
SELECT
date,
device.deviceCategory AS device,
(SELECT value FROM UNNEST(customDimension... | |
doc_23512162 | There are still a number of variables being leaked to the global scope,
probably because you're using them undeclared like...
He did not mention all the problem variables, is there anyway to know which are in global scope / getting leaked?
I have a crapload of variables and it would take ages going through each one o... | |
doc_23512163 | $sql = "SELECT * FROM mybase WHERE id='$id'";
$qry = $dbo->prepare($sql);
$qry->execute();
$row = $qry->fetch(PDO::FETCH_ASSOC);
fputcsv($data, $row);
Anyone knows the best method to eliminate the ID before writing into the csv file.?
I saw an obvious and simple result here. Unfortunately, I have too many colu... | |
doc_23512164 | Any suggestions?
SELECT c.*,
cc.*,
com.*,
cor.corr_id,
cor.corr_method,
cor.corr_action,
cor.corr_description,
cor.corr_date_added
FROM contacts c
LEFT JOIN companies_contacts cc
ON c.contact_id = cc.contact_id
LEFT JOIN companies com
ON com.company_id = cc.compa... | |
doc_23512165 | <?php
include 'script.php?text=hiii';
?>
content of the script.php
<?php
echo $_GET['text'];
?>
So, how can i pass an argument while including the script page?
A: You could set $_GET['text'] before including the file:
$_GET['text'] = 'hiii';
include 'script.php';
But this obviously won’t affect other variables like... | |
doc_23512166 | Code I tried:
import numpy as np
import pandas as pd
import mne
path = 'my path'
data = pd.read_csv(path + 'file.csv',
skiprows=0, usecols=[*range(0, 17)])
ch_names = ['CH 1', 'CH 2', 'CH 3', 'CH 4', 'CH 5', 'CH 6', 'CH 7', 'CH 8', 'CH 9',
'CH 10', 'CH 11', 'CH 12', 'CH 13', 'CH 14', ... | |
doc_23512167 | To open the drawer I already know its function, but to tap the right side of the drawer I don't know
Any help would be appreciated.
A: You can add a global boolean isSideBarOpen and make it true when it opens (best in the onPress() event of the button that opens it).
And make sure to set it false again once it closes... | |
doc_23512168 |
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for ${ourDS}"
I have found that it is usually a result of no postgres dependency. I have also tried adding other dependencies like tomcat plugin, etc.
I understand that I miss a small piece o... | |
doc_23512169 | 400 Bad Request
My content looks like this
{
"new_account@odata.bind": "/accounts(4b6676f1-2c31-ea11-a810-000d3a23e249)",
"new_name": "10012071567 - Fibre - ",
"new_uprn": "10012071567"
}
The code is here
HttpRequestMessage request1 = new HttpRequestMessage(HttpMethod.Post, "/api/data/v9.1/entityname");
request1... | |
doc_23512170 | I currently have everything I want besides getting the icon on each row. I have imported it, I just don't know how to define the XML. I tried other StackOverFlow questions, but I couldn't get them to work. I am also confident in my custom adapter. It is the layouts that is giving me trouble. I am new to layouts, s... | |
doc_23512171 | Can I know what's the error? Thank you!
const events =[
[ 1, '1230000003', '09:00:00' ],
[ -1, '1230000003', '14:00:00' ],
[ -1, '1110000002', '12:30:00' ],
[ 1, '1110000002', '14:00:00' ],
[ -1, '1110000007', '08:30:00' ],
[ 1, '1110000007', '11:00:00' ],
[ -1, '1110000008', '09:00:00' ],
[ 1, '1110000... | |
doc_23512172 | func mapView(mapView: MKMapView!, annotationView view: MKAnnotationView!, calloutAccessoryControlTapped control: UIControl!) {
performSegueWithIdentifier("mapToCity", sender: self)
var title = view.annotation.title
var subtitle = view.annotation.subtitle
var lat = view.annotation.coordinate.latitude
... | |
doc_23512173 | I have a folder containing around one thousand PDF-files, each named 123456.pdf, where the total number of characters varies between 4 and 6 but they are always just numbers.
I furthermore have an XML file, which contains different tags, which include a tag - let's call it <Test> </Test>, that contains an ID, which was... | |
doc_23512174 | As it takes a very long time for the program to setup these simulations in memory (30m to 1h), every time I hit an un-handled exception in Python, it takes another 30-minutes to 1-hour for me to re-start from the beginning of the Python script.
Is there any way in Visual Studio Code//Python, to...
1) pause at an un-han... | |
doc_23512175 | 05 21 * * * /home/backup.sh
my script will run only one time in a day at 21:05 OR every 5 miutes(12 times in an hour) and every day at 21:00 ?? i want to my cronjobs run's only one time in a day at 21:05! please help me
A: Your script will run at 21:50 every day.
See the file formats manpage for crontab:
$ man 5 cron... | |
doc_23512176 | InputStreamReader isr = new InputStreamReader(is);
InputSource source = new InputSource(isr);
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
SAXParser parser = factory.newSAXParser();
XMLReader xr = parser.getXMLReader();
GeofenceParametersXMLHandler handler = new GeofencePa... | |
doc_23512177 |
A: *
*A 32bit OS can't support 64bit software.
*Core2Duo is 64bit (and can also run in 32bit mode)
*There is a PHPx64 Project for windows x64, but I.m not sure if it will give you 64bit integers.
A: As long as you're on a 64 bit OS, and install 64 bit binaries, you're good to go.
e.g., my dev box is centos, and I... | |
doc_23512178 |
A: Yes, the following code should help.
CosmosClient client = new CosmosClient(connection, options );
Container container = await GetContainer(client, "database1", "container1");
ContainerProperties containerProperties = await container.ReadContainerAsync();
int? ttl = containerProperties.DefaultTimeTo... | |
doc_23512179 | I have a wicket base page (BasePage) and a child page (ChildPage) extending BasePage.
The div in BasePage is like,
<div class="container-fluid">
<wicket:child/>
</div>
and in ChildPage
<wicket:extend>
<div class="sidebar">
..........
</div>
</wicket:extend>
in my base page css I have I... | |
doc_23512180 | The wanted output: I want to see a stackedbar for every integer I have in my list. But it must be such that the first integer in listA is on the same bar as the first from listB.
zedGraphControl1.GraphPane.CurveList.Clear();
zedGraphControl1.GraphPane.GraphObjList.Clear();
//I want to clear my c... | |
doc_23512181 | Problem with closing the tab closes an invalid element by looking at the log.I have seen that from NSMutableArray * browserViews; when call [browserViews removeObjectAtIndex: index]; in willCloseTabViewItem
This is the code :
.h
{
IBOutlet NSTabView *tabView;
IBOutlet MMTabBarView *tabBarControl;
IBOutlet N... | |
doc_23512182 | str = "aaa {Callout [apple]} bbbb";
A: You can use lookahead and group matching:
\{(\w+)(?=\b)
See Demo
JS code:
var re = new RegExp(/\{(\w+)(?=\b)/);
var m = re.exec("aaa {Callout [apple]} bbbb");
alert(m[1]);
A: Keep it simple in my opinion. If you want the first match in the string access it by result[0]..
v... | |
doc_23512183 | import numpy as np
from scipy.signal import fftconvolve
n = 7
m = 100
N = 3000
a = np.random.rand( n,m,N ) + np.random.rand( n,m,N )*1j
b = np.random.rand( n,m,N ) + np.random.rand( n,m,N )*1j
# we want product over the n-dimension, with fftconvolve in the m-indices elementwise
old_shape= a.shape
new_shape= ( n*m,... | |
doc_23512184 | I am really getting tired of doing this manually every time I have to install something on my host. I don't know enough BASH (Shell?) command to do this.
A: Using symbolic mode names instead of raw numeric permissions:
chmod -R u=rwX,go=rX somedir
The X permission flag only sets directories or already executable file... | |
doc_23512185 | I have been following the following guides:
https://medium.com/@isaactchikutukutu/deploying-django2-python3-on-a2-hosting-9e786a3e38ad
https://www.a2hosting.co.uk/kb/developer-corner/python/installing-and-configuring-django-on-unmanaged-servers
Any time I try to visit my website all I get is a page that says "We're sor... | |
doc_23512186 | I've tried using both the DrawImage() function and DrawText() to add text as a test but no luck. Are there any issues with this part of the code? Thanks for the help.
public Stream WatermarkImage(Stream img, Stream mark, ImageType type)
{
// watermark the image
using (Image result = Image.FromS... | |
doc_23512187 | I simply have a large data cube and want to change the maximum values along the z axis to some other number:
import numpy as np
from time import time
x, y, z = 100, 100, 10
a = np.arange(x*y*z).reshape((z, y, x))
t = time()
a[np.argmax(a, axis=0)] = 1
print(time() - t)
This takes about 0.02s which is a bit slow for ... | |
doc_23512188 | I have many fields on my form, the main field is the User ID field, when the user inserts his user ID all the other fields will get the user data from the database. I managed to do all of that but I cannot do one thing which is to auto-populate the fields when the "User_id" field is filled by a link parameter. Please f... | |
doc_23512189 | I have thread 1 and thread 2 and I want to raise an exception in thread 1 and to catch it in thread 2.
EDIT
I can see now that my initial explanation is confusing. What I want to do is to INITIATE an exception raising in thread 2 from thread 1. So exception is raised and caught in thread 2, but this process is controll... | |
doc_23512190 | I have two tables:
sale:
id
drugstore_id
drugstore:
id
name
city
My models:
class Sale extends Model {
static modelPaths = [__dirname]
static get tableName() {
return 'sale'
}
static relationMappings = {
drugstore: {
relation: Model.BelongsToOneRelation,
modelClass: Drugstore,
joi... | |
doc_23512191 | My current approach to do the conversion is:
hg convert --dest-type svn repository.hg repository.svn
This works, unfortunately it does not preserve the timestamps of Mercurial revisions. Additionally, it expands tags in some legacy code parts where someone wrote $Id: ...$ stuff.
The questions:
*
*How can I export t... | |
doc_23512192 | I have no idea if this query string being sent is in the correct format but I do know that the action result function is being called. I need to see what requests are being sent to the server so that I can see the format in which the request was sent.
I know how to view the currently executing requests using the reques... | |
doc_23512193 | getChildren() async {
final String numberOfChildren = await FirebaseFirestore.instance
.collection("children")
.where("parentUID", isEqualTo: uid)
.snapshots()
.length
.toString();
}
How do I use the the numberOfChildren variable inside of a Text widget.
... | |
doc_23512194 | i've managed to start the preview and display it on a surfaceView, but i don't know how to convert the byte[] data (that comes in Yuv format i think) in a RGB bitmap to display it on a imageView.
the code i'm trying is the following:
camera = camera.open();
parameters = camera.getParameters();
camera.setParameters(para... | |
doc_23512195 | I want to compare two tables content, but the content format is differing to each other’s.
Table CANON
CAN
18102-75|18103-0|18104-88
Table DRUM
DR
18103-0
I have to compare this two tables and should get the result 18102-75 and 18104-88
Currently I have a Case stament simply using the equal to and it give odd result.... | |
doc_23512196 | The web services are secured with both transport-level security (SSL) and a federated security model with a Security Token Service (WS-Trust/WS-Security). I have implemented clients in .NET easily using the Windows Identity Foundation, issuing a Security Token first and then using the (CreateChannelWithIssuedToken) met... | |
doc_23512197 | I have no idea to solve this issue
thank you
const phoneNumber= /(?:\+|\d)[\d\-\(\) ]{9,}\d/g
const instagram=/(([Ii]nst?a?g?r?a?m?)|(ig)|<U\+1F606>):?[ ]?@?[a-zA-Z0-9]+/gm
const ig=/@[a-zA-Z0-9]+/gm
function getInboxElements() {
if (document.getElementById('messages-tab')!=null){ //an error appears here
doc... | |
doc_23512198 | let array1 = [5, 6, 44, 2, 6];
let array2 = ['', '', '', 5 , 7];
I got this far, but it's returning only unique values. Meaning, let's imagine we have those two arrays above, first having all values - array1, second doesn't - array2 (index 0, 1, 2 is null, but index 3 and 4 has its number values). The function below i... | |
doc_23512199 | I have a form and a datamodule using zeos to enstablish a connection with a local oracle db.
The problem born when I put some code to interlocute with the db.
Here is an example:
OracleMng.ZQuery1.SQL.Clear;
That is exactly the line going in error.
Here is the full code of the form:
unit form1;
{$mode objf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.