id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23498200 | ggplot(mpg, aes(x = displ, fill = trans, label = trans)) +
geom_histogram(binwidth = 1,col="black") +
stat_bin(binwidth=1, geom="text", position=position_stack(vjust=0.5), aes(label=ifelse(..count..>4, as.character(trans), "")))
The above code throws following error
*Error in ifelse(count > 4, as.character(trans)... | |
doc_23498201 | There are other questions about (more or less) the same issue. However they where asked / answered several years ago and the Guidelines have been updated since then. Additionally the circumstances are always a little bit different.
I am well aware, that nobody can give me any kind of guarantee on which interpretation o... | |
doc_23498202 | Unfortunately this component https://ionicframework.com/docs/api/radio allows very little access to customise it's CSS through CSS variables. What i'm trying to achieve is to set the style of this checkbox icon to match this https://i.stack.imgur.com/PQnkY.png . Currently the style is the default one which corresponds ... | |
doc_23498203 | The method show of my UsersController shows the user well, but I still did an AdminController to create an administrators profile page.
Route::namespace('Admin')->prefix('admin')->name('admin.')->middleware('can:manage-admin')->group(function() {
Route::resource('formations', 'FormationsController');
Route::resource('u... | |
doc_23498204 | i commented out the code for the toolbar in the xml and also the mainactivity in an attempt to debug the app. but the same error appears for the floating action button which i also have in my layout which indicated to me the problem wasn't the Toolbar but something else.
this is the logcat :
Process: com.example.alar... | |
doc_23498205 |
EDITOR's NOTE: The time limit have varied over the time and might vary between "consumer" (free) and "Workspace" (paid) accounts but as of December 2022 most of the answers are still valid.
I am sorting tens or sometimes thousands files in one run.
Are there any settings or workarounds?
A: One thing you could do (th... | |
doc_23498206 | res.setHeader('Access-Control-Allow-Origin', 'http://localhost:3000');
res.setHeader('Access-Control-Allow-Credentials', 'true');
but still get 401 error. the code I have is this:
also the React client is running on: http://192.168.1.18:3000
and express server on : http://192.168.1.18:3005
Client side
this is the requ... | |
doc_23498207 | To install OpenCV on Ubuntu it's simple, just run the shell file with the installation commands (print out the contents of this file below).
But I am not able to do the installation process on Windows 10 and I need it a lot, because there are programs that are not supported by Ubuntu, so I have to use Windows.
Do you k... | |
doc_23498208 |
Failed to save the script
Database Account: myaccountname, Script: HelloWorld, Message: {"code":500,"body":"{\"message\":\"An error has
occurred.\"}"}
And the textbox under Results is unchanged.
Below is a screenshot of how it looks in azure portal:
A: @MichaelRätzel: I have just written a very simple CosmosDB Sc... | |
doc_23498209 | How can do simply and effective? Help me.
A: Try this:
SELECT SUM(TABLE_ROWS) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '{database}';
A: SELECT distinct t.name, p.rows
FROM sys.tables AS t
INNER JOIN sys.partitions AS p
ON t.object_id = p.object_id
ORDER BY t.name
| |
doc_23498210 | I've created a fiddle with what I thought will work: https://jsfiddle.net/8aL1stcs/
the plot as such is working fine, here is a version of the fiddle with the X axis commented out: https://jsfiddle.net/8aL1stcs/1/
var elementID = "#myPlot";
var myData = {};
//myData.x = 'x';
//myData.xFormat = "%Y-%m-%d";
myData.type ... | |
doc_23498211 | add_filter( 'woocommerce_get_order_item_totals', 'adjust_woocommerce_get_order_item_totals' );
function adjust_woocommerce_get_order_item_totals( $totals ) {
unset($totals['cart_subtotal'] );
return $totals;
}
It isn't working, the Subtotal is visible on the Cart and Checkout pages.
Is there any other functi... | |
doc_23498212 | 2020-06-05 09:13:30 DEBUG cache:45 - TemplateLoader.findTemplateSource("index_en.ftl"): Not found
2020-06-05 09:13:30 DEBUG cache:45 - TemplateLoader.findTemplateSource("index.ftl"): Found
2020-06-05 09:13:30 DEBUG cache:45 - Loading template for "index.ftl"("en", UTF-8, parsed) from "jar:file:/C:/Users/sadakarp/.m2/re... | |
doc_23498213 | "scripts": {
"dev": "next dev && ts-node --compiler-options {\"module\":\"CommonJS\"} services/airdropLoop.ts",
"build": "next build",
"start": "next start && ts-node --compiler-options {\"module\":\"CommonJS\"",
"postinstall": "prisma generate"
},
Note that the reason I use --compiler-options "{"mod... | |
doc_23498214 | time ago : 15:10
i wanna get this message [10 minutes ago]
but my laptop time is : 15:30
so i get [30 minutes ago]
Is there a solution ???
This is the code :
<script>
jQuery(document).ready(function() {
jQuery("time.timeago").timeago();
});
</script>
<time style="float:right;margin:-20... | |
doc_23498215 | $to = "account@gmail.com";
$subject = "mail title";
$message = "mail content";
$from_mail = "sender@site.com";
$headers = 'MIME-Version: 1.0\r\n'.
'From: '.$from_mail.'' . "\r\n" .
'Reply-To: '.$from_mail.'' . "\r\n" .
'Content-type: text/html; charset=utf-8' . "\r\n";
... | |
doc_23498216 | I press import numpy as np and nothing
A: You have to install it first. Search “Python Pip” on google and download Pip. Then use that to open CMD and type “pip install (Module)”. Then it should import with no errors.
A: first install pip (for example in ubuntu use either of the following)
$> sudo apt install python-p... | |
doc_23498217 | Am I missing something?
| |
doc_23498218 | Added position to list "pusta" do not stay constant while i change variable "row". The result should look like that: [[0, 1, 2], [1, 2, 3], [2, 3, 4]]. I get [[2, 3, 4], [2, 3, 4], [2, 3, 4]]. I write in DartPad.
I tried to change row to string while adding to list, but tests on Codewars do not take it as solution.
lo... | |
doc_23498219 | Here's the code I'm using to generate the curve:
library(ggplot2)
library(grid)
set.seed(9)
T<-sort(runif(2^12,min=2^-5, max=16))
U<-function(t) exp(4*log(t) - 4*t)*(cos(log(t) + 3*t))
#Re(t^(4+1i)*t)*exp(-(4-3i)*t))
V<-function(t) exp(4*log(t) - 4*t)*(sin(log(t) + 3*t))
#Im(t^(4+1i)*t)*exp(-(4-3i)*t))
X<-sapply(T,... | |
doc_23498220 | <xs:element name="beStatus">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="1" />
<xs:enumeration value="A" />
<xs:enumeration value="D" />
</xs:restriction>
</xs:simpleType>
</xs:element>
when i try to validate the xml using this scheme ... | |
doc_23498221 | import json
import time
client = boto3.client('elbv2')
desired_capacity=8
client.set_desired_capacity(
AutoScalingGroupName='Test-Web',
DesiredCapacity=desired_capacity,
HonorCooldown=True)
and
boto3==1.7.1
When I run this script I get a
File "deploy_staging_web.py", line 6, in <module>
client.set... | |
doc_23498222 |
Fatal error: Uncaught ReflectionException: Class App\Http\Kernel does not exist in /var/www/html/cms/vendor/laravel/framework/src/Illuminate/Container/Container.php:734
The class does exist in app/Http/Kernel.php.
Those are permissions of the file
-rw-rw-r-- 1 ivan www-data 1537 nov 26 2016 Kernel.php
Those are per... | |
doc_23498223 | I have my data like the above image.
i want to achieve my output like the below image
I want to list all matching product codes for the given categories.
FILTER works for single input.
But i need a single formula which works for multiple inputs.
Test sheet link : https://docs.google.com/spreadsheets/d/15YmilAMPVv5zgAG... | |
doc_23498224 | import com.hp.hpl.jena.db.DBConnection;
import com.hp.hpl.jena.db.IDBConnection;
import com.hp.hpl.jena.db.impl.Driver_HSQL;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import com.hp.hpl.jena.rdf.model.ModelMaker;
public class Test
{
/** */
private String idbDrive... | |
doc_23498225 | echo '<button onclick="document.getElementById("."formInner".").innerHTML= document.getElementById("."SaveTheForm".").innerHTML" type="button">Edit the Table</button>';
echo '<textarea id="formInner"></textarea>';
SaveTheForm is an id of a form.
A: Just try this
echo '<form id="SaveTheForm">';
echo '<button onclic... | |
doc_23498226 | for each chapter, I can add a subchapter (which is in fact an other chapter ( but with id parent not null))
class Chapter
{
/**
* One champ has One parent champ.
* @ORM\ManyToOne(targetEntity="Chapter", inversedBy="children")
* @ORM\JoinColumn(name="id_parent", referencedColumnName="id")
... | |
doc_23498227 | //Menu in Google Sheet
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Dashboard')
.addItem('Email Dashboard','emailDashboard')
.addToUi();
}
//Convert dashboard to PDF and email a copy to user
function emailDashboard() {
// get sheet id
var ss = SpreadsheetApp.getActiveSpreadshee... | |
doc_23498228 | Students (StudentId,Name,Address)
Subjects (SubjectId,SubName)
Stud_Subjects (StudentId,SubjectId)
And I hv created c# classes for Student and Subject. I want to take data from Stud_Subjects table do i need to create another class named "Stud_Subject". How to add add properties to that class.
lets say I want to get da... | |
doc_23498229 | the matching IDs (by turning to zeros), or to do nothing.
data_tran_contam_filt_react = reactive({
if(input$contam_filter == "Remove"){
data_tran = data_tran_react()
contam_datafile = contam_datafile()
rownames(data_tran) = data_tran$Feature.ID
# data_tran = data_tran[ ! data_tran$Feature.ID %in% ... | |
doc_23498230 | Here's the code where I register the annotations:
map.register(customAnnotation.self, forAnnotationViewWithReuseIdentifier: "customAnnotation")
map.register(MKPointAnnotation.self, forAnnotationViewWithReuseIdentifier: "standardAnnotation")
and the delegate method:
func mapView(_ mapView: MKMapView, viewFor annotation... | |
doc_23498231 | RecCnt Store DelNo DelDate TruckNo ItemCode LotNo Line
2 443 B10237819 20220108 ZZZ023 10072879 0005113056 1
2 443 B10237819 20220108 ZZZ023 10072879 0005113430 2
2 443 B10237819 20220108 ZZZ023 10078415 0005109945 3
2 443 B10237819 20220108 ... | |
doc_23498232 | Previous Folder Structure.
project Folder
│
|The .git file is in this Project Folder
|└───folder1
| |
| | Files
| | The Files in this Folder get Tracked
| |----------
|
|
|
|
|----folder2
|
|------Sub-Folder
|
|The Files is this Sub-Folder do not get tracked
... | |
doc_23498233 |
I have my indention level set to four spaces. I double checked the number of spaces for the tags (b/c sometimes if you're missing a space sublime doesn't recognize it as a proper indention) and the number of spaces is fine:
I've been reading through the docs and looking in the forums but I can't seem to find a soluti... | |
doc_23498234 | To demonstrate:
$ mkfifo /tmp/foobar.pipe
$ some_program --command-fd=5 5</tmp/foobar.pipe
In this case, some_program is not run until some process has /tmp/foobar.pipe open for write; however, some_program has useful effects even when it isn't receiving commands, so desired behavior is for some_program to be immediat... | |
doc_23498235 |
I would like to add the missing person_ids in Table_2 by referring records from Table_1.
If you see the above tables, you can notice that person_id = 2,4 from table_1 is missing in table_2.
Though I am able to do this with help from forum, the problem is with the not null constraint.
Table 2 create table definition i... | |
doc_23498236 | .wrapper{
width: 300px;
height: 500px;
.container {
width: 50%;
height: 20%;
.inside {
color: red;
}
}
}
However in order to use the same CSS in CSS modules it requires to write it as follows:
.wrapper{
width: 300px;
height: 500px;
}
.wrapper .container {
width: 50%;
... | |
doc_23498237 | ...{$.get('../action.php',params, function(retcode){...} )};
which works as required, at least with Safari on a Mac.
But if I put the action.php file into a folder and write
...{$.get('../action_files/action.php',params, function(retcode){...} )};
I get a load error 500 for the php file.
I still get it if I replace the... | |
doc_23498238 | A: I used this code, it is working fine
var arr = MyDiv.getElementsByTagName('script')
for (var n = 0; n < arr.length; n++)
eval(arr[n].innerHTML)//run script inside div
A: JavaScript inserted as DOM text will not execute. However, you can use the dynamic script pattern to accomplish your goal. The basic idea is ... | |
doc_23498239 | Basically I want to let user write something on the images which my camera app will click for them. I can write and show it to them using the onDraw method on the preview of the camera. But after the user has clicked the picture I want to write the text over the picture and then save it.
A: You have to implement a can... | |
doc_23498240 | Is there any way to convert directly from .cgm to .jpg? If yes then how?
| |
doc_23498241 | When a user "dials" me, I must "anwser then press 6" on the phone.
So I'm trying to send a tone to the cable....
I've added a new Windows 10 remote dial-up connection to the number 6. Named "door"
So in console I would get: rasphone -d door
But doesnt works.....
How can I open this dooor with my computer? [Android :D... | |
doc_23498242 |
A: No, we do not current offer this functionality.
A: It cannot be done, but rather easily you can set up your own database and store the data there, using FB uids/event ids/page ids etc as your primary keys.
| |
doc_23498243 | My problem is the following, I am in planning stage of building an quiz ios-app. In some cases it would actually hand out physical prizes monthly, which means security must be tight enough to decrease cheating possibilities.
I will build a backend in PHP, on a debian server with Apache and a certified SSL (Rapid-SSL). ... | |
doc_23498244 | As base data, I have the following table:
declare @table table
(
id1 int,
id2 int,
ch char(1) not null,
val int
)
insert into @table values (1112, 121, 'A', 12)
insert into @table values (1351, 121, 'A', 13)
insert into @table values (1411, 121, 'B', 81)
insert into @table values (1312, 7, 'C', 1... | |
doc_23498245 | On domain A, i have a php file that when called with specific GET variables (URI) will return a JSON string to the caller. The idea is i send user and pass and get back a json string with a variable saying wether it was successfully loggedin, user data in case yes and error message case no.
Then i created in domain B a... | |
doc_23498246 | Conversation to PDF or Docx works, but when I am displaying file name, it just skips UTF-8 encoded letters, in my case, Lithuanian letters like ą,č,ę,ė,į,š,ų,ū
What I have tried so farm is :
<h:form enctype="multipart/form-data;charset=UTF-8">
Charset.forName("UTF-8").encode(myString)
or
byte[] bytes = templateTitl... | |
doc_23498247 | What I am trying to achieve is to load an import.sql on start of the test (which is a dump file from existing MySQL schema) and load it into H2 database.
Here is the hibernate config file:
@Configuration
@EnableTransactionManagement
@ComponentScan({ "kamienica.feature" })
public class HibernateTestConfiguration {
... | |
doc_23498248 |
*
*MainImage
*Summary
*Description
DECLARE @missingFields varchar(100)
SET @missingFields = ''
SELECT
c.[UnitReference] as 'UnitRef',
t.[NodeName] as 'Property',
@missingFields as 'Field/s missing'
FROM [DetailPage] d
INNER JOIN [CRM] c
ON d.ItemID = c.ItemID
INNER JOIN
[Tree] t
ON d.[ID] = t.[ID]
WHERE (ISN... | |
doc_23498249 | I am trying to have a vertical list where each list item has it's own icon, where is loaded in a single sprite. I seem to have got some of the way where the image is displayed in the background.
How do I crop the sprite image to show correctly, and how do I offset them to show different images?
HTML
<ul>
<li class... | |
doc_23498250 | Currently I have something that looks like this in my code:
PictureBox display = new PictureBox();
display.Width = 360;
display.Height = 290;
this.Controls.Add(display);
display.Image = bmp;
However, the size of my display is hard-coded to a specific value.
I know that if I want to draw a square that re-sizes I can us... | |
doc_23498251 | - (void)viewDidLoad
{
[super viewDidLoad];
}
So the super is calling the parent classes function, but where is self allocated?
A: self is a pointer to the “current object”, it’s allocated in the usual initialization formula:
NSObject *foo = [[NSObject alloc] init];
When you call [NSObject alloc], the class creat... | |
doc_23498252 | list1(fields)-->City , ID
list2(fields)-->customer , ID
I need to join these two lists on the basis of similar ID, I can't use the lookup column method. How can it be achieved?
(using sharepoint online, caml query and sharepoint web services)
A: It isn't possible to use a CAML Join to join two lists, without a looku... | |
doc_23498253 | ARG UBUNTU_VER=18.04
ARG CONDA_VER=latest
ARG OS_TYPE=x86_64
ARG PY_VER=3.9
ARG PANDAS_VER=1.3
ARG BEDTOOLS_VER=2.3
FROM ubuntu:${UBUNTU_VER}
# Copy clinvar and parse_vcf.py to directory called /mydir/
COPY . /mydir/
# System packages
RUN apt-get update && apt-get install -yq curl wget jq vim
SHELL ["/bin/bash", "-c"]... | |
doc_23498254 | Now we had to add other classes and .a files(Unity Vuforia files) in the project. For it we had to revert "Dead Code Stripping" to YES. In debug mode everything works fine and widevine DRM Player works fine. But in archive builds it crashed immediately. If "Dead Code Stripping" is set to No then we are getting followin... | |
doc_23498255 | First I setup a ServiceCollection
var serviceCollection = new ServiceCollection();
serviceCollection.AddTransient<IMyPlugin, MyPlugin>();
IMyPlugin inherits from the interface IPlugin
I then build a service provider
serviceProvider = serviceCollection.BuildServiceProvider();
Then I try to get my service from it
var m... | |
doc_23498256 | So far I came up with this which already fits my needs. But I wonder if there are some caveats to this method. Am I missing something?
jQuery(document).ready(function($) { // wait till page is loaded
$('form :input').on("input", function() { // listen on all input fields on all forms
form_name = $(this).parents("... | |
doc_23498257 | c:\myproj\boost_1_46_0\boost\thread\win32\thread_heap_alloc.hpp(97): error C2061: syntax error : identifier 'heap_memory
c:\myproj\boost_1_46_0\boost\thread\detail\thread.hpp(134) : see reference to function template instantiation 'T *boost::detail::heap_new<boost::detail::thread_data<F>,void(__cdecl *)(void)>(... | |
doc_23498258 | VARIABLE=development rails s
How do I make this variable start automatically, without having to wright it myself every time?
So I would then just do this
rails s
and it would run automatically with that variable.
A: Bundle the dotenv-rails gem, then create a .env file with the content:
VARIABLE=development
The gem ... | |
doc_23498259 | Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
where culture = {fr-be} =>French Belgium.
FYI, this action filter sets the culture on user choice.
in one of myAction user is entering Date in format [dd/mm/yyyy] => 26/7/2011.
Action is as follows
public Actio... | |
doc_23498260 | typedef struct __attribute__((packed)){
uint8_t magic[2]; /* the magic number used to identify the BMP file:
0x42 0x4D (Hex code points for B and M).
The following entries are possible:
BM - Windows 3.1x, 95, NT, ... etc
BA - ... | |
doc_23498261 |
Code
GridLayout layout = new GridLayout(1, true);
layout.marginWidth = 300;
Group group = new Group(this, SWT.SHADOW_OUT);
group.setText("Open file locations");
group.setLayout(layout);
Button optionOne = new Button(group, SWT.CHECK | SWT.LEFT);
optionOne.setText(AppMessages.msg("Open file A") );
Button optionTwo = ... | |
doc_23498262 | From a Ruby perspective, I'm trying to find a way of doing (1..100).each_slice(5) do |this_slice| in Rust.
I'm trying things like
for mut segment_start in (segment_size..max_val).step_by(segment_size) {
let this_segment = segment_start..(segment_start + segment_size).iter().take(segment_size);
}
but I keep getting... | |
doc_23498263 | {
public A()
{
// DoSomething
// If something is not correct return null;
}
}
public class B : A
{
public B() :base()
{
// Check if everything was fine in base class
}
}
How to check here if base class returned null or it has done his job? Then according this, I want to... | |
doc_23498264 | I know 200 means OK, but then whats the 203 for? Surely there can only be one status code?
The full responses are:
"GET /getLocationForAllFriends?uid=4&passport=0000 HTTP/1.1" 200 203 0.4243
"GET /getLocationForAllFriends?uid=5&passport=0000 HTTP/1.1" 200 8 0.3206
Everything makes sense except for the "slot" where 203... | |
doc_23498265 | What I've tried:
$(window).bind("unload", function(e) { console.log("====EXIT===="); console.log($(this)); console.dir(e); } );
Neither the $(this) nor "e" (event) reference the element that caused it.
*
*$(this) is nothing
*and "e" prints an empty object "c.Event"
A: The JavaScript event is "onBeforeUnload" and... | |
doc_23498266 | > a:Optional[str]=None
> type(a)
<class 'NoneType'>
> a:str=None
> type(a)
<class 'NoneType'>
Thanks.
A: locals() and globals() keep track of annotations of variables in the __annotations__ key.
>>> from typing import *
>>> a: Optional[int] = None
>>> locals()['__annotations__']
{'a': typing.Union[int, NoneType]}
>>... | |
doc_23498267 | ||
doc_23498268 | I get this error when trying to predict with my neural network:
ValueError: Error when checking : expected input_1 to have shape (12,) but got array with shape (1,)
However if i print(x.shape) it returns as (12,)
This is the code block:
def predict(str):
y = convert(str)
x = data = np.array(y, dtype='int64')
... | |
doc_23498269 | At the application level, we have syscalls and below we have vfs_read/vfs_write. Is there anything similar for device mapper layer?
I have been stuck here for very long. Any help will be appreciated.
A: NOTE: My answer is related to kernel version < 3.14, because since 3.14 API is slightly changed.
In kernel you read/... | |
doc_23498270 | /home/user/shap/venv/bin/python /home/user/Desktop/pycharm-community-2021.1.2/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py --path /home/user/shap/tests
Testing started at 10:51 a.m. ...
Launching pytest with arguments /home/user/shap/tests in /home/user/shap/tests
ERROR: usage: _jb_pytest_runner.py [options]... | |
doc_23498271 | "use srict";
var btn = document.getElementsByTagName("button");
btn.forEach(function(item) {
item.addEventListener('click' , function(){
item.style.display('none');
});
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initia... | |
doc_23498272 | global
chroot /var/lib/haproxy
user haproxy
group haproxy
defaults
timeout connect 10s
timeout client 50s
timeout server 50s
frontend fe_https_tomcat
mode tcp
bind *:443 ssl crt /path/cert.pem alpn h2,http/1.1
default_backend be_tomcat
backend be_tomcat
mode tcp
server loc... | |
doc_23498273 | in admin/user.rb i have
ActiveAdmin.register User do
permit_params :email, :name, :firstname, :mailsent, :email_confirmed,
:adminuser, :approved
index do
column :email
column :name
column :firstname
column :mailsent
column :email_confirmed
column :adminuser
column :approved
actions
end
end
A: ... | |
doc_23498274 | Insert INTO Table1 (ID,Qty)
Select ID,Qty from Table2
I pulled table2 from an excel spreadsheet. I made sure that every field property like field size, format, required, indexed etc matches for both fields but I am still getting the validation rule violation error.
I also tried to Insert only the ID or quantity field... | |
doc_23498275 | I want to render an object of the Index with an .onClick function. However, the function needs Body to be rendered first.
Because I need to access an object in Body, I thought about adding the .onClick function to the object from Index right at the parent App component.
This is how I did it. Everything loads, but the e... | |
doc_23498276 | I've got literally less than 24 hours of Python experience, so I hope you'll overlook my inability to apply advice from other threads to my own question.
I'm using BeautifulSoup to pull down a table, but I'm getting weird results. I'm inputting the following:
# -*- coding: utf-8 -*-
#Fetch table
import sys
import req... | |
doc_23498277 | std::wstring wsFoo(L"\"4\"");
int iSize = 1; // Number of characters the number will have
int iResult = -1;
swscanf_s(wsFoo.c_str(), L"\"%*d\"", iSize, &iResult);
wprintf_s(L"%d", iResult);
According to http://www.cplusplus.com/reference/clibrary/cstdio/printf/ the asterisk in %*d should mean: The width is not specifi... | |
doc_23498278 |
A: You can use ScheduledExecutorService :
ScheduledExecutorService execService
= Executors.newScheduledThreadPool(5);
execService.scheduleAtFixedRate(()->{
/*
you can call the repeated function here
*/
}, initialDelay, PERIOD, TimeUnit.MILLI... | |
doc_23498279 | It worked good for a while but recently I have been experiencing intermittent issues with it not downloading the attachments.
I'm starting to think the rule is the issue and not the script.
Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "path where ... | |
doc_23498280 | There needs to display some information about User and at the same time needs to load single Message.
I try to do something like:
mycontext.Users.Where(..).Include(user => user.Messages.Take(1).First());
However this code throws ecxeption
InvalidOperationException: The property expression 'user=> {from
Message ... | |
doc_23498281 | Well, I have a main page where I want to show the messages of all other controller and views.
In this "main" view I have the following
<div class="row" data-ng-repeat="msg in messages">
<div class="col-lg-12">{{mgs.message}}
<a data-ng-click="close(msg)">×</a>
</div>
</div>
When I set a message ... | |
doc_23498282 | For example:
["H", "e", "l", "l", "o"].getRangeIndexes(["e", "l", "l"]);
// [1, 3]
A: You can write a function like getRangeIndexes as below..
void main() {
List<String> fullStringList = ["H", "e", "l", "l", "o"];
List<String> subStringList = ["e", "l", "l"];
print(getRangeIndexes(fullStringList, subStringList)... | |
doc_23498283 | But I can't seem to find the column the error is aimed at, since there's only nvarchar.
The error I'm getting is the following:
I'll also add images of the datasets I'm using for the databases:
*
*The on-premise table
*The table that has to be a copy of the on-premise table (BC)
A: Thank you Damien_The_Unbeliever ... | |
doc_23498284 | my Directive is something like this:
export class chModalDialog implements ng.IDirective {
public restrict = 'A';
//static $inject = ["$rootScope", "modalService"]
constructor(
private $rootScope: ng.IRootScopeService,
private modalService: CH.Interfaces.IModalsService) {... | |
doc_23498285 | How can I convert it without depending on System.Drawing?
A: One of the libraries that has this functionality is ColorMinePortable. It has no dependencies on System.Drawing:
using ColorMine.ColorSpaces;
var hex = new Hex("#1d8102");
var rgb = hex.ToRgb();
var red = rgb.R; // 29
var green = rgb.G; // 129
var blue = ... | |
doc_23498286 | I have the following:
private HashSet<MyClass> _mySet; // module level
IEnumerable<ISearchKey> searchKeys; // parameter.
// Partial key searches are allowed.
private IEqualityComparer<ICoreKey> _coreKeyComparer; // Module level.
// Compares instances of MyClass and ISearchKey to determine
// if they match.
Gi... | |
doc_23498287 | Why I see 2 different declarations of the class ThisAddIn in the Add-In project?
a) the first one in the file ThisAddIn.cs
public partial class ThisAddIn
b) the second one in the file ThisAddIn.Designer.cs
public sealed partial class ThisAddIn : Microsoft.Office.Tools.AddInBase
How these two declarations are interrel... | |
doc_23498288 | note that I only wish to use a UITextView, and I have no problem using CoreText
Thank you in advance,
A: You can use the CTFrame classes, along with related class CTFrameSetter, to create a path around the image and wrap the text.
Here is a related article: http://blog.amyworrall.com/post/11098565269/text-wrap-with-c... | |
doc_23498289 | I've got them shared as visible to public, and I can get a list of the images here:
https://googledrive.com/host/0B3jFSjcavNweSWdFMUFfUGJNUEE/
I can embed this view on my site no problem using an iframe.
What'd I'd really like is an embeddable view that shows a thumbnail for each image, rather than a list of filenames ... | |
doc_23498290 | //Method 1:
Func<SalesOrderLineEntity, bool> func01 = (o => o.SOLNumber == "123456");
var q01 = _context.SalesOrderLineEntities.Where(func01).ToList();
//Got the result, but SQLServer Read All Records to memory before "where"
//Method 2:
Expression<Func<SalesOrderLineEnt... | |
doc_23498291 | My view looks like
class SpecsView(DetailView):
model = Specification
def get_context_data(self, **kwargs):
context = super(SpecsView, self).get_context_data(**kwargs)
pretty_json = "So pretty so pretty"
context['pretty_json'] = pretty_json
context['hello'] = "Hellow hellow"
... | |
doc_23498292 | If i run same sample on android 2.3.6(htc hd2) there is no problem and it works.
Is there any idea how can i fix this problem? I search it and people generally say "it's not working on android 4.1.1" but i'm just wondering is there anyone who works it on android 4.1.1.
A: Actually it's not about opencv. Some devices n... | |
doc_23498293 | How I can avoid this mistake?
import React from 'react'
import Header from './Header'
import Link from 'next/link'
import axios from 'axios';
export default class extends React.Component {
static async getInitialProps () {
if(!process.browser) {
const res = await axios.get('https://api.themoviedb.org/3/mov... | |
doc_23498294 | typedef struct
{
float x;
float y;
}Point2f;
typedef struct
{
int id;
unsigned char charcode;
}CharResultInfo;
typedef struct
{
int strlength;
unsigned char strval[1024];
CharResultInfo charinfo[1024];
}StringResultInfo;
typedef struct
{
int threshold;
int polarity; ... | |
doc_23498295 | EGL10 egl = (EGL10) EGLContext.getEGL();
egl.eglWaitNative( EGL10.EGL_NATIVE_RENDERABLE, null );
egl.eglWaitGL();
egl.eglSwapBuffers(mEGLDisplay, mEGLSurface);
However, on the Galaxy Nexus, this results in the following error message spamming the logcat output:
E/IMGSRV ([pid]): :0: WSEGL_WaitNative: Unrecognized eng... | |
doc_23498296 | I do it currently by having 2 image view (one at the start of animation and one at the end) and I play with the setVisibility to achieve this. Is this the correct way to do things? Here is the code I used:
<ImageView
android:id="@+id/ivStart"
android:layout_width="wrap_content"
android:layout_height="wrap_c... | |
doc_23498297 | So far, I have managed to put together this crude function which successfully finds the row number of the first cell in the given range containing the specified value, but it returns NaN if there is more than one occurrence of the value in the range. Any indication as to what I am doing wrong will be helpful, thank you... | |
doc_23498298 | Given is a small part of our database:
A table OBJECT which contains a list of cars and their respective properties. We also have a table OBJECT_OPTIONS which contains, for a given car in OBJECT, a list of OPTIONS, ACCESSORIES and STANDARD EQUIPMENT. These three types all have the same fields and are therefor stored in... | |
doc_23498299 | This seems to work every 6 seconds:
var vasen = 0;
setInterval(function() {
vasen++;
$('#valvonta').stop(true,true).css("left", vasen);
var valvonta = 1;
var kilpailu = 12;
jQuery.post("ilmoittautuneet.php", {
valvonta: valvonta,
kilpailu: kilpailu
}).done... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.