id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_22500 | The two lines in the block, are the lines I am confused with. ie. when I exchange those two lines I get a segmentation fault , but this code runs.So my question is
what is happening when I interchange the two lines?
#include<stdio.h>
#include<stdlib.h>
typedef struct scale_node_s {
char note[4];
struct sca... | |
doc_22501 | Ex: john.smith@email.com | 23
Tables
This is what I have so far:
SELECT COUNT(Order ID), Customer.Customer email
FROM Orders
INNER JOIN Customer ON Customer.Customer ID = Orders.Customer ID
GROUP BY Customer.Customer email
ORDER BY COUNT(Order ID)
I'm really struggling with SQL JOINS. Can anyone help me grasp this?
A... | |
doc_22502 | Figured I'd follow the same format that the validations and login state had (widget's onPressed triggers an event, bloc processes it and changes state to update view), but because states are mutually exclusive, toggling the password visibility causes other information (like validation errors, or the loading indicator) ... | |
doc_22503 | class p1 extends StatefulWidget {
@override
_p1State createState() => _p1State();
}
class _p1State extends State<p1> {
bool _isFavorite = true;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body:Stack(
children:<Widget>[
... | |
doc_22504 | my jquery is:
$(function(){
$('iframe').each(
function(index, elem) {
elem.setAttribute("width","250");
}
);
});
this code is not being able to set the width of iframe.
and one more thing: I inspected the iframe attributes, and there are NOT editable in browser unlike other css style - whic... | |
doc_22505 | Globals.shippingValues = $H({
address1: "25 Abbejet K�gerreveszak",
address2: "",
city: "Z�bev�r Abej�rn",
state: "KY",
zip: "51150"
});
The values are actually variables passed via PHP:
Globals.shippingValues ... | |
doc_22506 | ngAfterViewInit(): void {
$('#example').emojioneArea({
autoHideFilters: true,
saveEmojisAs: 'unicode',
events: {
keyup: function (editor, e) {
this.message = this.getText();
this.zone.run(() => this.onPlayerStateChange(e));
this.chRef.detectChanges();
... | |
doc_22507 |
A: So, I found a work around for this, turns out there is no way you can do a dynamic regex matching in redshift, but you can achieve this using python UDF, one of the features aws redshift cluster provides.
A: CREATE OR REPLACE FUNCTION regex_match(input_str character varying, in_pattern character varying)
RETURNS c... | |
doc_22508 | test_name | test_result
-----------------------
test1 | pass
test2 | fail
test1 | pass
test1 | pass
test2 | pass
test1 | pass
test3 | pass
test3 | fail
test3 | pass
As you can see all test1's pass while test2's and test3's have both passes and fails.
Is there a ... | |
doc_22509 | [WebMethod]
public static List<string> GetFileListOnWebServer()
{
DirectoryInfo dInfo = new DirectoryInfo(HostingEnvironment.MapPath("~/UploadedFiles/"));
FileInfo[] fInfo = dInfo.GetFiles("*.*", SearchOption.TopDirectoryOnly);
List<string> listFilenames = new List<string>(fInfo.Length);
for(int i = 0; i ... | |
doc_22510 | The problem is it only runs for the first record of the main report. I wish it run for all records of detail band. It is not showing on another pages.
To run it, I transfer 1 sql query parameter that feeds the detail band.
In the pages of the first record, it appears, as shown in the image below:
In the pages of the s... | |
doc_22511 | public ActionResult CocktailLoungeBarAttendant()
{
return View();
}
[HttpPost]
public ActionResult cocktailLoungebarattendant(string name, string email, string phone)
{
return View();
}
public ActionResult merchandisecoordinator()
{
return View();
}
... | |
doc_22512 | Here is the code and it works.
template <int N>
int scalar_product (std::vector<int>::iterator a,
std::vector<int>::iterator b) {
return (*a) * (*b) + scalar_product<N - 1>(a + 1, b + 1);
}
template <>
int scalar_product<0>(std::vector<int>::iterator a,
... | |
doc_22513 |
A: I'm not sure about sound presentation in PTB (I've never done it), but you seem to be on the right track for the flicker frequency.
The way I do it is to determine the screen refresh rate, divide the total length of time you want the stimulus presented by this refresh rate (this will give you the number of frames t... | |
doc_22514 | I've tried creating observer functions to update the barplot, to no avail. I've also tried nesting the selector server module within the barplot module, but I get the error: Warning: Error in UseMethod: no applicable method for 'mutate' applied to an object of class "c('reactiveExpr', 'reactive', 'function')"
I just ne... | |
doc_22515 | So I tried to play around by putting them in same app but in 2 different modules: AppModule and SecondModule
Now, I created a variable buildModule in environment files and created an environment.second.ts file with value of this variable(all other environment files have different value of this variable like first, thir... | |
doc_22516 | my_cell =
[172x15 double] [172x15 double] [172x15 double] [172x15 double]
I would to write the matrices on txt file side by side and tabulated, to obtain a .txt file with 172 rows and 60 columns (in this case)
A: use dlmwrite and cell2mat
mat = cell2mat(my_cell);
delimiter = ' '; % // used to separat... | |
doc_22517 | #include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
void PizzaMenu();
void SizePrices();
int main()
{
double personal = 10.00;
double medium = 14.50;
double large = 19.00;
double xlarge = 23.50;
double FlavorChoice=0;
int SizeChoice;
int PizzaCountP=(cin >> PizzaCountP, P... | |
doc_22518 | let Ajax (request : Request) =
let httpMethod = request.Method
let url = request.EndPoint
let data = request.AsJson
let success ok =
System.Action<obj,string,JqXHR>(
fun res _ _ ->
let result = (res :?> string |> Json.Parse)
... | |
doc_22519 | id | name | age
----+------+----
1 john 30
2 doe 22
and I want to update the age and name of the row with id=2 to 32 and tom, using python e.g sqlalchemy
I'm using a PostgreSQL database (and sqlite for dev).
A: The update you want is:
update t
set name = 'tom',
age = 32
where id = 2;
In th... | |
doc_22520 | Since they are writing to the same table, locks will obviously be employed and each node will have to wait until it can insert.
I felt that each node could write to a separate table to speed up operations, and later we could consolidate rows from all tables into a single table, after the program has finished.
My su... | |
doc_22521 | <asp:LinkButton ID="LB1" runat="server" CssClass="regular" OnClick="LB1_Click">
Today
</asp:LinkButton>
<asp:LinkButton ID="LB2" runat="server" CssClass="regular" OnClick="LB2_Click">
Today
</asp:LinkButton>
<asp:LinkButton ID="LB3" runat="server" CssClass="regular" OnClick="LB3_Click">
Today
</asp:LinkButton>
I... | |
doc_22522 |
A: Assuming that you know how to set the left, top, bottom, height constraints I will explain you how to set the right constraint, which will cause the imageView to span from the left to the center of the screen. Setting any width constraint will not work, because the width depends is different on every device.
*
*... | |
doc_22523 | Suppose that due to some error I fail to store it, so I try to re-register.
This time I receive a 400 error with the message "notification_key already exists".
This looks odd, especially compared to registration of a device to GCM, where you can register as many times as you want and always get the same Registration ID... | |
doc_22524 | If data is null or `undefined?, then value has to show empty - using Lodash.
this.PartServiceData.masterData = result['data'].partMasterDataCompleteList[0];
In the code above, if any data has undefined or null value, data has to be written empty, using a Lodash method.
A: If you use _.get with the default value para... | |
doc_22525 |
A: The language specification uses the term "evidence" in §7.4 Context Bounds and View Bounds:
A type parameter A of a method or non-trait class may also have one or more context bounds A : T. In this case the type parameter may be instantiated to any type S for which evidence exists at the instantiation point that S... | |
doc_22526 | I am not sure how to use loadtxt:
import numpy as np
a = np.loadtxt("path/to/file", float)
b = np.loadtxt("path/to/file2", float)
while np.absolute(a - b) !=0:
1
2
3
...
Not sure how to finish this? Is the start correct?
A: You could use
idx = np.where(np.abs(a-b) > 1e-6)[0]
firstidx = idx[0]
to find the fir... | |
doc_22527 | Main File:
import Database as DB
def Start():
print("\n---------------\n")
print("1: Database\n")
print("2: TensorFlowTest\n")
print("3: Quit Program\n")
print("---------------\n")
x = int(input("What would you like to open?\n"))
if (x == 1):
DB.dataMain()
Start()
Database Fil... | |
doc_22528 | I have
def get_bugs():
bugs = []
if ...:
bugs.append(123)
# can be empty
return bugs
def operate(bugs):
for bug in bugs:
do something
def main():
bugs = get_bugs()
if bugs:
operate(bugs)
.... # other methods
-------------------------
# in my test
@mock.patch.object(myutility, "get_b... | |
doc_22529 | XXXX-YYYY-MM-DD.pdf
where XXXX is a variable lenght numeric code (1 to 4 digits) always delimitated by "-", for example:
51-2016-08-22.pdf
776-2016-08-22.pdf
3881-2016-08-22.pdf
4-2016-08-22.pdf
2860-2016-08-22.pdf
The goal is to copy each file into its own directory, naming the directories like the pattern (ie: file... | |
doc_22530 | Test line abc (r);AAA-/2010/001
Test line abc (r);AB--/2010/001
A: Like that? (EDIT: in .NET regex patterns, / does not need escaping)
(.{4})/
Consider sites like https://regex101.com for future needs)
| |
doc_22531 |
A: the_output = `ruby my_other_file.rb`
notice that these are backticks, not regular quotes
A: You can also require the first file in the second one and use the result
test.rb
@a = 1+1
test2.rb
require "test.rb"
c = @a + 1
| |
doc_22532 | I have a GridView and work with its rows.
Can you help me and show me this code?
A: Good article which can help you to achieve your task:
Custom Controls in Visual C# .NET
Step 1: Create the event handler in your control as below.
public event SubmitClickedHandler SubmitClicked;
// Add a protected method called OnSu... | |
doc_22533 | - sudoku_solver.rb
- board.rb
- cell.rb
- column.rb
- row.rb
- block.rb
Each hierarchy is linked together with require_relative.
Now in Rails, I've created model/sudoku.rb, which is intended to be sudoku_solver.rb. I've read about mixins, concerns, and I don't know how to choose the correct one to use ov... | |
doc_22534 | this.props.showLoader();
ajax(config)
.then((response) => {
let data;
this.props.hideLoader();
data = response.data;
data[this.props.moduleName.storeVarName + "MediaCost"] = response.data.totalCampaignCost ? response.data.totalCampaignC... | |
doc_22535 | <html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="images/favicon.ico">
<!-- B... | |
doc_22536 | ERROR: type should be string, got "\nhttps://forum.unity.com/threads/integration-unity-as-a-library-in-native-android-app-version-2.751712/\nI saw this article and copied it, but It couldn't recognize UnityLibrary.\nWhat's the problem?\n\n*\n\n*I added this code in settings.gradle file\ninclude ':unityLibrary'\nproject(':unityLibrary').projectDir=new File('..\\\\unityLibrary')\n\n\n*I added this code in build.gradle(Module: app) file\nimplementation project(':unityLibrary')\nimplementation fileTree(dir:project(':unityLibrary').getProjectDir().toString() + ('\\libs'), include: ['*.jar'])\n\n\n*I added this code in build.gradle(Project: NativeAndroidApp) file\nflatDir { dirs \"${project(':unityLibrary').projectDir}/libs\" }\nenter image description here\n(It means it doesn't recognize it.)\n\nA: i was facing the same problem, there are several reasons that can occur and there are two scenarios you can face this problem.\nfirst one :\nif you are trying to build unity export directly, do not update the project with android studio. because when gradle is upgraded sometn occurs and it doest compile as it must be\nseckond one:\nif you are importing unity project to an android native project as a module or dependency, you should arrange your\n*gradle.properties\n*androidManifest.xml (ex. add your player activity)\n*settings.gradle (ex. include ':unityLibrary')\n\nand use the gradle version that you exported. here is working examples:\nsettings.gradle:\ninclude ':launcher', ':unityLibrary'\n\nlocal.properties:\nsdk.dir=C\\:\\\\Users\\\\amete\\\\AppData\\\\Local\\\\Android\\\\Sdk\nndk.dir=C\\:/Program Files/Unity/Hub/Editor/2021.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK\n\ngradle.properties:\norg.gradle.jvmargs=-Xmx4096M\norg.gradle.parallel=true\nandroid.enableR8=false\nunityStreamingAssets=.json, .dat, .xml\nunityTemplateVersion=3\n\n(project level)build.gradle:\nallprojects {\n buildscript {\n repositories {\n google()\n jcenter()\n }\n\n dependencies {\n // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity\n // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html\n // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle\n // To specify a custom Gradle version in Unity, go do \"Preferences > External Tools\", uncheck \"Gradle Installed with Unity (recommended)\" and specify a path to a custom Gradle version\n classpath 'com.android.tools.build:gradle:7.2.2'\n \n }\n }\n\n repositories {\n google()\n jcenter()\n flatDir {\n dirs \"${project(':unityLibrary').projectDir}/libs\"\n }\n }\n}\n\ntask clean(type: Delete) {\n delete rootProject.buildDir\n}\n\n" | |
doc_22537 | SELECT
cod.COM_DESC
,count(emp.OBE_Name) colValue
,'Total'[Desc]
FROM OBP_EMP_MASTER emp
LEFT JOIN COMMONCODES cod
ON emp.OBE_AGENT_DR = cod.COM_SLNO
WHERE OBE_AGENT_DR IS NOT NULL
GROUP BY cod.COM_DESC
UNION ALL
SELECT
cod1.COM_DESC
,count(rep.OBE_Name) colValue
,'Replaced'[Desc]
FR... | |
doc_22538 | if(!@include_once('config.php')) {
echo 'failed';
}
So we've downgraded to 7.1.9 but it doesn't work there as well.
There is no error thrown, nothing. Just a blank screen. It's as if it's not even there...
If I echo something before that, it works. If I echo something after this, nothing happens.
Why is this happe... | |
doc_22539 |
A:
it looks like LZ4_decompress_safe also can do partial decompression
That's incorrect.
LZ4_decompress_safe() is expected to decompress full blocks, only.
It will return an error code if one tries to use it for partial decompression.
Generally speaking, LZ4_decompress_safe_partial() is more powerful, because it can... | |
doc_22540 | ||
doc_22541 | Now I got all the 5 columns from table1 and 1 extra column from table2 after Join.
Expected:
I need my table1 structure to be the result of my join. (i.e) How can I update my table structure after the join. I require all the 6 columns to be table 1
A: You should use a view:
create v_table1 as
select t1.*, t2.col... | |
doc_22542 | Suppose we have times value are "11:AM" and 10:00 AM".
I am able to calculate but there is a bit of confusion in AM ,PM.
Thanks in advance
I am using following code:
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class StringToDate {
public static String timeDiff(Str... | |
doc_22543 | This is the code I have:
<?php
ini_set('soap.wsdl_cache_enabled', false);
class SayHelloResponse
{
public $sayHelloResult;
public $greeting;
}
$client = new SoapClient(
'http://localhost:8000/greetings_server.php?wsdl', [
'trace' => 1,
'soap_version' => SOAP_1_2,
'classmap' => [
... | |
doc_22544 |
A: This worked for me. I used an AnchorPane as a root node.
CodeArea codeArea = new CodeArea();
VirtualizedScrollPane sp = new VirtualizedScrollPane(codeArea);
anchorPane.getChildren().add(sp);
anchorPane.setLeftAnchor(sp, 0.0);
anchorPane.setRightAnchor(sp, 0.0);
anchorPane.setBottomAnchor(s... | |
doc_22545 | $unordered_array = array('11196311|3','17699636|13','11196111|0','156875|2','17699679|6','11196237|7','3464760|10');
To this
$ordered_array = array('11196111', '156875', '11196311', '17699679','11196237','3464760', '17699636');
The number after the "|" defines the position, and the array needs to be ordered from lowe... | |
doc_22546 | - (IBAction)login:(id)sender {
if([_username.text isEqualToString:name] && [_password.text isEqualToString:pw]) {
DashboardViewController *destinationController = [[DashboardViewController alloc] init];
[self.navigationController pushViewController:destinationController animated:YES];
}else {
... | |
doc_22547 | @XmlRootElement
public class Test {
public void setAge(int age) {
this.age = age;
}
private int age;
private String name;
private Cat cat;
public Test()
{
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = ... | |
doc_22548 | This is my docx file:
I do this:
XWPFDocument docx = new XWPFDocument(OPCPackage.open("..."));
for (XWPFParagraph p : docx.getParagraphs()) {
List<XWPFRun> runs = p.getRuns();
if (runs != null) {
for (XWPFRun r : runs)... | |
doc_22549 | Is it possible to create a cookie thats accessible across all of these domains?
Similar to the way facebook cookies work from everywhere.
A: Only for subdomains in the same root domain - you can use wildcard cookies by just specifying the subdomain. ex. sv1.test.com sv2.test.com all would use test.com
see:
http://foru... | |
doc_22550 |
The method parseXHtml(PdfWriter, Document, InputStream, Charset) in the type XMLWorkerHelper is not applicable for the arguments (PdfWriter, Document, InputStreamReader, InputStreamReader)
public void parseXHtml(PdfWriter writer, Document doc, InputStream in, InputStream inCssFile) throws IOException
{
... | |
doc_22551 | <div class="container-fluid">
<div class="col-sm-12">
<h1 class="text-center">
Discounts
</h1>
<div class="row">
<ngb-accordion #acc="ngbAccordion">
<ngb-panel id="toggle-1" title="First panel">
<ng-template ngbPanelContent>
Anim pariatur cliche reprehenderit, eni... | |
doc_22552 | e.g. 1: [27,31]
23: ['20', '10', '3'],
24: ['19', '16', '14', '6'],
25: ['16', '5', '9', '24', '18', '15', '11', '12', '14', '5'],
26: ['22', '15', '10', '6', '5', '4'],
27: ['4'],
28: ['27', '26', '20', '9', '22', '9', '25', '7'],
29: ['15', '26', '16', '24', '4'],
30: ['25', '16', '18', '21', '19', '4'],
31: ['2'],
... | |
doc_22553 | I read a blog today where the author just gave me the logic but not code and I am not an expert in writing highend JavaScripts. Can anybody help me in constructing it.
*
*Get scroll bar position.
*If scroll bar position is not bottom then move to bottom.
*If scroll bar is scrolled up do no action until new item is... | |
doc_22554 | For example, if one of my pre-defined values was the hex value 0x0D, and the user wanted to type 0x0D0x0A, after they typed 0x0D the cursor would go to the start of the ComboBox, and it might end up looking like this instead 0x0A0x0D. Can I stop the ComboBox from exhibiting this behavior?
| |
doc_22555 | Here is a portion of the procedure
DELIMITER $$
CREATE DEFINER=`root`@`10.%` PROCEDURE `prod_create_new_tasks`()
MAIN:
BEGIN
SET @trys = 0;
loop_label: LOOP
SET @trys := @trys+1, @p1 = '', @p2 = '';
DROP TEMPORARY TABLE IF EXISTS su;
CREATE TEMPORARY TABLE su (KEY(user_id)) ENG... | |
doc_22556 | if (list1[j]=='1');
z=1;
if (list1[j]=='2');
z=2;
if (list1[j]=='3');
z=3;
if (list1[j]=='4');
z=4;
The issue is that z always becomes 4 even if list[j]=3. I know I am making a mistake my comparisons but I've been unable to locate it. I wo... | |
doc_22557 | Here is what I tried:
open console (cmd)
python
>>> import numpy
this works, now creating the virtual environment
set VIRTUALENV_PYTHON=C:\WinPython-64bit-3.5.1.1\python-3.5.1.amd64\python.exe
set VIRTUALENV_EXTRA_SEARCH_DIR="C:\WinPython-64bit-3.5.1.1\python-3.5.1.amd64\libs C:\WinPython-64bit-3.5.1.1\python-3.5.1.am... | |
doc_22558 | https://codepen.io/kasiraket/pen/KmKYmL
$(document).ready(function() {
$('#search-icon').click(function() {
$(".search-container").slideToggle("400", function(){
$(".search-container input").toggleClass("show");
});
});
});
A: Your slideToggle() and toggleClass() are firing opposit... | |
doc_22559 | We installed ClearCase 7.1.1 version. We are using the atria license.
Now we are moving to the flexm license. Every operation is working fine in the server.
But in the client machine log, I am getting this error.
Error: License checkout error from Rational Common Licensing:
The FEATURE name MultiSite with version 1.0 ... | |
doc_22560 | Thanks
A: You are correct that Outlook uses the same Ribbon ID (Microsoft.Outlook.Appointment) for both Appointments and Meeting items.
To determine which appointment type, AppointmentItem.MeetingStatus will be 0 for Appointment items, while it will be non-zero for Meeting Items.
| |
doc_22561 | Expected Output URL: http://somewpsite.com/wp-content/uploads/2012/10/IMG_1234.jpg
Current Regex: $(this).attr('src').replace('/-[\d]+x[\d]+/', '');
Assume $(this) represents an img element. I know I could just as easily use -150x150 as the replacement string, but there are different sizes and it should be capable of s... | |
doc_22562 | i have a model like this
type Campaigns struct {
ID int `json:"id" form:"id" gorm:"column:CampaignID"`
UserID int `json:"userId" form:"userId" gorm:"column:UserID"`
Name string `json:"name" form:"name" gorm:"column:Name"`
... | |
doc_22563 | I get the price from a externar server inside of json file, and uptate it in a WP_session. Then get the price in funciton.php and update the price of the cart.
function action_woocommerce_review_order_after_submit( $cart_object) {
$custom_price = WC()->session->get( 'price_project' ); // This will be your custome pr... | |
doc_22564 | private RestAdapter adapter = RestAdapter.Builder().setClient(????).setServer("http://192.168.0.1").build();
This session should persist only if the application is running.
Min SDK requirement is 8
A: Ok,you know the retrofit actually uses the okhttp inside the framework.
And you should know the "Interceptor"
When y... | |
doc_22565 | <div id="id1" onmouseout="hideall();" style="border:1px solid red;">
<div id="id2">This is inside id1 div</div>
</div>
http://i.stack.imgur.com/hrfsM.png
A: There is a proprietary event in Internet Explorer called mouse leave that I believe is exactly what you are looking for. Unfortunately, this will not w... | |
doc_22566 | Below is what I have so far.
curl_test.php which is working
$username = "admin";
$password= "password";
$request_xml = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE telco_xml_enq SYSTEM "telco_xml_enq.dtd">
<person>
<individual>
<user_id>1234</user_id>
<full_n... | |
doc_22567 | That being said, how do I create a view in Django that can both create profile details about the user or update existing information.
Form
class ProfileForm(ModelForm):
class Meta:
model = Profile
fields = ['avatar', 'bio', 'gender', 'dob', 'country']
View
class SettingsView(FormView):
template... | |
doc_22568 | import time
from dask import delayed
from dask.distributed import Client
from time import sleep
client = Client(n_workers=4)
def Hello():
1+1 #this line breaks things by adding a sage operation
#if I remove it the code runs fine
return 'Hello World'
z = delayed(Hello)()
z.compute()
This code throws the ... | |
doc_22569 | I expected this to call the start method in /lib/camping/server.rb at line 131, and so I put a simple puts 'hello' statement at the beginning of that method, expecting that statement to be invoked when I ran /bin/camping. However, I never saw my puts statement get called, so I can only assume that it's not that start m... | |
doc_22570 | inFile >> MyPDBParser;
outfile << MyPDBParser;
I've got the << operator all set, but I can't seem to get the >> operator to work properly.
Here is the .h file for the PDBParser class to give you a better idea of what's going on:
#include <iostream>
#include <cstdlib>
#include "FloatArray.h"
#include "IntArray.h"
#incl... | |
doc_22571 | So I need help to make the video inside controllable, the window not close when I click on it.
As an extra feature, a good to have would be the overlay window to be responsive depending on the screen size?
Thanks
JS
$("#play1,#play2,#play3,#play4,#play5").click(function() {
var value = $( this... | |
doc_22572 | enum Tab {
case accounts, lootbox
}
struct AppView: View {
@State private var currentTab:Tab = .lootbox
var body: some View {
TabView(selection: $currentTab){
AccountView()
.tabItem {
Label("Accounts", systemImage: "person.crop.circ... | |
doc_22573 | I can do this easily enough with straight JS, but I'm trying to understand how to do this with jQuery.
Here is my code:
<html>
<head>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</head>
<body>
<p class="copy" title="actual text to be copied">Hello world.</p>
<script>
$('docume... | |
doc_22574 |
A: The link provides the HA(High availability) architecture of YARN's Resource Manager.
In your case , I believe Automatic fail over is enabled ,so when the Resource Manager goes down , another RM is automatically elected to be the active.
| |
doc_22575 | public void addinventory items(ArrayList<Inventory> mv) {
Scanner scan = new Scanner(System.in);
System.out
.println("Choose one of the following menu options (1,2,or 3): \n1. Update an item in the inventory");
System.out.println("2. Add a new inventory item");
System.out.println("3. Exit t... | |
doc_22576 | I have output of jasper reports as single Excel file, PDF, RTF.
But multiplay HTML files.
It trouble for me to manage not single report file, but many files and folders in HTML case.
A: I don't think that jasper reports has built in support for this, so you'd have to roll out your own implementation. You can use this ... | |
doc_22577 | 1. Monitor operations on certain drives/paths
2. Prevent read and/or write operations on certain drives/paths
For example:
C://Users
D:
Can this be done using Windows Filesystem Minifilter Drivers ?
I am mostly interested in step 2. In other words can a minifilter cancel a IRP ?
A: Yes this is all possible with a f... | |
doc_22578 | first one is the title which cant be with fixed width.
second is an image which is 150x150 and third is a paragraph which should spread to all available space.
Everything works great if the paragraph is short (only if it has one line it works) but if it is longer the paragraph is messed up. the second line doesnt go u... | |
doc_22579 | if((input$app != "") && (input$variable != "") && (input$variable != "All") && (input$variable1 != "") && (input$variable1 != "All") && (input$variable2 != "") && (input$variable2 != "All"))
can be written as
if((input$app != "") && (input$variable != c("","All")) && (input$variable1 != c("","All")) && (input$variable... | |
doc_22580 |
*
*Hide volume HUD view in MPVolumeView
*Hide device Volume HUD view while adjusitng volume with MPVolumeView slider
I'd like to hide the system volume HUD while adjusting the volume programmately without the need of a loaded View.
So this solution is not what I'd like to get (in my case this is not acceptabl... | |
doc_22581 | For my database, I am using MYSQL.
In my main method, I am creating an object and I am trying to save it.
However, I get the following error:
Exception in thread "main" org.hibernate.MappingException: Unknown entity: com.simpleprogrammer.User
at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFa... | |
doc_22582 | [LocationSelectViewController respondsToSelector:]: message sent to deallocated instance 0x27b96740
Let me share a crash log
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libobjc.A.dylib 0x3b2665d0 objc_msgSend + 16
1 MapKit 0x343b7492 -[MKReverseGeocod... | |
doc_22583 |
function showLucky(root){
var feed = root.feed;
var entries = feed.entry || [];
var entry = feed.entry[0];
for (var j = 0; j < entry.link.length; ++j) {
if (entry.link[j].rel == "alternate") {
window.location = entry.link[j].href;
}
}
}
function fetchLuck(lu... | |
doc_22584 | Here is the App.config file
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true"
logMessagesAtTransportLevel="true" />
<endToEndTracing activityTracing="true" />
</diagnostics>
<services>
<service name="Services.CategorieService">
... | |
doc_22585 | scatter_matrix(df, alpha=0.5, figsize=(14,14), diagonal='kde')
That program takes very long to run and eventually crashes, possibly because there are too many (26) columns, and the resulting image would be to big. Nether less, I noticed I'm able to render 13 variables just fine. That way, one solution would be to gene... | |
doc_22586 | I also know that when using strings, I need to work with pointers to the addresses of their first character rather than the entire string; this is what I am trying to do with the buffer and the OFFSET pointers, but I am not sure that this is entirely correct. I am also unsure if the push and pop is necessary, and if it... | |
doc_22587 | I guess it is likely that there are some problem with assets:precompile but couldn't find out any helpfull errors.
How can I fix this problem? Or I want to figure out what's happened.
errors are like this
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [5e4911b6] Runnin... | |
doc_22588 | package main
import (
"fmt"
"time"
)
func main() {
c1 := make(chan string)
c2 := make(chan string)
go func() {
for i := 0; i < 5; i++ {
time.Sleep(500 * time.Millisecond)
c1 <- "Every 500 ms"
}
close(c1)
}()
go func() {
for i := 0; i ... | |
doc_22589 | Contents on page are stored in database. For one post content can be in either language (only one language not all) not in both.
A: Since I want to display a page in only one language(ie. one page is in Hindi another is in English).So there will exactly one version of a page.
I achieved this by changing data type of... | |
doc_22590 | With
ax3 = divider.append_axes('right', size='10%', pad=0.3)
cb = plt.colorbar(Q, cax=ax3, ticks=[0.0, 3.0, 6.0, 9.0, 12.0, 15.0], format='%.1f')
I managed to have a colorbar with the same height as the plot, which has been asked for many other times, now I would like to shrink it.
Following suggestion provided in ot... | |
doc_22591 | 1º - In case there is a NULL value it is supposed to replace with the previous known value. (CASE 1-3)
2º - When there are two consecutive NULL and the ID changes. I expect it to go pick the previous known value from ID 5 and the next from ID 6, no matter which DATE. (CASE 4-5)
ID DATE HOUR VAL CASE
--... | |
doc_22592 | # bar.py
import numpy as np
global y
x=0
y=0
z=np.array([0])
# foo.py
from bar import *
def foo():
x=1
y=1
z[0]=1
# main.py
from foo import *
from bar import *
print(x,y,z)
# 0 0 [0]
foo()
print(x,y,z)
# 0 0 [1]
Question: Why did x and y not change their values while z did change value of its element? An... | |
doc_22593 | ffmpeg input_1.gif -i input_2.gif -filter_complex vstack -q:v 1 output.gif
The problem is that resulting gif experience quite some loss of quality. Furthermore, it seems that option -q:v has no effect at all, regardless of supplied value and (valid) positioning within command.
Does anybody know a way to overcome it? ... | |
doc_22594 | I have downloaded the cbl-log tool for windows using command,extracted it and installed the package:
"Invoke-WebRequest
https://packages.couchbase.com/releases/couchbase-lite-log/2.5.0/couchbase-lite-log-2.5.0-windows.zip
-OutFile couchbase-lite-log-2.5.0-windows.zip"
But after trying the command to read the logs... | |
doc_22595 |
here is the code I have written down so far:
public static bool north;
public static bool south;
public static bool west;
public static bool east;
static void Main(string[] args)
{
Console.WriteLine("Insert Coordinates:");
int x = int.Parse(Console.Re... | |
doc_22596 | [{
"ID":123,
"Project":"testing",
"Script":"script-1,script-2",
"Status":"present"
}]
I have using below python script :
import json
with open('project.json', 'r') as f:
project_details = json.load(f)
for project in project_details:
print("ID=",project['ID'],',', "ProjectName=",project['Project'],',', "S... | |
doc_22597 | The only problem with this is that, because we are working at different sites, the data that we are computing over is in different locations. So on my end, I want my docker-compose.yml to include:
volumes:
- /mnt/shared/data:/data
while my collaborators need it to say something like
volumes:
- /Volumes/sto... | |
doc_22598 | Could anyone help a total noob to set up an ipcluster? (Let's say the remote machine has ip 192.168.0.1 and the local machine has 192.168.0.2)
A: If you scroll roughly to the middle of the page https://ipython.org/ipython-doc/dev/parallel/parallel_process.html#ssh you will find this:
Current limitations of the SSH mo... | |
doc_22599 | I need to track those clicks for the Google AdWords conversion statistics.
The usual code for tracking clicks would look like:
// some data
goog_report_conversion = function(url) {
goog_snippet_vars();
window.google_conversion_format = "3";
var opt = new Object();
opt.onload_callback = function() {
if (typeof(url) != '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.