id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_26100 | FROM `wp_term_taxonomy` as wtt, `wp_terms` as wt
where (wtt.taxonomy IN ('pa_metal','pa_style')
AND wtt.term_id = wt.term_id
AND wtt.count>0) group by taxonomy";
| |
doc_26101 | I usually use a constainer view(just UIView) to make hierarchy.
When I'm using container view, I feel like there is much better way
than I using.
Below code is the way I write.
I make all view components as global variable.
And set them on initView()
let conditionContainerView:UIView = {
let view = UIView()
... | |
doc_26102 | The generated PDF consist mainly on images. I generate documents on parallel with multi threading.
itext7 seems faster but memory usage is much higher. Since I am generating more than one document at the same time I run out of memory.
I ran a simple test with the same input data and the output file is 5 MB. Below is my... | |
doc_26103 | https://wiki.eclipse.org/CDT/User/NewIn85#Header_File_Rename
I do not want my #include statements being replaced with relative paths as that is against my companies code style.
Example:
Before moving a header file:
#include <File.h>
After:
#include "../dir1/File.h"
Is there some setting which will disable this refact... | |
doc_26104 | how can I obtain the size of the message generated by the protocol?
Thank you for your help.
A: I assume that your messages extend omnetpp::cPacket class. In that case you may use getByteLength() method. Otherwise you have to implement a field in your message, which holds a payload size and then read it.
| |
doc_26105 | income.html.erb
<%= form_for @finance, url: wizard_path, :method => :put do |f| %>
<div class="field">
What <strong>year</strong> were you born?<br>
<%= f.number_field :age %>
</div>
<div class="field">
What's your <strong>zip code</strong>?<br>
<%= f.number_field :zip %>
</div>
<%= f.submit ... | |
doc_26106 | Caused by: java.lang.IllegalArgumentException: The config (ValueSelectorConfig(null)) has no configured variableName for entityClass (class com.tmtblback.dto.LessonDto) and because there are multiple variableNames ([room, studentGroups, timeslot]), it cannot be deduced automatically.
Has anyone else encountered this p... | |
doc_26107 | I tried this:
myRefVal=databaseBook.getReference("books");
Query lastQuery = myRefVal.limitToLast(1);
lastQuery.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
idBook = dataSnapshot.getKey();
... | |
doc_26108 | <form id="form1" action="" runat="server">
(even with this code-behind in Page Load: form1.Action = string.Empty;)
...this is the unexpected result that I get:
<form method="post" id="form1" name="form1" action="layouts/Default.aspx">
This is the expected result, that I would like your help to accomplish:
<!-- either... | |
doc_26109 | const DevTools = require('../components/DevTools.js')
DevTools.instrument()
I got the following error:
Uncaught TypeError: DevTools.instrument is not a function
Then I added console.log(DevTools) before calling instrument(), and this is the output in Chrome's console:
> Object {__esModule: true}
> __esModule: true
... | |
doc_26110 | What I'm doing
I'm developing an iOS app with a share extension. The extension app save links into CoreData, the containing(main) app, exhibits a listing of this links saved utilizing NSFetchResultsController.
The main app is the Master-Detail template provided by Xcode with really small adaptation.
I've created a emb... | |
doc_26111 |
A: If I understand right you want to snap to the road or use a Map Matching algorithm. For that task you can use e.g.
*
*GoogleMapsRoads API,
*MapBox Map Matching API
*Graphhopper Map-Matching
A: Use this and you will get precision upto 14+ decimal places.
locationManager.requestLocationUpdates(LocationManage... | |
doc_26112 | The light blue colour isn't showing up well on my maps.
Thanks,
A: You can check out the documentation for changing the style: https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#styling-draw and examples: https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/EXAMPLES.md
You can add styles options with yo... | |
doc_26113 | web.rb
class Web < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :password, :password_confirmation, :user_type, :remember_me
belongs_to :role, :polymorphic => true
end
user.rb
class User < ActiveRecord::Ba... | |
doc_26114 |
The far left shot has a bar above the ListView, is there anyway I can achieve this?
A: I don't know your current layout so I assume that you have only a ListView element in a LinearLayout. Here is a LinearLayout with 3 Buttons at the top of the list:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=... | |
doc_26115 | public class Web_ServicesActivity extends Activity {
private static String SOAP_ACTION = "http://service.fun2shoot.com/getLive";
private static String NAMESPACE = "http://service.fun2shoot.com/";
private static String METHOD_NAME = "getLive";
private static String URL = "http://119.82.75.91:8084/Fun2... | |
doc_26116 | error : type string is not assignable to type MenuItems[]
this.datasource.data=sessionStorage.getItem('MenuData')
A: Only store string in sessionStorage, by using JSON.stringfy() and while retrieving use JSON.parse() method
| |
doc_26117 | index.php :
<form action="odbierz.php" method="POST" ENCTYPE="multipart/form-data">
<input type="file" name="plik"/> <br/>
<input type="submit" name="submit"/> <br/>
</form>
odbierz.php
<?php
$dir = '/foto/';
$plik = $dir.basename($_FILES['plik']['name']);
if(move_uploaded_file($_FILES['plik']['tmp_name'],$plik)){
... | |
doc_26118 | helm upgrade --install artifactory-int --set ingress.annotations.'kubernetes\.io\/tls-acme'="true"
But this drops an error message:
Ingress in version "v1beta1" cannot be handled as a Ingress: v1beta1.Ingress.ObjectMeta: v1.ObjectMeta.Annotations: ReadString: expects " or n, but found t, error found in #10 byte of ...... | |
doc_26119 | PS C:\> Get-Host | Select-Object Version
Version
-------
5.1.19041.1023
PS C:\> $version = (Get-WmiObject -Class Win32_Product | where name -eq 'AWS Command Line Interface v2').Version
PS C:\> $version
2.0.7.0
PS C:\> $version -is [string]
True
PS C:\> 2.0 -is [double]
True
PS C:\> $version -gt 2.0
True
PS C:\> $ver... | |
doc_26120 | When I send a request with space, it returns 505. The request isn't even passed into the servlet so I am unable to add custom error handling in the application level.
How can I display a custom page for this 505 error? Also, is there a way to not treat this as a 505 and automatically encode the whitespaces?
eg URI:
"ht... | |
doc_26121 | Here is my ViewModel:
public class NewReservation
{
public SelectList AvailableServiceDates { get; set; }
public DateTime SelectedServiceDate { get; set; }
}
Here is my action method:
public virtual ActionResult New()
{
NewReservation newReservation = new NewReservation();
newReservatio... | |
doc_26122 | My code is below:
bool MainMenuLayer::init()
{
bool result;
result = Layer::init();
mainMenu = Menu::create();
mainMenu->setPosition(0, 0);
this->addChild(mainMenu);
Sprite *equalSprite, *equalDownSprite;
MenuItemSprite *equalButton;
LabelBMFont *equalButtonLabel;
MenuItemLabel *e... | |
doc_26123 | I have all my components separate, as well as the context, status, and reducer. I have a separate context for each artist, albums, and songs. When I click on an artist button, I want to filter the albums so that only theirs appear. But use reducer dispatch twice and in console log it tells me that both come from reduce... | |
doc_26124 | Please help me!
I am using symfony4 and react js with webpack encore.
This is my layout.html.twig:
<!DOCTYPE html>
<html>
<body>
{% block body %}
<div id="root"></div>
{% endblock %}
{% block javascripts %}
<script type="text/ja... | |
doc_26125 | the data should be align to right side not covering the whole pagethis code
.align-center{
text-align: center;
display: inline-block;
margin:0 auto;
margin-bottom: 50px;
}
.image-cover-3{
margin: 0;
padding: 0;
width: 100%;
height: 250px;
line-height: 250px;
background-size: co... | |
doc_26126 | press.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
part, And it looks like this: The method setDefaultCloseOperation(int) is undefined for the type ButtonClass. Even with the exit on close commented out there are more errors, please help.
Main class (with error):
package Buttons;
import javax.swing.JFrame;
publi... | |
doc_26127 | Service Policy Output:
GigabitEthernet11/1
Service-policy output: Gi11_1
Counters last updated 7191104 seconds ago
Class-map: class-default (match-any)
0 packets, 0 bytes
30 second offered rate 0000 bps, drop rate 0000 bps
Match: any
Queueing
queue limit 33025 packets
(queue depth/total drops/no-buffer... | |
doc_26128 | My test schema is:
CREATE TABLE T
(id int,
old varchar2(24),
new varchar2(24))
;
where old and new are strings that need to be split, an example row:
INTO T (id, old, new)
VALUES (14, 'L-D / T-E', 'L-E / T-E')
INTO T (id, old, new)
VALUES (14, 'L-D / T-E', 'L-D / T-D')
INTO T (id, old, ... | |
doc_26129 | But my lack of knowledge in server configuration (LAMP , etc) is making me do a lot of miss configurations .
First I think the .httaccess is not allow.
Second the update Wordpress and plugins featured is not allow
Third may be more numbers...
let me show my virtualhost file:
<VirtualHost *:80>
# Admin email, Serv... | |
doc_26130 | Invalid layout of java.lang.String at value
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:127), pid=8228, tid=6992
# fatal error: Invalid layout of preloaded class
#
# JRE version: (8.0_45-b15) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02... | |
doc_26131 | How can I get the IP address from the machine name? Once I get that I should be able to compare that IP with the local one to see if they're on the same subnet.
A: You can use nslookup (http://linux.die.net/man/1/nslookup), dig (http://linux.die.net/man/1/dig) or host (http://linux.die.net/man/1/host) command-line uti... | |
doc_26132 | This is my code:
new_list = [1,3, [0,10], 8, 9, [13]]
for i in range(len(new_list)):
if type(new_list[i]) == int:
new_list[i] == (new_list[i] ** 2)
else:
nested_list1 = new_list[2]
nested_list2 = new_list[5]
for i in range(len(nested_list1)):
nested_list1[i] == (neste... | |
doc_26133 | Height="300" Width="300"
I didn't change or add anything else. The window shows correctly as 300x300 in the Designer. But when I run the program I get a window that's 284x291. Why? If I set it to 309x316 the window becomes 300x300.
This is really a big problem, since controls are actually going out of bounds now. I de... | |
doc_26134 |
While MPI_Comm_split is the most common communicator creation
function, there are many others. MPI_Comm_dup is the most basic and
creates a duplicate of a communicator. It may seem odd that there
would exist a function that only creates a copy, but this is very
useful for applications which use libraries to pe... | |
doc_26135 | Currently, the ResultSet sometimes contains nested <a href>, <td>, and other tags. The only semi-solution I've found which acts upon the ResultSet (not the soup object) is RSelement.string
However, .string cannot handle inputs with multiple nested tags, e.g.
Input: <td class="yfnc_h" align="right">53.50</td>
Output: 53... | |
doc_26136 | AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Parameters:
ImageUri:
Type: String
LambdaName:
Type: String
RoleName:
Type: String
BucketName:
Type: String
Resources:
S3Bucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
Properties:
... | |
doc_26137 | Is my interpretation correct? I can't find anything in the API docs which says precisely what it does.
A: Based on answers from the FreeType maintainers I got the docs updated to add a bit of clarification. Basically the font itself determines the resulting sizes.
For RT_Request_Size
The relation between the requeste... | |
doc_26138 | <script>
function openPrint(){
var w = window.open();
var html = '<html><head> \<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"\>\<\/script\> \<script\>var xml = \'<Report>......</Report>'\<\/script\> \<\script src="./js/printScript.js"\>\<\/script\> \<script src="./js/printHTML... | |
doc_26139 | I don't understand where a reusable application is supposed to configure itself. Since it's intended for redistribution I don't have the ability to write the central settings.py myself. Looking at the Django documentation I see there's settings.configure but it appears to replace the entire configuration, instead of ... | |
doc_26140 | void MyClass::RemoveItem(std::tr1::weak_ptr<Item> const & pItem)
{
mylist.remove(pItem);
}
A: For one thing, you could just define operator == for any weak_ptr. I'm sure there's a reason this is not implemented, it can probably bite you at a later point.
template <typename T>
bool operator == (const std::tr1::wea... | |
doc_26141 | when i use the path of python program in the normal desktop, java can run the python program in eclipse.
However, i use the path of python program which is in the tomcat, java cannot run the python program in eclipse.
// String callPyPath="C:\\Python27\\python C:\\Users\\Desktop\\myprogram.py"+" ";
// GOOOOD it wo... | |
doc_26142 | MPMediaPickerController *picker =
[[MPMediaPickerController alloc]
initWithMediaTypes: MPMediaTypeAnyAudio]; // 1
[picker setDelegate: self]; // 2
[picker setAllowsPickingMultipleItems: YES]; // 3
picker.prompt =
NSLocaliz... | |
doc_26143 | Here are the problem requirements:
I need to take the word from the command line (dog) and compare it to the dictionary list (doggie). If the letters in the command line word exist then I need to output a message like You can't spell "doggie" without "dog"! So I am simply checking if the letters from the command line a... | |
doc_26144 | i have added this into my context processors:
TEMPLATE_CONTEXT_PROCESSORS = [
'django.contrib.auth.context_processors.auth',
]
my views.py currently looks like :
from django.shortcuts import render
from CreateVuln.forms import *
from django.views.generic import TemplateView
from django.template import Requ... | |
doc_26145 | Please advice me if my idea is right. For example to add a button to the toolbar, I create a
android.widget.Button button = new android.widget.Button()
and then add the button to the Toolbar.
My onCreate() function is as follows:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(saved... | |
doc_26146 |
1 : Line graph and
2 : Waterfall graph having y2 axis.
I want to merge those two graphs into a single graph having two y-axis. Is there any method to do it?
| |
doc_26147 | I would like to be able to send Date objects directly as a result but node/express seems to convert it automatically to String.
I could parse the string client-side but why should I ?
app.get('/', (req, res) => {
res.send(new Date());
});
Side-question : happy to get a jsFiddle with a node.js + Express functionin... | |
doc_26148 | function circle() {
this.x = 60;
this.y = 200;
this.draw = function() {
ellipse(this.x, this.y, 20, "green");
};
this.move = function() {
$(document).keydown(function(e) {
// console.log(e.keyCode);
if (e.keyCode === 68) {
this.y += 1;
... | |
doc_26149 |
Please ensure that adb is correctly located at
'C:\adt-bundle-windows-x86\sdkplatform-tools\adb.exe'
It is obvious that we missed a "\" between the "sdk" and "platform-tools" path.
Had been searching around in the web, but found no solution. Hope someone here can help.
Thanks in advance!
A: You don't mention if yo... | |
doc_26150 | http://localhost:49442/Orders/?$count=true&$filter=not%20(Freight%20eq%202.3)%20and%20(startswith(tolower(CustomerID),%27b%27))&$skip=0&$top=12
But here not-operator only worked to filter the Freight column. But I want to commonly us this not-operator to filter Freight and CustomerID.
A: Its hard to identify your int... | |
doc_26151 | <RelativeLayout
android:id="@+id/buttons_layout"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:paddingTop="80dip" >
</RelativeLayout>
On the MainActivity I do this
mButtonsLayout = (RelativeLayout) findViewById(R.id.buttons_layout);
RelativeLayout... | |
doc_26152 | The Dev machine has the following folder which contains MSTest.exe
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
On the build machine, that folder doesn't exist and searching for mstest.exe shows that it isn't on the build server anywhere.
Opening Control Panel > Programs and trying the Change operat... | |
doc_26153 | "Cascading foreign key 'FK_dbo.DriverLicense_dbo.Person_PersonId' where the referencing column 'DriverLicense.PersonId' is an identity column.\r\nCould not create constraint
These are my entities, Why I'm getting that error? I'm not saying PersonId is identity there in DriverLicense entity.
public class DriverLicense
... | |
doc_26154 | I dont know if it will help but this is the package.json of my CRUD app :
{
"name": "MyApp",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"depen... | |
doc_26155 | mysql_query( "UPDATE `tuser` SET `AthleteID`=' " . strtoupper( substr($row["LName"], 0, 2)) . $row["SkillshowUserID"] . " 'WHERE `SkillshowUserID` = `SkillshowUserID`;'");
A: Take your PHP logic out of your query. You're only making your life more difficult:
$athleteId = strtoupper(substr($row["LName"], 0, 2)) . ... | |
doc_26156 | Thank you so much for your appreciated
A: A memory dump is a process in which the contents of memory are displayed and stored in case of an application or system crash. Memory dump helps software developers and system administrators to diagnose, identify and resolve the problem that led to application or system fail... | |
doc_26157 | I tried to open them with ffmpeg-php, but it says: Can't open movie file /where/the/file/is
The file is there and is readable by the user.
Any ideas?
| |
doc_26158 | public class Class1
{
public void DoSomething()
{
using (var context = new CRMContext())
{
context.Policies.Where(p => p.new_RenewalDate ==
DateTime.Today.AddDays(60).Date).ToList();
}
}
}
I want to c... | |
doc_26159 | I've been looking at the visNetwork and networkD3 R packages. This 2015 blog post mentions that visNetwork is better featured that networkD3, but I've read a couple of SO questions mentioning how networkD3 has changed and expanded its functionality.
In which of these two packages would it be simpler to satisfy my requ... | |
doc_26160 | My Javascript code:
$("#advertising_form2").on("submit", function (e) {
e.preventDefault();
var formObj = $("#advertising_form2");
var formData = formObj.serialize();
$.ajax({
url: "/php-ajax-upload.php",
type: "POST",
data:new FormData(this),
contentType: f... | |
doc_26161 |
Okay, I get that HTTP authentication is done automatically on every message - but how? Is the username/password sent with every request? Doesn't that just increase attack surface area? I feel like I'm missing part of the puzzle.
The answers I received made perfect sense in the context of a mobile (iPhone, Android, WP... | |
doc_26162 | int *ptr = &array[102];
Supposing that there was some way to precisely detect buffer overflow, when will this code experience a buffer overflow? Is it compile time? My research tells me no, but I'm not sure.
| |
doc_26163 | TrajanjeČasaBranjaKnjige = new int[SteviloPoglavijKjige];
NasloviPoglavijKnjige = new string[SteviloPoglavijKjige];
for (int i = 0; i < SteviloPoglavijKjige; i++)
{
Console.Write("Vpiši naslov {0,2}. poglavij: ", i + 1);
NasloviPoglavijKnjige[i] = Console.ReadLine();
while (true)
{
try
... | |
doc_26164 | ResultSet rs = foo.executeQuery();
boolean hasNext = rs.next();
while(hasNext) {
bar();
boolean hasNext = rs.next();
}
ResultSet (java.sql.ResultSet) is an interface, so there should be no implementation for next(), only a method declaration. So how does the code run successfully? The best answer I found onl... | |
doc_26165 | In short I can find three installations of python2.7 in usr/local/lib, usr/local/bin and another private folder where I tried installing. The python call uses the bin installation and pip is linked to lib installation, I tried installing request module(which I needed) in all the three paths(path/dist-utilities). Still... | |
doc_26166 | dict = {}
I'm then returning back some information from an API to be added to this dictionary dependent on some variables name.
some_variables_name1 = str(some_variable1)
dict[some_variables_name1] += [{ 'key1': value1 }]
some_variables_name2 = str(some_variable2)
dict[some_variables_name2] += [{ 'key2': value2 }]
... | |
doc_26167 | window['newObject'] = "some string";
alert(newObject);
but for local scope. Right now only solution I have is using evals:
eval("var newObject='some string'");
But this is really ugly solution... The best one would be like using some reference to local scope like in a window[] solution, but I never heard of any refer... | |
doc_26168 | Now I'm getting this error ERR_CONNECTION_REFUSED after I try to start debugging.
I have already tried these solutions How to solve ERR_CONNECTION_REFUSED when trying to connect to localhost running IISExpress - Error 502 (Cannot debug from Visual Studio)?
and localhost refused to connect Error in visual studio
But non... | |
doc_26169 | window.find(' ');
This is acting very differently in Chrome compared to firefox.
In firefox it finds and highlights the character immediately after the current caret position. Where as in Chrome it finds from 0th position and always highlights the first space in the window. Any solution how we can get this working... | |
doc_26170 | - name: Pull aplication jboss container
docker:
name: jboss
image: jboss/wildfly
state: started
pull: always
ports:
- "9990:9990"
- "8080:8080"
command: "/opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0"
I want to mimic the command shown in the docs:
docker run -p ... | |
doc_26171 | A=[f magic(10)]
A=
931142103 92 99 1 8 15 67 74 51 58 40
931142103 98 80 7 14 16 73 55 57 64 41
931142103 4 81 ... | |
doc_26172 | foreach($data as $key => $value) {
$insert[] = [
'id' => $value->id, 'is_published' => $value->is_published,
"first_name" => $value->first_name, "middle_name" => $value->middle_name, "last_name" => $value->last_name,
"description" => $value->description,
... | |
doc_26173 | <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View"/>
<variable
... | |
doc_26174 | But googling around has resulting in no examples of this (some things close, but not quite... i think). So basically, I want a custom command, that depends on the target executables, but produces nothing and runs a script that need not be portable to accomplish the "install"
Anyone have any examples of something like t... | |
doc_26175 | arrayList of objects that i created. how can this be done? The problem im having is access the data in the onclicklistener onclick function
A: in your getView method you have to set setOnClickListener and then getPosition of clicked item and use it to get information from your arraylist that hold data, then call getN... | |
doc_26176 | I have one more command prompt instance running (lets call it B). B is just simple command prompt.
Now I want to run a command on A instance from B instance.
Something like,
e.g.
cmd B:> call A.exe "dosomething"
Now here I want "dosomething" to be ran on A cmd instance.
I tried with wmic.
C:\Users\dbe1>wmic process ... | |
doc_26177 | Here's the error:
Error in loadNamespace(name): there is no package called 'fuzzyjoin'
Can anyone help me figure out a solution or what's going wrong here?
I'm not sure if this is related to the future.apply package or future or globals packages as I know that they are also involved here.
Here's my code showing the iss... | |
doc_26178 | my code is here
Public Class Form8
Private Const constr As String = "server= PANKAJ\SQLEXPRESS; database = pankaj billing software; integrated security=true"
Private bs As BindingSource = New BindingSource
Private dt As DataTable = New DataTable
Dim adapter As SqlDataAdapter
Private cb As SqlCommandBuilder
Private ... | |
doc_26179 | I'm concerned that these types of operations are way easier to be handled directly in Python with user-defined keywords, but having in mind that a Built-In keyword is already thought to do this work for me, shouldn't it be able to work both in Big and Little Endian formats?
If someone could tell me if the Convert To By... | |
doc_26180 | According to the answers in this question this I have to set the viewCenter of the camera to the translation of the mesh. However, the meshes I have are already translated (the centroid is not at [0, 0, 0]) as they are in the coordinate system of a CT/MR scanner.
How can I get the centroid of an imported mesh in order ... | |
doc_26181 | For example, the callback function signature in RabbitMQ is:
def callback(ch, method, properties, body):
pass
I want something like:
def callback(ch, method, properties, body, x, y):
# do something with x and y
Then pass it down as a callback in basic_consume
channel.queue_declare(queue=queue_name, durable=Tr... | |
doc_26182 | all repos are unchanged.
I want to know if there are commits which are not pushed yet.
I checked the help of git status and found no way to output this message:
Your branch is ahead of origin/master by 1 commit
if things are not pushed, and nothing if everything is ok.
I could use git status and ignore lines by using ... | |
doc_26183 |
A: Try:
NSLog(@"%p", &myIntVar);
or
NSLog(@"%lx", (long)&myIntVar);
The first version uses the pointer-specific print format, which assumes that the passed parameter is a pointer, but internally treats it as a long.
The second version takes the address, then casts it to a long integer. This is necessary for portabi... | |
doc_26184 | ShopScreen.js is calling fetchShops.js from service folder
ShopScreen.js
import React, { useState, useEffect } from 'react';
import { View, Text, StyleSheet, Button } from 'react-native';
import { fetchShops } from '../services/fetchShops';
//import {set} from "react-native-reanimated";
const ShopsScreen = props => {
... | |
doc_26185 | 2017-08-03T20:29:40.017-0400 I CONTROL [initandlisten] MongoDB starting : pid=7684 port=27017 dbpath=/data/db 64-bit host=Matts-MacBook-Pro.local
2017-08-03T20:29:40.017-0400 I CONTROL [initandlisten] db version v3.4.6
2017-08-03T20:29:40.017-0400 I CONTROL [initandlisten] git version: c55eb86ef46ee7aede3b1e2a5d184a... | |
doc_26186 | Is there a way to protect my code and config from decompiling / downloading? I know there are numerous topics devoted to obfuscation and encrypting of jar files and general consensus is that protection is not possible but I don't think it relates to my case as I control the execution environment, can set up permissions... | |
doc_26187 | Expected behaviour: observeEvent(test_vals,...) should execute whenever there is a change to either of the 2 numeric inputs, and "test_vals changed" should get printed to the console.
Actual behaviour: It doesn't execute at all.
Reprex below.
library(shiny)
ui <- fluidPage(
numericInput("x", "x", 5),
numericInput(... | |
doc_26188 | int _tmain(int argc, _TCHAR* argv[])
{
CComSafeArray<long> sa;
vector<long> vec;
for (int i = 0; i<3 ; i++ )
{
func(&(sa.m_psa));
long* pVals;
HRESULT hr = SafeArrayAccessData(sa, (void**)&pVals);
if (SUCCEEDED(hr))
{
long lowerBound, upperBound; /... | |
doc_26189 | Create table Tab_with_Ix
(
id int not null,
name nvarchar(10),
phone decimal(10,0)
)
I inserted some records:
insert into Tab_with_Ix
values(1, 'Yogesh', 8855664452), (2, 'Vinay', 9977884455), (3, 'Sam', 9988554466)
Now, I create a non-clustered index on Tab_with_Ix:
CREATE NONCLUSTERED INDEX NCI_Ix on T... | |
doc_26190 | I've got a working script that sends an ajax request to get_code.php. This script is run from the main page - index.php. The get_code.php script queries my MySQL DB for a row and then sends back the data to index.php.
Current code
jQuery in index.php
<script type="text/javascript">
$("#Code").click(function(){
var ... | |
doc_26191 | I need a macro which generates Parser[T] - where both parser and T are constructed from external grammar, written in simplified grammar description language for library users. T is parsed AST which contains mutually nested case classes. These case classes should be generated and visible outside.
Grammar:
RootType {
m... | |
doc_26192 | Unfortunately the mysql doesn't seem to work. Could you please tell me what I am doing wrong?
if (isset($_GET['q']))
{
$q = $_GET['q'];
}
else
$q ="";
$query = mysql_query("Select q1.Umsatz, kundendatenbank.Kundenname from
(SELECT sum(rechnung.Betra... | |
doc_26193 | using UnityEngine;
using System.Collections;
public class ScenarioMatrix : MonoBehaviour {
public GFRectGrid _grid;
public string[,] _scenarioArray;
/*
USAREMOS A SEGUINTE NOMECLATURA PARA O GRID
E = GRID VAZIO TEM SOMENTE O CENARIO
SP = Spawn Point, é onde o player começa
EP = é onde o pl... | |
doc_26194 | this is My code :
RotateTransition rt = new RotateTransition(Duration.millis(3000), myImageView);
rt.setByAngle(360);
rt.setCycleCount(1);
rt.setAutoReverse(false);
rt.play()
;
A: It seems to be undocumented, but setting a negative angle results in a counter-clockwise rotation:
rt.setByAngle(-360);
| |
doc_26195 | git $*
but when passing a string as a parameter, this is treated like there were no quotes.
When typing myfunction commit -m "More than a word", an echo "git $*" from inside the function gives git commit -m More that a word, so I tried calling it with escape characters as follows:
myfunction commit -m \"More than a wo... | |
doc_26196 | A = matrix(c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 1, 5, 6, 3, 4, 9, 10, 7, 8, 12, 11, 3, 5, 1, 7, 2, 9, 4, 11, 6, 12, 8, 10, 4, 6, 7, 8, 9, 10, 11, 1, 12, 2, 3, 5, 5, 3, 2, 9, 1, 7, 6, 12, 4, 11, 10, 8, 6, 4, 9, 10, 7, 8, 12, 2, 11, 1, 5, 3, 7, 9, 4, 11, 6, 12, 8, 3, 10, 5, 1, 2, 8, 10, 11, 1, 12, 2, 3, 4, 5, 6, 7... | |
doc_26197 | ScaledCordinates.BottomRight = new PointF(((float)ScaleBottomRight.X * (float)Scale), ((float)ScaleBottomRight.Y * (float)Scale));
The values assigned to "ScaleBottomRight.X" is 2.36523485 and "ScaleBottomRight.Y" is 2.38020468.
"Scale" = 66.80098.
I don't understand why "ScaledCordinates.BottomRight" is giving me {X ... | |
doc_26198 | #!/bin/sh
VALUE=`sqlplus -silent $DB_USERNAME/"$PASSWORD"@"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=$HOST_NAME)(PORT=$DB_PORT)))(CONNECT_DATA=(SID=$DB_SID)))" <<END
set pagesize 0 feedback off verify off heading off echo off
SELECT ID FROM TEST_USERS WHERE USER_NAME=$SAMPLE_USER;
exit;
END`
if [ -z "$VAL... | |
doc_26199 | {"uptime":"44"}
available under url:
http://localhost/uptime
and I want to display this value on page using angularJS.
I wrote a resource to get data from this rest url:
angular.module('utilService', ['ngResource']).
factory('UtilService', function($resource) {
var UtilService = $resource('/uptime', { },
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.