id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23507100 | <CheckBox
android:id="@+id/checkBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:focusable="false"
android:checked="false"
android:layout_below="@+id/etConfirmPassword"
android:layout_ali... | |
doc_23507101 | https://www.youtube.com/watch?v=zrM6N-G6U_M&list=PLNf1MNtmy_vyQkFjuNqxKpQT0U_rbC_y8&index=19
My problem is that I get an error saying:
Uncaught SyntaxError: Cannot use import statement outside a module
I have no idea what to do. I have done some research on compilers and stuff like that but I don't think the tutorial m... | |
doc_23507102 | TypeError: Cannot read property 'bind' of undefined at Controller.NgModelController (VM2951 angular.js:29413)
@angular.js:29413 => this.$$updateEventHandler = this.$$updateEventHandler.bind(this);
package.json
"dependencies": {
"angular": "1.7.0",
"angular-animate": "1.7.0",
"angular-sanitize": "1.7.0",
"angula... | |
doc_23507103 | Date todaysDate = new java.util.Date("2015-02-07");
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
SimpleDateFormat df2 = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
SimpleDateFormat df3 = new SimpleDateFormat("dd-MMM-yyyy");
SimpleDateFormat df4 = new SimpleDateFormat("MM dd, yyyy");
SimpleDateFormat df5 =... | |
doc_23507104 | rake webpacker:install getting this error.
Webpacker configuration file not found /home/projects/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /home/projects/config/webpacker.yml
/home/.rvm/gems/ruby-2.3.4/gems/webpacker-3.5.2/lib/webpacker/configuration.rb:73... | |
doc_23507105 | public class Table1 {
[AutoIncrement]
public Int32 Id { get; set; }
[Index(Unique = true)]
public string FieldA { get; set; }
public string FieldB { get; set; }
public string FieldC { get; set; }
}
public Table2 {
[AutoIncrement]
public Int32 Id { get; set; }
[Index(Unique = true)]
... | |
doc_23507106 | I think there should be a way to do this all inside the GENERATE statement, but I can't find the right syntax.
Here is some toy code using a Python UDF to get the idea across.
Register 'jumper.py' using jython as myfuncs;
jumps = LOAD 'jumps.csv' USING PigStorage(',')
AS (jumper:int, attempt:int, distance:double, l... | |
doc_23507107 | Html:
<form method="post" action="mail.php">
<label for="name">name</label>
<input type="text" id="fname" name="name">
<label for="email">Email</label>
<input type="email" id="lname" name="email">
<label for="subject">message</label>
<textarea id="subject" name="message" style="height:200px"></textarea>
<... | |
doc_23507108 | Also, there is a summary sheet below which has values against KPI's and applying some calculations on those value, I need to show in Report.Like, there is a value in KPI (98765) for Dec 2018 and I need to reflect (98765/1000) above.A sample Report is provided below.
A: Try this Filter
[Date] >= _add_years(_add_days(cu... | |
doc_23507109 | string connection = "server=127.0.0.1; database=business;user=root; password=root01;";
MySqlConnection connect = new MySqlConnection(connection);
connect.Open();
MySqlCommand myCmd = new MySqlCommand();
myCmd.Connection = connect;
myCmd.CommandText = "SELECT fileSubmitted FROM files WHERE fileNo = @fileNo;";
DataR... | |
doc_23507110 | For example, I have such code:
int my_constant() { return 0; }
PYBIND11_MODULE(constants, m) {
m.attr("MY_CONSTANT") = py::int_([](){ return my_constant(); });
}
And I hope I could use it in python3 console:
>>> from constants import MY_CONSTANT
>>> MY_CONSTANT
0
Is it available to do that ?
| |
doc_23507111 | #include <stdio.h>
#include <conio.h>
#include <malloc.h>
#include <time.h>
struct node
{
int data;
struct node *left;
struct node *right;
};
struct node *tree;
struct node *InsertElement(struct node *, int); //declaration//
struct node *findLargestElement(struct node *);
void create_tree(struc... | |
doc_23507112 | I create as many actors as there are CommonPool threads, plus a channel for the main thread. The actors use rendezvous channels:
val resultChannel = Channel<Double>(UNLIMITED)
val poolComputeChannels = (1..commonPool().parallelism).map {
actor<Task>(CommonPool) {
for (task in channel) {
task.exe... | |
doc_23507113 | ||
doc_23507114 | I generated a couple of headers from ONVIF wsdl:
wsdl2h -x -o dm.h http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl -tC:\gsoap-2.8\gsoap\typemap.dat
wsdl2h -x -o an.h http://www.onvif.org/onvif/ver20/analytics/wsdl/analytics.wsdl -tC:\gsoap-2.8\gsoap\typemap.dat
After that I compiled the headers generating... | |
doc_23507115 | my problem:
Java:
public static int[][] ScoreMatrix = new int[5][20];
Scala:
var ScoreMatrix: Array[Array[Int]] = new Array[Array[Int]](5, 20)
It's not working, don't know why?
Error "too many arguments for constructor Array(_length:int)Array[Array[Int]]"
A: For initializing 5*20 2D int array you can use:
var ScoreM... | |
doc_23507116 | web-app
├── main.py
└── site
├── __init__.py
├── auth.py
└── models.py
In __init__.py there is a function called create_app() and this function must be accessed by my main.py.
# site/__init__.py
from flask import Flask
def create_app():
app = Flask(__name__)
app.config.SECRET_KEY = ""
ret... | |
doc_23507117 | Locale locale = new Locale("ar");
SimpleDateFormat sdf = new SimpleDateFormat("EEE, MMM dd, yyy", locale);
Date currDate = new Date();
String formattedDate = sdf.format(currDate);
A: As far as I know, there is no built-in support for islamic calendar on Android unless you are willing to limit your app... | |
doc_23507118 | The view I am building presents all these details to the user on one page, and the user has the ability to edit each of the separate sections and click the update button for each section once they are done. Basically when you want to change username, you click edit in the username section, change it and click the updat... | |
doc_23507119 | I'm using Java3D but it doesn't seem to have any sort of built in support for that...
A: This might be more compex than you think.
A solution would basically include the following steps:
*
*Edge detection using Java 2D ConvolveOp Filter
*Vectorizing the edges into a 2D model.
*Extrusion to 3D
A: Turns out what ... | |
doc_23507120 | Here's my code (made in React):
<div className="dashboard">
<div className="left-right-btn">
<div className='left_button'>
<button className="left-btn btn" onClick={this.prevPicture}>{'<'}
</button>
</div>
<div className='right_button'>
<button className="right-btn btn" onClick={this.ne... | |
doc_23507121 | for example I have 2 nodes, each nodes has 4 processes.
I have a simple code in which I have used mpi_shared_memory in one node(among 4 processes),each processes will update a part of a 2d array (this array is called matrix in the code) and afterward , all the processes has direct access to this shared array.
I mean a... | |
doc_23507122 | Sample data I have is like below. Children are linked with parent
through parent's id that is children's parent_id key is same that of
parent's id key.
[{
"id": 1,
"name": "ab",
"parent_id": null,
"value": 120,
"tree_level": 1
},
{
"id": 2,
"name": "ac",
"parent_id": null,
"v... | |
doc_23507123 | Now if I start transitions states and based on conditions it calls a functions that give TRUE/False in future time(initially return a deferred, but actually runs a call which is asynchronous like wait for file download, and returns with success/failure of file download in future)
In this case how to maintain the statem... | |
doc_23507124 | e.g. an image is 100 x 100 in dimension, then the temperature array be like,
temp[] = {
{ 104, 1000, 600, .........},
{ 34, ,234, 678, ..........},
{ ..........................},
{ ..........................}
}
I want to store those temperatures in an array named temperature.
applyColorMap(img, im_... | |
doc_23507125 | struct v_with_holder {
// bunch of fields
holder h; // does not name a type
};
typedef boost::variant</* such types, */v_with_holder/*, many others */> struct_v;
class holder { public: std::vector<struct_v> ss; };
I only added this particular variant recently. All the other ones just have standard, already-d... | |
doc_23507126 | @staticmethod
def parse_single(entry, source):
try:
pub_time = entry.get("published", "None")
guid = entry.get("id", "")
title = entry.get("title", "")
author = entry.get("author", "")
link = entry.get("link", "")
article_content = entry.get("content", "")
if ... | |
doc_23507127 | the goal is to check if the item is in the menu and if I have enough beans after serving each drink.
I tried to console.log each row- and still I do not understand why it doesn't run as intended- somehow it goes into one if condition- and then goes also into the else.. what am i doing wrong?
thanks for your time
`con... | |
doc_23507128 | <items name="home">
<chicken>Foo</chicken>
<nuggets>Bar</nuggets>
<moo>Hello World</moo>
....
</item>
I don't know what elements items will contain except that the value should be a string (no further nodes).
Is the only way to use <any processContents="skip" /> ?
A: XSD 1.0
You can use <xsd:any ... | |
doc_23507129 | class NativeClass
{
int someVariable;
public:
void someNativeFunction(){}
};
I have a managed class, which lightly wraps this native class.
class ManagedClass
{
NativeClass *nativeClassObject;
public:
void someManagedFunction()
{
nativeClassObject->someNativeFunction();
}
};
I use this managed class in my C# appl... | |
doc_23507130 | {
"2018-12": 1778
"2018-11": 3190
"2018-10": 5318
"2018-09": 2498
"2018-08": -2791
"2018-07": 1710
"2018-06": 1786
"2019-12": 3513.97
"2019-11": 2975.9700000000003
"2019-10": -5407.53
"2019-09": 5188.02
"2019-08": 5599.2699999999995
"2019-07": 3930.37
"2019-06": 1... | |
doc_23507131 | Looking for the following:
*
*How many connections are currently opened by the script.
*Generic (non-dataserver specific) Error handling modules/mechanism
When executing a stored proc, it returned the following error message.
DBD::Sybase::st execute failed: Server
message number=27000 severity=16
state=1 line=... | |
doc_23507132 | <html ng-app="myApp">
<head>
<script src="js/vendor/angular/angular.min.js"></script>
<script src="js/app2.js"></script>
</head>
<body>
<div id="users" ng-controller="usersController">
<h4>usersController</h4>
test = {{myUser}}
</div>
<div id="tasks" ng-controller="tasksController">
<b... | |
doc_23507133 | If my input is 32, it prints 23 followed a line of random numbers
. example:
23 983748572819937482
I wanna know what these random numbers are and why they are being printed
#include <iostream>
using namespace std;
int reverse(int n) {
if (n == 0) {
cout << " ";
return 0;
}
else {
... | |
doc_23507134 | I get the next error:
"Cannot destructure property 'name' of 'undefined' as it is undefined."
That mutation I make in Apollo Studio:
mutation Mutation($createOwnerName: String) {
createOwner(name: $createOwnerName)
}
My variables in Apollo Studio:
{
"createOwnerName": "John"
}
My backend with Express
schema.js:
... | |
doc_23507135 | My Map function is :
function (doc, meta) {
emit([meta.id,doc.latest.sortData],null);
}
}
Now my use case is that I want to perform a match query on meta.id and then for all the matched cases sort the data and then find out the top values.
The code that i am using to so is :
ViewQuery.from(DesignDocName, viewName)... | |
doc_23507136 | ||
doc_23507137 | I want to create a UserControl that will be a registration form.
In this control, I have a button, when the button is clicked, I want the server to redirect to another page.
Here's my code:
control.ascx.cs:
public partial class ControlFormulaire : System.Web.UI.UserControl
{
public event EventHandler ButtonClicked;... | |
doc_23507138 | For example, this was my code.
<ul>
<li> <span>npm start </span> : to start the project </li>
<li> <span>npm build </span> : to build the project </li>
</ul>
After I saved the file prettier converted it to
<ul>
<li>
{" "}
<span>npm start </span> : to start the project{" "}
</li>
<l... | |
doc_23507139 | Receiver:
public void onReceive(Context context, Intent intent) {
nm = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
CharSequence from = "myactivity";
CharSequence message = "click to start activity";
Intent scheduledIntent = new Intent(context, AmslerTestA... | |
doc_23507140 | In other words, I need to do something like this:
dbxml> putDocument tests/*.xml
I have written a GUI program to do that but the host server does not have X-windows installed, so must be in command line.
A: I do a similar thing when reloading certain XML docs into my current application DB. It helps if all of the fil... | |
doc_23507141 |
A: I think your best option is to create a temporary file and then to unzip it.
// Create a temporary file which creates file with unique file name
$tmp = tempnam(sys_get_temp_dir(), md5(uniqid(microtime(true))));
// Write the zipped content inside
file_put_contents($tmp, $zippedContent);
// Uncompress and read the ... | |
doc_23507142 | Suppose you want to create an MVC site that would also follow REST architecture.
Following this tutorial, when creating a page that would display a list of products would I need to create two controllers => one for regular website (that would derive from "Controller") and another for serving requests via API that would... | |
doc_23507143 | import aiostream
import asyncio
async def async_func(x):
await asyncio.sleep(1 - 0.2 * x)
return x
s = aiostream.stream.iterate(range(5))
s_mapped = aiostream.stream.map(s, async_func)
s_reordered = ???(s_mapped)
await aiostream.stream.list(s_reordered)
# [5, 4, 3, 2, 1]
(this is needed for downstream chun... | |
doc_23507144 | void app_main(void)
{
char command[64] = {};
printf("Welcome!\n");
fgets(command, sizeof(command), stdin);
printf("command: %s\n", command);
}
However, my output shows:
Welcome!
command:
I haven't got the chance to type anything, fgets() returns immediately with an empty string.
How can I wait for use... | |
doc_23507145 | def todo_list(todo_selector)
library = ["Get a cat", "Get a dog", "Build a fighting ring"]
puts "Your current step in todo-list is:\n#{library[todo_selector]}"
end
ARGV.each { |todo| todo_list(todo_selector) }
How am I able to call this method with an index via command line?
Normally I would use test.rb 1, b... | |
doc_23507146 | Here's the bundle I'm adding:
bundles.Add( new StyleBundle( "~/Content/css" ).Include(
"~/Content/bootstrap/css/bootstrap.css",
"~/Content/bootstrap/css/bootstrap-responsive.css",
"~/Content/site.css" ) );
Here's the link to the CSS that gets gene... | |
doc_23507147 | #include <stdio.h>
#include <stdlib.h>
void a( )
{
printf("Hello from function a!\n");
return;
}
void b( )
{
printf("Hello from function b!\n");
return;
}
int main( )
{
printf( "a = %p, b = %p\n", a, b );
a( );
b( );
return 0;
}
Which in this case gives the output of :
a = 0040... | |
doc_23507148 |
A: As My Head Hurts has pointed out, this has been asked before.
Here is the: code/demo.
You also asked for the opacity to be 0.5. You can do this with fillstyle:
ctx.fillStyle = 'rgba(0,0,0, 0.5)';
You can add that before the draw call. But don't forget to set it back to 1 after the call.
Also, make sure ctx is c... | |
doc_23507149 | @Component({
selector: 'my-button',
template: `
<button (click)="handleClick($event)">
<ng-content></ng-content>
</button>
`
})
export class MyButtonComponent {
@Output() public onClick: EventEmitter<Event> = new EventEmitter();
handleClick(e) {
this.onClick.emit... | |
doc_23507150 | Example:
myDict = {'item1': [7, 1, 9], 'item2': [8, 2, 3], 'item3': [9, 3, 11] }
I want to be able to iterate through the dictionary in order of the third value in each list, in this case item2, item1 then item3.
A: Here is one way to do this:
>>> sorted(myDict.items(), key=lambda e: e[1][2])
[('item2', [8, 2, 3]), (... | |
doc_23507151 | Currently, my macro is run on a document with tracked changes. It saves one copy with changes accepted and one copy with changes rejected. Then it goes through the accepted document to search for specific phrases and highlights each phrase. After that, it runs a comparison to create a final document that retains the tr... | |
doc_23507152 | private void ClickToAddMoreCoins(object sender, RoutedEventArgs e)
{
//Hides InputBox and takes input text from user.
InputBox.Visibility = System.Windows.Visibility.Collapsed;
// Ensuring that input from user is a integer number
String input = InputTextBox.Text;
var r... | |
doc_23507153 | from boto.mws.connection import MWSConnection
merchantId = 'XXXXXXXXXXX'
marketplaceId = 'XXXXXXXXXXX'
accessKeyId = 'XXXXXXXXXXX'
secretKey = 'XXXXXXXXXXX'
mws = MWSConnection(accessKeyId, secretKey, Merchant=merchantId)
# ListMatchingProducts
a = mws.list_orders(CreatedAfter='2018-05-24T12:00:00Z', Marketplac... | |
doc_23507154 | <form name = "exam" action="takeTest.php" method="post">
<textarea name="pa1" required rows=10 cols=55>public int add(int a, int b){
}
</textarea>
<input type="submit">
</form>
EDIT
Tried pre tags but those just show up as the default text in addition to the code. I think adding the \n tags will ... | |
doc_23507155 | This has been working perfectly. However I now want to try using a Stepping Thread Group with my app so I tried this same approach but it's not working - when I look at the results of the main request for the page I am trying to profile, I can see it's instead redirecting to the login screen, since the thread is not lo... | |
doc_23507156 | In my result page the url is encoded as: url?name=Ganesh&nationality%5B%5D=Italian&nationality%5B%5D=French
if(isset($_GET['nationality'])) {
$are='all';
if($_GET['nationality']!=$are) {
$loc = $_GET['nationality'];
$nationality = array($loc);
$comma_separated = implode(",", $national... | |
doc_23507157 | /species
id
types
[name, name] // each specy has 2 types, contained in an array
/types
name
We can see that we have an endpoint that provides a list of all the typeresources, and the speciesendpoint provides the type of a particular specy.
In my ReactJS app, I am going to have a Select field that ... | |
doc_23507158 | Here is the draw 9 patch image we use:
Here it how it looks when implemented:
I know you could create the rounded corners in code in this example but there are some other buttons/graphics we cant create by cpde because of shapes and other things where we have same issue.
Any idés why?
| |
doc_23507159 | What is the best way to implement a flow that is basically a "Choose Your Own Adventure" stepper, or a flowchart turned into a stepper?
For example, you have a UI with steps, and the next and previous step that will appear depend on data from the previous step. Right now, I have a switch statement to determine which st... | |
doc_23507160 |
A: Computers use the additive colour model, which involves adding together RGB to form white, and is the usual way of forming colours when using a light source.
Printers use subtractive color, normally using Cyan(C), Magenta(M), and Yellow(Y), and often Black(K). Abbreviated CMYK
Cyan is opposite to Red, Magenta i... | |
doc_23507161 | Here's our test. You can run in the immediate window by typing and seeing if you get the RowValidating popup from the handler:
_SandboxTest.DataGridViewTestModal
or
_SandboxTest.DataGridViewTestNonModal
here's the code:
Module _SandboxTest
Sub DataGridViewTestNonModal()
Dim frm As New Form
Dim dt... | |
doc_23507162 | {
"waluta": "PLN",
"vat": 1.23,
"00101": {
"cena": 340,
"powiazanyZ": "00139"
},
"00102": {
"cena": 325.33,
"powiazanyZ": "00140"
},
"00103": {
"cena": 306.67,
"powiazanyZ": "00141"
},
"00104": {
"cena": 289.33,
"powiaza... | |
doc_23507163 | Text("To learn more about AttributedString visit [this page](https://developer.apple.com/documentation/foundation/attributedstring/)")
Can I use this to go from ViewA to ViewB within the same app, kind of like this example in Twitter?
A: You can store an OpenURLAction in the environment to override how subviews like ... | |
doc_23507164 | PS C:\temp> npm install aws-sam-local
> aws-sam-local@0.2.4 postinstall C:\temp\node_modules\aws-sam-local
> go-npm install
Downloading from URL: https://github.com/awslabs/aws-sam-local/releases/download/v0.2.4/sam_0.2.4_windows_amd64.tar.gz
fs.js:766
return binding.rename(pathModule._makeLong(oldPath),
... | |
doc_23507165 | For example, some of my code looks like:
try {
$tableAresults = $dbHandler->doSomethingWithTableA();
$tableBresults = $dbHandler->doSomethingElseWithTableB();
} catch (Exception $e) {
return $e;
}
So I'm grouping multiple database operations in the same try/catch block because if any exception occ... | |
doc_23507166 | I've tried opening the keywords file (minikeys.csv) as a list and searching from there, but I've come the closest to success by opening it into a dictionary for some reason.
with open('minidata.csv', 'r') as f:
text = f.read()
csvFileArray = []
with open('minikeys.csv', 'r') as inf:
reader = c... | |
doc_23507167 | Possible Duplicate:
Code Profiling Tools for Perl
How can I track down CPU intensive requests in mod_perl?
I am looking for a tool that can monitor the execution of Perl scripting based tool
and what exactly i am looking for is say we have lot of scripts, and they will be running .. very often but we want to know bo... | |
doc_23507168 | Uri savedUri = Uri.fromFile(savedUri_file);
MediaPlayer mediaPlayer = MediaPlayer.create(MainActivity.this, getImageUri());
mediaPlayer.start();
The MediaPlayer.create returns a null value. In VLC I have checked the codec information of the audio. It is MPEG AAC Audio (mp4a).
I need to play this in android 2.3. I... | |
doc_23507169 | E/Parcel: Reading a NULL string not supported here.
Reading a NULL string not supported here.
D/gift-manager: getGiftPara pkg(com.example.myhomie,260,), ret=-22
I/libMEOW_gift: ctx:0xb40000786ccfd928, ARC not Enabled.
E/libEGL: Invalid file path for libcolorx-loader.so
I/chatty: uid=10300(com.example.myhomie) RenderTh... | |
doc_23507170 | I'm a total noob in JavaScript and browser plugin programming, but I think I saw people create mini-games like shooting page elements with a small ship, that start by entering some code into the current page's address bar, and I suspect that was JavaScript (but correct me if I'm wrong).
Is there a way to create a line ... | |
doc_23507171 | Note: I am getting data from Beacon via Bluetooth,This task does not depend on Internet, I have tried other solutions as well but sync adapter matches my requirement can anyone suggest solution which matches my requirement
| |
doc_23507172 | I want that if a word from the column A appear somewhere between B1 to D10, the color of the cell turn automatically to the same color of the same word in column A.
Edit: Sorry I wasn't clear:the color of the cells in A are not fixed! So if I change the color on one word of a cell in column A, I want the color to chang... | |
doc_23507173 | php artisan serve
and my laravel app is resolved on localhost:8000 successfully
Laravel Sanctum configuration
SESSION_DRIVER=cookie
SESSION_DOMAIN=localhost
SANCTUM_STATEFUL_DOMAINS=localhost:8080
My vue app is resolved on localhost:8080
async loginUser() {
try {
await this.$axios.get('/csrf-cookie');
... | |
doc_23507174 | As there is no parent selector to be had in pure CSS, I'm stuck and cannot figure out how this is supposed to work.
Fiddle won't work for some reason(for me), so here is a bin:
https://jsbin.com/yohapudimo/edit?html,css,output
My best effort was:
#infoDrop > li:hover ~ #aboutPara > p{
display: inline;
}
while trying... | |
doc_23507175 | <ul id="board">
<li class="card" id="card1a">1</div>
<li class="card" id="card1b" >2</div>
<li class="card" id="card2a" >3</div>
<li class="card" id="card2b" >4</div>
</ul>
I made to an array in javaScript:
var cards=document.getElementsByClassName("card");
Than I tried to replace elements inside the... | |
doc_23507176 | When I didn't use this ORM I simply draw diagram in MySQL Workbench and I used the "inserts" tab of each table to populate it with data. In Doctrine 2 I don't see such an option but I of course need it.
So, please, what is the best way to achieve that? What is your approach?
A: You want to hear about Doctrine Fixtures... | |
doc_23507177 |
*
*I want to upgrade deprecated methods and also move to the latest versions of Support Library, Google Services and GSon (I guess I can live without upgrading GSon if need be).
*To complicate matters, we have an Ant based build which takes the source code and generates numerous white label instances of application... | |
doc_23507178 | My problem is that when the user clicks on the map the list of map pins is already being updated and I get an ConcurrentModificationException error.
Basically, I have a JSONArray which has locations. I need each location to be on the map and when the new location is touched the pins are updated and the old pins are cl... | |
doc_23507179 |
A: You should be able to create a User-Mode driver using COM/.Net interop... but you will probably be in for a world of hurt.
| |
doc_23507180 | SELECT * FROM table WHERE date >= '2010-5-1' and user='test';
It doesn't use the date,user index it uses the user index. Is there any way to get mysql to use the date,user index for these queries?
A: Before resorting to optimizer hints, try analyzing the table.
ANALYZE TABLE table
A: Yep, by specifying USE INDEX (i... | |
doc_23507181 | namespace deletenumber
{
class Program
{
public static void Main(String[] args)
{
Random r = new Random();
int[] a = new int[10];
for (int i = 0; i < 10; i++)
a[i] = r.Next(1, 100);
for (int i = 0; i < 10; i++)
... | |
doc_23507182 | I ve added Interop.bpac.dll (Found it from samples bin folder)
I ve wrote this code
private void buttonTry_Tapped_1(object sender, TappedRoutedEventArgs e)
{
bpac.DocumentClass doc = new DocumentClass();
if(doc.Open("templateFile.lbx"))
{
doc.GetObject("field1").Text = "Hell... | |
doc_23507183 | I want to provide user a feedback about how many documents have been created and how many of them haven't (i.e. they didn't validate).
I created a callback like this
User.create(usersToImport, function(err, docs) {
console.log(err);
console.log(docs);
}
The problem is that if any document does not validate... | |
doc_23507184 | File1.txt
[2] Baudÿ: 9600
[7] Baudÿ: 9600
File2.txt
[1]COM1
[2]COM2
[3]COM22
[4]COM56
[5]COM57
[6]COM58
[7]COM59
[8]COM60
[9]COM27
I would like to compare those two files and have as output a third file like following:
File3.txt
[2]COM2
[7]COM59
The code must be adapted for any ... | |
doc_23507185 | ||
doc_23507186 | ||
doc_23507187 | Is that the way Pandas is designed?, Are all Pandas time series functions built upon that assumption?
A few weeks ago I was experimenting with pandas.rolling_mean which seemed to want the datetime to be in the index.
Given a dataframe like this:
df = pd.DataFrame({'date' : ['23/10/2017', '24/10/2017', '25/10/2017','26/... | |
doc_23507188 | To redirect users I use such function:
void http_utils::send_found_302( std::string redirect_lication, boost::shared_ptr<boost::asio::ip::tcp::socket> socket, boost::shared_ptr<http_response> response )
{
response->status = 302;
response->description = "Found";
response->headers.insert(std::pair<std::string... | |
doc_23507189 | in float some_value;
uniform float max_dist;
void main()
{
float dist = some_process( some_value );
gl_FragDepth = clamp( dist / max_dist, 0.0, 1.0 );
}
Now I need to perform further process on the resultant bitmap on CPU side. However, glGetTexImage would give you GL_UNSIGNED_INT_24_8 binary format for a dept... | |
doc_23507190 | In my case i save the option with getX storage and it's saved with success but when i want to select again and modify the option i can't . in my code the value normally take the value on the database and if it did not find it it take the value selected. Is there attribute that make a default value and it can be modif... | |
doc_23507191 |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0Ug... | |
doc_23507192 | I want the questions to be selected from a random pool to discourage cheating, I could make it so that it randomly selects between the numbers of 1,8 but that can cause repeats in the questioning, which is something that I don't want.
Random random = new Random(); // We use this random object to choose random icons for... | |
doc_23507193 | org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspTagException: No message found under code 'label.title' for locale 'en_US'.
I have tried adding the i18n folder to classpath in eclipse(Juno), placed messages*.properties files under WEB-INF/i18n, WEB-INF/classes/i18n, WEB-INF/class... | |
doc_23507194 | A Jenkins build will build artifacts from every existing branch. To track the version every build tags the version at the corresponding node, where the build was triggered.
Unfortunately I ran into troubles when merging back the master branch into develop after a release was finished.
After the back merge git describe ... | |
doc_23507195 | here is the sub that causes the error:
Public Sub Worksheet_UnLock()
For Each Sheet In ActiveWorkbook.Worksheets 'this line throws error
Sheet.Unprotect Password:=myPassword
Next Sheet
End Sub
Any ideas?
EDIT:
I don't have "option explicit" on top of the code.
changing from ActiveWorkbook.Worksheets to... | |
doc_23507196 | My timers are working well, I think there is some problem with the loops (when I debug this program using avr studio-gcc, I can see all the leds working as I want but when I transfer it on board...leds don't blink). Am going crazy with this type of behavior.
Here is my code:
#include <avr/io.h>
#include <avr/interrupt.... | |
doc_23507197 | //User.js
module.exports={
name:{
type:'string'
},
pets:{
collection:'pet',
via:'owner'
},
cars:{
collection:'car',
via:'owner'
}
}
//Pet.js
module.exports={
name:{
type:'string'
},
owner:{
model:'user'
},
doctors:{
collection:'doctor',
via:'pets'
}
};
//Car.js
module.exports={
color:{
type:'string'
},
owner:{
mode... | |
doc_23507198 | index.html (app.listen(8080);)
var qItems= 8;
var url= 'ItemsList';
var xhr = new XMLHttpRequest();
var tag = document.getElementById("insertHere");
tag.innerHTML = "Loading...";
xhr.open("GET", url+"?qItems="+qItems, true);
xhr.onreadystatechange = function() {
display(tag, xhr);
}
xhr.send(null);
But on Server side ... | |
doc_23507199 | import ctypes
import os
os.system("hello.mp3")
Then it opens Groove Music and plays the music file.
But what I want it to do is close the music file after playing.
How can I do this?
P.S It doesn't matter if it's not using the ctypes package
A: Try the mp3play module.
https://pypi.org/project/mp3play/
It would be s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.