id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_1400 | import sklearn hex_train='0x504F1728378126389BACDDDDDFF12873788912893788265722F75706C6F61642F7068702F75706C6F61642E7068703F547970653D4D6564696120485454502FAABBD10D0A436F6E74656E742D547970653A206D756C7469706172742F666F726D2D646174613B20436861727365743D5554462D383B20626F756E646172793D5430504861636B5465616D5F5745424675636... | |
doc_1401 | The only error I am given is A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 in tid 9408 (GLThread 27055), pid 9296 (fluidSimulation)
I started to do some digging in the gl_code.cpp file where I pass values to exposed C++ methods and I believe I have identified the issue, but I am stuck on a fix... | |
doc_1402 | $_POST['image'] is a URL of an image. $new_name is supposed to be added while running the switch.
$image = $_POST['image'];
$ch = curl_init($image);
curl_setopt($ch, CURLOPT_HEADER, 0);
$imagedata = curl_exec($ch);
list($width, $height, $type) = getimagesize($filename);
switch ($type) {
case 1: ....... //Give the... | |
doc_1403 | Let's say I have an Event, with Registrants, and they can pay for the event using one or more payments.
I'm trying to create a payment linked to a registrant (who is linked to an event).
So my payment should have both registrant_id and event_id.
My URL looks something like this: (nested routes)
http://mysite.com/events... | |
doc_1404 | My purpose is to index uploaded images data. Some information comes from a db, for example the owner of the image or the path where the file is stored. Other information, mostly metadata, are extracted from the image file. My idea is to set a dataInputHandler that extracts data from db, and a Transformer that extracts ... | |
doc_1405 | In file included from threads.cpp:1:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:215:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:401:32: error: use of ... | |
doc_1406 | I thought that SoX or similar can do the trick for me, but SoX only works with files and other similar libraries that supports adding sound effects seems to add the effects only when the sound is played. So my problem with this is that I want to apply the effect to the samples into my buffer without playing them.
I hav... | |
doc_1407 | I tried the following in getValueAt(.) but no luck:
if(value instanceof Date)
{
//System.out.println("isDate");
DateFormat formatter = DateFormat.getDateInstance();
SimpleDateFormat f = new SimpleDateFormat("MM/dd/yy");
value = f.format(value);
... | |
doc_1408 | def foo(): # asasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasas
pass
even though the line is clearly longer than the PEP8 limit. Is there a setting that I'm missing or does Anaconda not cover this with it's autoformatter? Are there any other PEP8 formatting packages / comment wra... | |
doc_1409 | Ideally I would like to have one file main.py with my main code and one file common.py with all my global variables (declared/initialized[1]) and with a from common import * I would be able to use every variable declared in common.py.
I apologize if it's a duplicate. I did search around but I can't seem to find somethi... | |
doc_1410 | It works when UITextView is not responding by using UIKeyCommands
override var keyCommands: [UIKeyCommand]? {
return [
UIKeyCommand(input: "\r", modifierFlags: [], action: #selector(taskOne)),
UIKeyCommand(input: "\r", modifierFlags: .shift, action: #selector(taskTwo)),
]
}
But ... | |
doc_1411 | initially, i thought to separate prices by the $10 value, but i realized that this isnt a good method of grouping because prices can vary greatly because of outliers or unrelated items, etc.
if i have a list of prices like so: [90, 92, 95, 99, 1013, 1100]
my desire is for the application to separate values into:
{ninet... | |
doc_1412 | PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?person ?birthPlace
WHERE {
?person rdfs:label ?label.
?person rdf:type dbo:Person.
?person <http://dbpedia.org/property/birthPlace>
<http://dbpedia.org/resource/Barcelona>.
}
However, I do not know how ... | |
doc_1413 | with plain-text fields it already works but I'm having a hard time setting RichTextFormat-Text as value, since everytime I use "setRichTextValue", save and open the document, the field is empty (unchanged).
Code is as follows (stripped from multiple functions):
PDDocument pdfDoc = PDDocument.load(new File("my pdf path"... | |
doc_1414 | [ERROR] ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
The only difference between my trial and Cloudformation is that I am generating the bucket name dynamically in the template. Other than that, everything is the same. I am attaching the exact same permissions to the lambda fun... | |
doc_1415 | I'm just talking about the "common cellphone", not smart phone/android stuff.
A: I work for wireless semiconductor chip provider, and we work on variety of phone platforms from ULC (ultra low cost ) segments to Smart phones.
In our Reference phone design, the entire code (including Protocol stack, Kernel, Middleware,... | |
doc_1416 |
curl: (77) error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
How do I set this certificate verify locations?
A: Another alternative to fix this problem is to disable the certificate validation:
echo insecure >> ~/.curlrc
A: For PHP code running on XAMPP on Wind... | |
doc_1417 | int main()
{
Stack<char> a;
char * expression;
expression=new char[30];
char * temp;
temp=new char[30];
int result=0;
bool flag=true;
cout<<"Enter an Infix Expression:";
cin>>expression;
//some more code//
.....
}
Is there a way t... | |
doc_1418 | def sitemap
last_model = MyModel.active.last
if stale?(etag: last_model, last_modified: last_model.created_at.utc)
@my_models = MyModel.active
respond_to do |format|
format.xml {render layout: false}
end
end
end
Its routed in routes.rb: match '/sitemap.xml' => 'dashboard#sitemap', defaults: {f... | |
doc_1419 | library(tidyverse)
library(fs)
file_path <- fs::dir_ls("User/Low Carbon London/daily_dataset")
df <- file_path%>%
map(function(path){
read_csv(path)
})
Each file is named as block_^, where ^ is an integer number. Each file within the df has columns look like this:
id mean max
a 1 2
d 2 4
f 3 ... | |
doc_1420 | I'm currently doing this:
$data = "raw image data";
$type = "image/jpeg";
$response = $this->getResponse();
$response->setHeader('Content-Type', $type, true);
$response->setHeader('Content-Length', strlen($data), true);
$response->setHeader('Content-Transfer-Encoding', 'binary', true);
$response->setHeader('Cache-Con... | |
doc_1421 | common_project
|---folder
| |--- file1.py
| |--- file2.py
| |--- file3.py
project
|---src
|----|---main_file.py
I need to access the functions of file1.py and file2.py in main_file.py. How can I zip the files of common folder so that I can import as
from common.file1 import func1
I tried to zip the folder as... | |
doc_1422 | Remote working directory is /
New local directory is D:\PP
local:PP65205861.PDF => remote:/PP65205861.PDF
Listing directory /
-rw------- 1 200 100 12414 June 03 20:05 PP65205861.PDF
New local directory is D:\PE
local:PE65205861.PDF => remote:/PE65205861.PDF
Listing directory /
-rw------- 1 200 100... | |
doc_1423 | var markers = [
{
"title": '1. Welgemeend',
"lat": '-33.805556',
"stopover": true,
"lng": '18.869722',
"description": '1. Welgemeend'
},
{
... | |
doc_1424 | #include <iostream>
using namespace std;
int main()
{
int n;
do
{
cout << "Enter a non-negative integer: ";
cin >> n;
if (n < 0)
{
cout << "The integer you entered is negative. " << endl;
}
}
while (n < 0);
return 0;
}
The terminal require... | |
doc_1425 | Even i select "device" as the launch target when clicked the run button VS launches the app on the emulator not the phone. Surprisingly if i right click the project on solution explorer and select debug it this time launched app on the device.
Is there anybody faced with this kind of problem? I dont want to install ev... | |
doc_1426 | I've looked for examples of someone using
- (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UICollectionViewScrollPosition)scrollPosition
But I'm not sure how to use it with my UICollectionView so I can have the right cells selected when the view loads and thus be highligh... | |
doc_1427 | struct alignas(16) MyStruct {
...
};
It is meant to be used for a template parameter where the template class needs to make sure that the type it is templated on is 16 byte aligned.
A: There is alignof that you can use to make sure the type you get is aligned to the correct size. You would use it in your functio... | |
doc_1428 | private void btnActionPerformed(java.awt.event.ActionEvent evt) {
String username = txtUserName.getText();
String password = txtPassword.getText();
String email = txtEmail.getText();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String ... | |
doc_1429 | {
"coreId" : "1",
"name" : "name",
"additionalValueList" : [
{
"columnName" : "allow_duplicate",
"rowId" : "10",
"value" : "1"
},
{
"columnName" : "include_in_display",
"rowId" : "11",
"value" : "0"
},
...e.t.c
]
},
...e.... | |
doc_1430 | <textarea maxlength="700"></textarea>
https://jsfiddle.net/bpyds1gd/
update
replace the blank line to a new line: preg_replace("/(^[rn]*|[rn]+)[st]*[rn]+/", "\r" , $string)
then replace the new line to a break: echo(nl2br($string)) for html output
A: it is not 704 chars, it is 700 chars if you delete enter chars
| |
doc_1431 | struct A {
A(int typ): type{typ} {}
const int type;
};
struct B : public A {
B(int typ): A(type) {}
};
int main() {
B b{3};
return 0;
}
Can you see the bug here, how tricky it is ?
Here we build an instance of B with 3 as parameter we expect that the value of type into A is 3, right ? But we have... | |
doc_1432 | SELECT col.COLUMN_NAME AS ColumnName
, col.DATA_TYPE AS DataType
, col.CHARACTER_MAXIMUM_LENGTH AS MaxLength
, COLUMNPROPERTY(OBJECT_ID('[' + col.TABLE_SCHEMA + '].[' + col.TABLE_NAME + ']'), col.COLUMN_NAME, 'IsIdentity')AS IS_IDENTITY
, CAST(ISNULL(pk.is_primary_key, 0)AS bit)AS IsPrimaryKey
FR... | |
doc_1433 | If not, is there a convenient way to share properties between Maven and TestNG?
I want to write a nice test suite that can run on different continuous integration servers, pointing to different remote hosts (development, testing, staging, and production), without modification of the code.
I am defining credentials to a... | |
doc_1434 |
TypeError: self.parent.context.gotToManageCategoryPage is not a function
The error comes on clicking over button 'Manage Categories'.
Here is my code:
export class HomePage {
//Will be true if the user is Logged in.
public isLoggedIn = false;
//Will be true if the user is Admin.
public isAdmin ... | |
doc_1435 |
A: You can use the GitHub API to do this.
For example, you can request the amount of commits a repository has by requesting (GET) /repos/:owner/:repo/commits.
An example of a response is as follows (from the API documentation):
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875... | |
doc_1436 |
A: The first thing Macports has to do when updating is synchronising the ports.
These are in /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports.
The modification date of this directory can tell you when the ports were last synchronised.
| |
doc_1437 | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Category(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="categories")
name = models.CharField(max_length=30, unique=True, primary_key=True)
class Todo(models.Model):
... | |
doc_1438 | I want to change the mouse cursor for one component of the JPanel.
But it seems that JList doesn't dispatch mouse movement / position to the childs, and my cursor is not updated.
Here is the tree of my JList :
JList
Custom Cell Renderer
Custom Cell (JPanel)
Components
My component wi... | |
doc_1439 | ||
doc_1440 | https://developers.google.com/custom-search/
That´s how they generate search requests:
function l(w, x, y) {
var v = "feed/http://news.google.com/news?q=" + encodeURIComponent(w) + "&ie=UTF-8&ned=us&nolr=1&output=atom";
(from https://s3.feedly.com/web/28.0.980/js/10101_web02.js)
...but e.g. if I enter http:/... | |
doc_1441 | string a = "abc";
var result = a.Substring(1,0);
Console.WriteLine(result);
This code will be compiled and will write nothing to console.
What is the reason that this is allowed?
In which case can this be used?
UPDATE
I will clarify that I know what is this method and that in this case it is returning empty string. I ... | |
doc_1442 |
A: You can use form.getAll("currentMemebers[]") to get all the values
var form = new FormData(document.querySelector('#modalForm'));
console.log(form.getAll("currentMembers[]"));
<form id="modalForm">
<input type="hidden" name="currentMembers[]" value="joe">
<input type="hidden" name="currentMembers[]" value="jo... | |
doc_1443 | <head>
<script scr="External Javascript" type="text/javascript"></script>
</head>
Now the problem is I want to restrict the loading of the file for a few users.
How can I achieve it here?
A: You can probably do this in pure JavaScript
<script>
if (condition) { //whatever that might be
document.write(une... | |
doc_1444 | SELECT SUBSTRING(
(SELECT ', '+ Name AS 'data()' from Names for xml path(''))
,3, 255) as "MyList"
Is it possible to make linq to sql generate the concatenation in the database as a subquery not in the memory or with many additional queries?
| |
doc_1445 | My goal is to calculate a certain measure for each point in list_of_peaks which is based the points in data closer to it than any other peak, i.e. I want to partition data halfway between each point in list_of_peaks.
My current (very slow) algorithm is this:
def measure(d,t_m,t_p):
radius = d[(d[:,0] > t_m)* (d[:,0... | |
doc_1446 | db.py
from sqlalchemy import create_engine
from sqlalchemy.pool import NullPool
def _create_engine(app):
impac_engine = create_engine(
app['DB'],
poolclass=NullPool # this setting enables NOT to use Pooling, preventing from timeout issues.
)
return impac_engine
def get_all_pos(app):
... | |
doc_1447 | I am trying to run my Grails 3.3.2 app in a Jetty (v 9.1.4) container. I added the following to my build.gradle file.
ext['jetty.version'] = '9.1.4.v20140401'
And tried several combinations of the Spring Boot container starter.
compile "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframewo... | |
doc_1448 | Confusion Matrix (vertical: actual; across: predicted) for F1-optimal threshold:
0 1 Error Rate
0 147857 234035 0.612830 =234035/381892
1 44782 271661 0.141517 =44782/316443
Totals 192639 505696 0.399260 =278817/698335
Any expert suggestions to treat the data and reduce th... | |
doc_1449 | function MyF () {
var xmlhttp;
var txt,x,i=0;
var xx;
if (window.XMLHttpRequest){
xmlhttp=new XMLHttpRequest();
}
else{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.send();
... | |
doc_1450 | Code
Structs
//the pixel structure
typedef struct {
GLubyte r, g, b;
} pixel;
//the global structure
typedef struct {
pixel *data;
int w, h;
} glob;
glob global, original, temp;
my copy Code
void copyPic(glob *source, glob *dest){
int x,y;
dest -> w = source -> w;
dest -> h = source -> h;
... | |
doc_1451 | I'm thinking along these lines:
select imageName, image from table where blah blah blah --(returns table of over 16,000 images).
--do whatever it takes to save each image in a file with filename = imageName
Any help is much appreciated.
A: You could use the bcp Utility to do this.
A: sounds like an ETL (extract tran... | |
doc_1452 | var1 := "RP/0/RSP0/CPU0:,mnet-prd-hub"
without ,mnet-prd-hub it will remove the unwanted text but if I add something else to var1 it stops working.
I want to also remove mnet-prd-hub:
from mnet-prd-hub:/home/data/configs/current$/home/data/configs/current$
I've tried if var contains %clipboard"
I've tried clipboard ... | |
doc_1453 | Right now with each api call, I get 7 items(meaning 1 image and 4 answers for each item). But amount of questions can change anytime, so I am trying to implement a way to automate the view creation process.
Based on what I searched this is what I was able to come up with it:
QuizMainViewController.h
#import <UIKit/UIKi... | |
doc_1454 | The thing is that I want to create the menu dynamically, but I need to use a javascript object. How can I convert an array into the expected object?
Imagine that I have this array:
var arr = ["element1", "element2"];
and I want to convert it to:
{
element1: myFunction,
element2: myFunction
}
(myFunction is a fu... | |
doc_1455 |
Website
Main Source [Empty]
Unit Test [Maven]
Sketches [Empty]
I have always been able to open this and have the structure shown properly. I've cloned this repository to a different computer now and am only able to open it the first time after clone. When I try to open the project the next day, it opens with only t... | |
doc_1456 | that is, just plot the 13th column (last iteration) against the 14th column.
times1<-times[timeindex] ### this is a vector
mat_ind <- matrix(0, nrow=120,ncol=13)
mat_ind [,1] <- logBF_Apollo_1[,1] ### all logBF_Apollo_1,..., logBF_Apollo_1 are matrices
mat_ind [,2] <- logBF_Apollo_2[,1]
mat_ind [,3] <- logBF... | |
doc_1457 | I'm using a provided assembly that has an interface I need to implement
public interface ICustomInterface
{
CustomType DoSomething(string name);
}
in my code I do like this:
public class MyClass: ICustomInterface
{
public MyClass()
{
}
// now I should implement the interface like this
public Cus... | |
doc_1458 | I am pretty clear that if the derived class method is to be used, one can use the override keyword so that the base class method will be overriden by derived class. But I'm not sure about new, and sealed override.
A: public class Base
{
public virtual void SomeMethod()
{
Console.WriteLine("B");
}
}
... | |
doc_1459 | If you create a simple iframe with designMode set to on, type a couple of words, and then paste some complex content in (in this example, an email including signature directly from Outlook, or a formatted document from MS Word), then upon modifying the original content, characters typed become invisible until space is ... | |
doc_1460 | The user of this web application should be able to obtain files by downloading them, however due to limited connectivity, he/she must be able to stop the download, exit the application, and when logged again, resume previous download(s). The same thing must be possible for uploads.
I have no much experience on that but... | |
doc_1461 | That is, instead of doing
ssize_t n = read(socket_fd, buffer, count);
which obviously requires the kernel to do a memcpy from the network buffer into my supplied buffer, I would do something like
ssize_t n = fancy_read(socket_fd, &buffer, count);
and on return have buffer pointing to non memcpy()'ed data received fro... | |
doc_1462 | Dim contract As String
Private Sub projectchart()
OpenConnection()
sql = "SELECT activityname, progress FROM '" & contract & "';"
dr = cmd.ExecuteReader
Chart2.Series("Progress").Points.Clear()
While dr.Read
Chart2.Series("Progress").Points.AddXY(dr("activityname"),dr("progress"))
End While
cmd.Dis... | |
doc_1463 | ('BCT','Department Of Electronics and Computer Engineering'),
('BEL','Deparment Of Electrical Engineering'),
('BCE','Deparment Of Civil Engineering'),
('SHE','Deparment Of Science and Humanities'),
('BME','Deparment Of Mechanical Engineering'),
)
department = models.CharField (max_length =10 ,ch... | |
doc_1464 | function on_canvas_click(ev) {
x = ev.clientX - canvas1.offsetLeft-40;
y = ev.clientY - canvas1.offsetTop;
var canvas = document.getElementById("canvas1");
var context = canvas.getContext("2d");
context.fillStyle = "blue";
context.font = "bold 16px Arial";
context.fillText([chosenChord], [x], [y]);
}
What I want now i... | |
doc_1465 | dt <- data.table(K=c("A","A","A","B","B","B"),Y=c("2010","2010","2011","2011","2011","2010"),Q1=c(2,3,4,1,3,4),Q2=c(3,3,3,1,1,1))
dt
K Y Q1 Q2
1: A 2010 2 3
2: A 2010 3 3
3: A 2011 4 3
4: B 2011 1 1
5: B 2011 3 1
6: B 2010 4 1
Let's say the values of K are persons, so we have two here. Quarters of ye... | |
doc_1466 | Update: The readme for ZF 1.8 suggests that it's now possible to do in ZF 1.8 but I've been unable to track down where this is at in the documentation.
A: So after some research you have to use Zend_Search_Lucene_Interface_MultiSearcher. I don't see any mention of it in the documentation as of this writing but if you... | |
doc_1467 | manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.testnfc"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />
<uses-permissio... | |
doc_1468 | So, I need to be able to do something before an user leave a page, following a link or validating a form. How can I do that ?
I tried using window.onbeforeunload, but this trigger a alert, asking the user if he really want to leave the website. I would have to do two action before leaving a page:
*
*Recoring the coo... | |
doc_1469 | Been reading quite a few blogs and everyone takes up different things.
The list I've come up with so far as follows:
*
*Pure DI/Poor mans DI
*Explicit register (DI container)
*Convention over configuration
Also the related types of the actual injections:
*
*Constructor injection (most used)
*Property inje... | |
doc_1470 | <messages>
<message name="Advertisement" msgtype="7" msgcat="app">
<field name="AdvId" required="Y" />
<field name="AdvTransType" required="Y" />
<field name="AdvRefID" required="N" />
<component name="Instrument" required="Y" />
<field name="AdvSide" required="Y" />
<field name="Quantity" req... | |
doc_1471 | class RestructureExamples < ActiveRecord::Migration[6.1]
def up
rename_column :examples, :old_column_name, :new_column_name
Example.reset_column_information
Example.find_each do |example|
unless example.new_column_name.nil?
if example.new_column_name == 100
example.new_column_na... | |
doc_1472 | git clone <myrepo>
git branch - indicates on master branch
git status - reports working directory is clean
git checkout <release-branch>
git status - shows a file has been deleted
Doing an ls <file> fails, indicates the file really is deleted.
gitk shows the red node indicating local uncommitted changes, but no change... | |
doc_1473 | I have about 10K lines of MATLAB code with about 4 people working on it. Somewhere, someone has dumped a variable in a MATLAB script in the typical way:
foo
Unfortunately, I do not know what variable is getting output. And the output is cluttering out other more important outputs.
Any ideas?
p.s. Anyone ever try overw... | |
doc_1474 | i am making an application on Flask using the SQLAlchemy ORM
now the problem is, i may have messed up the creating of a table user;
in the models.py the code looks like,
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(50))
username = db.Column(db.String(25), uni... | |
doc_1475 |
A: When I worked with <frame> it has taking a long time ago (seven or more years).
Because you didn't post any html sourcode :-|, I created a theoretical situation:
<html>
<head>
<script type="text/javascript">
function nullRand () {
//document.getElementById("frameBid").src = "myNewInternal... | |
doc_1476 | I get the error below. I run the same command directly in unix and it works. I have searched up and down. The python environment in unix is fine.
Error
Traceback (most recent call last):
File "Mixx.py", line 44, in <module>
call(["mi_xx", "-s", "20141215","-e","20150121","-p",'TX%_XX%',"-f","test","-i","-x","-d"... | |
doc_1477 | Note that i wrote my web application in java and deployed to weblogic at linux server.
Notes:
what encoding does your text file use? windows-1256.
How are you reading it? InputStream.
How are you writing it? redirect the result of input buffer to jsp page by request.
What is the encoding of your JSP? windows-1256.
H... | |
doc_1478 |
Thank you in advance for the help.
A: First, you have to open android studio->Tools->Android->SDK Manager
See the screenshot below
And Applying at the time, it will ask the license. You have to accept and download the API 26. After it will work. :)
A: Unhandle Promise rejection comes mainly with Cordova version @8.0... | |
doc_1479 | is it possible to test a service, without having to initialize all constructor services?
Because i would like to use the service class as a mock (like this),
but initializing all services would be a lot of extra work.
| |
doc_1480 | Now I am working on its second part that is to remove the randomly added characters and digits from the obfuscated String.
My code works for removing one random character and digit from the string (when encryption_str is set to 1) but for removing two, three .. nth .. number of characters (when encryption_str is set to... | |
doc_1481 | When i try to run ffmpeg i get this error message:
but the catch is that i only get the message is i run ffmpeg from my server application or from the folder where the server application is located e:\StreamServer2\
If i run from an other folder eg. e:\StreamServer2.BAK\ there are no problem.
the same goes for when i ... | |
doc_1482 |
A:
[client]
default-character-set=charset_name
source : http://dev.mysql.com/doc/refman/5.0/en/charset-configuration.html
more on charset configuration - http://dev.mysql.com/doc/refman/5.0/en/mysql-command-options.html#option_mysql_default-character-set
| |
doc_1483 |
A: You can install the tools for tha evaluation of SQl Server and the DB for SQL Server Express and then use Profiler to log all the queries made against the Express instance.
Check this out.
| |
doc_1484 | 1 <%= semantic_form_for @vendor do |f| %>
2 <% f.inputs do %>
3 <%= f.input :name %>
4 <%= f.input :tag_list %>
5 <% end %>
6 <%= f.buttons %>
7 <% end %>
Vendor.rb is acts_as_taggable_on.
However, when I enter strings into the field for tag_list, nothing gets stored w... | |
doc_1485 | from pprint import pprint
from PalmDB.PalmDatabase import PalmDatabase
pdb = PalmDatabase()
with open('testdb.pdb','rb') as data:
pdb.fromByteArray(data.read())
pprint(dir(pdb))
pprint(pdb.attributes)
print pdb.__doc__
#print pdb.records
print pdb.records[10].toXML()
which gives me the xml representation of a... | |
doc_1486 | A
3
2
4
1
7
8
what I want to achieve is to place (sort) the numbers on the column such that each cell value will take its position according to excel row numbering. which means:
I should have something like this
1
2
3
4
7
A: If it's as simple as stated, this should work.
In column B, say:
=IF(COUNTIF(A:A,ROW())>0,... | |
doc_1487 | I would like to add an image to x1 - the JPanel with Grid Layout.
For this I would have to add the paintComponent method and use the drawImage() method. My question is how will Eclipse know which panel to add the image to? I's prefer not to create a separate class for x1, I did that before and it just didn't work out... | |
doc_1488 |
failed to open dir: Too many open files error
I modified the php conf max_input_nesting_level = 1500 ulimit -n 30000. It didn't help.
[RuntimeException]
[UnexpectedValueException] ... | |
doc_1489 | /blog/tag/foo
will return a search results for foo.
In the template, I'd like to return a listing of all the posts that are tagged with 'foo', so I've made an MT:Entries block that starts:
<mt:Entries tag="<$mt:SearchString$>">
but it returns no results. However, placing on the page outputs 'foo' just fine.
So I... | |
doc_1490 | Querying a nullable @OneToOne relationship with JPA
How can I filter the null values of the non-SQL attribute of a @OneToOne relationship on the mappedBy side. The cited question dealt with the @JoinColumn side.
A: SELECT e2
FROM Entity1 e1 RIGHT OUTER JOIN e1.entity2 e2
WHERE e1 IS NULL
| |
doc_1491 | This is a small part of the code below:
this.year = (isNaN(year) || year == null) ? calCurrent.getFullYear() : year;
A: What you are referring to is the ternary operator which is an inline conditional statement. To illustrate:
this.year = (isNaN(year) || year == null) ? calCurrent.getFullYear() : year;
is equivale... | |
doc_1492 | I have a table with date and ip. I want to pull the count of new non-repetitive distinct ips for each hour, instead of the count of distinct ip aggregated hour
My table looks like
Date Time IP
07-01-2018 08:00:00 1.1.1
07-02-2018 09:00:00 1.1.1
07-02-2018 10:00:00 ... | |
doc_1493 |
A: I have a tutorial written for this a while back. You can get it on my blog here, it's lengthy so I won't repost it here
A: The signpost solution is a lot of extra work.
There's a way to do it wither Twitter4j that only takes a few lines of code. The solution comes from Stephan, here.
I have an example app using hi... | |
doc_1494 |
Not sure what I am doing wrong.
main urls.py
urlpatterns = [
path('', include('blogging_logs.urls', namespace='blogging_logs')),
path('users/', include('users.urls', namespace='users')),
path('admin/', admin.site.urls),
]
app: blogging_logs: base.html
<p>
<a href="{% url 'blogging_logs:index' %}">Home<... | |
doc_1495 | "Leonard, A., Fraternali, F., Daraio, C."
Now, there are three people in this string, and I would like to find the best way to obtain these three people, given that the string could also be sometimes:
"Leonard A., Fraternali F., Daraio C.",
i.e., without the commas. Before I had a function as follows:
def tokenize(st... | |
doc_1496 | My application should assure (as much as possible) that those media files are not accessible, copied or manipulated.
Which strategies could I follow? Crypt files in file system and decrypt in memory before showing or playing them? Keep them into SQL Lite as CLOBs? Is this SQL Lite accessible from other apps or is it hi... | |
doc_1497 | final resp = await http.get(Uri.parse(url));
File file = File(targetPath);
await file.create(recursive: true);
await file.writeAsBytes(resp.bodyBytes);
Because the videos that will be downloaded have a duration of 90 min they are large which makes this solution inappropriate.
My goal is to have a stream of... | |
doc_1498 | arr1=np.zeros([5,8])
arr2=np.ones([4,10])
I would like to put arr2 into arr1 either by cutting off excess lengths in some dimensions, or filling missing length with zeros.
I have tried:
arr1[exec(str(",:"*len([arr1.shape]))[1:])]=arr2[exec(str(",:"*len([arr2.shape]))[1:])]
which is basically the same as
arr1[:,:]=arr... | |
doc_1499 | java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first
Here is the code for creating list list of fragments to pass to the pageAdapter.
private Vector<Fragment> getFragments() {
Vector<Fragment> list = new Vector<Fragment>();
list.add(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.