id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23516600 | I've come across this article on mesh sampling, which looks promising, but wanted to see whether there were alternative approaches. Note that although I'm not looking to perform this operation in real-time, speed is still favourable over accuracy.
A: A typical approach is rejection sampling. Place a bounding box arou... | |
doc_23516601 | It uses a php file to check the database and if correct the php document (in a new page) just displays "login successful".
how do i change the original webpage, so that with a successful login - it displays the username in the updated container that once prompted for username/password?
A: I hope I understand your ques... | |
doc_23516602 | I saw in this thread
Is HttpUnit deprecated / inactive / not supported?
that Russell has put the httpunit source to his github repo.
The FAQ note for httpunit still talks about the svn repo at sourceforge for patching.
If I have a patch, should I use the svn repo and attach the patch to the ticket to source forge's iss... | |
doc_23516603 | PK | STARTDATE | ENDDATE
__________________________________________
1 | 2012/07/21 02:00 | 2012/07/21 04:00
2 | 2012/07/21 03:00 | 2012/07/21 10:00
3 | 2012/07/21 06:00 | 2012/07/21 17:00
4 | 2012/07/21 18:00 | 2012/07/21 19:00
Now, I like to merge the date ranges (within a given start and en... | |
doc_23516604 | How do I do that?
I mean I can do
$args = array(
'posts_per_page' => 30,
'post_type' => array("A", "B", "C"),
);
$posts = get_posts( $args );
But it will bring me just 30 latest posts - not 10 of each of them.
A: You could create a function and pass in the types, and amount of each that you want, then ru... | |
doc_23516605 | project
| feature_files
| | app1.js
| | app2.js
| | app3.js
| | ...
| step_definitions
| ...
All the apps begin their tests in the same way, there's a start page where you enter a variable and click a link. The problem is that Cucumber complains about multiple step definitions match becaus... | |
doc_23516606 | LocalDate localDate = purchased_at.getValue();
localDate.format(DateTimeFormatter.ofPattern("dd.mm.yyyy"));
This is the Error I get.
Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour
I'm still kind of a beginner. I had Java for the past 3 or 4 months now. I'm tryi... | |
doc_23516607 | Error I got when using build command (ng build --prod --build-optimizer --base-href=.
):
ERROR in Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 11:12 in the original .ts file), r... | |
doc_23516608 | And how can i call this 3 calls at the same time? I tried with "Promise All" but didn't work for me..
Thanks for help! ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
import './Style.css';
class ... | |
doc_23516609 |
A: The two processors share a LOT of code, the only real difference is that ExecuteSQL only outputs the results as Avro, whereas ExecuteSQLRecord can output the results using any RecordSetWriter into its associated format, such as Avro, JSON, CSV, XML, etc.
| |
doc_23516610 | #include<iostream>
#include<fstream>
#include<cmath>
using namespace std;
int main(){
// establish counters for the number of each character
char x;
int acount=0;
int bcount=0;
int ccount=0;
int dcount=0;
int ecount=0;
int fcount=0;
ifstream iFile("plato.txt"); //define & open files
ofstream oFile("statistics.txt... | |
doc_23516611 | The query used in SQL:
Select count(distinct ColName) from TableName
And in R:
Length(Unique(DataframeName$Colname))
A: It's difficult to say without the actual data, but R and SQL look at unique values differently. R (more to the point - unique) will treat NA and various sizes of spaces as unique values:
> unique(... | |
doc_23516612 |
Run-time error 13 Type Mismatch
Every time I add this to user form. Any ideas why?
I've set it up as a module then called it in to the UserForm_Initialize then it shows an error and won't open the Userform
I am trying to add headers & controls to the Listbox Quote Details List
Sub Fill_Quote_Detail()
Dim QDetails As... | |
doc_23516613 | Here is what the website looks like fully functioning.
i.gyazo.com/2db38f72dff333d3eab898b5981151d1.gif
Link to fully functioning design: http://web-beta.archive.org/web/20161006125524/http://murray-engineering.com
And now here is my issue:
i.gyazo.com/32905aca742dd967d1b00d5ff01eb1ce.gif
The images I attempted to add ... | |
doc_23516614 | On a monthly basis, I am provided an Excel file from a business partner that is a list of members. Each row is a person, and the columns are MemberID, LastName, FirstName, and DateOfBirth.
In our medical records database, which we query with SSMS, the primary identifier for patients is PatientID (from the Person table)... | |
doc_23516615 | sqlContext.sql(s"""
create external table if not exists landing (
date string,
referrer string)
partitioned by (partnerid string,dt string)
row format delimited fields terminated by '\t' lines terminated by '\n'
STORED AS TEXTFILE LOCATION 's3n://....'
""")
It gives error:
Exception in thread "main" java.lang.Ru... | |
doc_23516616 | M path/to/subrepo
Switched to branch 'another-branch'
message. I then manually do:
git submodule update --recursive
and that goes away.
I tried writing a git hook, in .git/hooks/post-checkout:
#!/bin/bash
exec git submodules update --recursive
but this doesn't seem to do anything. I tried to add an exec ec... | |
doc_23516617 | LoginTableViewController *contributeViewController = [[LoginTableViewController alloc] init];
[self presentViewController:[UIHelpers blurredViewController:contributeViewController withFrame:contributeViewController.view.frame andBlurEffectStyle:UIBlurEffectStyleLight] animated:YES completion:nil];
I've tried without ... | |
doc_23516618 | My assumption is that I already have pairs of [Word,Context] and corresponding positive 1 and negative 0 labels. Sample X_train = [[4,645],[631,22]] etc.
What I do is simply build one-hot representation of words (corpus_size x corpus_size) to feed it to a model Input.
The network is learning with about 90% accuracy ho... | |
doc_23516619 | But have no idea how to check it simple.
I found something like this tutorial
but i wonder is there any existing solution for my problem in XNA?
I attach the image which showing what i'm trying to check if someone not fallow
EDIT:
I'm making game for Mobile Windows Phone 7. It should not overload CPU too much.
Thanks ... | |
doc_23516620 | HTML:
<input type="checkbox" class="checkbox" value="yes" id="answer" name="answer" data-label="I am over the age of 18" />
<div class="categories row-fluid">
<div class="span4">
<ul>
<li>Full Name</li>
<li>Current Address</li>
<li>Address History</li>
</ul>
<... | |
doc_23516621 | certs := x509.NewCertPool()
pemFile, err := ioutil.ReadFile("cert.pem")
if err != nil {
return
}
certs.AppendCertsFromPEM(pemFile)
tlsConfig := &tls.Config{
RootCAs: certs,
}
proxyUrl, err := url.Parse("https://someproxyurlhere.com:8080")
if err != nil {
return
}
t := &http.Transport{
TLSClientConfig:... | |
doc_23516622 | V1 V2 V3
1 Date 12/16/18 12/17/18
2 Equip a b
3 x1 1 2
4 x2 3 4
5 x3 5 6
I want to gather the data to make it tidy, but gathering only works when you have single column names. I've tried looking at spreading as well. The only solutions ... | |
doc_23516623 | My Rspec code
`require 'rails_helper'
#Update user test
RSpec.describe 'Updating a user', type: :feature do
let(:tester1) { FactoryBot.create(:user, name: "tester1",
email: "tester1@gmail.com",
password: "password")}
befor... | |
doc_23516624 | So to start with i have my structuremap setup.
public class DefaultRegistry : Registry {
#region Constructors and Destructors
public DefaultRegistry() {
Scan(
scan => {
scan.TheCallingAssembly();
scan.AddAllTypesOf<IImporterService>().NameBy(type => type.Nam... | |
doc_23516625 | I am building a table of buttons that I need this function to be an event of.
so the current code is
var me = this
for (x iterations) {
button.addEventListener('click',function() {
me.remove(this) // <- document is passed via this. I need both contexts
}
obviously this is bad code on every reiteration the... | |
doc_23516626 | This has been hacked together quickly to test a concept i know the code isn't great.
class Profiling {
public:
template<class _Fn, class... _Args> GetProfile(_Fn&& _Fx, _Args&&... _Ax);
int GetTime();
char Type;
int Size;
private:
int StartTime;
int EndTime;
};
template<class _Fn, class... _Arg... | |
doc_23516627 | int sequence = {};
random(1, 4);
for (int i=0; i <= 7; i++){
sequence[i] = random(1, 4);
}
A: Arduino is based on C++.
int sequence[8];
// You must initialize the pseudo-random number generator
// You can get a "random seed" using analogRead(0) if this
// pin isn't been used and unplugged.
randomSeed(analogR... | |
doc_23516628 | @Override
protected void onCreate(Bundle savedInstanceState) {
calendar = Calendar.getInstance();
//final Calendar mCalendar = new GregorianCalendar();
final DatePickerDialog.OnDateSetListener datePocetnoVreme = new DatePickerDialog.OnDateSetListener() {
... | |
doc_23516629 | I was working first working on d3 v3 and everything was going so well but I've got informed that I needed to work on v4.
Here is a piece of my code :
...
// create function for x-axis mapping.
var x = d3.scaleBand().rangeRound([0, hGDim.w]).padding(0.1)
.domain(fD.map(function(d) { return d... | |
doc_23516630 | to do a logo slider.
Question1: How to make the image bigger upon hovering with the above logo slider?
I tried adjusting the image height and width directly, but I want the image to become bigger in this effect: http://www.morearty.com/blog/2013/06/06/html-css-to-make-an-image-bounce-to-a-larger-size-on-hover/
When on... | |
doc_23516631 | using the host: x86_64-w64-mingw32
Earlier, configure script was giving errors for libgcrypt, but disabling it proceeded to successful config.
Compilation fails because it does not find `__ms_vsnprintf'.
Following is a sample compilation error log.
../vlc-2.0.4cross/contrib/x86_64-w64-mingw32/lib/libvpx.a(onyx_if.c.o):... | |
doc_23516632 | I've noticed the interest_by_city data frame doesn't contain any date information. As I am looking to monitor the changes over time this is problematic.
Is there a way to add a new variable for the date where each observation will be the date and time the data was extracted?
A: If what you want is to add Sys.time() t... | |
doc_23516633 | procedure TForm3.StringGrid1Click(Sender: TObject);
begin
SelectedElement := stringgrid1.Cells[0,stringgrid1.Row];
end
SelectedElement is declared in public section:
public
SelectedElement : String;
end;
When I use it in this unit, for example Label1.Caption := SelectedElement, it works fine. But in another unit,... | |
doc_23516634 | The problem is that the server receives the content (image and string) but when it saves the image on the disk it is corrupted and can't be opened.
This is the relevant part of the script.
HttpPost httpPost = new HttpPost(url);
Bitmap bmp = ((BitmapDrawable) imageView.getDrawable()).getBitmap();
ByteArrayOutputStream ... | |
doc_23516635 | And I found some ways :
*
*Availability Check
(1) Using CURL command
*
*When I using CURL command, that only return HTTP 200 status code.
*Command Example: curl -X GET -w "{"status": "%{http_code}", "response_time":"%{time_total}"}" https://dynamodb.us-west-1.amazonaws.com
*Result Example :
healthy: dynamodb.us-... | |
doc_23516636 | The main app itself is a static, standalone RIA built in Dojo and doesn't make use of the Rails asset pipeline.
The stylesheet however, I'd like to have sprockets assemble from various sources as well as some values from the database.
Goals/desires:
*
*I'd like to start out with a stylesheet in app/assets/stylesheet... | |
doc_23516637 | +(NSInteger)dayOfMonthFromDate:(NSDate *)date {
NSCalendar *calendar = [NSCalendar currentCalendar];
NSRange range = [calendar rangeOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitMonth forDate:date];
NSInteger numberOfDayInMonth = range.length;
return numberOfDayInMonth;
}
+(void)buildSmartCalendarDayWi... | |
doc_23516638 |
A: What have you tried till now?
Still you could checkout this tool that bash has ab. Its apahce benchmarking.
This helps in checking performance. And In the end it provides you a summary.
The command goes like :
ab -n 10 -c 2 http://my.webserver.prod.com
Where
-n -> total number of requests to be made
-c -> n... | |
doc_23516639 | NSString *eID = [entertainmentArticle objectForKey:@"eID"];
NSURL *urla = [NSURL URLWithString:@"http://www.mydomain.com/iostest/appPHPs/schedule.php?eID=",eID];
A: You can't concat 2 string variables just by putting a comma between them. Try this instead:
NSURL *urla = [NSURL URLWithString:[NSString stringWithForma... | |
doc_23516640 | The script below stops at the first matching, I wish that the process continues for all possible matches.
Public Sub try()
Dim lastRow As Long
Dim i As Long, j As Long, b As Long, Fente As String, newente As Worksheet
With Worksheets("totale")
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End... | |
doc_23516641 |
A: You can achieve it with pure CSS using text-overflow property.
.ellipsis {
width: 10em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ellipsis:hover {
width: 100%;
white-space: normal;
overflow: visible;
}
And use it like that:
<div class="ellipsis">your_very_long_string</div>
| |
doc_23516642 | I use this code.
map <- sf::st_read('map/map.shp', quiet = TRUE)
gg = ggplot(map) +
geom_sf(aes(fill =AREA),linewidth=0.7,colour='black',inherit.aes=FALSE) +
scale_fill_viridis('Area',na.value = 'white')+
theme(axis.line = element_blank(),axis.title = element_blank(),
axis.ticks = element_blank(), ax... | |
doc_23516643 | class test:
def __init__(self) :
print("init")
def __del__(self):
print("del")
a=test()
outpuu in vs code :
init
del
out put in jupyter :
init
A: When you run the Python script in the terminal (which is similar as in vscode), after the last line has been executed, the script terminates. When a... | |
doc_23516644 | For example, if I have a JS file containing the following content, Outline shows the one top level function only:
function topLevel() {
var local1 = 1;
var local2 = 2;
function local() {};
}
A: You need to add the web perspective in the "Open Perspective" dialog
| |
doc_23516645 | firstly , I made the template page , it is name : Register User
but I am afraid if the user can do somthing bad (sql injection .. etc) ..
this is my code ..
if(!empty($_POST['user_name']) || !empty($_POST['email'])){
$user_login = $_POST['user_name'];
$user_email = $_POST['email'];
$random_password = wp_generate_pass... | |
doc_23516646 | We need to persist state for some of elements of user interface. For example:
*
*windows layout;
*controls layout;
*last accepted input;
*various grids' state(columns' visibility, width, order)
.Settings file seems too plain for this because of no hierarchy in it.
Why can't I just serialize some SettingsModel, ... | |
doc_23516647 | why grouped by old columns
select
CEIL( b.lat) AS lat ,
CEIL( b.lon) AS lon,
b.lat,
b.lon,
Count(*)
from tur_gozlem a
inner join geopoints b on a.harita = b.id
group by lat,lon
order by lat,lon
A: You have a name collision. Either use unambiguous aliases or repeat the expressions:
select CEIL(gp.lat) ... | |
doc_23516648 | I get the following error saying that I must add a shared scheme:
I follow the steps here to generate a scheme for my workspace: https://learn.microsoft.com/en-us/appcenter/build/troubleshooting/ios#no-scheme
The final step says: Add the .xcscheme file to source control and pushed to your remote repository so that Ap... | |
doc_23516649 |
A: You're a little vague there so I hope this is what you mean:
combobox.SelectedItem will give you the display value of whatever item is selected in a combobox.
listbox.Item.Add(itemToAdd) will add that item to your listbox. You'll have to rebind the listbox if it is already created. You'll need to rebind the listbox... | |
doc_23516650 |
A: On this zimbra release you need a patch to be a least a level 1178
| |
doc_23516651 | #include <iostream>
#include <vector>
using namespace std;
int main()
{
vector <int> vec(10);
for(int i=0; i<10; i++){
vec[i]=i+1;
cout << vec[i] << endl;
}
cout << "the length of this vector is " << vec.size() << endl;
for(int i=0; i<20; i++){
vec[i]=i+1;
cout << v... | |
doc_23516652 | I have to concat the value of 1st and 2nd textarea to display in 3rd text
I have used ng-bind to combine both values but i cannot see the combine values in UI but it is
combined when i inspect the thirdName textarea.
<div class="row">
<div class="col-md-3">
<textarea ng-model="vm.firstName" class="form-control" placeh... | |
doc_23516653 | I would like to extract both the English phrase "Hadayek Helwan" in one column and Arabic phrase "حدائق حلوان" in another column.
A: If your data is really stored as this more or less json string, you can parse it like so:
select
new json(<your column>).<json entity>
from
...
So to get the english one, you would use
... | |
doc_23516654 | Here is the code with poll:
#include <sys/timerfd.h>
#include <sys/poll.h>
#include <sys/epoll.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
int main(int ac, char *av[])
{
struct pollfd p;
int timerfd;
struct itimerspec timerValue;
/* clear pollfd */
bzero(&p, ... | |
doc_23516655 | the dataset is divided into three text files for x,y and z respectively each file contains one column and 1000 rows.
and this is my code
import numpy as np
import matplotlib.pyplot as plt
fake_size = 1000
time = np.arange(fake_size)/1000 # 1kHz
x = np.loadtxt("trainingdatasetX.txt", delimiter=",")
y = np.loadtxt("tra... | |
doc_23516656 | But I keep getting this error:
Error: OPTIONS of '': Could not
Error: resolve hostname `svn.apache.org': No such host is known.
The funny thing is that I can access 'svn.apache.org' from my browser but if I try to ping it from the command prompt, it says host not found.
Does any body else face this problem? Is t... | |
doc_23516657 | We are sending usage reports to our customers once a quarter (every 90 days from the date they bought the license). This report contains major tables with 30+ columns of raw number data.
I want to create a simple >drag new report into folder >paste results of main workbook into report
Creating a this is obviously simpl... | |
doc_23516658 | https://i.stack.imgur.com/HnqLJ.png
A: when creating the database, ClickHouse doesn't check on creation if the settings for MaterializedPostgreSQL engine are valid, it just creates the database to link.
for example, i can use something like this and creates the database on the clickhouse side:
CREATE DATABASE db3_post... | |
doc_23516659 | It's particularly difficult to diagnose since its occurring in an async routine in Django, so it hasn't been throwing error messages.
As more detail, if new_df has 20,000 records, I am selecting the first 10,000 records on the first loop, and the second 10,000 on the second loop. It runs "fine" for the first iteration... | |
doc_23516660 | So what are some good options to get this desired behavior - i.e. I when I change one slider, it also changes the other slider, but those changes don't actually call any events? Some of my ideas are:
1, I just check if there's any actual difference from the previous value. This should solve things. This should be fine,... | |
doc_23516661 | {
"type":"input","uniqueId":434,"label":"name","viewToCall":"input-configuration-menu"},{"type":"button","uniqueId":930,"label":"name","viewToCall":"button-configuration-menu"}]
Im not sure how to handel different type of json object in my @Requestbody:
@RequestMapping(value="/saveForm", method = RequestMethod.POST)
... | |
doc_23516662 | Is
String sState = service["State"].ToString();
if (! sState.Equals("Running"))
Sufficent to moniter if a service is not running? I want the if statement to return true in all cases where the service isn't running so it can send a warning message.
A: Windows service states are:
*
*SERVICE_STOPPED. Service is not... | |
doc_23516663 | The context of this entire question comes from:
The case of the disappearing OnLoad exception – user-mode callback exceptions in x64
Background
In 32-bit Windows, if i throw an exception in my user mode code, that was called back from kernel mode code, that was called from my user mode code, e.g:
User mode ... | |
doc_23516664 | https://docs.manim.community/en/stable/reference/manim.mobject.geometry.line.Angle.html?highlight=angle#manim.mobject.geometry.line.Angle.from_three_points
But getting the following error:
NameError: name 'Angle' is not defined
Here's the line of code I used:
self.play(ShowCreation(Angle(nueva_linea2, nuevo_radio)))
... | |
doc_23516665 | I am using a property file[prop.properties] which contains a system property 'name' and 'value' to set in JBoss.
ex: locate_property_file=c/user/desktop
The CLI script looks like:
if (outcome == success) of /system-property=locate_property_file:read-resource
/system-property=locate_property_file:remove
end-if
if ... | |
doc_23516666 | I have installed Google plugin with GWT 2.6, Appengine 1.9.18 and GWTP plugin 0.6.1.
I am using Windows 7, and Eclipse luna 4.4
I have two java versions installed on my machine for different versions!!!
On terminal:
D:\project>echo %JAVA_HOME%
"D:\installations\java8"
D:\project>java -version
java version "1.8.0_40"... | |
doc_23516667 | { "rates": {
"AED": 3.672626,
"AFN": 48.3775,
"ALL": 110.223333,
"AMD": 409.604993,
"ZAR": 8.416205,
"ZMK": 4954.411262,
"ZWL": 322.355011
}
}
A: JSONObject jsonResult = new JSONObject(yourString);
JSONObject rates = jsonResult.getJSONObject("rates");
double aed = rates.getDouble("AED");
... | |
doc_23516668 |
A: The DartDoc tool (which uses markdown) creates API documentation (as found at api.dartlang.org )
This describes the api reference for using DartDoc in your own code
The Readme.txt here, shows how you can format your code comments to generate API doc
A: ///I am the beerclass
class BeerClass{
///this is a beer var... | |
doc_23516669 | I want to get the local Bluetooth MAC address of my Windows device and then make it available from connection by the Android device which will use that MAC address to connect directly without needing to go through the discovery process.
I would like to use Java for the Windows application if possible. All I can find is... | |
doc_23516670 | Code Below V
using namespace std
int varset()
{
string ChoiceTeamA;
string ChoiceTeamB;
bool Atk1 = false;
bool Atk2 = false;
int health = health;
int health1 = health1;
}
int main() {
cout << "player 1 turn - choose what to do" << endl;
cout << "Player 1's health is " << health... | |
doc_23516671 | I have created a simple model implementing INotifyPropertyChanged.
public class PushNotes : INotifyPropertyChanged
{
public string CompletePushNotes { get; set; }
}
Binding in cs:
evt_pushNotes = new PushNotes()
{
CompletePushNotes = "HelloThere"
};
this.DataContext =... | |
doc_23516672 | Creating test database for alias 'default'...
System check identified no issues (0 silenced).
..
----------------------------------------------------------------------
Ran 2 tests in 0.495s
OK
Destroying test database for alias 'default'...
These tests are part of a project which is currently residing in a GitHub rep... | |
doc_23516673 | I appreciate any help.
A: After searching my question,I understood maybe the problem is about "time out" in network connection or another problem about downloading.
I removed the complete binary output build directory, again.
I used "freegate.exe" and tried again.
cmd>cd caffe
cmd>caffe>scripts\build_win.cmd
and ... | |
doc_23516674 | and i need to remove it.
I am using .replace('^', '') but nothing happend.
A: replace returns a copy of the string in which the replacement has taken place. In your code, you discard the result of .replace(). The value in the array is never updated. You could solve this via:
tmp_el[1] = tmp_el[1].replace('^', '')
| |
doc_23516675 | #getting variables from csv file
with open(csvfilepath, 'r', encoding='utf-8') as csvfile:
csvreader = csv.reader(csvfile)
next(csvreader)
for row in csvreader:
args_str = row[5][1:]
#select json template
jsonfilename = input("Enter .json template name: ")
jsonfilepath = jsontempdir + jsonfile... | |
doc_23516676 | class Person:
raise_amount = 1.04
def __init__(self, name, street_name, house_nr, post_code, salary): #:post_code, salary):
self.name = name
self.street_name = street_name
self.house_nr = house_nr
self.post_code = post_code
self.salary = salary
... | |
doc_23516677 |
A: Try installing the mod_php, the php interpreter:
sudo apt-get install libapache2-mod-php5
Then obviously restart apache
sudo /etc/init.d/apache2 restart
A: In my case, i had installed php7.2 and i disabled the php version through the command
a2dismod php7.2
and this happend.
Then i ran the below command
a2enmod... | |
doc_23516678 | class Property{
/**
* @var string
* @ORM\Column(type="string", length=10)
*/
private $postCode;
/**
* @var InstructionToSell
* @ORM\OneToOne(targetEntity="App\Entity\InstructionToSell")
* @ORM\JoinColumn(nullable=true)
*/
private $instructionToSell;
}
class Instru... | |
doc_23516679 | I thought about this code:
list = []
for i in range(0, 256):
icounter = 0
for x in range(len(Arr)):
if Arr[x] == i:
icounter += 1
list.append(icounter)
But is there any way I can do this a little bit faster (it takes me several minutes at the moment)? I thoug... | |
doc_23516680 | The correnponding jars used are jsf-api-1.2_04-p02.jar & myfaces-impl-1.2.9.jar.
<h:selectManyCheckbox value="#{restrictionMaintBean.selectedRestrictionTypeList}" layout="pageDirection" tabindex="5" onchange="setChangeFlag(true);">
<f:selectItems value="#{restrictionMaintBean.restric... | |
doc_23516681 | import pandas as pd
data = {'A': [['ABCD'], ['PQRS'], ['LMNOP']], 'B':[['YUIO', 'DFGH'], ['QWERT', 'CVDF', 'WERT'], ['BCLF', 'DASE', 'OPIU', 'RTYU']]}
df = pd.DataFrame(data)
df['A'] = df['A'].astype('str') #Intentionally added to mimic the actual problem.
df['B'] = df['B'].astype('str') #Intentionally added to mimi... | |
doc_23516682 | As far as I can see it has installed correctly.
After restarting eclipse I get the following error in MobileFirst
Console: Liberty directory is expected here:
C:\eclipse\plugins\com.worklight.worklight-artifacts_7.0.0.00-20150312-0731.jar\liberty\wlp
I see the jar exists and I unpacked the jar and liberty\wlp path... | |
doc_23516683 | I want the output like
Array (
[1st Apr 2014][0] => Array ([daylink] => 1st Apr 2014 [text] => Report of 1st Apr 2014 - View [link] => link1.html)
[2nd Apr 2014][0] => Array ([daylink] => 2nd Apr 2014 [text] => Report of 2nd Apr 2014 - View [link] => link2.html)
[3rd Apr 2014][0] => Array ([daylink] => 3rd... | |
doc_23516684 | The problem seems to be triggered in the following code
HRESULT MCMyOutputPin::EnumMediaTypes(IEnumMediaTypes** types)
{
MyMediaHandler* myhandler;
CoInitialize(NULL);
HRESULT hr = CoCreateInstance(CLSID_MyMediaHandler, NULL, CLSCTX_INPROC_SERVER, IID_IEnumMediaTypes, (void **) & myhandler);
ASSERT(type... | |
doc_23516685 |
I'd like to call this from an Azure Data Factory Pipeline.
I've created a new linked service and configured as follows:
I've configures the Azure Function task within the ADF Pipeline as follows:
When I run the pipeline, I get the following error:
Works if using Web Task
If I make the call from the pipeline using a... | |
doc_23516686 | Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /... | |
doc_23516687 |
*
*To get routes for certain template name, or
*To get templates names related to given route?
(1) For example, I have the template symfony2blog\src\Blog\AdminBundle\Resources\views\layout.html.twig. I would like to know in which routes it is included?
(2) For example, i have the route blog_admin_author_show. I ... | |
doc_23516688 | https://i.stack.imgur.com/KoNNH.png
Could anyone explain me what are the differences between these options?
| |
doc_23516689 | I have found services to manage the members and roles of a Place, but no one in a document per document basis.
A: That API is not currently publicly available. The public Quickr APIs are documented here.
| |
doc_23516690 | I'm trying to read a text file and then convert the lines into floats. The text file has \n and \t in it though I don't know how to get rid of it.
I tried using line.strip() but it didn't take it off and I got an error when I wanted to convert the stuff to floats. I then tried line.strip("\n") but that didn't work eith... | |
doc_23516691 | I need to load a third-party DLL (such as D:\mydll.dll), but on some computers mydll.dll is not in the system path or in c:\windows\system32 and I get loading errors.
Here is the code:
SetCurrentDirectory ("d:\");
m_hModule = LoadLibrary ("mydll.dll");
LoadLibrary returns 126. I checked with DEPENDS.EXE to view the de... | |
doc_23516692 | Example : mailer.sendEmail(res, req.body, token).
No errors in the console. It could be something wrong with the way I am passing the parameters.
Can anyone help?
server.js
app.post('/signup-user', upload.single('avatar'), (req, res) => {
let sSignupUserImagePath = req.file.path.split("public/").pop()
Object.d... | |
doc_23516693 | Disable UITextField Predictive Text
But I have been unable to adapt that to a UITableViewCell. How do I access the textfield of the cell?
A: You can't set it on a UITableViewCell because the cell does not use a keyboard. you need to set it to the text fields subviews of the cell.
Edit post-comment
There are many ways... | |
doc_23516694 | Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute schema management to JDBC target [alter table pow2image add constraint FKfnn5r6ascraodeblk9mrkedfq foreign key (image_id) references Image (id)]
at org.hibernate.tool.schema.internal.TargetDatabaseImpl.accept(TargetDatabaseImpl.ja... | |
doc_23516695 |
Koala::Facebook::APIError (OAuthException: This authorization code has been used.)
I am able to oauth, but when I issue a call, doing the following...I get the error. i.e. the below:
@friends = graph.get_object("/me/friends")
Here was the Facebook Update:
New security restrictions for OAuth authorization codes We w... | |
doc_23516696 | At first I thought it was because I didn't include Id in my schema but I checked and it looks alright.
var viewModel = new kendo.observable({
orgDataSource: new kendo.data.DataSource({
transport: {
read: {
url: "/Organization/GetAll",
dataType: "json"
},
update: {
... | |
doc_23516697 | This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in... | |
doc_23516698 | Example:
List<MyObj> list = new ArrayList<>();
list.add(new MyObj("Ram");
list.add(new MyObj("Girish");
list.add(new MyObj("Ajith");
list.add(new MyObj("Sai");
public class MyObj {
public String name;
public MyObj(String name){
this.name=name;
}
}
Now, I would like to the get the index of an Objec... | |
doc_23516699 |
I tried this but could not get the desired result and no any idea about color picking.
<ImageView
android:id="@+id/action_image"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:layout_width="720dp"
android:layout_height="1280dp" />
A: //try this code with picasso library ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.