id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23500100 | Would appreciate any help on manipulating this block each time the loop runs.
function runLoop() {
var counter = counter + 1;
var redBlock = document.getElementById("block");
redBlock.style.left = counter + "px";
}
setInterval(function () {
runLoop();
}, 60)
#block {
background-color: red;
width:... | |
doc_23500101 | When I choose new > Image Asset, it comes out a dialog to choose Asset Type...
How can I add an image to res/drawable folder?
A: You need to use a third party plugin like AndroidIcons Drawable Import
to install this.
Goto
Android Studio > Prefrences > Plugins > and browse for AndroidIcons Drawable
You can do things... | |
doc_23500102 | myEventHandlingSystem.addCallback(event_name, event_callback)
However, as each client has a set of event and sometimes the supported event list will be very long. In such situation, manually add each event using the method described above is quite complicated and might also have some mistakes like forgot to assign an ... | |
doc_23500103 | <cfif len(REreplace(phoneNum, "[^0-9]", "", "all")) LT 10>
[THROW AN ERROR]
</cfif>
The problem is that an error is thrown every time, no matter the length of phoneNum UNLESS I include a non-numeric character for REreplace() to replace. I wanted to see what was going on and try something a little different, so I e... | |
doc_23500104 | I have the following lines of code
HTML
<table class="addSection">
<thead>
<tr>
<td>
<select data-bind="options: $root.productNames, optionsText: 'ProductName', optionsValue: 'ProductName', value: selectedChoice, optionsCaption: 'Product'">
</select>
... | |
doc_23500105 | private void button1_Click(object sender, EventArgs e)
{
var fdlg = new OpenFileDialog();
fdlg.Title = @"Site Assist Database Update";
fdlg.InitialDirectory = @"c:\";
fdlg.Filter = @"CSV Files (*.csv)|*.csv";
fdlg.FilterIndex = 2;
fdlg.RestoreDirectory = true;
if... | |
doc_23500106 | public:
const std::string const getName();
const std::vector<Employee>& const getSubordinates();
private:
std::string name;
std::vector<Employee> subordinates;
};
void printEmployeeLevels(Employee e)
{
}
My program is supposed to be able to use breadth-first tra... | |
doc_23500107 | Lets have a look at PrefCompat.
First we initialize it
public class Application extends android.app.Application {
@Override
public void onCreate() {
super.onCreate();
Pref.init(this);
}
}
and then we can use it anywhere like
Pref.putString("name", "Tushar");
Which is convenient, looks nice... | |
doc_23500108 | I have a string separated with pipe like this - "some value | other value". I need to split it at pipe and use both the values. So, I am trying to achieve it in the template like below.
{{row.full_value | splitDelimiter:'|':'beforeSeparator'}}
{{row.full_value | splitDelimiter:'|':'afterSeparator'}}
i am trying to use... | |
doc_23500109 | ||
doc_23500110 | Protected Sub SOAPRequest(ByVal tarikh As String, ByVal jabatan As String, ByVal HRMS_asmx As String, ByVal tempuri As String)
Dim xmlQuery As String = "<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/20... | |
doc_23500111 | I'm trying to use VaadinServlet and UI:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = TestUi.class)
public class TestServlet extends VaadinServlet {
}
public class TestUi extends UI {
@Override
protected void init(VaadinRequest request) {
add(new Labe... | |
doc_23500112 | I want to put all method's definition in the class definition which is in a .h file, but I'm worrying that the compiler generate duplicated code for the same methods/functions when one class header file is included by different files.
Does the linker find out and merge the duplicated code pieces to reduce the file siz... | |
doc_23500113 | example of state variable :
this.state = {
route: 'signin',
postDetails: [...]
};
and my render() looks like
render(){
const {route, postDetails} = this.state;
return (
<div className="App">
{
route === 'home' ?
<Navbar/>
{
postDetails.map... | |
doc_23500114 | When I try to show a worklist of "to do tasks", so asking EF for the abstract class, or when I try to get a generic task by ID, EF makes a 10000 lines query joining every concrete class, that result very slow.
There is a way to configure EF to avoid the big query?
In the worklist method, I need only fields of the abs... | |
doc_23500115 | Quite a few relate to XML and JSON syntax this project is using. In the following, I'm not sure what to cast the XML containing data as so that it is recognised by the compiler
Example:
public function convertXMLToAssets(file:XML):void
{
var data:XML = new XML(file.data);
var id:int = data.item.id;
//etc
}
... | |
doc_23500116 | public static DomTree<String> createTreeInstance(String path)
throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder db = docBuilderFactory.newDocumentBuilder();
File f = new File(path);
Documen... | |
doc_23500117 | It seems like my data is not suitable for the histogram() function.
My Data in dev tools (top = my data; bottom = bins from the histogram):
My data is not in histogram bins. The array objects are missing.
Here are the data from bl.ocks.org working example:
...and the bins from histogram from bl.ocks.org example:
You... | |
doc_23500118 | I tried to follow examples but then I found that all provided network layers in the library are linux specific:
*
*https://github.com/CopernicaMarketingSoftware/AMQP-CPP/blob/master/include/amqpcpp/libboostasio.h#L36
*https://github.com/CopernicaMarketingSoftware/AMQP-CPP/blob/master/include/amqpcpp/libev.h#L24
*ht... | |
doc_23500119 | remove(X,[],[]).
remove(X,[X|Y],Z):-remove(X,Y,Z). % [X|Y] is the input list
remove(X,[F|Y],[F|Z]):-remove(X,Y,Z). % code 1
remove(X,[],[]).
remove(X,[X|Y],Z):-remove(X,Y,Z). % [X|Y] is the input list
remove(X,[F|Y],Z):-remove(X,Y,[F|Z]). % code 2
A: Both predicates you presented—code 1 and code 2—are broken.
And t... | |
doc_23500120 | Could someone please help me develop a regular expression for matching AWK variables.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/awk.html provides definition for the AWK language.
Variables must start with a letter but can be alphanumerical without regard to case. The only special character that can be ... | |
doc_23500121 | Please advise.
A: You could add something like code below to your singletons and invoke checkAlive() method when you need to check if timers are alive:
@Resource
private TimerService timerService;
private int initialNumberOfTimers;
@PostConstruct
public void postCon() {
initialNumberOfTimers = timerService.getT... | |
doc_23500122 | Assume that I will provide these applications to a few customers.
My applications are made for customer accounting.
So all of my customers wil manage their customers whithin the applications I provide.
That brings me to my question. Should I work with one big database for al my customers, or should I use seperate datab... | |
doc_23500123 | I have planned to create a separate database for archive. After completing each event, I plan to move that data to the archive database using a stored procedure.
I have already added many indexes on database to improve speed.
So is this good technique or is there any better idea to improve the speed on database ?
Thank... | |
doc_23500124 | connection.js
let mysql = require('mysql2');
let pool = mysql.createPool({
host:'localhost',
user: 'root',
database: '',
password: '',
connectionTimeout: 10000
}).promise()
pool.getConnection(function(err, connection) {
console.log('connected to database')
});
pool.on('error', function(err) {
console.l... | |
doc_23500125 |
*
*convert an excel file to a tab delimited file and open this in matlab organized in the following way:
every row is a new subject
first colum is name of subject
other 8 columns are the parameters for each subject
*I would like to run a growthfunction on each subject and obtain the following results
the maximum ve... | |
doc_23500126 | I get back an JSON response which includes a byte array with 67615 entries.
Now well it adds a
`[....,154,156,);jQuery1910039778258679286416_1363006432850(181,104,...]
every ~7300 characters
Now when i use the ajax method to parse it how it normaly works it gives me an error because the callbacks invalidate the respon... | |
doc_23500127 | So far i have the code hiding the div but not showing it. Which i know i've done wrong somehow! i do have multiple checkboxes
heres my code
<script type="text/javascript">
function show(target) {
document.getElementById(target).style.display = 'block';
}
function hide(target) {
document.getElementById(targ... | |
doc_23500128 | @Component(metatype = true, label = "My Component", policy = ConfigurationPolicy.REQUIRE)
@Property(label = "My Component's expression", name = "my.expression", value = "/5 * * * * ? *")
public class MyComponent {
private static final Logger log = LoggerFactory.getLogger(MyComponent.class);
@Reference
pri... | |
doc_23500129 | two models exist at present, posts and departments
class Post < ActiveRecord::Base
belongs_to :department
attr_accessible :title, :comments, :department_id
end
class Department < ActiveRecord::Base
has_many :posts
attr_accessible :name, :post_id
#Scopes
scope :staff_posts, where(:name => "Staff")
end
So ... | |
doc_23500130 | I've create a drawable from a the svg file and use it for a ImageView ImageResource but the image is invisible.
So How can i do that with svg-android? or with a different way?
Here an exemple for icons that i want to use:
I want to use it with SVG format because i want to use the same icon with another color.
Here my ... | |
doc_23500131 | Imagine a data set like this:
tmp <- data.table(x = 1:10, y = c(27, 70, 54, 18, 50, 44, 22, 73, 6, 5))
For each row of the data, I want to calculate a new value, z, which is the min(y) for all rows with a larger value of x. For instance, for the third row of the data where x is 3, I want min(y) among rows with x > 3 (... | |
doc_23500132 | It sits in a basic div but didn't think it was needed.
<form id="contact-form">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<h5>Join us now</h5>
<div class="form-group">
... | |
doc_23500133 | for (int i = 0; i < ListBox1.Items.Count; i++)
{
//Get the `ValueMember` of `Item` where it's `Index` is `i`
}
A: Did you tried like code below:
for (int i = 0; i < ListBox1.Items.Count; i++)
{
Console.WriteLine((ListBox1.Items[i] as YourItemClassType).Number.ToString());
}
YourItemClassType is your class... | |
doc_23500134 |
From there I'm using a user form to collect the branch name from a dropdown (populated by looping through names of the sheets), the available dates (getting the days on the identified sheet), then the blank times for the given dates.
For some reason, every time a date is selected, it's setting the date cell to "" or b... | |
doc_23500135 | I've got two main errors:
*
*My code is supposed to generate 4 answer fields for each question but only 1 answer field is generated.
*When I press submit on my form, I get
unknown attribute 'answers' for Survey.
Extracted source (around line #33):
# POST /surveys.json
def create
@survey = Survey.new(survey... | |
doc_23500136 | One of the partitions looks like this :
GCP_P1 TO_DATE(' 2011-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN') 83 M_DATA01 DISABLED 348132 15214 146 08.06.2014 02:20:40 1078 0
Each partition is one week long.
We run our sql's through thin client with jdbc. No ORM just pure jdbc.
When... | |
doc_23500137 | This is my code:
.h
#import "InAppSettingsKit/IASKAppSettingsViewController.h"
@interface Settings : IASKAppSettingsViewController
@end
.m
#import "Settings.h"
#import <MessageUI/MessageUI.h>
#import "InAppSettingsKit/IASKSpecifier.h"
#import "InAppSettingsKit/IASKSettingsReader.h"
#import "CustomViewCell.h"
@inter... | |
doc_23500138 | ---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-10-39178> in <module>
1
----> 2 import torch
~/jupyter_py3/lib/python3.6/site-packages/torch/__init__.py in <module>
84 from torch._C import... | |
doc_23500139 | There is no issue when i run on any physical device.
A: Had a similar problem. For me the reason was there was an instance of the non-beta simulator running in the background. Make sure to quit all Xcode related applications and restart.
| |
doc_23500140 | I have tested it on an iPhone 5C (iOS7), iPhone 4 (iOS 6), Samsung Galaxy S3 (Android 4.4.2), Samsung Galaxy S4 (Android 4.4.2), and LG G2 (Android 4.4.2).
It works unreliably when using the Google Chrome mobile browser, but not at all when using the default browser installed. Does anyone know how to make it work for ... | |
doc_23500141 | When you are done, you should have the same data from the object that has already been written, but in an array, without having to retype each of the variables separately.
var userData = {
1: true,
2: true,
3: "00QRA10",
4: "slimer42",
5: "FFASN9111871-USN16"
};
var userDataArray = [0,1,2,3,4];
A: You can... | |
doc_23500142 | I know I could get this with cmd | tail -1, but I want to run this as a seperate command (tint2 executable) as a sort of progress meter.
For example:
I have a python program that outputs Downloaded x out of y as it downloads images, and I want to get the output as a shell variable.
Or:
Maybe I'm running pacman -Syy and... | |
doc_23500143 | w00tw00t.at.blackhats.romanian.anti-sec:
A: What kind of attack is it exactly ? HTTP? Are you using a load balancer?
Here are some options:
*
*You an ssh to the machine that Elastic Beanstalk machine is using and pick up the IP address where that request is coming from. Look under /var/app/current/log. Then just bl... | |
doc_23500144 | But that IP is not connecting in putty.
Please someone help regarding that.
Thank you.
A: -Ensure you have the right port forwarding rules set up on your VM and connect to the correct port.
-Make sure ONBOOT=yes on /etc/sysconfig/network-scripts/enp0sX file.
In this case you'd connect to port 2222.
| |
doc_23500145 | annotation: {
annotations: [{
type: 'line',
id: 'vLine',
mode: 'vertical',
display: true,
scaleID: 'x-axis-0',
value: '12:00am',
borderWidth: 1,
borderColor: 'gray',
label: {
... | |
doc_23500146 | error: expected expression
template <typename T>
^
was represented.
Why did this error appeared and how do I fix it?
#include<iostream>
using namespace std;
int main() {
template <typename T>
T sum(T a, T b) {
return a+b;
}
cout <<"Sum = " << sum( 2.1, 7.9 ) << endl;
return 1;
}
A: You cannot define a function w... | |
doc_23500147 | This is the code I've used:
<html>
<head>
<meta property="og:title" content="Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://www.the-website.com" />
<meta property="og:image" content="http://url-to-image.com" />
<meta property="og:site_name" content="The content" />
</he... | |
doc_23500148 | How can I set the first column to a fixed width, and divide the remaining space equally between an unknown number of columns?
<thead>
<tr>
<th style="width: 25%">
Fixed width
</th>
<th th:each="instance: ${headers}">
Dynamic width
... | |
doc_23500149 | I don't want a docker production container, but a development one: I need to share files between docker container and local development machines. I don't want to run docker each time I change a source file.
Currently my dockerfile is:
#React development
FROM node:4.1.1-wheezy
MAINTAINER xxxxx
ENV DEBIAN_FRONTEND noni... | |
doc_23500150 | a, b = 1, 2
Augmented assignment is also possible:
b += 1
But is there a reason destructuring augmented assignment cannot be done?:
a, b += 1, 2
> SyntaxError: illegal expression for augmented assignment
From what I can tell, destructuring is a language thing; it cannot be modified by something like object.__add__()... | |
doc_23500151 | var cardButton = document.getElementById('cardButton1');
var cardButton2 = document.getElementById('cardButton2');
var cardValue = document.getElementById('cardValue');
var cardValue2 = document.getElementById('cardValue2');
var cardTotalButton = document.getElementById('cardTotalButton');
var cardTotal = doc... | |
doc_23500152 | I can send a broadcast or start an activity to/from my android application indirectly by executing commands such as am via exec, but I can't directly establish a Binder connection between my android application like getService()/startActivityForResult()/bindService().
My Linux executable is also not a privileged progra... | |
doc_23500153 | So here is part of XSD that is used to create the "Test" class which allows the user to build a monitor:
<xs:element name="Test">
<xs:complexType>
<xs:sequence maxOccurs="unbounded" >
<xs:element ref="Ping"/>
<xs:element ref="CheckWebService"/>
<xs:element ref="CheckDB"/>... | |
doc_23500154 | Javascript code like
var b = 1;
function cloneRow() {
var row = document.getElementById("table");
var table = document.getElementById("particulars");
var clone = row.rows[1].cloneNode(true);
var clones = row.rows.length;
var workerName = clone.cells[0].getElementsByTagName('input')[0];
var position = clone.cells[2]... | |
doc_23500155 | Any ideas how to fix this?
setTimeout(function(){
document.getElementById('checkboxdelay').checked = true;
},1000)
<input name="product" value="199" type="checkbox" id="p4" id="checkboxdelay" onChange="totalIt()"/>
A: You don't have to select one element in different ways to attach different javascript code, Bu... | |
doc_23500156 | Thanks.
A: Some approaches I looked at -
*
*Use a Script to set the value of password.
*Use a config file (no way !)
*Use a C# script instead of the Script task. (Nice !)
(1) Link - http://wannabesoftwareengineer.blogspot.com/2009/03/setting-ftp-password-from-external.html
VB code -
Imports System
Imports Sy... | |
doc_23500157 | Existing date: 2019-11-13 00: 00: 00: 000 ; datatype=datetime
Expected output require: 11/13/2019 (mm/dd/yyyy) ;
datatype= date
Please help me.
A: If the core requirement is a right type then:
SET DATEFORMAT MDY;
SELECT CAST(GETDATE() as DATE);
Explicit DATEFORMAT added becaise the output depends on a language se... | |
doc_23500158 | The tasks looks like this:
- set_fact:
log_servers:
- "auth.info\t@10.10.10.100"
- "*.info\t@log.example.com"
- lineinfile:
path: /etc/syslog.conf
regexp: '^{{item}}'
line: '{{item}}'
loop: "{{log_servers}}"
The first line is inserted with no issues, but I get a Python exception when the... | |
doc_23500159 | This means that the routine is 'doubly' asynchronous; reading the stream and querying the user while processing the header row.
The libraries I've seen so far do not make it possible to handle the header row asynchronously or I'm missing something.
How could I implement this without having to reimplement the csv logic ... | |
doc_23500160 | Here the link:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/RequestPayment.html#//apple_ref/doc/uid/TP40008267-CH4-SW6
A: Let's day your app uses an account system so each user has an identifier (email, username etc) which we refer as appId here and the app... | |
doc_23500161 | Menu Class:
public class MenuScreen extends Screen {
private OrthoCamera cam;
private PlayButton pb;
private ExitButton eb;
private Background bg;
@Override
public void create() {
// TODO Auto-generated method stub
cam = new OrthoCamera();
cam.resize():
pb = new PlayButton();
eb = new ExitBut... | |
doc_23500162 | Now I’m running into problems with the Prism.Unity.UnityBootstrapper: it seems that the Container field is still a Microsoft.Practices.Unity.IUnityContainer instead of Unity.IUnityContainer.
I had hoped that the upgrade would cleanly cut all references to Microsoft.Practices.Unity off of my project, but it seems that I... | |
doc_23500163 | SELECT this_.id AS y0_ FROM event this_
INNER JOIN member m1_ ON this_.member_id=m1_.id
INNER JOIN event_type et2_ ON this_.type_id=et2_.id
WHERE m1_.submission_id=40646 AND et2_.name IN ('Salary')
ORDER BY m1_.ni_number ASC, m1_.ident1 ASC, m1_.ident2 ASC, m1_.ident3 ASC, m1_.id ASC, et2_.name ASC LIMIT 15;
I... | |
doc_23500164 |
A: The extensibility point in WIF for enriching the claimset is the ClaimsAuthenticationManager
From the docs:
The claims authentication manager provides an extensibility point in
the RP processing pipeline that you can use to filter, modify, or
inject new claims into the set of claims presented by an
IClaimsPr... | |
doc_23500165 | RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
and url manager array in my main configuration file main.php is
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
'case... | |
doc_23500166 | Following is the Flask app I tried to expose via cherrypy
from flask import Flask,request
from flask_restful import Api,Resource, reqparse
app= Flask(__name__)
api = Api(app)
class Main (Resource):
def get(self):
return "Hello Flask"
if __name__ == '__main__':
api.add_resource(Main, "/testapp/")
... | |
doc_23500167 | Currently MiniProfiler is great to understand & measure individual page requests performance. But it is not storing/logging anything for reporting. I'm looking for something that can continuously monitor & record the same and gives us an ability to filter what was the slowest queries in application during some point of... | |
doc_23500168 | How to resolve??? also tell me whether my printing method of array is correct or not?
import java.util.Random;
import java.lang.Math;
class MersennePrime {
public int[] MersennefindPrime() {
int i=0;
int k=0;
int array[] = new int[100]; ... | |
doc_23500169 | ActionBarDrawerToggle cannot be applied to android.support.v7.widget.Toolbar
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,
R.drawable.ic_drawer, R.string.drawer_open,
R.string.drawer_close)
R.drawable.ic.drawer is giving error. I searched in entire stackoverflow and fo... | |
doc_23500170 | The problem is when you view it with the browser window on full width and the height on 50%, it doesn't fill the whole window.
$(element).each(function(){
var videoAspectRatio = $(this).data('height')/$(this).data('width'),
windowAspectRatio = windowHeight/windowWidth;
if (videoAspectRatio > windowAspe... | |
doc_23500171 | 00034|netdev|WARN|could not create netdev dpdk1 of unknown type dpdk
00035|bridge|WARN|could not open network device dpdk1 (Address family not supported by protocol)
Googling little bit shows this issue is faced by earlier ovs version as well, but I didn't find any satisfactory solution.
Any idea what could be rootcaus... | |
doc_23500172 | HTML
<input type= "text" id="city2check"></input>
<button type="submit" onClick="myCity()">Check</button>
JS
function myCity() {
var cleanestCities = ["Cheyenne", "Santa Fe", "Tucson", "Great Falls", "Honolulu"];
for (var i = 0; i < cleanestCities.length; i++) {
if (city2check === cleanest... | |
doc_23500173 | I just want to insert a string into a varcharfield.
import MySQLdb
import json
conn = MySQLdb.connect(
host='localhost',
port=3306,
user='root',
passwd='',
db='ng')
cur = conn.cursor()
cur.execute(INSERT INTO `current_table` (`id`, `name`) VALUES (NULL, '{name}');".format(name="Lily' dog"))
conn... | |
doc_23500174 | I've got a struct that looks like this:
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
public unsafe struct navdata_vision_detect_t
{
public ushort tag;
public ushort size;
public uint nb_detected;
public fixed uint type [4]; // <Ctype "c_uint32 * 4">
public fixed uint xc [4... | |
doc_23500175 | The table is defined as
create or replace TYPE "rep_table_T" AS TABLE OF rep_table_O;
The object is defined as:
create or replace TYPE "rep_table_O" AS OBJECT (
day1 VARCHAR2(250 BYTE),
....
day31 VARCHAR2(250 BYTE),
TS DATE
);
I wanna do some computation and save the resul... | |
doc_23500176 | Updated Picture with subplots
def createSVMandPlot(X,y,x_name,y_name):
h = .02 # step size in the mesh
# we create an instance of SVM and fit out data. We do not scale our
# data since we want to plot the support vectors
C = 1.0 # SVM regularization parameter
svc = svm.SVC(kernel='linear', C=C).... | |
doc_23500177 | Here's my code:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script>
google.load("elements", "1", {
packages: "transliteration"
});
function onLoad() {
var options = {
sourceLanguage: 'en',
destinationLanguage: ['gu'],
shortcutKey: 'ctrl+g',
tra... | |
doc_23500178 | $memberidVal = ABC0123;
$numMemberVal = preg_replace("/[^0-9]/", "", $memberidVal);
if (strlen($numMemberVal) == 3) {
$numMemberVal = 0 . $numMemberVal;
} elseif (strlen($numMemberVal) == 2) {
$numMemberVal = 00 . $numMemberVal;
} elseif (strlen($numMemberVal) == 1) {
$numMemberVal = 000 . $numMemberVal;
}
... | |
doc_23500179 | Of course, event store and read models may be separate applications (e.g. databases) but are the CQRS read-side and write-side handled in the same NodeJS application?
If so, can / could these be split to enable them to scale separately, given the premise of CQRS is that the read-side is usually much more active than th... | |
doc_23500180 | #include<cmath>
#include<ctime>
#include<cstdlib>
#include <complex>
#include<windows.h>
#define PI 3.14159265358979323846
#define A 0.0000000001
using namespace std;
complex<double> dir(0,1);
class Car
{
directionX=0;
directionY=1;
public:
Car(char *type)
{
fuel=30;
speed=0;
}
... | |
doc_23500181 | The issue is, this program is only working on the test cases/in theory. To extrapolate, I bring in the file name as the "event" for the lambda function, and carry it to various other functions like so:
def get_kv_map(event):
filePath = event
fileExt = filePath.get('body')
s3 = boto3.resource('s3')
buck... | |
doc_23500182 | {{infobox color|
title=Spring Green|textcolor=black|
hex=00FF7F|
r= 0|g= 255|b= 127|sRGB=1
c=100|m=0|y=50|k=0|
h=150|s=100|v=100<ref>{{cite web|url=http://web.forret.com/tools/color.asp?RGB=%2300FF7F|title=web.forret.com Color Conversion Tool set to hex code of color #00FF7F (Spring Green):}}</ref>
|source=[[Web ... | |
doc_23500183 | import { Task } from './task';
import { TaskStatus } from './task-status';
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
@Injectable()
export class TaskService {
constructor(private http: Http){
}
getTasks() {
return this.http.get('http://localhost:8080/tasks').m... | |
doc_23500184 | protocol Event {}
enum LightsEvent: Event {
case SwitchOn
case SwitchOff
}
enum CameraEvent: Event {
case Rolling
case Cut
}
struct EventHandler {
let event: Event
func handle(event: LightsEvent) {
// do something with lights
}
func handle(event: CameraEvent) {
// do... | |
doc_23500185 |
import "fmt"
func main() {
var age int
fmt.Scanf("%d", &age)
// Code your switch or if...else-if statement here.
switch age {
case 1:
age <= 14
fmt.Println("Toy Story 4")
case 2:
age <= 18
fmt.Println("The Matrix")
case 3:
age <= 25
fm... | |
doc_23500186 | I have this function, which gets cached resource, and if it isn't in cache then it calls back-end for this resource.
However, the function is called twice, both times right after login. In the result, there are two exactly the same requests send to backend, as the resource is not cached yet by the time the second time ... | |
doc_23500187 | TableA_ID (int)
Date (smalldatetime)
Name (string)
and a table 'TableB' linked with TableA by TableA_ID:
TableB_ID (int)
TableA_ID (int)
Description (string)
Total (double)
I want to sum up the TableB 'Total' column between two dates (TableA 'Date').
A: This should work:
SELECT SUM(b.total)
FROM tableB AS b
INNER JOIN... | |
doc_23500188 | readXML(): void {
// testing the function
let xmlstr = `<book><title>Some title</title>
<description>some description </description>
<author>
<id>1</id>
<name>some author name</name>
</author>
<r... | |
doc_23500189 | __declspec(dllexport) bool toUpper(void)
{
return true;
}
and the code that is supposed to call this function goes into a win32 application, which is compiled natively:
bool toUpper(void);
int _tmain(int argc, _TCHAR* argv[])
{
bool b = toUpper();
return 0;
}
However vs2010 gives the following linker err... | |
doc_23500190 | @child = @parent.childs.last
if child's attribute satisfies some condition
@parent.something = "asd"
@child.something = params[:something]
end
@parent.save
This only saves the change made to the parent. Is there a way to save both changes with only one "save" call?
A: By default only new association records are ... | |
doc_23500191 |
A: You can't get this. You could include this information in a hidden form field.
A: The ID attribute is not submitted; its purely for client side processing. The forms Name is available. If you need it, you'll have to include in in another form element.
A: If the ID from the form you were looking at is in the que... | |
doc_23500192 | I don't want to use external libraries now, because I want to get better in C#.
TheMovieDB API returns me the following:
I have the following classes:
public class raizDoJson
{
public int pagina { get; set; }
public int totalRegistros { get; set; }
public int totalPaginas { get; set; }
... | |
doc_23500193 | But when this runs on jenkins it says skipping task "assemble" as it has no actions and no jars are produced.
| |
doc_23500194 | in receive
size = int(rec_sock.recv(HEADER_SIZE).decode('utf-8'))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
Before each message I send a header with the length of the following message. The header is encoded in UTF-8 by the client and therefore shouldn't throw this ... | |
doc_23500195 | v=0
for var in "$@";do
echo $var
v+=1
echo $v
done
Here is the command:
$ bash MyScript.sh duck duck goose
Here is the output:
duck
01
duck
011
goose
0111
So it appears (to me) to be treating the variable v as a string or not an integer. I am not sure why it would do this and I feel like this... | |
doc_23500196 | svn: Path 'new_file_name' is not a directory
What's the correct way? (sorry, this seems so trivial, but I'm stuck).
PS. using svn version 1.6.11
EDIT it seems I get this error only if new_file_name refers to the name of a file that is currently under version control. In this case, of course, I can simply
mv old_file... | |
doc_23500197 |
I know that the bullet itself is • in pure HTML, but I can't find anything about if or how to use glyph ornaments in HTML.
Any insight on how to do this - or why it can't be done - would definitely be appreciated!
A: OpenType alternate glyphs like ornaments can be selected through CSS font-feature-settings. Th... | |
doc_23500198 | set-executionpolicy remotesigned
Install-Module PSWindowsUpdate
Import-Module PSWindowsUpdate
Get-WindowsUpdate
Install-WindowsUpdate
| |
doc_23500199 | import com.eviware.soapui.support.types.StringToStringMap
def headers = new StringToStringMap()
def cookie_name0 = testRunner.testCase.testSteps["ServiceWTm.svc 1 - SessionLogon"].testRequest.response.responseHeaders["Set-Cookie"][0]
def cookie_name1 = testRunner.testCase.testSteps["ServiceWTm.svc 1 - SessionLogon"].te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.