id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23512700 | What is the canonical process of developing a server, knowing that it must run on Windows?
Does one build a Windows Service application right away? Is the debugging process really as obnoxious as it seems? Does a Windows developer start out with a Command Line Application for the sake of debugging, and only convert it ... | |
doc_23512701 | After displaying the data, each of them that I click goes to the first option and is selected.
For example, I choose the third option, but it goes to the first option !!
I did not write any code to the server !!! I do not know why this happened.
The code I wrote is exactly the same code below:
<form id="form1" runat="s... | |
doc_23512702 | var MapStart = new google.maps.LatLng(41.664723,-91.534548);
var markers;
var map;
var infowindow = new google.maps.InfoWindow({maxWidth: 650});
function initialize() {
markers = new Array();
var mapOptions = {
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP,
center: MapStart
};... | |
doc_23512703 | function filter(){
var input1 = $("#advanced-search1").val();
$.ajax({
dataType: 'html',
url: "php/filter.php",
type: "POST",
data: input1,
success: function(response){
$('#result').html(response);
}
});
}
The html form
<form>
<select id="advanced-search1" name="taskOpti... | |
doc_23512704 | Click here for index page code
The favicon displays on the index page , the same code is on the template page but doesn't display the favicon(and the directory is declared ../recources) I've tried many articles and worked with a colleague but still can't find the problem.
Thanks for your time,
Ayaan
Template section:
... | |
doc_23512705 | For example, please look this code.
test:: test1 test2
@echo "test"
test1:: back3
@echo "test1"
test2:: back3
@echo "test2"
back3::
@echo "back3"
Results of "make test"
back3
test1
test2
test
But I want to get below result.
back3
test1
back3 <---- I want to run back3 again.
test2
test
How can I d... | |
doc_23512706 | questionsList=[]
answersList=[]
def retrieveQuestions():
f=open('Questions.txt')
questionsList=f.read().splitlines()
for row in f:
questionsList.append(row)
def retrieveAnswers():
with open('Answers.txt') as j:
answersList=list(j.read().splitlines())
retrieveQuestions()
retrieveAnswers... | |
doc_23512707 | if (exception instanceof InterruptedIOException) {
// Timeout
return false;
}
It won't retry if it's timeout. What's the reason? Sometimes, the network is not stable, I just want to retry connection. I can use my own RetryHandler, but I just want to make sure if there is any problem if I retry ... | |
doc_23512708 | @Rule
public WireMockRule rules = new WireMockRule(PORT);
It is an old app and used wiremock version 1.7. Now that we upgraded it to the 2.4.1, some of the tests fail.
The actual Http Query is done through Hystrix, which might be an issue.
A: This has nothing to do with Hystrix.
If your response files size is n... | |
doc_23512709 |
checking 1/6...
checking 2/6...
..
..
I did something similar in c# a while a go but cant remember how so now cant transfer the logic to this java application. Instead of a background worker i am using a swing worker here
Please could someone enlighten me on what i need to research
Thanks
A: For "Monitoring" SwingWo... | |
doc_23512710 | I have sorted them into hash tables based on the domain in their UPN.
$org1Users += [PSCustomObject]@{
UserPrincipalName = $user.UserPrincipalName
AccountSkuId = $user.Licenses
With those hash tables each contains the UPN and the Licenses string for each user displayed as:
UserprincipalName ... | |
doc_23512711 | <script>
var stop = false;
$("#accordion h3").click(function(event) {
if (stop) {
event.stopImmediatePropagation();
event.preventDefault();
stop = false;
}
});
$("#accordion").accordion({
header: "> div > h3"
})
.sortable({
axis: "y",
handle: "h3",
stop: function(... | |
doc_23512712 | The value is being logged out but I need to get the value inside fetch in the 'title' property. Please excuse me if it is an irrelevant question, I am new to this. Need a solution or an alternative please.
button.addEventListener('click', (e) => {
function editTodo(e) {
function filterID() {
Array.from(todoItem).... | |
doc_23512713 | from abc import ABC, abstractmethod
class AbstractMetaClass(type, ABC):
@abstractmethod
def func(self):
pass
class MyClass(metaclass=AbstractMetaClass):
pass
I would have expected my code to fail, since MyClass is an instance of an abstract class. Instead it runs with no problems.
What is happe... | |
doc_23512714 |
A: Even you get SMTP return code 250, it doesn't guarantee your email will arrive in final destination.
That return code means that the relay server ACCEPTS your email-delivery request. After they accept the request, who knows what happen after that. Several possibilities:
*
*The remote server scan your email with... | |
doc_23512715 | <?php
$current_date = date("Y/m/d");
$update_d = "UPDATE product SET c_date = '$current_date' ";
$run_d = mysqli_query($con, $update_d);
if ($run_d) {
echo "<script>alert('Current Date Updated Successfully!')</script>";
}
?>
A: Why not do the whole operation in the database rather than passing a variable ... | |
doc_23512716 | At first , I thought it related to COM registering ,But I write a test winform application to invoke same COM and it works fine at the same server .
Anyone?
class FaceScannerServerHost : Form
{
public FaceScannerServerHost(Control control, bool hidden = false)
{
if (control.IsHandleCreated) throw new In... | |
doc_23512717 | results.jsp
<script>
var data = ${jsonProducts};
var ht = new Handsontable(dataTable, {
data: data,
startRows: data.length,
readOnly: true,
maxCols: 7,
colHeaders: true,
colHeaders: ["Id", "Problem", "Solution", "Deadline", "Type", "Status", "Developer"], ... | |
doc_23512718 | I need to extract the email of a button. I tired to extract href, but button are obviously something else than in smartphone applications.
So I click on this button which open my gmail with the New message window and the email in the "To" field.
SO I investigate and I could find only 1 tutoriel in Java :-(.
I found so... | |
doc_23512719 | My Python code is as follows:
#IMPORT LIBRARIES
from bs4 import BeautifulSoup
import requests
import csv
#OPEN A NEW CSV FILE. IT CAN BE CALLED ANYTHING
file = open('csv_py.csv', 'w')
#CREATE A VARIABLE FOR WRITING TO THE CSV
writer = csv.writer(file)
#CREATE THE HEADER ROW OF THE CSV
writer.writerow(['Date', 'Conte... | |
doc_23512720 | This is the input of the form:
<input value="<?php echo $ss['text']; ?>" name="text" id="" cols="30" rows="7" class="test_input_size" >
$ss['text'] from sql which is "1 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1... | |
doc_23512721 | APP="/opt/apps/"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME="/usr/lib/jvm/java-8-oracle"
I have sourced source /etc/environment on my machine. I am able to get the output when I type echo $APP on terminal
But When I call it from inside a java file
LOGGER.e... | |
doc_23512722 | if (model is null || !model.Any()) return this;
But in latest Microsoft conference I saw guys use something like:
if(model is { })
I try to use it but always return true (if object comes null or not)
So my question is. Is there a new way to check if a model comes null?
What is the correct usage of brackets { }
... | |
doc_23512723 |
A: In the context of entity groups, 'child' means the MessageIndex's key is a descendant of the Message's key. It does not mean the MessageIndex list (or collection) is a property of the Message.
See the section titled "Creating Entities With Entity Groups" in documentation on transactions for an example of how to do... | |
doc_23512724 | My goal is to execute custom code when a method from the Gem is called, but also to keep executing the original code.
I tried to abstract the code into the following script:
module Foo
class << self
def foobar
puts "foo"
end
end
end
module Foo
class << self
def foobar
puts "bar"
sup... | |
doc_23512725 | this.DataBindings.Add("Width", E, "Width");
this.DataBindings.Add("Height", E, "Height");
What is the best way to fix it? Only by hands, problem that there is many properties? Or exists something like "DataBindings"?
P.S. Element not inherited from any class, he haven't "DataBindings".
Thanks!
A: To get it working bo... | |
doc_23512726 |
There is no other parent div, however It is possible to expand the settings which increases the height of the <div id='app'>
Isnt it possible to have the Body expand with its content, so that the height of the Body gets smaller if the height of <div id='app'> gets smaller?
This id how I expand the settings div:
funct... | |
doc_23512727 | So the problem I am having is this portion
"<?php
$cnt = 0;
foreach ($default_properties as $prop_key => $value) {
?>"
'<div class="view-row">'
'<div class="view-label">'."<?php echo $prop_key?>".'</div>' +;
'<div class="view-value">'. "<?php echo $value?>".'</div>' +;
'</div>'; "<?... | |
doc_23512728 | I downloaded the file and open it in iTunes and when I am trying to sync my iPhone with iTunes it gives me an error saying "WBW app was not installed on your iPhone".
Could anyone can please provide me with the steps or any link?
A: You need to install the provisioning profile (drag and drop it into iTunes). Then dra... | |
doc_23512729 | I can find them and delete them row by row, but I am looking for a faster work around.
As some of these are related to other tables, they can not be deleted directly without taking care of the relation. I wand to first delete those are not included in the relationship by running a simple DELETE command without any cond... | |
doc_23512730 | To do this I use file.list() with q="'FOLDER_ID' in parent" and trashed=false with FOLDER_ID being the ID of the folder I am interested in. As I process the results I keep track of all of the folders that get returned from this request and then repeat the files.list() call using the new folders in the q parameter. I co... | |
doc_23512731 | Exception AttributeError: "'MyClass' object has no attribute '_popen'" in <Finalize object, dead> ignored
But my class has the expected behavior though.
Here's how what the signal handling looks like:
import os
import signal
import multiprocessing
class Actor(multiprocessing.Process):
def __init__(self, *args, *... | |
doc_23512732 | sudo pip2 install numpy
but it says
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/lib/python2.7/dist-packages
but when I go to the python shell, and type import numpy, it throws an ImportError
python --version prints `Python 2.7.5`
I have no idea what the problem is even after looking at va... | |
doc_23512733 | However, the same collection and environment setup is working fine in my colleagues laptop.
Also, my other collection with different environment works fine.
Error: Client network socket disconnected before secure TLS connection was established
A: Socket error usually comes when you have proxy issues :
see if your pro... | |
doc_23512734 | def current_user
@current_user ||= User.find(:id => session[:id])
end
And I call a method like this:
def get_food user
food = Food.find(:id => user.id)
end
This is fine, but I want to add exception handling.
When the user is nil I want to use @current_user:
def get_food user
food = Food.find(if user is nil i wa... | |
doc_23512735 | But when I am generating procedure, it do not contain existing GRANT EXECUTE role.
How can I add (automatically!) it to generating script?
A: In SSMS, go to Tools, Options, SQL Server Object Explorer, Scripting and in the Object Scripting Options section, change Script Permissions to True.
| |
doc_23512736 |
interface SFunction<T, G> {
G apply(T t);
default <Q> SFunction<T, Q> andThen(SFunction<? super G, ? extends Q> after) {
return (T t) -> {
return after.apply(apply(t));
};
// return new SFunction<T, Q>() {
// @Override
// public Q apply(T t) {
// retu... | |
doc_23512737 | I have some data in core data and want to update it when didSelectRowAtIndexPath is called. this is my code
class ViewController: UIViewController, UITableViewDelegate {
var todo = [NSManagedObject]()
var JSON = Data.sharedInstance
@IBOutlet var TableView: UITableView!
override func viewDidLoad() {
super.viewDi... | |
doc_23512738 | The first way is by passing the filename as a command line parameter: ./a.out a.txt
The second one is by reading from a pipe: cat a.txt | ./a.out
The second way is more important and more difficult for me. How can it be done?
Here is detail about my question:
There is a class,which i defined like this:
class API_EXPORT... | |
doc_23512739 | I want to reformat the MySQL Date to dd/mm/YY but I don't know how to do it because I don't specifically select the date column. I just select all columns from the table.
Code:
<?php
echo "<table style='border: solid 1px black;'>";
echo "<tr><th>Id</th><th>Name</th><th>Date</th></tr>";
class TableRows extends Recursiv... | |
doc_23512740 | ie The tweet which has highest retweet_count will be 1st and so-on....
Here is election Table details
id bigint from deserializer
created_at string from deserializer
source string from deserializer
favorited ... | |
doc_23512741 |
A: The closest thing that you might be looking for is probably the EDM metadata available here: https://graph.microsoft.com/v1.0/$metadata.
It's in XML, but if you parse it and find the EntityType element with Name="user" attribute, you can see what properties it has:
<EntityType Name="user" BaseType="graph.directoryO... | |
doc_23512742 | In many documents or video tutorials, I see scala developers create empty class or objects and use that on another class as parameter or implement empty traits !
for example :
object Controller {
sealed trait Controller
case object Login extends Controller
case object Logout extends Controller
}
Or this :
seal... | |
doc_23512743 | jQuery is automatically loaded by WordPress.
Installed plugins are Yoast SEO, WPML and SMK Sidebars.
The issue is when I check the console in my browser, it shows me the following:
Mixed Content: The page at 'https://www.myuri.com/' was loaded over
HTTPS, but requested an insecure script
'http://www.wplibs.org/jqu... | |
doc_23512744 |
A: user_ids = Message.select('distinct(user_id)').map(&:user_id)
messaged_users = User.where(id: user_ids)
A: pluck is more efficient than select. Select will return a relation object and create ruby objects when you map.
user_ids = Message.pluck(:user_id)
messaged_users = User.where(id: user_ids)
| |
doc_23512745 | I created a class to clean the numbers and passed them through a command:
output = output.replaceAll("\\-", " ");
I thought it was working fine because the double dashs were gone but now I realized all my negative numbers appear to be positive. I'm not sure how to approach it, is there a way to specifically say if tw... | |
doc_23512746 | Please let me know what I am doing wrong.
Thanks!
Dim pack As New ExcelPackage
Dim ws As ExcelWorksheet = pack.Workbook.Worksheets.Add("Sheet1")
Dim ms As New MemoryStream
Dim dt As New DataTable
ws.Cells(1, 1).Value = "Test"
pack.SaveAs(ms)
ms.WriteTo(Context.Response.OutputStream)
... | |
doc_23512747 | "NameError: uninitialized class variable @@instances in InstanceCounter::InstanceMethods"
What I need to change in my modules.rb?
Console:
Evgenys-MacBook-Pro-2:lesson_05 admin$ irb
2.3.1 :001 > load 'modules.rb'
=> true
2.3.1 :002 > load 'car.rb'
=> true
2.3.1 :003 > car=Car.new
initialize
NameError: uninitialized... | |
doc_23512748 | I finally am getting the results I want (or at least I think I am), but am unaware what to do with it. The response format is JSON.. I try outputting it via json_decode() to get it as an array, then I could do something with it.
You can see that I am getting "something" as a response as I am echoing the url that I am ... | |
doc_23512749 | Thanks
| |
doc_23512750 | The picture is an example
A: If you wanna back to root view controller you can use:
self.navigationController?.popToRootViewController(animated: true)
Another way if you want to come back not to root view controller.
In your current view controller:
guard let navigationController = self.navigationController else {r... | |
doc_23512751 | var test = [];
test.push({var1:'somevalue',var2:'someotherstuff'});
but how to save this in:
var appData = Windows.Storage.ApplicationData.current;
var roamingSettings = appData.roamingSettings;
when I try to set the variable like:
roamingSettings.values['myArrayList'] = test;
I get a typeconflict error. Any i... | |
doc_23512752 | m <- 50
l <- 50
initial1 <- function(m, l) {
sample(c("S", "I"), size=m*l, prob=c(0.9, 0.1), replace=TRUE)
}
Second Function
plot_infection <- function(initial1) {
sir_colors <- c("White", "Grey", "Red")
x1 <- matrix(x, nrow=m)
x1
z <- matrix(0, nrow=m, ncol=l)
z[x == "I"] <- 1
image(z, col=sir_colors)
}... | |
doc_23512753 | Can anyone tell me which IDE I can use to do development towards WAS 7.0?
Please help me out with the answer very soon. I have checked Netbeans 6.5 beta and it does not have the support for it. Also on the MyEclipse Blue Edition page it says Compatible with WebSphere 5.x, 6.0, 6.1, 7, but in http://www.myeclipseide.com... | |
doc_23512754 | import 'package:flutter/material.dart';
import 'package:xo_xo_xo/data/matrix.dart';
it must be problem with my widget state
class _GameFieldWidgetState extends State<GameFieldWidget> {
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
child... | |
doc_23512755 | I do that because I don't want user to see the link url.
example :
<a href="#<?php echo $msg_id=$data['msg_id']; ?>" title="Comment" data-toggle="modal"><img src="images/comments.png"/></a>
Now how can I convert that into button ?
<button></button>
A: I'm assuming that you're using bootstrap and you want to trigger ... | |
doc_23512756 | This would not be a problem but it does not tell me what method to replace it with, and I am unable to find it anywhere in apple's developer documents. If anyone knows of a good replacement function so I can once again send and receive data, and have updated apps, that'd be much appreciated!
A: Apple told me that this... | |
doc_23512757 | class test1{};
class test2{ test2();};
class test3{ test3(int); };
test1 t1(test1()); //compile ok
test1 t2(test2()); //compile ok
test1 t3(test3(int())); //compile ok
test1 t4(test3(10));
//compile error: no known conversion for argument 1 from 'test3' to 'const test1&'
wh... | |
doc_23512758 | //tecnicosType
$builder->add('dt', 'entity', array(
'class' => 'MSKLigaBundle:Jugadores',
'label' => 'DT',
'query_builder' => function(
\MSK\LigaBundle\Entity\JugadoresRepository $er) use($equipoId){
return $er->getJugadores($equipoId);
},
'property' => 'nombreCompleto',
'empty_value... | |
doc_23512759 | For instance:
I have: "Reform health care to serve patients, not corporate medicine
http://t.co/WMKJKU4hl7 @PNHP #SinglePayerSunday http://t.co/i4bNrruUNS"
But I want to get:"Reform health care to serve patients, not corporate medicine"
How could it be possible?
Thanks ahead!
Upon the suggestions, I rewrite the co... | |
doc_23512760 | I have been trying to introduce SCRUM into our company. Getting into this subject I noticed the SCRUM burndown chart. I want to extract some information about the team performance, or maybe the ability to make a correct guess of the workload.
Question:
I know what the ideal line is on this chart. But how should I inter... | |
doc_23512761 | http://amsul.ca/pickadate.js/date/
I'm in a situation where I need to add dynamic options/setting value to the plugin.
Example of working settings:
$input = $('.datepicker').pickadate({
disable: [
{ from: [2015,5,10], to: [2015,5,17] }
]
});
I'm want to crea... | |
doc_23512762 | var aws = require('aws-sdk');
var ses = new aws.SES({region: 'us-east-2'});
var lambda = new aws.Lambda({region: 'us-east-2'});
const mysql = require('mysql');
const connection = mysql.createConnection({
host: process.env.host1,
user: process.env.user,
password: process.env.password,
port: process.env.p... | |
doc_23512763 | __declspec(align(16)) int *pData = (__declspec(align(16)) int *)_mm_malloc(width*height*sizeof(int),16);
Generally, wouldn't it enable faster reading and writing if one used signed/unsigned char arrays like this?:
__declspec(align(16)) int *pData = (__declspec(align(16)) unsigned char *)_mm_malloc(width*height*sizeof(... | |
doc_23512764 | 1)- What variant: Global variable vs passing by reference
/* 1 example */
$val = 1;
function add1(){
global $val;
$val++;
}
add1();
var_dump($val);
/* 2 example */
$val = 1;
function add2(&$val){
$val++;
}
add2($val);
var_dump($val);
2)- What variant: *"Return" vs passing by reference
/* 3 example */
$val... | |
doc_23512765 | I'm using the enum to describe which of our customers an MEF plugin/component is meant for. This will be our main mechanism for implementing customer customisations.
I'm fairly certain my bosses won't be too pleased with the idea that we can only serve 64 customers, but I cannot implement such a flexible system without... | |
doc_23512766 | I am using a postgresql 11 container, but to access psql I have to install a postgres on the host machine.
My docker file has just one line:
FROM postgres:11
How can I use the command above without install postgresql on host machine:
psql -c "CREATE DATABASE test_db WITH encoding 'UTF-8'" -h localhost -U postgres
I w... | |
doc_23512767 | Is there an additional parameter i need to pass besides the ones being passed here?
https://places.cit.api.here.com/places/v1/discover/search?
at=30.269446%2C-97.741067
q=chipotle
size=10
tf=plain
app_id=XXXXXXXXXXXX
app_code=XXXXXXXXXXXX
A: I think Venue Images refers to the Venue Maps image t... | |
doc_23512768 | Example Function
function DB() {
$conn = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_USER, DB_PASS);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if (!$conn) {
echo "<br />MySQL SERVER CONNECTION ERROR.<br />\n";
}
if($conn) {
return $conn;
}
}
Example Useage
function is_post_id($su... | |
doc_23512769 | G = nx.lollipop_graph(4, 3)
for line in nx.generate_adjlist(G):
print(line)
[0]
0 1 2 3
1 2 3
2 3
3 4
4 5
5 6
6
A: nx.generate_adjlist returns a line of the graph, in adjacency list format. You can generate a nested list from the result with:
G = nx.lollipop_graph(4, 3)
np.array(list(nx.generate_adjlist(G)))
# array... | |
doc_23512770 | cursor=mydb.rawQuery("Select category from items;", null);
I have even tried GROUP BY but still wont work.
I am new to SQLite, would appreciate any help. Thanks.
A: First of all your string query must not be terminated so instead of passing it as:
"Select category from items;"
you should try passing it as:
"Select c... | |
doc_23512771 | I had my preprocessor dump its output into a text file, so I could see what it was producing.
Then I performed a basic test to confirm the behavior.
#define MACRO_TEST_1( X , Y ) X && Y
MACRO_TEST_1 ( A , B )
// Desired result: A && B
// Actual result: A && B
MACRO_TEST_1 ( ( C , D ) )
// Desired result: ( C && D )
... | |
doc_23512772 | If I try to open the html file with a browser the image shows up without problem, but when I run it from the node js server it doesn't work.
Here is my node js code:
var http = require('http');
var fs = require('fs');
http.createServer(function (req, res) {
fs.readFile('pruebaFoto.html', function(err, data) {
... | |
doc_23512773 | create table tmp.tbl_inserted (fromId int, toId int)
INSERT INTO mytable (name)
OUTPUT t.id, INSERTED.id INTO tmp.tbl_inserted
SELECT t.name FROM mytable t
Thanks in advance
A: You can't do it directly from an INSERT:
from_table_name
Is a column prefix that specifies a table included in the FROM clause of a DELETE,... | |
doc_23512774 |
A: Nils Anders Danielsson uses a monad in Agda to track time complexity: sub-computations which are "relevant" to the complexity being studied are explicitly marked as such by making each of them take "one tick of time". These sub-computations are then combined monadically by tracking the sum number of ticks in the in... | |
doc_23512775 | import xlrd
book = xlrd.open_workbook('D:\Scripts\UpdateID01.xls')
sheet = book.sheet_by_index(0)
myList = []
for i in range(sheet.nrows):
myList.append(sheet.row_values(i))
outFile = open('D:\Scripts\update.txt', 'wb')
for i in myList:
outFile.write("\nUPDATE PERSON SET LegacyID = " + "'" + str(i[1]) + "'"... | |
doc_23512776 | What will be insert query for this?
A: If your input:
*
*is always a chemical formula,
*uses mostly (but incorrectly) normal numbers, and
*normal numbers can't occur anyway in them, just subscripts,
then you can use the translate() function upon insertion:
translate(formula, '0123456789', '₀₁₂₃₄₅₆₇₈₉')
http://... | |
doc_23512777 | Need help I'm stuck here from a long time because the same script is running fine on my other machine.
root@test:/home/graphs# /usr/bin/php -q /home/graphs/ss_get_mysql_stats.php --host localhost --items aa --user --pass
aa:-1
root@test:/home/graphs#
note: I'm running mariadb and php version is PHP 5.5.9-1ubuntu4.20
| |
doc_23512778 | UPDATE Table1
SET CustomerName = 'john Doe'
FROM Table1
JOIN Table2
ON Table1.TableID = Table2.TableID
WHERE CustomerID = 4
A: This is a simple way to do it using LINQ-to-SQL:
var query = from x in db.Table1
join y in db.Table2 on x.TableID equals y.TableID
where x.CustomerID == 4
... | |
doc_23512779 | log4j.logger.ros.my_package=DEBUG
However, the following does not work:
log4j.logger.ros.my_package.my_node=DEBUG
A: The easiest way is running rqt_logger_level GUI.
If you have no GUI on robot, you can do that using service :
rosservice call /my_node/set_logger_level "{logger: 'rosout', level: 'debug'}"
Replace m... | |
doc_23512780 |
Cannot deserialize the current JSON object (e.g. {"name":"value"})
into type 'System.Collections.Generic.List`1[UserItem]' because the
type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To
fix this error either change the JSON to a JSON array (e.g. [1,2,3])
or change the deserialized type so t... | |
doc_23512781 | I am trying to have the user input an answer and the code checks the users input for any word in a list of several words.
keywordlist = ("pain", "suffering", "hurt")
question1 = input("how are you feeling?")
if question1.lower() in keywordlist:
print("something here")
I ended up browsing stackoverflow for the ans... | |
doc_23512782 | Consider the text
Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nullam.
By default, with an 80-character width vim displays this as
Etiam ornare mollis tortor. Suspendisse sed neque. Nullam in elit. Cum sociis nu
llam.
This wrapping doesn't care about whitespace, so sometimes it just sli... | |
doc_23512783 | This is the code in my PHP file:
<div id="edittitle" title="Editing title">
<b>1</b>
</div>
$strhtml=;
libxml_use_internal_errors( true );
$dom=new DOMDocument('1.0','utf-8');
$dom->validateOnParse=false;
$dom->loadHTML( $strhtml );
libxml_clear_errors();
$col=$dom->getElementsByTagName('b');
... | |
doc_23512784 | I know some people has clicked in the advertisement but admob doesn't count this clicks.. (the code I think is correct.. the first day I tried a click and admob count it)
Somebody knows about it? any idea or suggestion?
thanks
A: Don't click your ads , any cheating will let you get banned !
Wait a bit and they'll be c... | |
doc_23512785 | note: yes I know I did install hadoop to /usr/local/hadoop/hadoop/ but the tutorial does not
When I run:
hduser@ubuntu:~$ /usr/local/hadoop/hadoop/bin/hadoop namenode -format
I get
Warning: $HADOOP_HOME is deprecated.
/usr/local/hadoop/hadoop/bin/hadoop: line 320: /usr/lib/jvm/java-6-sun/bin/java: No such file or di... | |
doc_23512786 | import requests
from bs4 import BeautifulSoup as bs
import pandas as pd
url = 'https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/compliance-actions-and-activities/fda-debarment-list-drug-product-applications'
r = requests.get(url)
soup = bs(r.content,'lxml')
table =soup.select('tabl... | |
doc_23512787 | public class CustomProgressBarRenderer : ProgressBarRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ProgressBar> e)
{
base.OnElementChanged(e);
Control.ProgressTintColor = Color.FromRgb(182, 231, 233).ToUIColor();// This changes the color of the progress
}
pu... | |
doc_23512788 | What I would like to do is pop the form page right away on save and show save progress as in the catalog page. How do I go about doing that?
A: You'll have to create bloc or a cubit of some kind that will carry out the upload mechanism. Once you hit save, you'll have a bloc event that will start the upload and emit st... | |
doc_23512789 | i have added the ip address of yadvi.com in coupoen.tk DNS A Record ,Ip Address of yadvi.com which will be same for coupons.yadvi.com.
A: coupen.tk needs to point to the same A record IP address as coupons.yadvi.com, so they both resolve to the same server. That server then needs to be configured to serve the same sit... | |
doc_23512790 | Therefore I have written the function below to check for approximate spelling of a word based on the following rules: the first two letters must match, the last letter must match and the users answer is within 1 character, plus or minus, of the correct answer.
The code works but I am sure it can be simplified using a r... | |
doc_23512791 | A section employs many staff members
Each section has multiple phone numbers
Each staff member has their own internal telephone number.
I have created three entities: Phone, Staff and Section. The phone entity store the numbers with the phone number as the PK. However, the ERD I have created has a loop between the thr... | |
doc_23512792 | It's explained there must keep Write External Storage permission must outside the application tag. I have already kept it outside.
I am putting my code here :
cvMain.setDrawingCacheEnabled(true);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
String imageFileName = "DEMO_... | |
doc_23512793 | I try to exit when the user enters a wrong name, but it doesn't work. I think this is because the profile is read before the shell actually runs, so the exit will not affect the shell running. How to reach my goal?
The code is:
#!/bin/bash
echo "What's you name?"
read name
if [ $name = "Frank" ]
then
echo 'Hello' $na... | |
doc_23512794 | I have a browser that may be any size, and I want to set the iframe width to be 80% of browser window..
16:9 aspect ratio with fixed width mentions how to set the 16:9 height once I select a width. I don't understand how to use it.
any jsfiddle example (or codepen) will help a lot. I have tried a bunch of different way... | |
doc_23512795 | When i use this framework in a new project, the project runs fine on the simulator but then crashes on a device. I've narrowed down where in the framework it crashes, and it on this line:
size = CFSwapInt16(size);
The appropriate frameworks exists in the project - again, it runs in the simulator, so I'm stumped as ... | |
doc_23512796 | Heres the HTML and CSS:
body {
background-color: #161616;
}
header {
height: 3.375rem;
}
.ul1 {
list-style: none;
float: right;
}
li {
display:inline;
color: white;
margin: 0.625rem;
position: relative;
right: 0.625rem;
}
a {
text-decoration: none;
color:white;
font-si... | |
doc_23512797 | I'm sure javascript frameworks exist to do this, but I'd rather not use javascript frameworks.
A: Assuming you're rendering HTML and not JSON (which it seems like you are from the tag), why not just add the filter query parameters from the request into the rendered page?
For example, something like this:
Python:
@app.... | |
doc_23512798 | Situation: I have a table that fills everytime with new TableViewCells. There are 3 cells, each one has a UILabel and UITextField. For table repaint (when because of scroll cell goes out of screen and user scrolls back to see this cell) there are creates new object of TableViewCell, UILabel and UITextField.
I want dyn... | |
doc_23512799 | @GetMapping("/items/{id}")
public String itemPage(Model model, @PathVariable long id) {
model.addAttribute("item",items.getItem(id));
return "itemPage"; //"itemPage" is a template
}
Given a template (itemPage.html) which loads resources from /assets, located at ../static:
<script src="assets/js/jquery.min.js">... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.