id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_34900 | $("#pager a img").each(function(){
var currentName = $(this).attr("src");
var theNumToSub = currentName.length - 4;
$(this).hover(function(e){
$(this).attr("src",$(this).attr("src").substr(0,theNumToSub)+"selected.jpg");
$(this).parent().find(".caption").css("display","block");
var parentOffset = $(this)... | |
doc_34901 | Can I do this? I don't want to login as root for various reasons, including security issues. I basically want my script, which moves the file from user X's directory to an outside directory, to have root privelages temporarily.
A: Your question has essentially nothing to do with SSH. You are just asking "can set up a ... | |
doc_34902 | Another problem, in one table one column is referencing the column of another table:
@DataType(TEXT) @NotNull @References(table = PlaylistsDb.PLAYLIST, column = PlaylistColumns.NAME) String PLAYLIST = "playlist";
Now when I change the referenced column NAME in the table PLAYLIST I would expect that in the referencing ... | |
doc_34903 | I captured the question as it was from the question-paper, I couldn't solve it in the exam, and non of student's could.
You probably ask, why don't you ask your lecturer ( it's fair question because you are not here to solve the exam-question or a homework), we did but she didn't solve it she just told us the BCD is li... | |
doc_34904 | I was wondering how can I remove spacing between two buttons in a linear layout, please notice that I tried padding, margin, and weights.
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:layout_gravity="fill"
a... | |
doc_34905 | I am extracting id from URL for that i want to use OnDestroy to avoid memory problem and need to call service onInit
import { Component, OnInit, OnDestroy } from '@angular/core';
import { DetailService } from '../detail.service';
import { Router, ActivatedRoute } from '@angular/router';
import { Subscription } fro... | |
doc_34906 | Of lately we see lots of POST requests to SharePoint for end point " _vti_bin/sharedaccess.asmx" .
These requests just wait in IIS pipeline for as long as 3+ hours and after.
Once IIS can't take more requests, SharePoint Throttles and no one can access anything.
Any idea why this web service is hanging? What can be d... | |
doc_34907 | Here's my code:
package
{
import agent.Agent;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.KeyboardEvent;
import flash.geom.Point;
public class Main extends Sprite
... | |
doc_34908 | so for one dataframe I have this code
> range(data1$seamless_user_reg_date)
[1] "2021-05-03" "2022-07-11"
> lubridate::floor_date(range(data1$seamless_user_reg_date), "month")
[1] "2021-05-01" "2022-07-01"
and for the other dataframe where i get the error I have this code
> range(data1$opt_meeting_booked_date)
[1] "2... | |
doc_34909 | a) It appears outside of its containing div (which I can do) and,
b) the bottom edge of the div is adjacent to the top edge of its containing div (which I'm struggling with).
Visually, the end result should be that the div appears to be sitting on top of its containing div, like the following diagram:
NOTE: The heigh... | |
doc_34910 | {
"name": "tool1",
...
"bin": "./standalone-functions/tool1.js",
...
}
However, I have a few of those in a single project, e.g.
standalone-functions/tool1.js, standalone-functions/tool2.js, standalone-functions/tool3.js etc.
But I only have one package.json. So I successfully linked one. But is there a way to... | |
doc_34911 | An error occurred while connecting to the database. The database might be unavailable. An exception of type 'System.Data.ProviderIncompatibleException' occurred. The error message is: 'The provider did not return a ProviderManifestToken string'.
The inner exception caught was of type 'System.FormatException', with this... | |
doc_34912 | UserService
And it has 2 public methods:
Method1, Method2
And I'm testing Method1, but Method1 makes a call to Method2.
How can I mock (or stub is the more correct word) the call to Method2.
If I mock UserService, that I can't actually test Method1 now can I?
A: This cannot be done unless you weaken the coupling bet... | |
doc_34913 | app.component.html
<html>
<head>
<title>Hauptmenü</title>
</head>
<body>
<label class="title">Hello World</label>
</body>
app.component.scss
html {
margin: 0px;
height: 100%;
width: 100%;
}
body {
background-image: url('../assets/background.jpg');
margin: 0px;
min-height: 100%;
width: 100%;
}
app.co... | |
doc_34914 | http://theapache64.xyz:8080/gpix/v1/gpix?keyword=honda%20civic%202009&limit=1
and display as <img src=""> using php?
A: You can fetch data from json as follow
<?php
$content = file_get_contents('http://theapache64.xyz:8080/gpix/v1/gpix?keyword=honda%20civic%202009&limit=1');
$arr = json_decode($content,true);
$url =... | |
doc_34915 | There are a few lines I pasted in the original version of my plunk that I would like to hide.
A: It is not possible to delete versions of a Plunk without deleting the entire Plunk.
| |
doc_34916 | However when the documents are uploaded the images are showing negative in the preview and the text isn't visible. But when you download the documents from the site they are fully searchable again.
Any idea how I can search the content of these PDF's on liferay?
A: This forum post reply might help: http:Is it possible... | |
doc_34917 | XHTML
<?xml version="1.0" encoding="UTF-8" ?>
<html>
<body>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<a href="www.link.com">This is a link.</a>
</body>
</html>
Desired output:
This is a paragraph. This is another paragraph. <a href="www.link.com">This is a link.</a>
I am u... | |
doc_34918 | nginx.conf
location /app1/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8001;
}
location /app2/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://localhost:8002;
}
now in App1 and App2 they reference ... | |
doc_34919 | I think I should make the canvas more larger and scale it to normal size..
HTML :
<iframe width="80px" height="80px" id="printframe">
JS :
var frame = document.getElementById("printframe");
var frame_canvas = frame.contentWindow.document;
frame_canvas.body.innerHTML = '<canvas id="myCanvas" width="980px" style="bord... | |
doc_34920 | <% all = "All value" %>
<input type="text" name="name" id="name" value=<%= all %>>
But when the view is rendered, it seems like a string after space was missing and I just got:
<input type="text" name="name" id="name" value="All">
But my expection is:
<input type="text" name="name" id="name" value="All value">
... | |
doc_34921 | $(".accordion-section-title").click(function() {
if (!$(".accordion-section-title").hasClass('active')) {
$(".accordion-section-title").toggleClass("inactive");
}
});
A: May be below code will help you out:
$(".accordion-section-title").click(function(evt) {
$(".accordion-section-title").removeClass('... | |
doc_34922 | I would greatly appreciate the help on ideas/codes which can be used for such cases.
My attempted code is given below:
install.packages("BiocManager")
install.packages("STRINGdb")
library(BiocManager)
library("STRINGdb")
string_db <- STRINGdb$new( version="11", species=469008, score_threshold=00, input_directory="")
li... | |
doc_34923 | I have a php page that through a series of queries populates a table.
I function, which through a click of a button I export the table to Excel.
I need to export this table in an html file always clicking on a button.
How could I do?
A: It is 3 a easy step process:
1 - The first thing you have to do is add an applicat... | |
doc_34924 | Everytime when i want to run my program I should enter this command in my command line: $ python3.6 C:\assistant\myassis.py
I want to set an specific command for my program which let me to use my program in every folder with a short command.
for instance:
$ assis download file --test should require $ python3.6 C:\assis... | |
doc_34925 | setup() in distutils.core looks like it shouldn't exit, so I thought that I could just import my module and call the function after calling setup() in setup.py, but it doesn't seem to be working, even though installation does work.
This is what my setup.py looks like right now:
from distutils.core import setup
setup(.... | |
doc_34926 | stringstream line;
while(/*there's still stuff in line*/)
{
string thing;
line >> thing;
//do stuff with thing
}
A: Yes:
std::stringstream line;
std::string thing;
while (line >> thing)
{
// do stuff with thing
}
if (line.fail())
{
// an error occurred; handle it as appropriate
}
Stream operatio... | |
doc_34927 | I developed a code to calculate the number of nodes in the tree (in class BinaryTreeNode), but it doesn't work because of a NullPointerException:
public int size(){
if(this == null) { // base case
return 0;
} else {
return 1 + left.size() + right.size();
}
}
However another solution I fo... | |
doc_34928 | Here is my Html code:
<div class="well well-sm" id="well-color">
<button class="btn btn-default ">More Details</button>
</div>
Here is my CSS:
.well{
margin-right:800px;
}
Output
Could anyone help me on this
A: Use this
<div class="well well-sm" id="well-color">
<button class="btn btn-default well"... | |
doc_34929 | For example:
main()
{
char rx_char;
:
:
rx_char = get_char();
}
My co-worker asks me to initialize rx_char, but I don't understand why. Could anybody point out the reason?
A: "Initializing each variable when you declare it, even if the value is meaningless" is a schoolbook example of a cargo cult behavio... | |
doc_34930 | I have a div of anchors:
<div class="allTabs">
<a href="#">link 1a</a>
<a href="#">link 1b</a>
<a href="#">link 1c</a>
<a href="#">link 1d</a>
<a href="#">link 1e</a>
<a href="#">link 1f</a>
<a href="#">link 1g</a>
<a href="#">link 1h</a>
</div>
and then a ul:
<ul class="ppItemTabs">
<li>
<a href="#">link 2a</a>
</li>... | |
doc_34931 |
A: On iOS devices, this error (no connection) is reported be caused by an incompatible or not enabled AVAudioSession configuration; or maybe by trying to use an audio format (sample rate, bytes, endianess, etc.) incompatible with the device. It might also be caused by trying to use a bogus buffer list or number of sa... | |
doc_34932 | I'm making a forum with an account system.
So naturally they have to insert data to the database whilist speaking in the forums.
What is the safest way to let the user input data in an textarea?
Is there away so they can't just type in DROP TABLE 'USERS', or something else that might effect my forum?
Now I know there... | |
doc_34933 | My Index view code is:
<% using (Ajax.BeginForm("Save","Home", new AjaxOptions() { HttpMethod = "POST", InsertionMode = InsertionMode.Replace }, new { enctype = "multipart/form-data" }))
{%>
<input type="file" /><input type ="submit" value="Submit File"/>
<% } %>
and Controller code is:
[HttpPost]
publi... | |
doc_34934 | But when I multiply two ints of large value and store it in long long int, it is showing me negative number.
Eg:
int a=1000000, b=1000000;
long long int c=a*b;
cout<<c;
The above code gives me a negative value. Can someone explain why?
A: a*b is still of type int. Once it's evaluated, the result is then converted to... | |
doc_34935 | s = "s4, ep2 -- The one"
>>> re.search(r'(Episode|Ep?\.?)?\s?(\d{0,})', s, re.IGNORECASE).group(2)
''
I am trying to capture the 2 from the "S4, Ep2". I thought the Ep?\.?\s?d{0,} would capture it but it seems like I'm missing something.
Here are other example inputs that might be entered:
Episode 2
Ep. 2
E. 2
2
Seaso... | |
doc_34936 | By using this:
%s/asd\[\'.*\'\]/this->line('.*')/g
I will not be able to keep the wording in between. Please enlighten me.
A: Using regex, you could do something like :%s/\$asd\['\([^']*\)'\]/$this->line('\1')/g
Step by step:
%s - substitute on the whole file
\$asd\[' - match "$asd['". Notice the $ and [ need to be e... | |
doc_34937 | Class Survey{
public function steps(){
return $this->hasMany( Step::class );
}
}
Class Step{
public function survey(){
return $this->belongsTo( Survey::class );
}
public function isFinished( Survey $survey ){
// Check some things
return ( /* Chech if that step of th... | |
doc_34938 | {
"module":{
"module":[
{
"id": "0",
"name": "Kepesertaan"
},
{
"id": "1",
"name": "Layanan dan Manfaat"
},
{
"id": "2",... | |
doc_34939 |
I have checked the path listed for Junit dependancies and the jar files do exist there. I definitely have Junit on my computer as I had unit tests working before and I did not delete any files since. Any help would be wonderful as I have been wrestling and searching this for some time now.
A: You should try upd... | |
doc_34940 | I have to do some preprocessing with these dfs that at the moment I'm doing by calling different functions. I would like to use scikit learn pipelines.
One of these functions is a special encoder function that will look at a column in the df and will return a special value. I rewrote that function in a class like I saw... | |
doc_34941 | Just to visualize it, here is what I have now:
1. Title ........ 1
2. Title 2 ...... 4
3. Title 3 ...... 5
-------------------------
1. Title
where "------" denotes a page break. And what I am after is this:
1. Title ........ 1
2. Title 2 ...... 4
3. Title 3 ...... 5
1. Title
The command being used to gen... | |
doc_34942 |
php composer.phar update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove symfony/symfony v2.5.12
- Conclusion: don't install symfony/symfony v2.... | |
doc_34943 | <html>
<head>
<title> php test script - hope this works </title>
</head>
<body>
<h1>php & mysql connection</h1>
<hr>
<?php
$db_host = "localhost";
$db_username = "vistor";
$db_pass = "visitor";
$db_name = "test";
$db = new PDO('mysql:host='.$db_host.';dbname='.$db_name,$db_username,$db_pass);
$db->setAttribute(PDO::ATT... | |
doc_34944 | Even after using wake lock, I don't know what I am lacking.
Firing Intent
Intent intent = new Intent(this.getApplicationContext(), BroadCastReceiver.class);
//..... some extras
PendingIntent pi = PendingIntent.getBroadcast(getApplicationContext(), code, intent, 0);
manager.setRepeating(AlarmManager.RTC_WAKEUP, time... | |
doc_34945 | I have a few aspx pages for company administrators only.
Is there any way to prevent those pages from non-administrator users using the web.config?
A: In ASP.Net the standard fair for restricting access to pages in the config is via the Location element.
The following example will restrict anyone except users who are ... | |
doc_34946 | Can you please let me know how to convert it into batch processing, so that it executes at-least-once.
Producer Code:
package com.test.anna.KafkaSpark;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayLi... | |
doc_34947 | and my Project Based on
https://github.com/PrismLibrary/Prism-Samples-Wpf/tree/master/17-BasicRegionNavigation
i want to Add Authentication to it :) , just simple Login and Log out...
i have MainWindow and LoginView (Both Two Windows)
my Bootstraper.cs
class Bootstrapper : UnityBootstrapper
{
protected override D... | |
doc_34948 | This has been stumping me for the past week now, so I would appreciate any ideas.
A: I've figured it out and it turns out I just needed to add force to the object to bounce OnCollisionExit with the softbody as well as add force to the softbody bones downwards OnCollisionEnter with an object so it still maintains the e... | |
doc_34949 | SELECT MAX(LastSaleDate) FROM Sales;
Any suggestions?
A: Ensure you have an index for the lastsaledate property, e.g. when upgrading the database do:
store.createIndex('by_lastsaledate', 'lastsaledate');
When querying, use a reverse cursor ('prev') and null range (i.e. all records):
var store = transaction.objectSto... | |
doc_34950 | There is some function in LINQ to SQL that aggregates data by month or by year, but I could not find any function to aggregate data by week.
Could someone help me with LINQ to SQL query to get the data using the two tables? Any suggestion is appreciated.
The first two tables are what I have, and I want to get the thi... | |
doc_34951 | The API call
POST http://localhost:8080/api/v1/adsession
Content-Type: application/json
body {
"sessionId": "abcd123123123",
"serviceGroup": "1234",
"targetCode": {"zipcodes":"30096,30188","code2":"value2"}
}
Route handler
class AdSessionRoutes(services: Services)(implicit ec: ExecutionContext, log: LoggingConte... | |
doc_34952 | What's the best way to test this with protractor? I'm thinking I need two test cases:
it('should not show busy indicator because http response is quick', function () {
// ??
});
it('should show busy indicator because http response is taking longer than 1 second', function () {
// ??
});
A: One way to do thi... | |
doc_34953 | Now whenever two developers add new localized strings on different branches, they produce merge conflicts. In the majority of the cases, localization strings are just added, so manual merge is trivial: Use one version, and append the new strings from the other version.
Even though this is trivial, it would be nice to a... | |
doc_34954 | Here is my code :
private void btnsubmitevent_Click(object sender, EventArgs e)
{
try
{
new frm_addeventcal().Run().Wait();
}
catch (AggregateException ex)
{
foreach (var exi in ex.InnerExceptions)
{
MessageBox.Show("ERROR: " + exi.Message);
}
Mes... | |
doc_34955 | [
{
"Meta": {
"ID": "1234567",
"XXX": "XXX"
},
"bbb": {
"ccc": {
"ddd": {
"eee": {
"fff": {
"xxxxxx": "xxxxx"
... | |
doc_34956 | Example:
$a = 1..9
$a | foreach {if ($_ -eq 5) { "show the line number of $_"}}
I hope you know what i mean.
Thanks!
A: Array.IndexOf Method (.NET Framework)
Searches for the specified object and returns the index of its first
occurrence in a one-dimensional array or in a range of elements in the
array.
Example... | |
doc_34957 | I am using the Coinbase API to 'generate' a button
https://coinbase.com/api/doc/1.0/buttons.html
I have also put the correct API in the $ch variable below as per this page
https://coinbase.com/docs/api/authentication
It fails to fetch anything back. I have posted the correct details to get a response with some data b... | |
doc_34958 | I have been reading for days but I can't find an answer on the apache site, google, or here. In https://maven.apache.org/settings.html it says:
There are two locations where a settings.xml file may live:
The Maven install: ${maven.home}/conf/settings.xml
A user’s install: ${user.home}/.m2/settings.xml
I want to cha... | |
doc_34959 | function change() {
if (document.getElementsByClassName("sliderItems")[0].classList.contains("active")) {
document.getElementsByClassName("sliderItems")[1].classList.add("active");
document.getElementsByClassName("sliderItems")[0].classList.remove("active");
} else if (document.getElementsByClassName("slide... | |
doc_34960 | I have been running my node application with prefix DEBUG=* and in the browser set the variable localStorage.debug='*'.
It goes as follows:
1. Client emits on 'event'.
2. Server receives on 'event' and emits on 'event'.
3. Client does receive on 'event'/client does not receive on 'event' (randomly).
Debug messages appr... | |
doc_34961 | We're using Postgresql / Supabase / PostgREST.
So far I've been able to create the recursive query as a RPC function that returns a table using UNION ALL. This gives me a flat table back and I can't definitively trace back an ingredient to a specific parent recipe (because the same recipe can be called as a child in mu... | |
doc_34962 | Now, on my other Object, I also added a collider (2d of course) and set it as "is trigger" = true, but I also tried it with the box unchecked.
The following Code should execute when the Trigger "area" is entered:
public void OnTriggerEnter2D(Collider2D collider)
{
print("found coin");
manager.AddCoin();
Des... | |
doc_34963 |
A: String str = "clyde";
str = str.Substring(0, str.Length - 1) + 'o';
Tried some online VB converter
Dim str As String = "clyde"
str = str.Substring(0, str.Length - 1) & "o"C
A: in vb.net script:
Dim s As String
Sub Main()
s = "hello world"
s = s.Substring(0, s.Length - 1) & "o"
Console.WriteLi... | |
doc_34964 | HTML
<ul>
<li><a href="#fragment-1"><span>One</span></a></li>
<li><a href="#fragment-2"><span>Two</span></a></li>
<li><a href="#fragment-3"><span>Three</span></a></li>
</ul>
<div id="fragment-1" style="height:1000px;"> </div>
<div id="fragment-2" style="height:800px;"></div>
... | |
doc_34965 | Is there a way we can have a single configuration (be it on a file or in memory/db) which can be shared among all the services on any given server? If so what would that be? If not, why not? If we shouldnt shouldn't go for this approach, why not?
Currently we have such a hierarchy (Folder structure)
Services
- Servic... | |
doc_34966 | int abc(int x) {
for (int i=0; i<x; i++) {
for (int j=0; j<100; j++) {
push to stack;
}
}
return 0;
}
A: Big O notation shows how the performance scales with input size. The inner loop is not at all affected by any change in input size, so it is not reflected in the time comp... | |
doc_34967 | I am also using Retrofit to make any network calls required to populate the database with new data.
I have set up an observer in my Fragment as follows:
private void setUpObserver() {
tfViewModel = ViewModelProviders.of(getActivity()).get(TFViewModel.class);
tfViewModel.getAllPosts().observe(getActivity... | |
doc_34968 | "(<a href=['\"]?([\\w_\\.]*)['\"]?)"
The problem with this approach is that it fails to capture hrefs that also have # in their value. I've tried
"(<a href=['\"]?([\\w_\\.#]*)['\"]?)"
and
"(<a href=['\"]?([\\w_\\.\\#]*)['\"]?)"
with no success.
What am i doing wrong?
Thank you
A: I don't think the problem is with... | |
doc_34969 | I have issue with printing in Chrome. Chrome in print preview adds own margins...
Can I change default setting for print output in Chrome. If I choose set value for margins = none, it looks ok, but I need to get such result, using CSS.
I've tried to add
@media print and (color) {
* {
-webkit-print-color-a... | |
doc_34970 | //Following code to generate 25
Button with unique name for each
button
// 25 buttons contains value
from 1 to 25
// like
btn1='1',btn2='2' ... btn25='25'
<?php
$j=0;
for($i=1;$i<=25;$i++)
{
$j++;
... | |
doc_34971 | Interestingly, if I push 6 right after I push 5 and then print, it works. Thus, I suppose the problem occurs when there is only one element in the stack.
Any ideas?
Thank you in advance!
.fmt:
.asciz "%d\n"
.text
.globl _start
_start:
push $5
pop %rdx
mov %rdx, %rsi
push %rdx
mov $.fmt, %rdi... | |
doc_34972 | I have the content element back-end template defined like this:
{namespace flux=Tx_Flux_ViewHelpers}
{namespace v=Tx_Vhs_ViewHelpers}
<f:layout name="Content" />
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
xml... | |
doc_34973 | import { LitElement, html } from 'lit-element';
class Component extends LitElement {
render () {
return html`
<slot name="activator">
<button @click="${this.openDialog}">Default Button</button>
</slot>
<custom-dialog></custom-dialog>
`;
}
openDialog () {
// code to open di... | |
doc_34974 |
but this is how I sent it. Is there a solution to this?
The code I wrote for Vue.js output is as follows
p(v-html="selectedProduct.description")
This
Html Output
A: Make sure any of your ol or ul default style list-style-type property is overwritten. If it's overwritten you can override the style unde... | |
doc_34975 | {
"parentId":"1234",
"otherParentProperty":"someProperty",
"nestedArray":[
{
"propertyId":"1234"
"property1":null,
"property2":"some value"
},
{
"propertyId":"5678"
"property1":null,
"property2":"some other value"
}
]
}
How can I copy the value of property2 for each element and set it in the corresponding property1? S... | |
doc_34976 | Link to the problem:
http://desa.uchile.cl/noticias/92894/beauchefiana-blanca-duran-se-corono-campeona-nacional-de-tenis-mesa
the html source code:
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8"/>
<meta property="og:type" content="blog" />
<meta property="og:image:type" content="image/jpg" />... | |
doc_34977 | Is there a way to configure this option on my date picker?
Actual programming:
func createDatePicker() {
datePicker.datePickerMode = .date
datePicker.locale = NSLocale.init(localeIdentifier: "es_MX") as Locale
if #available(iOS 13.4, *) {
datePicker.preferredDatePickerStyle = .wheels
} els... | |
doc_34978 | const handleAddToHistory = (e) => {
e.preventDefault();
setValue((parseFloat(Object.values(data))*fromTo).toFixed(2))
setHistory([ ... history , {
date: new Date().toISOString().slice(0, 10),
before: fromTo,
after: value,
}])
}
However, on the first run "value" is empt... | |
doc_34979 | "Unhandled exception thrown: read access violation. this was 0xCDCDCDCD."
Is anyone able to look at the code below and help point me toward the issue? I've gone through it many times and cannot figure it out (I'm using Visual Studio 2019). Any help would be greatly appreciated.
using namespace std;
#include <string>... | |
doc_34980 | cpu.usage()
.then(info => {
console.log(info)
})
EDIT:
I tried to edit the code according to your recommendations, unfortunately I still couldn't find where I'm making a mistake.
I used the async function with await. Now I would like to return and display the value in systemdata, but the output shows Promis... | |
doc_34981 | class SerialController : NSObject, ORSSerialPortDelegate {
var port : ORSSerialPort
init(path: String){
port=ORSSerialPort(path: path)
port.close()
}
func open(){
port.baudRate=9600
port.delegate=self
port.open()
}
func close(){
port.delegate=ni... | |
doc_34982 | f_in = open("/dev/videobuf", O_RDONLY);
f_mmap = mmap(0, BUFFER_SIZE, PROT_READ, MAP_SHARED, f_in, 0);
f_out = open("/dev/sda", O_WRONLY | O_DIRECT);
write(f_out, f_mmap, BLOCK_SIZE);
where BLOCK_SIZE is sector aligned value. f_out is opened without any errors, but write results in EFAULT. I tried to track down this i... | |
doc_34983 | Below is some example data on what lunch options were served on which days at school. I have already parsed my data and this is the reduced form. Originally it was in the form of complex character strings.
soup = c(15:18)
grilledcheese = c(0:19)
pasta = c(3:13)
I want to create a graph similar to this one, with days o... | |
doc_34984 | vagrant@homestead:~$ ping google.com
ping: google.com: Temporary failure in name resolution
vagrant@homestead:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=23.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=21.9 ms
^C
--- 8.8.8.8 ping statistics ---
2 pa... | |
doc_34985 | There are tons of repositories of 3D models in various formats but it seems that only a small fraction of them have texture coordinates. I'm looking for find some well known stuff like the stanford bunny or the teapot, with texture coordinates.
Anybody know where I can find these?
A: GLUT has a function for generati... | |
doc_34986 | //Loop
while (true)
{
//*active* is the bool that I want to toggle
if (active)
{
if (*CRITERIA*)
{
*CODE*
}
}
Sleep(1);
}
A: The negation of the current state is the new state you want:
active = !active;
| |
doc_34987 | Below is the data from the table (I changed the names on the first 2 fields to get it to fit in the SO format from menu_item_id to id, and from menu_parent_id to pid).
id pid menu_item_name menu_url sortorder status
1 0 Settings 0 ACTIVE
2 5 Grid Demo ... | |
doc_34988 | Written like this (in eachBatch)
parsedDf \
.select("somefield", "anotherField",'partition', 'offset') \
.write \
.format("delta") \
.mode("append") \
.option("mergeSchema", "true") \
.save(f"/mnt/defaultDatalake/{append_table_name}")
I need to keep a fast view on this... | |
doc_34989 |
Notice: Undefined index: username in B:\dev\project\web\ted\login.php on line 6
Notice: Undefined index: password in B:\dev\project\web\ted\login.php on line 7
My php codes:
<?php
$con=mysql_connect("localhost","root","");
mysql_select_db("ted_db",$con);
$user=$_POST['username'];
$pass=$_POST['password'... | |
doc_34990 |
public class ApplicationView extends Application {
private static Context mContext;
private static final String TAG = "ApplicationView ";
public static Context getContext() {
Log.i(TAG, "getContext: " + mContext);
return mContext;
}
public static void setContext(Context... | |
doc_34991 | <video id="bgvid" playsinline="" autoplay="" muted="" loop="" style="margin-right: 3px;width: 300px;">
<source src="vid/le'toile.mp4" type="video/mp4">
</video>
<div id="polina">
<h1>Le'toile</h1>
<p>ART of Switching</p>
<p>We believe that a seamless blend of Art & Technology makes what we create, Alive and Evo... | |
doc_34992 | I created a script that processes timesheet data in a Google spreadsheet, generates a Google document invoice from a template, and then creates email drafts with said invoices attached as PDFs. It all starts with a
var sheet = SpreadsheetApp.getActiveSheet();
, which was fine while I was working with a sample spreadsh... | |
doc_34993 | FOLLOW UP 1:
One solution that I can think of is to create one ROUTER socket on each process, and each ROUTER socket will connect to all the ROUTER sockets of the other processes (all-to-all connection). Will that work?
FOLLOW UP 2:
Another solution that I can think of is to use ROUTER and DEALER socket instead. Maybe ... | |
doc_34994 | There are a lot of messages in my code saying the files imported may be "undefined or defined" which is confusing. I can't tell if that's the reason or not.
(I'm using repl.it, and just started trying to learn pygame a week ago)
main.py CODE:
from settings import *
from tiles import tiles
#pygame setup
pygame.init()
sc... | |
doc_34995 | I need to create a simple vector or vector-like data structure that has indexable access, for example:
arr[0] = 'a';
arr[1] = 'b';
//...
arr[25] = 'z';
From this structure, I would like to remove some index, for example index [5]
The actual value at the index does not need to be erased from memory, and the values shou... | |
doc_34996 | style="position:fixed;top:0;"
on HTML tags in Chrome Dev Tools Elements pane?
I'm using a custom JS framework that uses inline styles for styling components and this makes HTML debugging harder. element.style{} under Styles pane shows the style anyway so having it in the source is only a distraction, especially since s... | |
doc_34997 | if err?
res.end 'Error!'
else
res.write 'got here'
partial 'partials/table', {items: data, layout: false}
res.end()
return
I get the following error on my server:
partial('partials/table', {
^
ReferenceError: partial is not defined
Any idea?
A: While the examples i... | |
doc_34998 | I referred this link
https://developers.google.com/analytics/devguides/collection/ios/v3/?configured=true
My code is .
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);
My Log is :
Attempt... | |
doc_34999 | At the same time, most systems also allow unique contraints on nullable columns.
Why is it that unique constraints can have NULLs but primary keys can not? Is there a fundamental logical reason for this, or is this more of a technical limitation?
A: A primary key defines a unique identifier for every row in a table: w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.