id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23508400 | SELECT * FROM products WHERE id IN (1,2,3)
This returns:
ID | Title
1 | Bla
2 | Bla2
3 | Bla3
If I change the query to:
SELECT * FROM products WHERE id IN (2,3,1)
I still get:
ID | Title
1 | Bla
2 | Bla2
3 | Bla3
How can I change my query to get:
ID | Title
2 | Bla2
3 | Bla3
1 | Bla
For the second query?... | |
doc_23508401 | If I simply do this:
array.forEach { $0() }
array.removeAll()
It's possible that an item snuck its way in between the forEach and removeAll execution, so I might be removing an element that didn't get executed in the previous line.
Would something like this be safer?
extension Array {
mutating func removeEach(han... | |
doc_23508402 |
It crashes on samsung device running operating system version 4.1. While on Marshmallow Nexus 6 device, it works perfectly fine. What is the problem?
Gradle file
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:appcompat-v7:23.1.1'
comp... | |
doc_23508403 | I am using the PHP mail() function. Now, I am running PHP5 on an Ubuntu machine. In php.ini I have declared SMTP as the IP of the machine running the mail server and smtp_port as 25. Further, I have tried to telnet into the mailserver on port 25 and send a mail - it works (my work terminal is Windows).
The problem is t... | |
doc_23508404 | Thanks
A: You could design a simple programming language and write an interpreter for it:
Check the tools Alex (http://www.haskell.org/alex/) for lexical analysis, and happy (http://www.haskell.org/happy/) for parsing your code.
You can make the language as complex as you want. I think that defining While loops and ... | |
doc_23508405 | PS : I'm using Windows and executing my code on a Android Emulator from Android Studio.
I tried multiple things ( https://medium.com/@Charles_Stover/create-a-react-native-app-on-an-android-emulator-1c0d94f288ae, ... ):
Without any configuration, the build works find but using fetch always returns a timeout (and accessi... | |
doc_23508406 | For example, the user enters some data, the project processes it, and then calculates some simple statistics. I would like to pass a "year" variable through dropdown button, so that the user could choose the year for which the report should be generated.
Some parts of the code:
Models.py:
class Fms(models.Model):
...
d... | |
doc_23508407 | @-webkit-keyframes rollIn {
0% {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
}
100% {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@keyframes rollIn {
0% {
opacity: 0;
-webkit-transform... | |
doc_23508408 | https://www.npmjs.com/package/react-native-animated-nav-tab-bar
And I have written code like this :
const Tabs = AnimatedTabBarNavigator();
function Tabbar1(props) {
return (
<Tabs.Navigator
tabBarOptions={{
activeBackgroundColor: "#ff00ff",
inactiveBackgroundC... | |
doc_23508409 | For example, i have sale id nr 100 on delete and on create a new sale the id will be 101.
What i want is to keep 100 if i delete.
this is my model based on codeigniter:
public function getAllInvoiceItems($sale_id)
{
$q = $this->db->get_where('sale_items', array('sale_id' => $sale_id));
if($q->num_r... | |
doc_23508410 | I have configured the following way
log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.hibernate.type=TRACEThe first is equivalent to hibernate.show_sql=true, the second prints the bound parameters among other things.
hibernate.cfg.xml
<property name="show_sql">true</property>
<property name="format_sql">true</pro... | |
doc_23508411 | Now I'm searching for the right one to register a provider for
IntelliSense Information.
Could anyone help me out or give a hint?
Thank you in advance.
| |
doc_23508412 | main :: IO ()
main = print $ 2^2
despite the signature of
(^) :: (Num a, Integral b) => a -> b -> a
due to GHC's type defaulting mechanism. I'm using numeric-prelude, which instead exports
(^) :: Ring.C a => a -> Integer -> a
This is extremely annoying to use with Int exponents, so I prefer Prelude's version with... | |
doc_23508413 |
A: Visual Studio 2019 works with Azure DevOps Server 2019, TFS 2017, TFS 2015, TFS 2013, TFS 2012 and TFS 2010 SP1.
Source: https://learn.microsoft.com/en-us/visualstudio/releases/2019/compatibility#team-explorer-azure-devops-server-and-team-foundation-server
I assume it works with TFS 2018 as well, even it is not men... | |
doc_23508414 | 2-inputWidth : '20px' , 2-inputHeight: '10px', 2-color : 'blue',
3-inputWidth : '60px' , 3-inputHeight: '70px', 3-color : 'white',
4-inputWidth : '90px' , 4-inputHeight: '10px', 4-color :'yellow',
scroll : 'auto', z-index : 1}
resultObj = {1: {1-inputWidth : '30px' , 1-inputHeight: '... | |
doc_23508415 | Route Code:
this.store.find('Parent', params.parent_id).then(function(parent){
//this works
var a = parent._data.children.length;
//this doesn't but feels like it should?
var a = parent.get('children').length;
})
Model:
App.Parent = DS.Model.extend({
...
children: DS.hasMany('child', {async: true})... | |
doc_23508416 | TABLE
...
09.07.1908 63.5
10.07.1908 59.7
11.07.1908 49
12.07.1908 44.7
.......
.......
12.05.2003 32.45
13.05.2003 38.33
.......
OUTPUT
JANUARY FEBRUARY MARCH ...
1908 12.53 23.45 45.87 ...
1909 45.23 14.43 23.54 ...
.................................
................................. | |
doc_23508417 | UserSchema.pre('save', function (next) {
if (!this.isModified()) {
return next();
}
this.crm.isUpToDate = false;
next();
});
and
UserSchema.pre('save', function (next) {
if (!this.isModified()) {
return next();
}
if (this.crm.update === true) {
this.crm.isUpToDate = ... | |
doc_23508418 | Recently, i installed AMP posts in my website and all permalink now have the /amp/ at the end of the URL.
The problem is that mod_pagespeed (at this time) doesn't support AMP tag, so the console show me some errors. But when i insert ?PageSpeed=off at the end of the amp URLs, AMP is validated.
So, i'd like, if it's pos... | |
doc_23508419 | I am very new to ECS, please help I want to setup the metrics alarms on fargate so from their metrics I will select the overall threshold values.
Thanks in advance !
A: Fargate provides metrics on ECS "Service" level, and not Task level since you have scheduled tasks which are not running as an ECS Service thus you ar... | |
doc_23508420 | @using (Html.BeginForm("Buy", "Keys", FormMethod.Post))
{
<div class="calc_steps">
<div class="NumberedRow one">
1. @Html.DropDownListFor(model => model.PaymentSystem, Model.PaymentSystems, new { @class = "calcsteps_select styledselect" })
</div>
<div class="NumberedRow two">
2. <div class=... | |
doc_23508421 | I have a property that have a iframe of google maps and I want to show the iframe of google in angular html.
room.mapgoogle = <iframe .....
Must I use a pipe?
| |
doc_23508422 | The CSS:
.order-table{
border-collapse:collapse;
}
.order-table-header{
text-align:center;
background:none repeat scroll 0 0 #E5E5E5;
border-bottom:1px solid #95bce2;
padding:16px;
}
.order-table-odd-row{
text-align:center;
background:none repeat scroll 0 0 #FFFFFFF;
border-top:1px solid #000000;
}
.order... | |
doc_23508423 | So far I can create the tree with all nodes and values.
Now I would like to add all attributes. Here my problems start ;-)
The relevant XAML looks like this:
<Window.Resources>
<HierarchicalDataTemplate x:Key="NodeTemplate">
<StackPanel Orientation="Horizontal" Focusable="False">
<TextBlock x:Na... | |
doc_23508424 | How can I populate my grid panel if the data is not in key-value format?
Here is the response:
{"result":true,"data":["dep1","dep2","dep3"],"totalCount":3}
Here is my grid panel
xtype: 'gridpanel',
flex: 1,
itemId: 'departmentsGridPanel',
title: '',
store: new Ext.data.ArrayStore({
autoLoad: true,
fields: [
... | |
doc_23508425 | RewriteRule ^page/([A-Za-z0-9-]+)/?$ page.php?id=$1
So with this the page loads fine when someone visits example.com/page/3fssdfs. However the CSS and image files doesn't load. When I checked the console they appear like this,
GET http://example.com/page/assets/css/index.css 404 (Not Found)
The css files are stored l... | |
doc_23508426 | // @name responsive design
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Take screenshot
// @author You
// @match https://example.com
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.5.0-beta4/html2canvas.min.js
// ==/User... | |
doc_23508427 | However, with the TOP 5 takes over 7 minutes to execute, eventually coming up with the expected answer.
To get around this partially I can place it into a temporary table, and then do a TOP 5 from there. However I need to incorporate this into a function with a variable clause for the PrID. But functions don't work wit... | |
doc_23508428 | public class Person {
private String name;
public void setMember(String memberName, String memberValue) {
// look at memberName, see that it is "name", and then set this.name to whatever memberValue is.
}
}
A: Maybe misunderstanding, but you could just use
if ("name".equals(memberName)) this.name... | |
doc_23508429 |
function checkSubmit() {
var name = document.getElementById('name').value.trim();
var dob = document.getElementById('dob').value.trim();
var id = document.getElementById('id').value.trim();
var phone = document.getElementById('phone').value.trim();
... | |
doc_23508430 | I have views that make remote calls and I want to keep the data when the user navigates back to the view using the back button so I don't have to make a remote call again.
Is there a way to set a global variable that's accessible from all views, or a way to retain data when a user navigates back to a view using the bac... | |
doc_23508431 | Sample program (in Kotlin):
package my.test.rx_task_queue
import io.reactivex.Flowable
import io.reactivex.Single
import io.reactivex.schedulers.Schedulers
import org.slf4j.LoggerFactory
import java.util.concurrent.atomic.AtomicInteger
object TestCommonResource {
private val logger = LoggerFactory.getLogger(TestC... | |
doc_23508432 | I have determinate this layout :
I need at least 10 reputation to post image so i upload my picture on a website. You can view it here:
Item1, Item1, Item1 will be day, month and year.
I do not know at all how to develop the rest.
A: You can use Swipe tab layout which is very much popular and easy to create.
Androi... | |
doc_23508433 | I'd like to put them into a dictionary, as seen from the code below.
However, this is just returning an empty list back.
import pprint
detail_recipes = []
for recipe in list_recipes:
title = ""
description = ""
ingredient = ""
if(len(recipe.find_elements_by_css_selector(".post-title")) > 0):
title = recipe.... | |
doc_23508434 | I did that copying to first get the plugin recognised before I alter it.
I changed the qmake project to look that way:
TEMPLATE = lib
TARGET = qtcopysocketcanbus
CONFIG += plugin
QT = core serialbus
HEADERS += \
copysocketcanbackend.h
SOURCES += \
main.cpp \
copysocketcanbackend.cpp
DISTFILES = plugin.js... | |
doc_23508435 | pls help
int invoice_no,bookno;
static ArrayList<Integer> reference=new ArrayList<>();
static ArrayList<Integer> quantity2 = new ArrayList<>();
public void abc1()
{
try
{
System.out.println("hello");
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection=D... | |
doc_23508436 | option19971675181 ACHILLE BLA BLA BLA1 blabla 88 498
option19971675182 ACHILLE BLA BLA BLA1 blabla 176 498
option19971675183 ACHILLE BLA BLA BLA1 blabla 191 498
option19971675184 ACHILL... | |
doc_23508437 | A friend told me that it is possible to adjust the app window and place it somewhere on the screen so that the app does not fill up the whole screen.
Has anybody some information on that? I cannot find a ressource that describes that feature.
A: Seems elementary, but aren't you then talking about a Widget:
http://deve... | |
doc_23508438 | Here is my didSelectRowAtIndexPath method in the tableview:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.navigationController pushViewController:webViewController animated:NO];
// Grab the selected item
RSSItem *entry = [[channel items]objectAtIndex:[i... | |
doc_23508439 | #ifdef GL_ES
#define LOWP lowp
precision mediump float;
#else
#define LOWP
#endif
varying LOWP vec4 v_color;
varying vec2 v_texCoord;
uniform sampler2D u_texture;
void main()
{
gl_FragColor = v_color * texture2D(u_texture, v_texCoord);
gl_FragColor.rgb = vec3(gl_FragColor.g, gl_FragColor.r, gl_FragColor.b)
}
... | |
doc_23508440 | In Android, Display pressed button animation in OnClick?
This is the button image :
When touched, I want this to show a rotating animation. For this, I created the same in various rotation angles like this:
I created a custom button.xml like this:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="htt... | |
doc_23508441 | Here is my code
<a-entity gltf-model="#character" texture-map="map: map" position="0 0 -7"></a-entity>
and here is the part of the code in the component texture-map that is trying to reset the model back to it's original position of 0, 0 -7
play.addEventListener("click", (e)=> {
if (play.innerHTML === "Stop"){... | |
doc_23508442 | I have the Following PL/SQL Codes:
for Parent table
CREATE OR REPLACE FUNCTION insertneworder (
orderdate IN orders.order_date%TYPE,
orderdescription IN orders.order_description%TYPE
)
RETURN orders.order_id%TYPE
IS
orderid orders.order_id%TYPE;
BEGIN
INSERT INTO orders
(order... | |
doc_23508443 | How can that be done?
A: You could use a pile of JavaScript with pushState (note limited browser support) but it would be clunky at best.
I'd recommend scrapping the frames and using JSP to template the shared content into standalone pages.
| |
doc_23508444 | I have 3 PHP pages. The main page is the one with all the jQuery on it:
<body>
<script type="text/javascript" src="includes/jquery-1.4.2.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// for each trade, load the current comparisons
<?php
... | |
doc_23508445 | Whenever i open the solution, try to build or try to get latest team explorer automatically checks out the solution.
When i try to check-in displays that files are identical and check-in undone by server.
what is the reason of this behaviour?
A: The best solution to prevent accidental check outs seems to be to change ... | |
doc_23508446 | My _Layout.cshtml looks like this:
<head>
//...
@if (IsSectionDefined("AdditionalMeta")) {
RenderSection("AdditionalMeta");
}
//...
</head>
...My shared view (_Title.cshtml) looks like this:
@model TitleViewModel
@section AdditionalMeta {
@if (Model != null && Model.Title != null)
{ ... | |
doc_23508447 | TRTREJ6M_KIY .
TXKIDE -1.317048e-01
TXKIDL .
TXKIDR .
URINE_INF_DON .
VASODIL_DONN .
VASODIL_D... | |
doc_23508448 | class Bar
attr_reader :n
def initialize(n)
@n=n
end
def a
if @n <= 3
b1
else
b2
end
end
def b1
@n+=1
end
def b2
@n+=1 ##super fast addition
end
end
I try to write a rspec like that
bar=Bar.new(5)
allow(bar).to receive(:b2).and_call_original
bar.a
expect(bar).... | |
doc_23508449 | *
*This will appear to a duplicate question but please consider this. I am doing an application with google map. my client need to load the places around the visitor, so i am trying to use geolocation. But all the google results and stackoverflow results shows, its impossible with wired network in Safari to get the lo... | |
doc_23508450 | $oldpw = $_POST['oldpw'];
$newpwd = $_POST['newpwd'];
$newpwd2 = $_POST['newpwd2'];
$username = LoggedUser()['Username'];
$qvars = [':User'=>$username,':oldpw'=>md5($oldpw)];
$qvars[':pass'] = md5($newpwd);
$insertuser = query("insert into SRO_VT_WEBSITE..TB_User (StrUserID,encrypted_password,old_password,new_passw... | |
doc_23508451 | <?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
Here's a screenshot of the AWS console: https://dzwonsemrish7.cloudfront.net... | |
doc_23508452 | For a start, what is this beast called? I wish Google would allow us to search for punctuation like this.
What exactly does it mean?
At first glance, it appears to be a double reference (like the C-style double pointers T** var), but I'm having a hard time thinking of a use case for that.
A: It denotes an rvalue refer... | |
doc_23508453 | open System
type Envelope<'a> = {
Id : Guid
ConversationId : Guid
Created : DateTimeOffset
Item : 'a }
I would like to be able to use Pattern Matching on the Item, while still retaining the envelope values.
Ideally, I would like to be able to do something like this:
let format x =
match x with
... | |
doc_23508454 |
FirebaseError: Function Query.where() called with invalid data. Unsupported field value: undefined
What should I do? This is my code:
const ChatRoomList = () => {
const [user] = useAuthState(auth);
const userChatRef = db
.collection('chats')
.where('users', 'array-contains', user.email);
const [chatsSna... | |
doc_23508455 | Here is an example of what I am trying to do
SPListItem item = GetListItem();
item["Field1"] = GetField1ValueFromControl();
item["Field2"] = GetField2ValueFromControl();
item.Update();
if (!item.MissingRequiredFields)
{
SuccessRedirect();
}
else
{
Error("Fields missing");
}
In this example the Field2 is set as a... | |
doc_23508456 | How do I select the particular values of the response based on specific values of both gender and location?
For example, I know
dataset$response[gender=="Male"]
will select all the Males. But say I want to select the response values from males that are from location=='SE' as well. I don't know how to do this.
Than... | |
doc_23508457 | I am then using Azure Pipelines in Azure DevOps to build these two projects, pack them as NuGet packages and push them to a NuGet server provided by Azure Devops (Azure Artifacts).
However, when the NuGet packages are published, they only include dependencies in NuGet on packages that I've added to the projects via Nu... | |
doc_23508458 | App.Build = DS.Model.extend({
allegiance: DS.attr('string'),
profession: DS.attr('string'),
skills: DS.hasMany('skill')
});
App.Skill = DS.Model.extend({
name:DS.attr('string'),
value:DS.attr('number')
});
In my app, I have controls to set the allegiance, profession, and values of each skill (... | |
doc_23508459 | I am trying to create a column of buttons but I want them left aligned.
I have tried many things but am new at css/html5.
A: Use an unordered list:
<ul>
<li><img src="/images/yourimage.png />Some Text</li>
<li><img src="/images/yourimage.png />Some Text</li>
<li><img src="/images/yourimage.png />Some Text<... | |
doc_23508460 | I think I understand quite well how it works:
print("0 and 0 : ", (0 and 0))
print("0 and 1 : ", (0 and 1))
print("1 and 0 : ", (1 and 0))
print("1 and 1 : ", (1 and 1))
print((0 and 1) == (1 and 0))
That gives me the expected results :
0 and 0 : 0
0 and 1 : 0
1 and 0 : 0
1 and 1 : 1
True
BUT when I run this code... | |
doc_23508461 | i.e in 1 datatable i have username and pwd and in another datatable i have that user details. how to show all these in one datatable to get those values display in gridview(asp.net)
any idea????
A: on=new SqlConnection("Data Source=MCN101; Initial Catalog=MergeTable; Uid=sa; pwd=");
da = new SqlDataAdapter("Select * f... | |
doc_23508462 | AWS CLI.
for example:
get_cluster_name() {
EKS_NAME=$(aws eks describe-cluster --name ${CUSTOMER_NAME}) && \
echo $EKS_NAME | jq -r .cluster.name}
the output when the cluster exist is ok, i get the name of the cluster.
when the cluster does not exist, i get:
An error occurred (ResourceNotFoundException) when calling t... | |
doc_23508463 | def timer_func(func):
def wrap_func(*args, **kwargs):
t1 = time()
result = func(*args, **kwargs)
t2 = time()
return result
return wrap_func
Since my functions are in a loop, I need to add a partial timing to a global timing using different store variables. Something like that:
def timer_func(func, gl... | |
doc_23508464 | Typically I'm using text boxes. To organise this text, I decided to group the digits entered and put spaces between the groups.
So something like '555555555' will appear like '555 555 555', to give something similar to a whatsapp or viber signup text box effect. I'm using a TextChanged event to accomplish this.
Here's... | |
doc_23508465 | Now, I code as
const data = orderBy(realData, ['name'], ['asc'])
Here's my data
input:
[{name: 'A1'},{name:'A2'},{name: 'A21'},{name:'B10'},{name: 'A100'},{name:'A22'},{name: 'B32'},{name:'A3'}]
The issue is 'orderBy' sort data as it text(ASCII sorting)
current output:
[{name: 'A1'},{name: 'A100'},{name:'A2'},{name: '... | |
doc_23508466 | Possible Duplicate:
How can one check to see if a remote file exists using PHP?
I want to programatically check if a website is live or not. I know i can do this by opening the url using "cURL" or "fopen" but it takes a lot of time because it needs to fetch the full page.
Furthermore, this method is not reliable beca... | |
doc_23508467 | So I am following this example:
stackblitz
But in my case I need to make a remote call to retrieve the info so I have to call a service:
Service.ts
getCustomers(name: string) {
return this.endPointUrlService.checkIfMapIsReady(this.entityLink[2])
.flatMap((res) => {
return this.http.get(this.endPo... | |
doc_23508468 | The output I get is like this:
J
a
k
e
25
M
a
l
e
But I'd like for the output to look like this:
Jake;25;Male
I've attached the code of this program below. Any help would be greatly appreciated. Thank you.
import sys, select, os
from os import system
def option_1():
with open(input("Input file name with extensi... | |
doc_23508469 | jQuery's documentation for individual methods is littered with comments about lack of support for XML documents like:
"Note: this method currently does not provide cross-platform support
for setting data on XML documents, as Internet Explorer does not allow
data to be attached via expando properties."
or the more... | |
doc_23508470 | The code below simply creates and destroys a Vulkan instance and overloads the new and delete operators to keep track of how many times memory is being allocated and freed.
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <iostream>
int counter = 0;
void* operator new(std::size_t size)
{
void* buffer... | |
doc_23508471 |
A: That's because while the app is created using HTML, etc... it's still an app - not a web page, and so makes it sense that it will not be zoomable. You don't want your app to feel like a webpage, but like an app.
For example, you can review Apple's page on Do and Don't when creating an application: https://developer... | |
doc_23508472 | Without precompile, everything works great. However, when I run rake assets:precompile locally or on production server, problem appear.
Uncaught TypeError: undefined is not a function application.js:8
application.js contains everything (just first glance), so I have no idea where can be a problem. Eve... | |
doc_23508473 | class WebsiteA extends AggregateRoot
{
private $id;
private $email;
private $password;
public static function initiate($id, $email, $password)
{...}
}
class WebsiteB extends AggregateRoot
{
private $id;
private $email;
private $password;
private $accountIds = [];
private ... | |
doc_23508474 | Repeater Markup:
<asp:Repeater runat="server" ID="RPMenu" DataSource='<%# Menues.GetAllMainMenu() %>'>
<ItemTemplate>
<%# Eval("MenuName") %><br />
<asp:Repeater runat="server" ID="RPMenuUnder" DataSource='<%# Menues.GetAllMainMenu(Convert.ToInt32(Eval("MenuID"))) %>'>
<ItemTemp... | |
doc_23508475 | {
"car_name": "sendrel",
"brand": "toyota",
"price": 12500,
"timestamp": "2021-02-02 00:00:00"
}
As the ES default uses the "yyyy-MM-dd", so the change the timestamp mapping by making a put request to the ES doc "car" following this documentation
PUT http://localhost:9200/car
{
"mappings": {
"propertie... | |
doc_23508476 | /usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
Does anyone know what the issue could be?
A: The question is naive but a problem exists: when Homebrew asks for the password, sometimes it does it multiple times consecutively.
It does it because it needs it multiple ti... | |
doc_23508477 | double d = (4/3)*6;
Why does it sees 4/3 as 1(int?) not 1.333 and the result is 6 not 8?
Thanks.
A: 4/3 is equal to 1, since it's dividing two integers using integer division. 4.0/3 will give you the result you expect, since it will use floating point division.
A: You are calculating the value in integer arethmetic... | |
doc_23508478 | select
SGB_ID,
max(SGB_TERM_CODE_EFF)max_term,
SGB_TYP_CODE
from SGB
group by
SGB_ID,
SGB_TYP_CODE
order by 1
I'm getting multiple rows, as the SGB_TYP_CODE has different values. I just want the result from the maximum term. I've tried using 'keep dense_rank', but I can't get it to work.
Thanks.
A: Here i... | |
doc_23508479 | Following is the code:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class LoginScreenOne extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Stack(
children: [
Container(... | |
doc_23508480 | below is my code,
function useAnother(Id: string) {
const [compId, setCompId] = React.useState(undefined);
const {setIsLoading} = React.useContext(LoadingContext);
const comp = useCurrentComp(Id);
const load = useLoad();
if (comp && comp.id !== compId) {
setCompId(comp.id);
const pre... | |
doc_23508481 | Im programin in ui5 and I get this file from ui5 class sap.ui.unified.FileUploader
Thanks in advance and greetings!
openPDF: function (file) {
if (file && window.FileReader) {
var reader = new FileReader();
reader.onload = function (e) {
var raw = e.targe... | |
doc_23508482 | I get the following error when I include any shell command like 'mkdir' , 'chmod'
any help on this is really appreciated.
OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown
A: distroless provides a debug image tha... | |
doc_23508483 | foreach(){
// .....
if(!in_array($view, $this->_views[$condition]))
array_push($this->_views[$condition], $view);
// ....
}
OR
foreach(){
// .....
array_push($this->_views[$condition], $view);
// ....
}
$this->_views[$condition] = array_unique($this->_views[$condition]);
UPDATE
Th... | |
doc_23508484 | import pygame
pygame.init()
screen = pygame.display.set_mode((300, 300))
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
| |
doc_23508485 | I’m not in this role. So .. help would be appreciated.
I have a system that captures a created and completed date for items (call them tasks). I want to know what tasks take the longest to complete, and generally average completion times.
Ideal Output:
Task Name | Average Completion Time
-------------------------------... | |
doc_23508486 | {
"_id" : ObjectId("629e98b6d1f00e840e9f337d"),
"Is_credential" : "1",
"New_Title" : "Mastering Agile 1",
"Slug" : "Mastering-Agile-1",
"Skillbuilder_Capstone_Level" : "Advanced"
}
{
"_id" : ObjectId("629e98b6d1f00e840e9f337e"),
"Is_credential" : "0",
"New_Title" : "Mastering Agi... | |
doc_23508487 | I see all packages I have installed in interpreter settings (see photo - pycharm settings) - on the photo you can see:
*
*os, torch imports not working
*remote is selected and I see the path inside docker to interpreter
*my package installed and even I see all pip list in settings
I went though all "repair IDE" st... | |
doc_23508488 | Here's my code that I tried:
jQuery
var dataString = $('#form_confirm_delete').serialize();
$.ajax({
type: "POST",
url: "ajaxpage.php",
data: dataString,
dataType: 'json',
cache: false,
success: (function(response)
... | |
doc_23508489 | $subject = "Test Email";
$from = "noreply@bob.com";
ini_set("sendmail_from", $from);
$message = "<html><body bgcolor=\"#DCEEFC\">
Hello<br><br>
This is a <b>test</b> email.
<br><br><hr>
<a href=\"\">Click Here</a>
<br><br>... | |
doc_23508490 | Our Admin said no certificates are needed.
Error:-
$ node test2.js
Error : { Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1048:34)
at TLSSocket.emit (events.js:182:13)
at TLSSocket._finishInit (_tls_wrap.js:628:8) code: 'ESOCKET', command: 'CONN' }
NodeJS Code:-... | |
doc_23508491 | :begin
SET /P runscript= [Question Here]
if %runscript%==:100 goto run blahblah.bat
if %runscript%==EXIT goto :A
pause
I am trying to make there be an option to open another .bat file in a different window, but when I answer :100, command prompt just shuts down. I am trying to be as clear as possible as to what I am ... | |
doc_23508492 | #Toggle Script
# $dirserver/A -> $dirproject/{trunk|branches}/A
if [[ "$1" == "dw" || -z "$1" ]]; then
echo "[+] Delete old link ( $dirserver/A )... "
rm "$dirserver/A"
if [[ "$(readlink -f $dirserver/A)" == *"branches"* ]]; then
ln -s "$dirproject/trunk/A" "$dirserver/A"
... | |
doc_23508493 | For now, a tenant represents around 56 collections and 208 indexes.
I have seen there is a recommended maximum for M10 cluster of 5000 collections and indexes (https://www.mongodb.com/docs/atlas/reference/atlas-limits/)
So if my understanding is correct, M10 cluster suits best for 18 maximum tenants (5000/(56+208)=18,9... | |
doc_23508494 | String password = "xyz";
Now after run, when i open .class file, it contain those passwords. How to handle this case. I don't want to use DB for storing. And if i'll change the variable name then also it'll contain password.
**I want .class should not contain any password value.
A: It's not advisable to store the pa... | |
doc_23508495 | 'use strict';
module.exports = {
a: 'a',
b: 'b',
c: 'c',
};
When I run tsc the transpilation fails with an error that refer to files that import this config.js file. The error seems to point at some typescript type related problem:
src/db/index.ts:138:26 - error TS2345: Argument of type 'string' is not assignab... | |
doc_23508496 | If it's can be added in qweb repot then what is the field name for opportunity title. Or is there any other way to do this?
Appreciate all your help and support. Thanks.
A: It is possible to add an opportunity to the quotation form view. The field name is "opportunity_id" and you can add it to the form view using "E... | |
doc_23508497 |
A: You can use javascript or jquery for this.
You can call a function on selection of the dropdown and check if the value is others, then make an input text appear with .html function of jquery.
| |
doc_23508498 | <div class="container">
<br>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#m... | |
doc_23508499 | I have an observable called _data$, which emits all the values I need to track, but I only want to subscribe to it when the video player is playing.
I know that the following approach is incorrect, but it explains what I am trying to achieve. It currently does not work, because I can't unsubscribe from _data$.
const ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.