id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_12100 |
This is a sample of data with id, parent id, name, code (which is sometimes not filled), level and isroot column. In real scenario there will be more levels than just 2 but now let's look at the simplified example.
What I need to do is to loop over all records and find rows where id is not filled at any level of the h... | |
doc_12101 | To do this I use valueForUndefinedKey: which causes a lookup in the "user fields" mutable dictionary. It all works very well and allows me to build predicates based on both built-in properties as well as user-defined properties.
I am considering moving it to Core Data but can't determine a way to allow the user to defi... | |
doc_12102 | I know I can display it like that:
1-10 of 500 results Your search took 0.31 seconds.
I want to display it like
1-10 of 500 results (0.31 seconds).
A: You have to edit the web part "Search Statistics" of your Search Center site. Just read this article, if something is unclear: office.microsoft.com/en-us/sharepoint-... | |
doc_12103 | After executing the following code:
from ship import Ship
from settings import Settings
import sys
import pygame
class Alien_invasion:
"""class to manage the game"""
def __init__(self):
"""initialise the game and create game ressources"""
pygame.init()
#print("ouzou")
self.set... | |
doc_12104 | ||
doc_12105 | Seeing four almost identical test functions for asserting actions can be accessed offended my notion of best practice, so I rewrote the last four methods, adding in a fifth as a helper, like so:
private function assertActionCanBeAccessed ($action)
{
$this->routeMatch->setParam('action', $action);
... | |
doc_12106 | Class myClass
{
public $foo;
private $bar;
private function GetFields()
{
$lambda = function( $obj ) { return get_object_vars( $obj ); };
return $lambda( $this );
}
public function SomeFunction()
{
$fields = $this->GetFields();
}
}
This worked perfect, and gave me all public vars while in... | |
doc_12107 | In the below documentation is from Microsoft, we get several api related to the team. But it does not provide anything related to 'how do I add existing VSTS account holder to a team'
https://www.visualstudio.com/en-us/docs/integrate/api/tfs/teams
Thanks in advance.
A: Option 1: REST API (not available for now)
For no... | |
doc_12108 | The pattern:
I wrote a service, which executes an asynchronous request in a static function which takes a delegate instance. The delegate instance conforms to a protocol which requires implementation of a success and failure method. I've contrived an example which hits Google.com. Please ignore the Type safety issues i... | |
doc_12109 | for me I upload a txt file in combitimetable which contain 7 columns that represent temperature values, now I would like to read each column separately.
--------txt file---------------
temperature values.txt
| |
doc_12110 | Here's my array.
int[][] map=
{
{1,1,1,1,1},
{0,0,1,0,0},
{1,1,1,1,1},
{0,0,1,0,0},
{1,1,1,1,1}
};
I know I'm missing alot, and I can't seem to find any answers that are understandable to a begi... | |
doc_12111 | and I tried using it below but when you run the code you can see that there are 2 plots on pages 3 and 5 and there should not be. it is somehow not keeping the \newpages. There should be 1 plot on pages 2,3,4 and 5. There should only be 5 pages.
Any idea how to fix this?
---
title: "Untitled"
output: pdf_document
toc:... | |
doc_12112 | I tried a variety of things. I executed the following commands in my home directory, in my git file (with the node_modules) folder, and the actual node_modules folder.
> var express=require('express');
undefined
> var express=require('node_modules/express');
Error: Cannot find module 'node_modules/express'
at Funct... | |
doc_12113 | I cannot link the model to controller SecondCtrl for some reason.
The code below is an adaptation of this http://plnkr.co/edit/3RJ2HS?p=preview from https://github.com/angular-google-chart/angular-google-chart
Here is my code:
index.html:
<html>
<head>
<title>
Google Chart Tools AngularJS Directive Example
... | |
doc_12114 | Is there a way to apply custom CSS to these boxes?
A: I would debug it with developers tools and try to overwrite the class of this hint. Other way is to redefine this bootstrap(?) class in some global styles file.
| |
doc_12115 |
A: You can use CAAffineTransform to upscale any type of UIView in UIKit. This is the 'transform' property of UIView. Do something like this:
UIImageView *imageView = ...;
imageView.transform = CGAffineTransformMakeScale(1.1, 1.1);
Please note: the 'frame' property of the UIView will not work properly when a trans... | |
doc_12116 | EntityManager-> createQuery ('current DQL')
Someone can give me an example.
My DQL example is:
SELECT c FROM JbxModelBundle:Categoria c
But I do not like using LockMode find unused methods.
| |
doc_12117 | I can get the hovering effect only for one row in my table.
It is not apply for the whole table.
How can i get Hovering effect for full table.
Can any body have any idea please revert me.
A: Take a look: https://stackoverflow.com/a/464828/1758762
You're on the right track with -mouseEntered: and -mouseExited:.
Look in... | |
doc_12118 | What I need ?
Transform json into table where attributes come columns and objects come rows
That's the script:
library(data.table)
library(jsonlite)
url <- 'http://ergast.com/api/f1/2004/1/results.json'
res <- fromJSON(file=url)
drivers <- res$MRData$RaceTable$Races$Results[[1]]$Driver
colnames(drivers)
The result th... | |
doc_12119 | It works well for AVI & FLV format. Please help me understand what I am doing wrong?
@session_start();
@include_once("start.php");
$command = '/usr/local/bin/ffmpeg -i '. FILEPATH .'/video_1244579292.mp4'.' -strict -2 -crf 20 '. COMPRESSPATH .'/my_video.mp4';
shell_exec($command);
echo ... | |
doc_12120 | it doesn't wait 'form action=' from html...
what's wrong?
<?php
if(isset($_POST['submit']))
{
$name = $_POST['name'];
echo "User Has submitted the form and entered this name : <b> $name </b>";
echo "<br>You can use the following form again to enter a new name.";
}
?>
from my .htaccess. maybe it's braking ... | |
doc_12121 | {
id: 1,
icon: require("../../../assets/logo.png"),
title: 'Title',
category: 'First',
},
{
id: 2,
icon: require("../../../assets/logo.png"),
title: 'Second Title',
category: 'Second',
}
] and a Picker ... | |
doc_12122 | 10:57:01 10:59:01 :02:00 (B2-A2)
10:59:01 11:00:01 :41:00 (B3-A3)
The custom time format to convert the number to time that I have used is #":"00:"00
A: then you are not converting the number to a time but are applying a mask of ##\:##\:## to a number
What that means is 10:00:01 is not being seen by exc... | |
doc_12123 | I did some googling and found this.
A: Yes, List.subList returns a view, as documented:
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so non-stru... | |
doc_12124 | Got it to work a while ago. Received some comments about this so I'm adding my code below for you to compare to yours/steal. From what I remember, my issue had something to do with the connection string I was using. I think the example I found had an extra parameter that was messing things up maybe?
using System;
using... | |
doc_12125 | Check the codepen.io for code. Sorry, new to Stack Overflow, please don't hurt me if I'm doing it wrong. ;-;
I have my logo (http://i.imgur.com/CIwEPgT.png) in the code already, but can someone make it so that my logo is in front of the space background?
Thanks.
Miles.
A: First target the image tag with the class="lo... | |
doc_12126 | through C# or Javascript?
Let me say I have ajax NumericUpDown and Button If I click Button named Reset the value of NumericUpDown will reset into minimum value.
asp:TextBox ID="TextBox1" runat="server" ></asp:TextBox>
<ajaxToolkit:NumericUpDownExtender ID="numeric" RefValues="" Se... | |
doc_12127 | if(/\$\b([a-zA-Z]|_ )(\w)*\b /x && !/ /)
is what I am using to detect a scalar. The problem right now though is that \b \b doesn't seem to be working with the special characters (!@#$, etc). For example it would count $var### as a valid name. Any ideas?
A: The regex you have is correct. all you need to do is to ancho... | |
doc_12128 |
A: Most barcode scanners behave like a keyboard, hence requiring the processing application to have input focus. There are however also barcode scanners, which connect to the serial port or are connected to the USB and offer a virtual serial port interface.
These scanners must be accessed through the real or virtual s... | |
doc_12129 | Code Review ---> Push to Release Branch (Currently in work during Sprint) ---> Merge to Master Production Ready Branch
(a) What are the negative consequences of utilizing this strategy in Git?
(b) For cleaner history, should everyone Rebase ReleasePublic Remote into ReleaseLocal, or conducting Pull? (Fetch/Merge), I wo... | |
doc_12130 | `
from mpl_toolkits.axisartist.parasite_axes import HostAxes, ParasiteAxes
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 16})
plt.rcParams.update({'font.weight': 'normal'})
plt.rcParams.update({'font.family': 'times new roman'})
x = [0, 1, 2]
y1 = [0, 1, 2]
y2 = [1, 2, 3]
fig = plt.figure(figsize... | |
doc_12131 | Is it possible to wrap a Channel in an Input/OutputStream? I found references for a ChannelBufferInputStream and ChannelBufferOutputStream on the net but that appears it was for an old version of Netty and is no longer around.
I can't defer the reading/writing into the channel handlers (encode/decode) methods because I... | |
doc_12132 |
docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
What command do you need to start docker?
A: You have to first start docker service:
rc-service docker start
See https://wiki.alpinelinux.org/wiki/Alpine_Linux_Init_System for more details.
| |
doc_12133 | I've been playing with the following code. The output of the following gives the exception PermissionError: [Errno 1] Operation not permitted from line 399 of /python3.4/selectors.py self._epoll.register(key.fd, epoll_events) that is triggered by the add_reader() line below
import asyncio
import urllib.parse
import sys... | |
doc_12134 | I'm probably missing some very basic concept, but any pointers or links to examples are appreciated
A: The way I like to do this is to use the full power of the embed.components method and pass in a dictionary of plot objects and then render them wherever I need in my html template.
I call components as follows:
from ... | |
doc_12135 | =IIF(Sum(Fields!NumActionPlanRemainOverdue.Value)=0, 0, Sum(Fields!NumActionPlanRemainOverdue.Value))
What else can I do?
A: From what I know, a Tablix does not hide non-positive rows. Can you verify that the dataset is returning a row for every month?
Some additional considerations are:
*
*Are you showing the dat... | |
doc_12136 | // Code 1
public class Bar<AnyType> {
private AnyType a;
}
// Code 2
public class Bar<Lalaland> {
private Lalaland a;
}
A: It works the exact same way, just as choosing a different variable name works the same way.
int anyInt = 5;
vs.
int lalaland = 5;
But always be careful that you choose a generic type... | |
doc_12137 | class User {
@EmbeddedId
@AttributeOverride(name="firstName", column=@Column(name="fld_firstname")
UserId id;
Integer age;
}
@Embeddable
class UserId implements Serializable {
String firstName;
String lastName;
}
I want to know what is the use of AttributeOverride.
This is the code from hibernate online docs
A: It is... | |
doc_12138 | How do I securely pass an API key from the remote client's page to my server (for the user to authenticate connecting his account to the client's page/app)?
-dylan
A: Have you looked into SSL?
A: In my experience, API Keys are actually used as salt to hashes, and the key itself is not actually passed.
When a client g... | |
doc_12139 | Let me first start off by explaining my goal. I would like to play some poker about a billion times. Maybe I'm trying to create the next PokerStars.net, maybe I'm just crazy.
I would like to create a program that can produce better randomized decks of cards, than say the typical program calling random(). These need to... | |
doc_12140 | CREATE TABLE zoo (
cage INTEGER,
animal TEXT,
);
Is there a real, effective difference between:
ALTER TABLE zoo ADD CONSTRAINT x EXCLUDE USING gist (cage WITH =, animal WITH =)
and:
CREATE UNIQUE INDEX ON zoo(cage, animal)
?
A: I read this on the blog of the author of the exclude constraints:
Exclusion Co... | |
doc_12141 | Later (ie. 1-2 years, may be less I hope), I'll probably exceed 2 billion entries. Will it be a relatively big deal to change the data types then or should I take 20-30 minutes to change all the DB fields and classes from int to long now, while it's pretty easy to do.
Thanks for your suggestions.
A: If you have that m... | |
doc_12142 | <li><a href="/help/index.htm" target="_blank"><i class="fa fa-question-circle"></i> Help</a></li>
and I looked around the CSS and this was the part affecting the color:
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
color: #ffffff;
background-color: #006687;
}
the problem... | |
doc_12143 | In my table Students I have 3 fields (id, name, firstname).
In my Feedbacks I have 3 fields (id, instruction, fk_student).
My sort with alphabetical order is incorrect. I have as message:
Column not found: 1054 Champ 'feedbacks.student_id
public function index(Request $req)
{
if ($req->search == "") {
... | |
doc_12144 | Delete = df[ (df['Food'] == 'Ham') & (df['Fruit'] == 'Beans') ].index
df.drop(Delete, inplace=True)
and I'm getting the message "A value is trying to be set on a copy of a slice from a DataFrame"
I investigated and it seems I'm not doing the change in the original data frame, how can I achieve this?
Thanks
| |
doc_12145 | void Worker::requestWork()
{
mutex.lock();
_working = true;
_abort = false;
qDebug()<<"Le thread travail de"<<this->myId<<" "<<thread()->currentThreadId();
mutex.unlock();
emit workRequested();
}
void Worker::abort()
{
mutex.lock();
if(_working) {
_abort = true;
qDebug()<<"... | |
doc_12146 | I have for example ;
int N =5;
int df = 2;
double value = N/df;
when I use the previous code I get the value = 2 ,
I need return 2.5
A: You can convert one of the arguments to double:
int N = 5;
int df = 2;
double value = ((double)N)/df;
or you can initially declare N and/or df as Double
double N = 5;
dou... | |
doc_12147 | I have a data in rows arranged by station names, (6 or so rows(months) per station) and put simply I would like to for each station name, extract the appropriate rows of data into a variable/(array?) to later do some "back end" calculations with.
the code I have so far is:
Sub Electrical_Checks()
Dim a As Integer
Di... | |
doc_12148 | The form field:
<input type="hidden" name="items.Index" id="items.Index" value="0" />
The JQuery:
var id = document.getElementById("id").value;
var newId = parseInt(id) + 1;
var clonedRow = $("#myTable tr:last").clone();
$("#items.Index", clonedRow).attr({ "value": newId });
$("#myTable").append(clonedRow);
I ahve al... | |
doc_12149 | Let's say i have this code with a lots of cases (trying to make a lexer):
import java.util.*;
import java.util.regex.Pattern;
public class MainClass {
public static void main(String[] args) {
Scanner scanner = new Scanner("Hello World! 3 + 3.0 = 6 ");
Pattern a = Pattern.compile("..rld!");
Patter... | |
doc_12150 | EMR step
aws emr add-steps --cluster-id j-2AXXXXXXGAPLF --steps Type=Spark,Name="Spark Program",ActionOnFailure=CONTINUE,Args=[--class,org.apache.spark.examples.SparkPi,/usr/lib/spark/lib/spark-examples.jar,10]
Spark Submit
spark-submit --master yarn --deploy-mode cluster my_spark_app.py my_hdfs_file.csv
Will running... | |
doc_12151 | Example:
arrays = [np.hstack([['One']*2, ['Two']*2]) , ['A', 'B', 'C', 'D']]
columns = pd.MultiIndex.from_arrays(arrays)
data = pd.DataFrame(np.random.randn(5, 4), columns=list('ABCD'))
data.columns = columns
import seaborn as sns
cm = sns.light_palette("green", as_cmap=True)
data.style.background_gradient(cmap=cm, s... | |
doc_12152 | I am using the zurb-foundation gem, and tried both version 3.x and 4 (with rails generators). The off-canvas js/css files do not seem to get included in my pages. Should I be including these manually?
A: Better late than never.
I just hade this issue and its due to the fact that the zurb-foundation gem is badly out o... | |
doc_12153 | $input = '%name (%postcode) <%email>';
How can I detect the placeholders with the scheme %NAME so that I get an array
$wildcards = array('name', 'postcode', 'email');
in the end?
It should recognize any wildcards following the wildcard scheme in any string. So the function should also convert
'%address (%name)'
to ... | |
doc_12154 | preg_match('/20[0-1][0-9]/', $inputstring, $array_return); // PHP
I can't figure out how to do this in Java. match.group() returns the whole string.
Is this impossible?
A: What you can do is something similar to the following:
Pattern p = Pattern.compile("\\w"); // Replace "\\w" with your pattern
String str = "Some ... | |
doc_12155 | I'm having a local development environment on mac from which I git push to my remote repo. My production server is on linxu and there I pull my repo. Usually this works fine but this time I'm stuck with an error I can't find a workaround for :(
npm ci failing on linux because of fsevents
Steps to reproduce:
$ npm ci
np... | |
doc_12156 | Nodejs server.js:
import fetch from 'node-fetch';
import express from 'express';
const app = express();
import http from 'http';
const server = http.createServer(app);
import {Server} from 'socket.io';
const io = new Server(server);
import mysql from 'mysql';
{...}
server.listen('4000', () => {
console.log("Server ... | |
doc_12157 | function App() {
const [rooms, setRooms] = useState([]);
const [days, setDays] = useState([]);
const roomsMapped = products.data.map(room => ({
id: room.id,
title: room.title
}))
useEffect(() => {
setRooms(roomsMapped);
})
return ( etc )
This returns the following error: Error: Maximum upda... | |
doc_12158 | number 1: how can I replace randomly tow items form list_B with list_A for 200 iterations and 200 lists created must be unique. for example List_1 = [**2**,11,35,48,**42**]
number 2: how can I replace first tow items of list_B and randomly select from list_A for example list_2 = [**5**,**33**,35,48,19]
A: *
*
import... | |
doc_12159 | <%= f.label :attachment_uploader, 'Current Attachments:' %>
<%= f.fields_for :data_files do |attachment| %>
<% if !attachment.object.new_record? %>
<%= attachment.label :attachment_uploader, 'Delete: ' + attachment.object.attachment_uploader_url.split("/").last %>
<%= attachment.check_box :_destroy %>
... | |
doc_12160 | {
id: "update/0",
//comments contains elements with type:comment
comments: [{
id:"comment/0"
content:"old first level comment content..."
children:[{
id:"comment/00",
content:""old second level comment content...",
childre... | |
doc_12161 | http://jsfiddle.net/hk1jfp4z/
I would like to be able to do following:
*
*On page load: Scale #scrollable_zoomable_background to fit the #window.
*To be able to zoom with two finger gestures, scroll with touchstart, touchend
*The rest of the page must not zoom, nor scroll horizontally (with <meta name="viewport" c... | |
doc_12162 | My problem is:
The value returned by event.keyCode is different if the event is returned from an input element or document.
Also
testing the following issue on Chrome Version 55.0
I get for input:
event.keyCode: 93 - String.fromCharCode: ]
I get for document:
event.keyCode: 221 - String.fromCharCode: Ý
and on Firefox 5... | |
doc_12163 | $(".leftnav").click(function () {
$(".rightnav").hide("slide", { direction: "down" }, 1000);
});
I have this so far: http://jsfiddle.net/452Yx/22/
I cant work out how to get the DIV to show again by clicking the same element.
Any ideas?
thanks
Mike
A: "I cant work out how to get the DIV to show again by clicking th... | |
doc_12164 |
A: You have to play around with TelephoneyManager to test if it has simcard slot or not .
to be exect try below code. more details from here
public static boolean isSimSupport(Context context)
{
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); //gets the curr... | |
doc_12165 | Here's the call to the task
PublicTweetListBox.ItemsSource = await getTweets(twitterCtx);
And here's the task itself
async Task<List<TweetViewModel>> getTweets(TwitterContext twitterCtx)
{
var tweetList = await Task.FromResult<List<TweetViewModel>>(
(from tweet in twitterCtx.Status
where tweet.Type ... | |
doc_12166 | When importing dependency "A", is there a way to tell Maven to automatically include all the its dependencies including "B" (without manually declaring to import "B", since it's already in the pom.xml of library "A")?
A: Transitive dependency are added by Maven automatically. If you go to a dependency loaded in local ... | |
doc_12167 | My Configuration for this server is: Ubuntu 10.04 LTS Disk Image 32bit
I can get this far:
Running both of these work as expected.
apt-get -y update
apt-get -y install curl git-core python-software-properties
When I get to the nginx steps:
add-apt-repository ppa:nginx/stable
apt-get -y update
apt-get -y install nginx
U... | |
doc_12168 | var casper = require("casper").create({
verbose: true,
logLevel: "debug",
webSecurityEnabled: false
});
var url = casper.cli.get(0);
casper.on('remote.message', function(msg) {
this.echo(msg);
})
casper.start(url, function () {
thelinks = getLinksFromIframes( casper );
console.log("doesn'... | |
doc_12169 | RewriteCond %{REQUEST_URI} ^/?storeadmin/([a-z]{2})/user/login/?$ [NC]
RewriteRule ^(.*)$ /store/%1/user/login [NC,R=301,L]
and it works fine. What I tried to rename the url after the redirect is over is :
RewriteCond %{REQUEST_URI} ^/?storeadmin/([a-z]{2})/user/login/?$ [NC]
RewriteRule ^(.*)$ /store/%1/user/login [... | |
doc_12170 | Code:
https://jsfiddle.net/6q352ysx/59/
They are both the same height, but they are uneven.
Which of these would get:
vertical-align: top;
vertical-align: bottom;
or would I use it on only one of them?
That, or would I be using
vertical-align: middle;
input[type=text] {
font-size: 22px;
width: 200px;
color... | |
doc_12171 | Let's say I have Post.php (which is DataObject for working with Posts on my website), and each post got it own category (many-many relationship goes here, but it doesn't really matter)).
The problem is: I hit Save button when creating new Post dataobject and I want to these category'ies would be duplicated automaticall... | |
doc_12172 | Follow is code which is i have written. I am able to set all the parameter except Texture.
float progress;
float4 colBack;
float reverse;
sampler input : register(s0);
sampler Texture2 : register(s1);
//Code to get the parameterhandle
progressHandle = transitionEffect.GetParameter(null, "progress"));
rev... | |
doc_12173 | #page1
<Link to={"/GroupsDetail.js/?group_Id="+item.group_Id}}>Details</Link>
#page2
submit() {
let Id= this.props.match.params.group_Id;
console.log(Id);
let url = 'http://localhost:0000/api/Group/GroupDetailsDisplay?group_Id='+Id;
}
Need to pass that Id into API.Please share your Idea. Tha... | |
doc_12174 | Is there any explanation on how to use Node file modes on Windows?
A: Take a look at the source. It seems like the only thing they are doing is setting FILE_ATTRIBUTE_READONLY based on whether the file is writeable or not.
if (flags & _O_CREAT) {
if (!((req->mode & ~current_umask) & _S_IWRITE)) {
attribute... | |
doc_12175 | This surely won't work:
while [[ read line != "q" ]]; do; echo "enter q to quit: "; done
Zsh here tells me condition expected: read.
Perhaps read does not even have this concept of a return value.
A: Bash Pitfall #9:
if takes a command. [ is a command, not a syntax marker for the if statement. It's equivalent to th... | |
doc_12176 |
*
*when I use array of strings, I must define the size of array before (this is disadvantage),
*when I would like to use ArrayList, I cant have empty items with null values or I cant skip ids:
ArrayList<String> a = new ArrayList<String>();
a.add(0, "hahah");
a.add(1, "bleeeee");
a.... | |
doc_12177 | i get that info (externaly using IMPORTHTML, dont control order) to a col in that order and want to rearange to a row in another order
i think i got source and target right and declared data i want to copy, but now i need to work with array and that is beyound my current skills
function Export_Relacao()
{
var ss = S... | |
doc_12178 | I tried to do like this:
string commandLine = "\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\"";
commandLine += " -- ";
commandLine += pURLinfo->szURL;
CreateProcess(commandLine.c_str(), NULL, NULL, NULL, FALSE,
CREATE_NEW_CONSOLE, NULL, NULL, &startupInfo, &processInformat... | |
doc_12179 | Addition to the question, how can we embed a conditional operator to make a request for getFeatures(...) only when (model === 'porsche')?
this.getCars().pipe(
map(cars => {
...
}))
.subscribe(cars => {})
export interface Car {
id: string,
model: string,
engine: string,
details: Detail[]
}
export interfa... | |
doc_12180 | List<string[]> Diff_ProductName = ("SELECT GUID,ProductName FROM Table_A bla bla bla.... ");
So i need to use GUID from Diff_ProductName to copy another data from another Table.
For (int i = 0; i < Diff_ProductName; i++)
{
List<string[]> DCB_CopyData = ("SELECT Name, ID FROM Table_B WHERE='"+(((string[])Diff_Produ... | |
doc_12181 | One way I think is by looking into connectionstring and manually checking if dev/QA exists but thought if there is a better way to do it?
A: You can create a separate class to use as a singleton.
public class DbOptions
{
public bool UseDefaultSeed { get; set; }
}
In your services add it as:
if (env.EnvironmentN... | |
doc_12182 | We are using YAML.dump function to create state capture in our tests.
Found strange diff conflicts after moving from docker to Mac Os Catalina local versions.
The difference we notice is in the way how nil keys are being dumped. On linux nil values are being replaced with empty space.
While on my mac for some reason ni... | |
doc_12183 | A Unity game can crash to the home screen (we are talking Android here) when any exception is not handled. As the programmer I'd call this a "crash", and I'd love to see in Fabric's report tools how many people have these crashes to home screen.
However Fabric.Internal.Crashlytics.CrashlyticsInit.RegisterExceptionHandl... | |
doc_12184 | template <class Type1>
void myFunction ( const Eigen::MatrixBase<Type1>& matrix)
{
}
Now, I would like to specialize the template function "myFunction" for the type std::complex<Type>. Note that the type "std::complex<Type>" is again a template.
How to define such a function?
A: You have to note that Eigen::Matr... | |
doc_12185 | (,[:+/_2&{.)^:10]0 1 NB. 10 + 2 elements
0 1 1 2 3 5 8 13 21 34 55 89
And here's its explicit monadic version:
3 :'(,[:+/_2&{.)^:y 0 1' 10
0 1 1 2 3 5 8 13 21 34 55 89
The questions is: in tacit definition, can I somehow supply rightmost argument to ^: conjunction, so as (off top of my head):
((,[:+/_2&... | |
doc_12186 | $num = "3";
$num_list = "30 3 42 54";
How can I match the "3" and not the "30"? The number order will always be changing.
I tried:
if ($num_list =~ /(\s?$num\s+/)
Unfortunately it matches the "3" in "30". Not sure how to fix it. I know it's because of the ? means 0 or 1.
Your help is much appreciated!
A: Try using... | |
doc_12187 | I created a table for it called categories, and I managed to add a category to it via a button. I can add everything to it, but if I add something to it, I want to check if it already exists in the categories table. If it does, then echo 'already exists`. If not, insert the data.
I can't solve this. Thanks for the help... | |
doc_12188 | I am using ZF Boilerplate and apparently it should be fairly simple, but I am lost. Any ideas?
A: I realize this was posted some time ago, and this might be a shot in the dark, but adding these two lines to my application.ini config did the trick for me:
resources.doctrine.orm.entityManagers.default.metadataDrivers.an... | |
doc_12189 | but with any other card I get this error
Exception in HttpConnection Execute: Invalid HTTP response The operation has timed out
This happens consistently with any other test card number I try
I tested more than one account with the good card and it works but not with the others.
Here are the cards I am using
GOOD (Note... | |
doc_12190 | I need to retain the order of my the messages I received from my source. When I receive messages A,B,C,D, I have to send them to sink as A,B,C,D. (I can't send them as B,A,C,D).
If I have just have 1 instance of each application, everything will run sequentially and the order will be retained.
If I have 10 instances ... | |
doc_12191 | What is the best way to query this data? All the documentation talks about nested arrays, but this is at the root level and there is no testing.
I have tried select supercolumnname[n] from tablewithsuper; and I am getting nulls, which isn't right.
A: The best way (that I know right now) is to unnest the array:
CREATE ... | |
doc_12192 | num = 3
try: #set an exception in case of a file Error
while num >=0: '''read in values and place them in a file'''
value = int(input("Enter values: "))
my_file = open('my_data.txt', 'w+')
my_file.write(str(value))
numbers = my_file.readlines()
num -=1
my_file.close... | |
doc_12193 | So far I manage to get the groups together and to calculate the statistical significance for each group/sub group. For some reason, stat_compare_means() only prints the all the p-values without a bracket. If there is more than one comparison per group (meaning: more than two sets of values within a group), all the p-va... | |
doc_12194 | public Bdd()
{
this.connection = new MySqlConnection("SERVER=192.168.205.1; DATABASE=bdassistnounou; UID=root; PASSWORD=root");
}
here is my configuration on my VM debian :
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.205.1
netmask 255.255.255.0
network 192.168.205.... | |
doc_12195 | I have a spring boot application with one RestController which takes in a RequestParam("id") and i return back the same id along with HttpStatus.OK.
When i hit GET API like : http://localhost:8080/Temp/getInteger?id=%23abcd
the value that gets assigned to id is 43981 which i don't understand how it got assigned.
Ideall... | |
doc_12196 | doctype html
html
head
title= title
script(src='/bower_components/jstree/dist/jstree.min.js')
script(src='/bower_components/jquery/dist/jquery.min.js')
link(rel='stylesheet', href='/stylesheets/style.css')
link(rel='stylesheet', href='/bower_components/jstree/dist/themes/defa... | |
doc_12197 | ((mazeLength ** 2) + 10)
for a buffer of 10. Typically, the mazeLength is far over 20, but this behavior can be observed at a mazeLength of 10.
Running a maze works fine on the windows machine, but the same maze and same code hits the recursion limit on the RaspberryPi. The issue can be solved on the Pi just by incre... | |
doc_12198 | ||
doc_12199 | $value = ''; //starting value
$repeat = false;
while(true)
{
$value = md5($value);
/*Save values in database, one row per value*/
/*Check for repeated hash value in db, and set $repeat flag true if there is one*/
if($repeat)break;
}
As you can see I suspect that there will be repeated has... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.