id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_43900 | if( isServer() ) {
resultsDir <- "U:\\Share\\Results\\"
maxIterations <- 1000
} else {
resultsDir <- "D:\\Temp\\"
maxIterations <- 50
}
I'm using Win7 locally and the other machine is Win 2008 Server.
A: R get hostname of current computer
get_hostname <- function(){
return(as.character(Sys.info()["nodena... | |
doc_43901 | +------+---------------------+
| ID | TimeStamp |
+------+---------------------+
| 1001 | 2009-06-09 13:24:50 |
| 1002 | 2013-04-03 21:47:47 |
+------+---------------------+
A quick investigation of the dataset shows the following for the above data set.
ID,TimeStamp
1001,09/06/2009 1:24:50 PM
1002,03/04/2... | |
doc_43902 | `id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`commercial` tinyint(1) NOT NULL DEFAULT '0',
`usrid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
INSERT INTO `Channels` (`id`, `name`, `commercial`, `usrid`) VALUES
(2, 'ORF 1'... | |
doc_43903 | I know I have to use clearInterval and I assume that this is to clear the var myTimer - but I can't get this to work.
Any help would be appreciated
HTML
<input type="button" value="Start" onclick="wpm($numberWords,$speed)" />
<input type="button" value="Stop" onclick="stopWpm()" />
JS
var myTimer;
function wpm(number... | |
doc_43904 | PRIMARY KEY ('table1fk' , 'table2fk')
How would I do this via the SAP PowerDesigner table/column editor?
A: After joining your table to the other tables, you mark the Foreign Key migrated from the other tables, as Primary Key.
Which gives the following SQL script:
create table PARTICIPATION (
POLL_ID i... | |
doc_43905 | I have tried the following in a do file:
#delimit;
clear;
set mem 700m;
use file1.dta;
local average_income = mean income;
use New.dta;
gen avincome = average_income;
However, it does not work.
A: This overlaps with your other post, namely How to retrieve data from multiple Stata files?. You don't say why you thin... | |
doc_43906 | I've done the following succesfully
*
*Read file with FileReader API
*Convert file to base64 with readAsDataURL() function
*Encrypt it with the following
CryptoJS.AES.encrypt(e.target.result, password);
But I couldn't manage to send it to server as a File object because I already converted it to text object and I ... | |
doc_43907 | to a file.
So I figured I need some sort of printMethod that let me print stuff to the file.
I've got a bunch of methods that print stuff to the console, but cant access all the varibles outside of the method. So need too find a way to print variables from different methods out
to a textfile.
Hope you understand.
A: I... | |
doc_43908 | I mean when I click my .BAT File, It should ask like Please enter your program installation directory.
if user types nothing the batch file should exit otherwise it should set the text (The installation directory in my case)that user typed before to a variable like %DIRECTORY%.
From there, the %DIRECTORY% should behave... | |
doc_43909 | For example, f1.txt looks like this:
This isn't a great example, but it works.
And f2.txt looks like this:
This isn't a great example, but it wasn't meant to be.
"But doesn't it demonstrate the problem?," she said.
When I read these files in, using something like the following:
f = open("f1.txt","r")
x = f.read()
I... | |
doc_43910 | For example, if a comment is added to a post, it is broadcasted to all the connected clients. When I add a comment to a post from my phone, it doesn't emit it to the same page open on my PC.
Any help/guidance will be appreciated.
Thanks.
A: Change the IP address in your client side page.
In my case I had
//client si... | |
doc_43911 |
A: I struggled with this for the best part of a day. It seems that the built-in inking control that used to be available in Windows Phone 7 and 8.0 was pulled out for 8.1
I used the techniques in the article pointed out by Chris W to make a control that can be added to the page's XAML and handle everything else.
The m... | |
doc_43912 | models.py
class Post(models.Model):
STATUS_CHOICES = (
('draft', 'Draft'),
('published', 'Published'),
)
title = models.CharField(max_length=250)
slug = models.SlugField(max_length=250,
unique_for_date='publish')
image = models.ImageField(upload_to=upload_l... | |
doc_43913 | public static function doQuery($Query, $Params = array())
{
$psth = self::$dbh->prepare($Query);
foreach ($Params as $param => $value)
{
if (!is_numeric($value)){
echo "$value is not numeric \n";
$psth->bindParam($param, $value, \PDO::PARAM_STR);
... | |
doc_43914 |
$('input').blur(function () {
console.log($('input')[0].checkValidity());
});
When I typed a space, the console gives a true. This is very confuse...
A: you can use the html5 pattern
i give you an example but you can put what you want
$('input').blur(function () {
console.log($('input')[0].checkValidity()... | |
doc_43915 | I am trying to take out the total number of test cases passed failed skipped or pending for last three months and I used this below query :
SELECT unnest(array[to_char(CURRENT_DATE - INTERVAL '1 months', 'Month'), to_char(CURRENT_DATE - INTERVAL '1 months', 'Month'), to_char(CURRENT_DATE - INTERVAL '3 months', 'Month')... | |
doc_43916 | From the documentation
package api;
import static org.junit.Assert.assertEquals;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Application;
import org.junit.Test;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.core.ResourceConfig;
import com.sun.jersey.test.frame... | |
doc_43917 | final Spinner s2= (Spinner) findViewById(R.id.Spinner2);
final ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.Manu_array, R.layout.textview);
s1.setAdapter(adapter);
s1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
pub... | |
doc_43918 | Please note that a CListCtrl column width can change by dragging the column divider or by double clicking on the header row.
A: I think the key is to understand that there is a difference in the listcontrol itself, and the header control. By using the GetHeaderCtrl() member function of the listcontrol you can get to t... | |
doc_43919 |
*
*Domain Layer (Which is a dll abstracting the business logic)
*Third party dll which helps generating excel files
Now there are many configuration items which I have set in the app.config (Including connectionstring, FolderPath to generate reports, MSMQ name)
My question is How do I send this Console Applicatio... | |
doc_43920 | What I need to do is have a lookup on wheel_id while doing a ng-repeat on wheel_handlers so it returns the wheel object from json B and then I can use this within the view and print the results. I think I need to do something with the ng-repeat but I'm not sure to be honest.
A - Car model
[{
id: 14,
name: "Audi",
... | |
doc_43921 | my code is :
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"morningcell" forIndexPath:indexPath];
UICollectionViewCell *cell1 = [collectionView dequeueReusa... | |
doc_43922 | payments = stripe.PaymentIntent.list(limit=10000)
How I can make the above code run asynchronously?
I tried await payments = stripe.PaymentIntent.list(limit=10000) but I received the error SyntaxError: cannot assign to await expression
A: I've created a pure async (no threads) stripe client for Python: https://github.... | |
doc_43923 | grunt.registerTask('custom-release', ['task1', 'release', 'task2']);
Hence when you call grunt custom-release:major, is there any chance I can invoke my release task to get invoked as release:major?
Else am I forced to register tasks conforming to each of the grunt-release options?:
grunt.registerTask('custom-release-... | |
doc_43924 | I tried this following code:
<iframe scrolling="auto" style="width:500px; height:300px; border:0; padding:0; margin:0; overflow-x:hidden; overflow-y:auto;" src="http://digg.com"></iframe>
It works on Firefox, but doesn't on IE, Chrome, Opera... it might be a bug or something.
Fiddle:
http://jsfiddle.net/DpbUy/3/
I a... | |
doc_43925 | <head>
<script src="javascript.js"></script>
</head>
<table>
<tbody>
<tr>
<td id="test">Some random, text separated, by commas, that I will, try to separate, with filter.split(/, /);, sometime in the future </td>
</tr>
</tbody>
</table>
var testTd = document.getElementById('test'... | |
doc_43926 | This is the code
<?php
include 'conn.php';
if ( $_REQUEST['key'] == 'notification' ) {
include 'notifications.php';
$message = $_REQUEST['text'];
$text = mysql_real_escape_string( $_REQUEST['text'] );
$start = $_REQUEST['start'];
$end = $_REQUEST['end'];
$date = date( "Ymd", strtotime( $_R... | |
doc_43927 |
A: Everyone has already explained that they're different. Here are some difference in behaviors I've noticed between the two compilers. They all boil down to a bug in (at least) one of the implementations.
Compile-time optimization related
*
*Eclipse bug? Switching on a null with only default case
Generics type inf... | |
doc_43928 | > removeAll [1..3] [0..10]
[0,4,5,6,7,8,9,10]
> removeAll "aeiou" "supercalifragilisticexpialidocious"
"sprclfrglstcxpldcs"
removeAll _ [] = []
removeAll [] y = y
removeAll (x:xs) (y:ys)
| x==y = removeAll xs ys
| otherwise = y:removeAll xs ys
A: This is one simple way:
removeAll ignores = filter (\x -> n... | |
doc_43929 | if some allocation fails I would like my program to stop the execution.
After the "new Node" fails the exception is thrown so do I have to call the destructor explicitly in the exception handler.
how can I deal with this situation in order to prevent memory leak?
Here is my code that I have written
LinkedList.h
#pragma... | |
doc_43930 | Purpose is to solve the lag between data loading event after using simple pagination technique while fetching the large amount of data.
I am referring to the doc:
*
*https://proandroiddev.com/8-steps-to-implement-paging-library-in-android-d02500f7fffe
*https://medium.com/mindorks/pagination-using-paging-library-wit... | |
doc_43931 | Will Mongo do the right thing by first searching on the indexed field, and only then searching the other non-indexed search parameter?
A: It depends.
*
*If you have normal find, then IXSCAN will be used on indexed field. You can check this by using explain()
*If you have aggregate queries and your first stage matc... | |
doc_43932 | public function redirect($key)
{
$item = $this->items->findOrFail($key);
$item->increment('redirects');
$encode = urlencode($item->_url);
return view('item.redirect', ['url' => ($encode)]);
}
A: I'm not sure about topic of your question. Do you get such method somewhere from Laravel?
I don't know w... | |
doc_43933 | @RestController
@Validated
@RequestMapping("/users")
public class UsersController {
@GetMapping
public String getAllUsers(@Valid Filter filter) throws MyCustomServiceException {
[...]
}
}
Since this endpoint has around 20 RequestParam instead of bloating the controller(s) with all the fields I have put them ... | |
doc_43934 | The line:
ItemTree.Items.AddChild(nil, CurrentField_Text);
simply adds a node to the top level.
How can I specify a point to insert it in?
Please note that while looping through the data from the table, I may (for example) insert 3 top level items and then the 4th element is actually the child of node 2.
How can I spe... | |
doc_43935 |
*
*Reactive-Extensions (https://github.com/Reactive-Extensions)
*ReactiveX (https://github.com/ReactiveX)
A: Regarding RxJS there're two main version right now.
https://github.com/Reactive-Extensions/RxJS - RxJS 4 is the older RxJS implementation.
https://github.com/ReactiveX/RxJS - RxJS 5 is the new RxJS impleme... | |
doc_43936 | My question is: WHY?
This makes no sense to me... And makes no sense to many others, as we can see:
*
*Android broadcast receiver not working when trying to receive bootcomplete or screen off
*android: broadcast receiver for screen on and screen off
*Android - how to receive broadcast intents ACTION_SCREEN_ON/OFF?... | |
doc_43937 | So within my HTML file, I have 2 DIVs that I want to toggle based on a radio button selection within a form
<div id = 'mySched'></div>
<div id = 'orView'></div>
My form was initially setup within the HTML file, as were the DIVs above:
<form>
<input type='radio' id='userSched' name='viewSelect' value='userSched'>
... | |
doc_43938 | SELECT a.*, t.PhotoCount
FROM dbo.Album a
LEFT JOIN dbo.vw_AlbumPhotoCount t ON t.AlbumID = a.AlbumID
How can I use this view (vw_AlbumPhotoCount) in NHibernate to speed up the query?
UPDATE:
I mapped a simple <one-to-one/> entity as Alex advised and it worked for me. One downside of this solution - as one-to-one prop... | |
doc_43939 |
A: In WF4 any workflow can be consumed as an activity if you compile it. If you need to consume XAML I've added activities to Microsoft.Activities that makes this possible. We have sample code at Windows Workflow Foundation (WF4) - How To Invoke a Child Workflow as XAML
| |
doc_43940 | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cricket', '1_tennis_ball'),
]
operations = [
migrations.RemoveField(
model_name='movie',
name='application',
),
]
| |
doc_43941 | EmployeeSkillController:
EmployeeSkill ski = context.EmployeeSkill.Where(r => r.SkillID == skill.SkillID && r.EmployeeID == skill.EmployeeID).FirstOrDefault();
if (ski == null){
Mapper.Initialize(cfg =>{
cfg.CreateMap<EmployeeSkillDTO, EmployeeSkill>();
});
var map = Mapper.Map<EmployeeSkillDTO, Emplo... | |
doc_43942 | Cake returns the ones in the table in its own array and the others in an array key of 0 - essentially splitting my results which afterwards I then have to merge together.
I know I can use virtual fields to put the derived fields in to the main array however they are very custom and can change a lot, so it is not suitab... | |
doc_43943 | I am using the angular-moment
and moment libraries.
The text being displayed for the "am-time-ago" directive of "angular-moment", like "few seconds ago, a minute ago" for the given time, is not matching.
Here, sometimes the text changes to "a minute ago" even before the actual time is more than a minute ago.
Here is th... | |
doc_43944 | <?xml version="1.0" encoding="iso-8859-15"?>
with
<?xml version="1.0" encoding="UTF-8" href="diwa_klein.xsl"?>
My current code is a simple case of
File.WriteAllText(@copiedfile, File.ReadAllText(@copiedfile).Replace(@"<?xml version=""1.0"" encoding=""iso - 8859 - 15""?> ", @" <?xml version = ""1.0"" ?><? xml - styl... | |
doc_43945 | Header file:
#ifndef PQUEUE_H_INCLUDED
#define PQUEUE_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
//Data structure for holding one element in pqueue
typedef struct _e {
void *data;
size_t datalen;
int priority;
struct _e *next;
} ELEMENT;
//data structu... | |
doc_43946 | And again thanks for the help!
I have three PHP files that are at play.
First one is login-home.php
<?PHP
require_once("./profile_settings/view.php");
if(!$fgmembersite->CheckLogin())
{
$fgmembersite->RedirectToURL("login.php");
exit;
}
?>
/*a bunch of stuff*/
<img id="profile_avatar" src="profile_settings/<... | |
doc_43947 | command --arg1=arg1 --arg2=arg2 -arg3 -arg4
How do I use system() to run command with these arguments?
A: Best practices: avoid the shell, use automatic error handling - IPC::System::Simple.
require IPC::System::Simple;
use autodie qw(:all);
system qw(command --arg1=arg1 --arg2=arg2 -arg3 -arg4);
use IPC::System::S... | |
doc_43948 | E.g. the content of file looks like this :
line 1
line 2
.
.
.
my_start_pattern
.
.
.
my_end_pattern
.
.
.
line n
The output of grep should look like following :
my_start_pattern
.
.
.
my_end_pattern
Thanks.
A: Don't know if grep can do this, but awk can.
awk '/start pattern/,/end pattern/' data_file_name
(... | |
doc_43949 |
A: You can find all the keyboard shortcuts in [Help Menu] -> [Default Keymap Reference]. It is an excellent PDF that you can print and keep next to your keyboard.
A: The format code shortcut in IntelliJ IDEA is CtrlAltL.
Here's a list of keyboard shortcuts in IntelliJ IDEA and Eclipse.
Also note that you can configur... | |
doc_43950 | Requirements:
*
*It must have 15 items.
*Two slider buttons(Left and right).
*Display five weeks at one time.
How do I do this?
I am able to make the list but I don't know how to hide elements except the ones I want to display. How do I give width to each element of the list.
A: If you have a list of images let s... | |
doc_43951 | Error: The module '/Users/macosx/Documents/Electron/node_modules/leveldown/build/Release/leveldown.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
I have tried
rm -rf node_modules/leve... | |
doc_43952 | There is ClearCase Report Viewer which shows list of elements which got modified between two labels. But I am looking for number of files which got changed.
Any solution to this?
A: The easiest way (without involving any commercial third-party tool) is to use linux commands diff and diffstat and apply it to two dynami... | |
doc_43953 | "/PrecompiledApp.config",
"~/_appstart.cshtml",
"~/_appstart.vbhtml"
"/Views/Home/Index.aspx",
"/Views/Home/Index.ascx",
"/Views/Shared/Index.aspx"
(...) and many others. Is there a way to define a list of paths to reduce time and the number of queries made agains... | |
doc_43954 | The note belongs_to :user and the user has_many :notes. I need the validation for only note name.
A: If you want to validate the uniqueness in the model along with scoping it to the user, you could use the following in the Note model.
class Note < ActiveRecord::Base
belongs_to :user
validates :name, uniqueness: {... | |
doc_43955 | Context: I have a main web app linked to the existing Java back end. Now I need to create another web-app, with a certain Admin capability. The back end services needed for this new app, are already written in the existing Java back-end. So I had intentions to modify the existing back-end and plug the second one to thi... | |
doc_43956 | I could register the BroadcastReceiver in the second fragment, however, the event may come at the moment when my second fragment opens and then I do not have time to register the BroadcastReceiver and I lose the event.
So my code inside the onReceive of activity looks like this:
@Override
public void on... | |
doc_43957 |
A: Most sites do it with a form.
But I think using ajax is also good, because the call to the server is asynchronous and so it doesn't delay your page. Since the user cannot change fields in very high speed, it should not be an issue to keep as it is.
| |
doc_43958 | $("table tr").each(function() {
return ($(this).find("td").eq(0).text() + " " + $(this).find("td").eq(8).text())
}).join("#")
I need to get the result in the form of array
as
["apple 20", "banana 30", "pears 30"].join("#")
and the expected result is
apple 20#banana 30#pears 30
How can I modify my iteration to retu... | |
doc_43959 | class SetCord
{
double x;
double y;
private int Id;
private static int NextId;
public SetCord(double a, double b)
{
x=a;
y=b;
}
public double getX()
{
return x;
Id=NextId;
NextId++;
}
public double getY()
{
return y;
Id=NextId;
Next... | |
doc_43960 | My Processor is (it's OK) :
from("timer:aTimer?fixedRate=true&period=10s")
.setHeader(Exchange.HTTP_METHOD, constant("GET"))
.to("jetty:http://localhost:3030/getFile")
.marshal(xmlJsonFormat)
.process("camelProcessor")
.to("mongodb:mongoBe... | |
doc_43961 | This works nicely, but I dont see any warnings any more on subsequent compiles. The only thing I see is "[success] Compiled in xs".
Now i do see the warnings immediately after running "activator ~run" for the first time. I do not see it after I make code changes and save them.
How can I get sbt to display the warnings... | |
doc_43962 | criteria to the second through mergeMap to retrieve the addition data for each record returned in the first.
My issue is that I can see the data being returned w/o error and the table iterating rows in the output but nothing being displayed in the table. The two relevant classes are:
export class GetMyShizz implement... | |
doc_43963 | A search turned up an approach using repeatable-page-master-alternatives with simple-page-masters for even and odd pages. I figured I could pass a parameter to the template based on the even/odd page and use that to align the image.
This works great for headers and footers. But the solution uses multiple fo:flow blocks... | |
doc_43964 | The memory is 8 GB, and I want to complete the broadcasting operation, but it did have a huge cost.
Given the condition:
interdata = data[:, None] - data[None]
The data is with shape [1000, 32, 32], and I want the interdata with a shape of [1000, 1000, 32, 32], and that seems to be too large for my memory.
Is there a ... | |
doc_43965 | but, the google map will load perfectly if i minimizing the window
IN MY CONTROLLER
var app = angular.module('mymap', ['uiGmapgoogle-maps', 'ngAnimate', 'ui.bootstrap']);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.fullmap = {
center: {latitude: 67, longitude: -55},... | |
doc_43966 | On the page i've generated request - "
/api/receive?method=create&cors=true&format=plain&address=1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq&shared=false&callback=http%3A%2F%2Fgoogle.com
and need to receive an answer -
{"callback_url":"http://google.com","input_address":"16ofW1jBBLbVnDQWJsyL6NKq7hKms9tDLP","destination":"1A... | |
doc_43967 | I have added Ojdbc7.jar in Lib
and using Oracle 11g (11.2.0.2) version
My code is :
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class PrintForm extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)throws IOException, Servlet... | |
doc_43968 | In the course of debugging, we've opened up all of the related security options we can think of; in specific:
*
*We've enabled the GP settings to Allow Delegating Fresh Credentials (standard and 'With NTLM only') with the wildcard SPN wsman/*
*We've enabled the WSMan Trusted Hosts setting with *.domain.com
*We've ... | |
doc_43969 | I need to
1) send a POST request to a server and get cookies associated to my login
2) reuse these cookies with url based on that same server, which runs a report.
To perform this I use php and cURL. The below script works fine:
<?php
$homeurl = "http://localhost:8080/pentaho/j_spring_security_check?j_username=admi... | |
doc_43970 |
engine = create_engine("mysql://user:passwd@localhost/shema", echo=False)
meta = MetaData(engine, True)
conn = engine.connect()
tb_list = meta.tables["tb_list"]
tb_data = meta.tables["tb_data"]
tb_list.c.i_data.append_foreign_key( ForeignKey(tb_data.c.i_id) )
q = tb_list.outerjoin(tb_data).select()
res = conn.exec... | |
doc_43971 | And mostly code works normally, however I'm having an issue with an array.
CODE:
$settings = Core_Settings::find_by_sql("SELECT * FROM core_settings");
foreach($settings as $setting)
{
$array = (array) $setting;
$$array['name'] = $array['data'];
}
$settings =
Array ( [0] => Core_Settings Object ( [name] => ... | |
doc_43972 | <div class="entry">
<p> some text</p>
<p> some text2</p>
<p> some text3</p>
<p> some text4</p>
<hr>(get text part before this hr tag)
<p> some text5</p>
<hr>
<p> some text6</p>
</div>
tried this
//hr[1]/ancestor::div[@class="entry"]/text()
and some similar variants but couldn't get the expecte... | |
doc_43973 |
*
*Click an "Add" button. This will add a JavaScript object to either an array, or another JavaScript object.
*Click a dynamic "Remove" button. This will remove the JavaScript object from the array, or object, whose ID matches the button click.
*Submit the complete array, or object, of desired objects server-side ... | |
doc_43974 | then I check /etc/init.d/php-fpm -m, there's also haven't.
What's can i do now? and btw is there any way to restart php-fpm, i dont know why there isn't /etc/init.d/php-fpm restart.
FYI, I did find / -name mbstring, it's output:
/usr/local/src/php-5.4.14/ext/mbstring
/usr/lib64/php5.4/include/php/ext/mbstring
run # /e... | |
doc_43975 | #include <iostream>
#include <chrono>
using std::chrono::nanoseconds;
using std::chrono::duration_cast;
int main(int argc, char* argv[])
{
std::cout
<< "Resolution (nano) = "
<< (double) std::chrono::high_resolution_clock::period::num /
std::chrono::high_resolution_clock::period::... | |
doc_43976 | I'm saving a byte[] in my shared preferences. I am able to close the app and reopen it with the value persisting in the Shared Preferences. When running the app and closing it via the 'Task Manager' or 'Force Close', the Shared Preference value for the byte[] is cleared. I don't understand this because other values ... | |
doc_43977 | I read it online it can be controlled using "maxDepth" but couldn't find anything more. Would appreciate if someone could help me implement this.
A: maxDepth was only supported by Robo v1. It has been deprecated and has not had any effect on Robo tests for a long time. The standard way to limit the length of a Robo... | |
doc_43978 | require "aws"
AWS.config(
access_key_id: 'xxxxxxxxxxxxxxxxxx',
secret_access_key: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
region: 'eu-west-1'
)
dynamo_db = AWS::DynamoDB.new
table = dynamo_db.tables['mytable']
table.hash_key = [:string, :string]
# add an item
table.items.create(id: '12345', 'foo' => '... | |
doc_43979 |
a=0
a+=1
print(a)
#if a==5:
#sys.exit()
b=threading.Timer(3, data)
b.start()
if __name__ == "__main__":
data()
①I want to try stop this code about 15 seconds
(Actually,I need to stop the time is about 16200 second, and it's must be very precise )
(i want to know is there a bett... | |
doc_43980 | ValueError: operands could not be broadcast together with shapes (365,) (2,)
But I'm surprised by this (2,).
How do I know which variable does this dimension (2,) please?
Because none of my variables should have it.
Thank you for your help !
Here, you can see the first script, where I define my function. It include a... | |
doc_43981 | # Load ResNet50 pre-trained on imagenet
resn = applications.resnet50.ResNet50(weights='imagenet', input_shape=(IMG_SIZE, IMG_SIZE, 3), pooling='avg', include_top=False)
# Load CIFAR10
(c10_train, c10_test), info = tfds.load(name='cifar10', split=['train', 'test'], with_info=True, as_supervised=True)
# Make sure all... | |
doc_43982 | For example,
$text="translate this content"
to
$translated_text="traduci questo contenuto"
I do not need to find the browser language, etc,. Just direct translation I need.
Tried this, seems like it is deprecated. Got it from another question answered here.
function translate($from_lan, $to_lan, $text){
$json = jso... | |
doc_43983 | My question is what would be the best way to store this data? The simplest example I can think of would be:
- file_id (id)
- filename (varchar)
- file_url (varchar)
- [various file settings]
- data (longtext or blob)
In this way, whenever a user wants to save a new setting, we would apply the transformation to the dat... | |
doc_43984 | I would like to allow access to:
/directory/subdirectory/..
But I would also like to restrict access to /directory/ not withstanding the above exception.
A: I would recommend using Google's robot tester. Utilize Google Webmaster tools - https://support.google.com/webmasters/answer/6062598?hl=en
You can edit and test... | |
doc_43985 | some/url/<mystring>
My problem: mystring comes directly from a user input where it is allowed to type any special character including dangerous ones, like slash for example. I want to escape those.
EDIT: no, I do not want to escape HTML code. I want to escape the parts of a string, that could make the url directing el... | |
doc_43986 | In the HTML
<body ng-app="starter" ng-controller="searchController as searchController">
<ion-pane>
<ion-header-bar class="bar-stable">
<h1 class="title">Ionic Blank Starter</h1>
</ion-header-bar>
<ion-content>
<input type="text" ng-model="searchController.searchString" required />
<button class="btn... | |
doc_43987 |
I want to be able to do this using the iOS SDK. However, I cannot determine through the documentation how to load a location by means other than a Lat/Long. Does this require the use of the Places API to work? If so, how?
Once I am able to display this, I want to display the user's current location on the screen, but ... | |
doc_43988 | 'The display is a normal Capacitative touch dispaly'
Thanks a lot for your valuable time
A: Although this question really doesn't belong on this forum, here are two possible solutions.
*
*Depending on the requirements of the project, you could assemble an array of solenoids to be placed over the screen. Each solen... | |
doc_43989 | below is the method which I am writing.
@Post('upload')
@UseInterceptors(FileInterceptor('file', multerOptions))
@UseInterceptors(FileInterceptor('file'))
UploadExcelFile(@UploadedFile() file: Express.Multer.File) {
console.log("Hello")
console.log("Hello");
console.log(file);
const workBook: XLSX... | |
doc_43990 | CellReference cr = new CellReference("A1");
row = mySheet.getRow(cr.getRow());
cell = row.getCell(cr.getCol());
but now if I need the next cell in a row or another cell in another row, is there an easy way to navigate about the worksheet? Is there some type of increment function?
A: There should be an iterator of som... | |
doc_43991 | But when I am using below code the print button is missing:
$('#printData').DataTable({
dom: 'Bfrtip',
"paging": false,
"iDisplayLength": -1,
buttons: [{
extend: 'print', footer: true,
title:'<div style="text-align:center;">Test Report</div>'
}],
columnDe... | |
doc_43992 | However, these functions point to rsa_pub_enc , rsa_priv_dec respectively which I can't find anywhere. Any headstart on how to read the openSSL cource code would be very helpful.
P.S. I am using openssl-1.0.2d.tar.gz tarball.
A: I just discover your post today while having strictly same question with some time spent t... | |
doc_43993 | str = [str, "<div class='c3lMenuGroup padXLLeft marLTop' width='20%'>"].join("");
str = [str, "<input class=' wColor' name='inputId' id='inputId' onclick='c3lshow:cont_btn_" + i + "& c3lhide:cont_btn_" + k + "' align='right' width='100%' type='radio' valign='middle'>.</input>"].join("");
str = [str, "</div>"].j... | |
doc_43994 | What should this method do? It iterates over found target web pages, with a list of found query parameters. For each web page, it should apply the method phase1 (my attack logic) to every query parameter associated with that page.
Meaning, if I have http://example.com/sub.php, having page &secret as query parameters, a... | |
doc_43995 | <div class="navbar-fixed">
<nav class="white">
<div class="nav-wrapper">
<a href="index.html" class="brand-logo"><img src="img/logo.png" alt="Logo" height="64"></a>
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons black-text">menu</i></a>
<ul ... | |
doc_43996 | After I clicked the delete button
runs MessageBox.Show("Error");
Because It is a foreign key
After I clicked the delete button
I do not want to insert the table
Again gives the same error, delete
Never
I can not insert or update the table
Again gives the same error, delete
How the problem is solved
code delete
priva... | |
doc_43997 | I've checked the cordova-android source and it appears that there is a CookieManager interface.
When I'm trying to use it, the cookie isn't set when I inspect the webview.
@Override
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
super.initialize(cordova, webView);
ICordovaCookie... | |
doc_43998 |
<div ng-mouseover="infoIsVisible = true" ng-mouseleave="infoIsVisible = false" ng-init="infoIsVisible = false" onmousemove="getCoords(event)">
<img class="icon" ng-src="{{ info.icon }}" height="20px" width="20px">
</div>
<div class="info">
<p ng-show="infoIsVisible">{{ info.description }}</p>
</div>
<s... | |
doc_43999 |
My approach was to call this method only. But not getting code coverage. All the lines of code need to be covered. I get very less code coverage in sonar cube.
public getNavList() {
this.navSrv.getNavList().subscribe(list => {
list.forEach(element => {
if (element.parentId === 0) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.