id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_13800 | public class GameElement : FrameworkElement
{
private VisualCollection Visuals { get; }
public GameElement()
{
this.KeyDown += this.OnKeyDown;
this.MouseDown += this.OnMouseDown;
}
private void OnKeyDown(object sender, KeyEventArgs keyEventArgs)
{
... // Does not get fi... | |
doc_13801 | @if (Model.emailhasbeensent != true)
{
<div id="MailFoot">
<input id="input1" class="form-control" type="email" />
<button type="submit" class="btn btn-default" id="emailSignup">Signup</button></div>
}
else {
<div id="ty" style="display:none">
<p>Thank you for subscribing </p>
</div>
}
When my email for... | |
doc_13802 | struct ContentView: View {
var test: Int
var body: some View {
List {
ForEach(1...5, id: \.self) {
Text("\($0)…")
test = $0 // how to realise this?
}
}
}
}
I can not bring this to live, I'm getting an error like:
Unable to infer co... | |
doc_13803 | library(ggplot2)
library(dplyr)
#Data frame
df.raw <- read.csv(url('https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv'))
str(df)
df <- df.raw
df$Date <- as.Date(df$Date)
str(df)
df.israel <- df %>% filter(Country == 'Israel', Confirmed>10)
df.uk <- df %>% filter(Country == 'Unit... | |
doc_13804 | Here is part of my manifest:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name=... | |
doc_13805 | i'm using the webfont "open sans" from google webfonts and tested the grapheme on googles review option. everything's fine, the š is thin and beautiful like the rest of the font. (sorry i cant post images yet)
but at my site the š is always bold! i reseted all stylesheets to make sure nothing is overwriting the font-we... | |
doc_13806 | select * from pg_stat_activity;
but after restarting my jboss and database it again works fine.And it happens in busy transaction time.
I think that my memory is not released from database after a query.
A: After a long research i have solve my problem by implementing pgbounce with its proper configuration ... and ... | |
doc_13807 | Sarah, 0.5 0.2 2.0
Where (0.5, 0.2, 2.0) is a vector that describes Sarah. The vector is shortened here. In the actual textfile the vector spans multiple lines.
I have tried :
data = np.genfromtxt(filename, dtype =[("label","U10"),("description","f4",(3,))], delimiter = ",")
However I end up with the following error co... | |
doc_13808 | I am currently working on this flutter app example as shown above.But when i tap on Calculate to navigate to next screen i get a black screen as shown below
enter image description here
Here is the GitHub Repo link: https://github.com/batman007db/bmiCalculatorApp
need Help!
A: Often times in navigation it's common to ... | |
doc_13809 | I have a textfile and parse it using awk. The output should be in json format. It should look like this:
{
"Record X" : { "Key1":"Value1", "Key2":"Value2"},
"Record Y" : { "Key1":"Value1", "Key2":"Value2"},
"Record Z" : { "Key1":"Value1", "Key2":"Value2"},
"Record A" : { "Key1":"Value1", "Key2":"Value2"}
}
Now, this i... | |
doc_13810 | I've been trying to remove these since I have to implement our own transaction logic in this module.
The problem is, if I access the session directly instead of using HibernateTemplate, Hibernate acts as if all entities have the @Immutable annotation: I can create new database entries and delete these or old ones, but ... | |
doc_13811 | if I do:
$cookie_file= __DIR__.'/cookie.txt';
@unlink($cookie_file);
CURLOPT_COOKIEFILE => $cookie_file,
CURLOPT_COOKIEJAR => $cookie_file
I will only use the received cookies and if I don't unlink the file I'll only use the template without the received cookies.
How can I append what I receive in Coo... | |
doc_13812 |
DEPT EMP SALARY
---- ----- ------
10 MARY 100000
10 JOHN 200000
10 SCOTT 300000
20 BOB 100000
20 BETTY 200000
30 ALAN 100000
30 TOM 200000
30 JEFF 300000
I want the department and employee with minimum salary.
Results should look like:
DEPT EMP SALARY
---- ----- ------
10 MARY 100000
... | |
doc_13813 | DROP TYPE IF EXISTS RecipeCategory;
CREATE TYPE RecipeCategory AS ENUM (
'Vegetarian',
'Breakfast',
'Dinner',
'Snacks',
'Sides',
'Desserts',
'Soups'
);
CREATE TABLE IF NOT EXISTS recipe_table (
recipe_id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
recipe_name TEXT not NULL... | |
doc_13814 | The problem is when I opened more than 20 files with the Form Editor in my application, I get an exception "SWT: No more handles". I could understand that there is no more control handles for the controls to be created to the Form Editor. I could check the control handles availability and proceed to open the file, if e... | |
doc_13815 | to solve this , I am planning to read the data from rundate (day when i am executing the script) to the day where the data available for every 100 days to avoid this issue. can you please let me know how to achieve this using bash and please do let me know if is there any other approach other than setting up the memory... | |
doc_13816 | Algorithm 1:
function shuffle(a) {
var j, x, i;
for (i = a.length - 1; i > 0; i--) {
j = Math.floor(Math.random() * (i + 1));
x = a[i];
a[i] = a[j];
a[j] = x;
}
return a;
}
Algorithm 2:
function shuffle(a) {
return a.sort(() => 0.5 - Math.random());
}
Please expla... | |
doc_13817 | const text = $("td[class='forceWordWrap']");
const date = text.eq(0).text();
const title = text.eq(1).text();
const description = text.eq(2).text();
<p/>
<form name="his" method="post" action="/a/b.axp">
<input type="hidden" name="action" value="accept"/>
<table width="100%" bord... | |
doc_13818 | I would use a vector and current nodes specified by indexes, but sometimes a node is removed from the list, this silently invalidates the index, what is not acceptable.
So, I want to represent it as a reference counted digraph: the list is a path in the digraph (with only a single parent per node). When I add a new cur... | |
doc_13819 | ie, i want an events listing, and i want to organise the events in groups, using the Month for each group, how would i achieve this?
below is my XML structure, its pretty basic
<EventsUpcoming>
<Event id="1">
<month>July</month>
<title>Ian Moss</title>
<date>Saturday, July 1st</date>
<ticket>$35 On the door</ticket>
<... | |
doc_13820 | Does somebody know how can I insert a javascript function on a combobox?
My combobox takes info from my database (only three rows), I have this:
<%=select("post", "user_id", @usertype.collect {|p| [p.type_user]},{:include_blank => 'None'}) %>
I want the equivalent to:
select id="post_user_id" name="post[user_id]" onCh... | |
doc_13821 | Therefore, I want to find the method to run the io traces generated by DiskSim in real devices. All the kinds of format are accepted including ascii, validate, blktrace, etc. Please help me.
The example of DiskSim trace in ascii format:
ARRIVE_TIME DEVICE_NUM BLK_NUM BLK_COUNT R/W
0.46 0 50631816 8 1
0.53 0 50631824 8... | |
doc_13822 | How can I get to use vue 3?
A: If you want to use Vue3, you'll need to follow CLI's instructions for Nuxt3 located here: https://nuxt.com/docs/getting-started/introduction
If you want to use some Vue-specific packages, here you are: https://v3.nuxtjs.org/guide/directory-structure/plugins/#vue-plugins
| |
doc_13823 | SELECT myColumn1, myColumn2
FROM MyTable
WHERE to_char(myColumn_DATE, 'YYYY/MM') = '2018/12'
This is quite simple and I can now use these rows to create some further logic. However what if I need to repeat this for every month in a given year, or even every week?
I'm exporting the query results into separate excel t... | |
doc_13824 | df1=data.frame(names=c('a','b','c'),value=1:3)
df2=data.frame(names=c('c','a','b'),value=1:3)
so that
> df1
names value
1 a 1
2 b 2
3 c 3
> df2
names value
1 c 1
2 a 2
3 b 3
Now, I would like to sort the df1 to the same order as the names column in df2, to obtain
na... | |
doc_13825 | I followed this tutorial: http://mobileorchard.com/tutorial-iphone-sqlite-encryption-with-sqlcipher/
Would be glad to know if and how I'm able to open my db after adding the key to it. As I receive following error atm:
"file is encrypted or is not a
database"
Thanks in advance!
Grtz,
Lewion
A: To create a new encr... | |
doc_13826 | I am getting the below error:
Chrome 69.0.3497 (Windows 10 0.0.0) ERROR
{
"message": "An error was thrown in afterAll\nUncaught Error: [$injector:nomod] Module 'UTAppV2' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the depend... | |
doc_13827 | Does anybody know a solution?
#main {
height: 100px;
border: 1px solid #c3c3c3;
display: -webkit-flex; /* Safari */
display: flex;
}
#main div:nth-of-type(1) {-webkit-flex-grow: 1;}
#main div:nth-of-type(2) {-webkit-flex-grow: 3;}
#main div:nth-of-type(1) {flex-grow: 1;}
#main div:nth-of-type... | |
doc_13828 |
*
*computed with Panda a number of events to calculate from a csv file. I tested these functions separately and they work
*created a table on my HTML homepage with the different categories for which I would like to display the number of events from my csv file
*used the html_page.replace function to replace the num... | |
doc_13829 |
The prop is used to pass in an initial value; the child component wants to use it as a local data property afterwards. In this case, it’s best to define a local data property that uses the prop as its initial value.
You can see example code here: https://codesandbox.io/s/vue-template-gmh5n. You can see it running her... | |
doc_13830 | Please explain me what is the meaning of iso and :start (in below code snippet) in apache camel context xml file?
There is bean with id iso defined in camel-context.xml. But, if camel route to endpoint is referring to iso bean then what is the meaning of :start?
<to uri="iso:start" />
A: According to the book "Camel... | |
doc_13831 |
*
*I am certain the named parameter exist and is not tampered.
*This works on most of our environment.
*Query.setParameter() does not throw the exception, but rather from some sort of interceptor from spring.
Does anybody have an idea?
SQL assembly with the parameter :
sql.append(" AND table2.entry_date >= :st... | |
doc_13832 | Like if some error occurs in Transformer Stage, then is it possible to capture the error and the field which had the error into a file? As of now, I am able to capture the entire error record into a file but not the error message or just the error field.
Thanks!!!
A: Basically, no. Certainly there is no generic solut... | |
doc_13833 | Public Sub ReadMdb()
Dim cn As Object, rs As Object
Dim intColIndex As Integer
Dim DBFullName As String
Dim TargetRange As Range
DBFullName = Application.GetOpenFilename()
On Error GoTo Oops
Application.ScreenUpdating = False
Set TargetRange = Sheets("Sheet1").Range("A1")
Set cn = CreateObject("... | |
doc_13834 | # if data is valid, check against values held in the database
if ($valid) {
$sql = 'SELECT COUNT(*) FROM authors
WHERE email = :email AND password = :password';
$s = $dbConnection->prepare($sql);
$s->bindValue(':email', $email);
$s->bindValue(':password', $password);
$s->execute();
... | |
doc_13835 | $(document).ready(function(){
$("#flip").click(function(){
$("#panel").slideToggle("slow");
$("#wrapper").css("height","900px");
$("#wrapper").css("background-size","… 700px");
});
How I reset div (wrapper) to origin style:
$("#wrapper").css("height","600px");
$("#wrapper").css("background-size","4… 500px");
Can help... | |
doc_13836 | Here is minimal grammar:
%require "3.0"
%defines
%define api.pure full
%define parse.trace
%left TYPE_UNIT
%%
example
: statement
;
statement
: type identifier '=' expression ';'
| identifier '=' expression ';'
| expression ';'
;
expression
: expression '.' identifier
| ide... | |
doc_13837 | I don't want to deploy web.config through it.
So how can i skip the config file deployment through ms-deploy.
I am using below Command for deployment.
msdeploy.exe -verb:sync -source:package=C:\udeploy\agent\var\work\JenKins\MwApplicationData\MarketWorkFlowWebApp.zip -dest:auto=localhost -setParam:name=%1,value=%2 -ena... | |
doc_13838 | Possible Duplicate:
How can you change Network settings (IP Address, DNS, WINS, Host Name) with code in C#
Developing a program(C#/ winForm) that can change the ip and dns setting with a limited user account.
Inititally, My Program is developed based on the following Code Project example: SwitchNetConfig - Laptop use... | |
doc_13839 | sqoop export --columns floor
| |
doc_13840 | I have configured correctly the airflow.cfg file providing the string connection with Vertica and the schema name.
This is the error I keep getting when I try to run airflow initdb
Traceback (most recent call last):
File "/srv/python/virtualenvs/airflow/bin/airflow", line 32, in <module>
args.func(args)
File "/... | |
doc_13841 | My main method pretty much cins an int to a var and calls the factor method with the int as the argument.
Here's the code:
void factor(int num)
{
for(int x = 0; x < ((num + 2) / 2); x++)
{
if((num % x) == 0)
{
cout << x << " ";
}
}
}
The program always crashes inside fac... | |
doc_13842 | parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">@color/pink</item>
<item name="android:icon">@drawable/header</item>
<item name="android:displayOptions">showHome|useLogo</item>
<item name="android:titleTextStyle">@style/ActionBar.TitleTextStyle</ite... | |
doc_13843 | I now have website with this files:
/admin/
/images/
/js/
about.php
index.php
news.php
questions.php
So my URLs now are:
www.mydomain.com/about.php
www.mydomain.com/news.php
...
I would like to have www.mydomain.com/about/, www.mydomain.com/news/,...
I have tried many things which I found but none of them works like i... | |
doc_13844 | // https://businessbloomer.com/woocommerce-add-text-add-cart-single-product-page/
add_action( 'woocommerce_single_product_summary', 'custom_data_above_add_to_cart_button', 6 );
function custom_data_above_add_to_cart_button( $product ) {
// https://wordpress.stackexchange.com/a/165757/135006
if ( get_post_meta... | |
doc_13845 | For this I would like to access the HTTP_USER_AGENT. How can I do that?
I have read a few things on the net, but didn't come to a working solution at this point.
One of the thing I went through is this https://www.npmjs.com/package/useragent.
But as soon as I start, adding this to my code:
var useragent = require('user... | |
doc_13846 |
FWLSE3051E: Invalid payload. See additional messages for details.
FWLSE2302E: Can't read the content: failed to extract data from the zip format. Malformed ziped content.
Steps to reproduce:
*
*Navigate to your-mfpserver:9080/mfpconsole/index.html#/downloads#samples and click on the "Hello World" link under "Jav... | |
doc_13847 | I call the parse util method to migrate an anon user:
[PFFacebookUtils linkUserInBackground:[PFUser currentUser]
withReadPermissions:permissionsArray
block:^(BOOL succeeded, NSError *error){
The Facebook login process is started with via SFSafariViewController - creden... | |
doc_13848 | $.ajax('http://mydb.php', {
dataType: "json",
jsonp: "jsoncallback",
method: 'get',
contentType: 'application/json',
success: function (data, status) {
var _ul = $('<ul />').attr('data-role', 'listview');
$.each(data, function (i, item) {
$('<li />').append($('<... | |
doc_13849 | Basically if there is a value present for FirstName and LastName, it should output FirstName+LastName. If either or both values for FirstName or LastName are empty, it should not output the FullName. Note this is an existing document and I am unable to modify any existing code above line #34.
Here is what I have so fa... | |
doc_13850 | I/Ads ( 564): adRequestUrlHtml: <html><head><script src="http://media.admob.com/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":1,"u_sd":1,"slotname":"**********","u_w":320,"msid":"com.hani.android.admobtest","simulator":1,"cap":"m,a","js":"afma-sdk-a-v4.3.1","isu":"B3EEABB8EE11C2BE770B684D95219ECB","ci... | |
doc_13851 | Code is below
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(20,20))
map = Basemap(llcrnrlon=-124.48,llcrnrlat=32.53,urcrnrlon=-114.13,urcrnrlat=42.01,
resolution='c', projection='lcc', lat_0 = 36.778259, lon_0 = -119.417)
#westlimit=-124.48; sout... | |
doc_13852 | Alternatively can anyone suggest a method to style dynamic textfields instead of using html?
A: I was able to have bring the same effect without using the anchor tag. Apparently there's a bug in using Anchor tag with images. Anyway here's what I did to overcome this.
import flash.display.*;
import flash.text.*;
import... | |
doc_13853 | This is how I am trying to check the data. If the data correctly I want the mentioned console in success code. But if it is not then I want else code to run. But the if-else conditions are not working properly. I am including PHP code and ajax code which I have tried. Am I doing it right?
<?php
$host = "dpydaldermt... | |
doc_13854 |
findByHouseByStreetByPlain
How can I match to values after each "By". I have managed to find the first "By" value, but I can't get it going that it gives me all the matches for the value after "By".
A: Thsi regex should work for you:
<?php
$ptn = "#(?:By([A-Za-z]+?))(?=By|$)#";
$str = "findByByteByHouseNumber";
pr... | |
doc_13855 | <CheckBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,5,0,10" Style="{StaticResource MyCheckBoxStyle}"
IsChecked="{Binding UseOriginalPath, UpdateSourceTrigger=PropertyChanged}" FocusVisualStyle="{x:Null}" >
<TextBlock TextWrapping="Wrap" Text="Use the original path"/>
</CheckBox>
My custo... | |
doc_13856 | <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
pre { display:none }
#main h2 { text-align: center }
#right { cursor: pointer }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script... | |
doc_13857 |
I follow some tutorials to do the following:
input[type=date]:not( :focus )::-webkit-datetime-edit-ampm-field,
input[type=date]:not( :focus )::-webkit-datetime-edit-day-field,
input[type=date]:not( :focus )::-webkit-datetime-edit-hour-field,
input[type=date]:not( :focus )::-webkit-datetime-edit-millisecond-field,
inpu... | |
doc_13858 | static func setTextViewRichText(textView: UITextView, html: String, title: String) {
do {
let titleText = NSAttributedString(string: title + "\n", attributes: [NSFontAttributeName: UIFont(name: "Helvetica", size: 20)!])
let contentText = try NSAttributedString(data: html.dataUsingEncoding(NSUTF8Str... | |
doc_13859 | If I wrap all my callback functions in try-catch-blocks (so that no exceptions need to be propagated "through" the llvm code), can I then safely remove the "-fno-exceptions" (for GCC) from my linker flags? (this flag is normally required when linking with llvm, as it turns up when doing llvm-config --cxxflags).
If not,... | |
doc_13860 | In my application user can trim the video, I have a custom control for selecting the start time and end time. I need to trim the video by these two values. I tried with UIVideoEditorController like follows.
UIVideoEditorController* videoEditor = [[[UIVideoEditorController alloc] init] autorelease];
videoEditor.... | |
doc_13861 | $n=15;
while($n>0)
{
print "$n,";
$n--;
sleep(1);
}
It worked as usual without any extra code..., There was no output when i locked the session, as i locked the session before the next second.
The output seen when I unlocked the session:
C:\Pradeep>perl test.pl
15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,
C:\Pradeep>
W... | |
doc_13862 | jQuery(document).ready(function($){
var selectEvent = function($el){
$(".selectmenu").change(function() {
var selectedValue = $("select.selectmenu").val();
alert('Selected event' + selectEvent);
});
};
$(".selectmenu").scrollectBox({
... | |
doc_13863 |
A: RichFaces is shipped with jQuery. Using that built-in jQuery is perfectly correct.
You can load that build-in jQuery library by adding the following to your page:
<a4j:loadScript src="resource:///org/richfaces/renderkit/html/scripts/jquery/jquery.js"/>
A: If you already have a jQuery application, and want to use ... | |
doc_13864 | WaitForMultipleObjects(2,pEvents,false,1000);
in s separate thread and post stuff to a State Machine whenever I get events worth posting. I am porting this behavior into QP where, as I understand it, each active object is its own thread. Can I therefore just do this in an infinite loop (with some terminate break condi... | |
doc_13865 | public ActionResult TreeView()
{
var db = new PCNMSContext();
return View(db.AssetRegisters.Where(x => !x.ParentAssetID.HasValue).ToList());
}
public ActionResult AssetRegisterIndex(string SearchString)
{
var assetregisters = from m in db.AssetRegisters
... | |
doc_13866 | As suggested in many posts, I am using os.stat(filename) to get such information.
However, the result I get is different from the one I expect.
Here an example:
import os, time
f = 'untitled.ipynb' # Created 30 March 2016 at 15:45
fileStats = os.stat(f)
time.ctime(fileStats.st_ctime)
The result is :
'Mon May 2 16:04:... | |
doc_13867 | I created 2 classes BankingAccount(abstract, project req) and SavingAccount that calculates all interest and all good banking stuff.
The I make a menu in CLI using inputs(select 1,2 or 3) the CLI is working PERFECT, but then when I try to do the "same thing" for the GUI the results are duplicated.
For example if I wri... | |
doc_13868 | This is my html code:
<div ng-controller="ImgCtrl">
<input type="hidden" ng-model="uid" value="<?=$_SESSION["uid"];?>" >
<input type="file" ng-file-select="onFileSelect($files)" >
<br/>
<span>{{ message }}</span>
</div>
I have also tried it as this:
<input type="hidden" ng-model="ui... | |
doc_13869 | [
{
"id": "65664546",
"name": "Employee 1",
"contacts":
{
"id": "56546564",
"firstName": "James",
"lastName": "Carter",
"email": "carter101@google.com"
}
},
{
"id": "65664547",
"name": "Employee 2",
"contacts":
{... | |
doc_13870 | protoc The term protoc is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ protoc \object_detection/protos/*.proto --python_out=.
+ ~~~~~~
+ CategoryInfo ... | |
doc_13871 | First I loop through Customer to display all of them. Inside this loop I have a loop that goes through OrderCustom and inside that I check if there is a CustomerOrderCustom with the right Customer_id and OrderCustom_id.
Not only am I using a lot of queries but the view shows OrderCustom items that now Customer are usi... | |
doc_13872 | http://mysolrcloud:8983/solr/admin/collections?wt=json&action=CLUSTERSTATUS
But I got the 400 Bad Request and when I looked at the log file, I found the following error:
Unknown action: CLUSTERSTATUS
Is my request path wrong or do I need to register some handler in solr.xml or something?
A: This operation was relea... | |
doc_13873 | { [Error: ../../node_modules/@bigcommerce/citadel/dist/tools/toolkit.scss doesn't exist!]
formatted: 'Error: ../../node_modules/@bigcommerce/citadel/dist/tools/toolkit.scss doesn\'t exist!\n on line 13 of stdin\n>> @import "../../node_modules/@bigcommerce/citadel/dist/tools/toolkit"; // 1\n --------^\n',
... | |
doc_13874 | {
"results": {
"result_1": {
"text": "abc"
},
"result_2": {
"text": "def"
}
}
}
I wish to decode it to a case class that looks like:
case class Results(results: List[SingleResult])
case class SingleResult(text: String)
I wish to write a decoder for this... | |
doc_13875 | ||
doc_13876 | Right now what I'm trying to do is at first have this canvas:
<canvas id="can1" data-processing-sources='empty.pde'></canvas>
which is an empty Processing project. But then I click a button which runs this javascript function:
document.getElementById('can1').data-processing-sources="circles.pde";
So that I change the... | |
doc_13877 | Current code:
EMPTY_SPACE=$(df -k . | awk 'NR==2 {print $4}')
ARCHIVE_SIZE=$(( $(tar czf - "$1" | wc -c )/1000 ))
if [ $EMPTY_SPACE -lt $ARCHIVE_SIZE ]; then
echo "Not enough disk space to save the archive"
exit 6
fi
tar czf ${1%/}".tar.gz" $1
What I would like to do is have some kind of conditional tee or the... | |
doc_13878 | This is my class ConnectioDB: (it works to connect to my database in postgresql)
class ConnectionDB:
"""Connection class."""
bd = None
cursor = None
def __init__(self, **param):
"""Connection constructor."""
try:
self.db = connect(
host = '127.0.0.1', # loca... | |
doc_13879 | But if the user is not logged in then the form just fails and reloads the home page.
In short, the form is a job application form. The form sends all the data to the function, the function creates two emails and sends them both out to the HR and the Candidate. Then redirects to a thank you page.
THE FORM PROCESSOR IN... | |
doc_13880 | This question solves a little of the issue of (un)evenly splitting the value into a list in integers but does not address the other parts of the issue: How do I split an integer up into near-equal amounts in different variables?
I have an input such as:
{'apples':2,
'banannas':12,
'cats':5,
'dogs':7}
#User chooses val... | |
doc_13881 | Login Screen -> TabBarController -> NavigationController -> CustomerMainViewController
I have been all over stack overflow and implemented the following code which seems to be the consensus:
//From my login View Controller
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let tabVC = segue.destin... | |
doc_13882 | I only found this answer but I don't think it would apply to get_serving_url().
A: No - If you want any kind of access control for images you're serving from Blobstore/Google Storage then you should write a BlobstoreDownloadHandler and use send_blob to return the image after doing whatever access control you would lik... | |
doc_13883 | <?xml version="1.0" encoding="UTF-8"?>
<database name="issue-tracker" defaultIdMethod="native">
<table name="user" phpName="User">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
<column name="username" type="varchar" size="32" required="true" />
... | |
doc_13884 | I don't think getting this data should be too difficult (I'm thinking a list of options and getting a random number generator to select a choice), but I'm confused as to how I input this information into the accounts and how I run my script.
This http://developers.facebook.com/docs/test_users/ is basically the only res... | |
doc_13885 | The parent class has the following fields (id, name) and the child class has the following columns (id, name, date, parent_id). The end resulting JSON I want to return is the following. I also always want to return the parent even if it has no children, which is why I LEFT OUTER JOIN on the child with the ON clause the... | |
doc_13886 | #RequireAdmin
#Region Directives created by AutoIt3Wrapper_GUI
#AutoIt3Wrapper_UseX64=n
#EndRegion Directives created by AutoIt3Wrapper_GUI
ListDrives("REMOVABLE")
ListDrives("FIXED")
Func ListDrives($type)
$drive = DriveGetDrive($type)
For $i = 1 To $drive[0]
MsgBox(64,"",$drive[$i])
Next
EndFu... | |
doc_13887 | [distutils]
index-servers=pypi
[pypi]
repository: https://upload.pypi.org/legacy/
username: <username>
password: <password>
| |
doc_13888 |
*
*users is full of users.
*item is full of items.
*item can have multiple second_items.
*users are able to have second_items via table users_items.
When I delete a item all second_item and users_items should be removed too. So I setup some constraints that should delete child table records. But it leaves the r... | |
doc_13889 | I believe the problem is that the css modules are not recognizing variables I've defined globally in plain css files. Here's an example of the set up I came up with:
index.css file imported at the top level index.js in my react project:
@import '../Global/ColorScheme.css';
body {
// body styles
}
a {
// global a... | |
doc_13890 | According to literature, it is only necessary to include mongo's uris in the configuration (mydb and coll exist at mongodb://127.0.0.1:27017):
from pyspark.sql import SparkSession
spark = SparkSession.builder.master("local[*]").appName("myApp") \
.config("spark.mongodb.input.uri", "mongodb://127.0.0.1/mydb.coll") \... | |
doc_13891 | Uri gmmIntentUri = Uri.parse("geo:37.7749,-122.4194?q=restaurants");
I want to save the result in an Array, and display them as markers on the map. I do not want to open Google Maps for this, I want to do this in my app.I have the following URI Please help me for This
A: If you want to save the result in an array. Yo... | |
doc_13892 | I'm trying the following code:
<select name="Select" class="textfields" id="prods">
<option id="0">--Producto--</option>
<?php
require("conectdb.php");
$allproducts = mysql_query("SELECT * FROM Productos");
while ($viewallproducts = mysql_fetch_array($allproducts)){
?>
<option id="<?php echo $viewallproducts["... | |
doc_13893 |
Conversion failed when converting date and/or time from character string."
Here is my code.
SELECT
t.Client_id, t.Name
FROM
(SELECT
Client_id,
C_name + ' ' + C_surname AS Name,
CONVERT(INT, SUBSTRING(Client_id, 3, 2)) AS M,
CONVERT(INT, SUBSTRING(Client_id, 5, 2)) AS D,
... | |
doc_13894 | NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:@"Hello", @"Again", @"World", @"I", @"Test", @"All-Day", nil];
How would I be able to get it down to:
(Hello, World, Test)
A: Any solution involving removeObjectAtIndex: is O(N^2), which you might not want since you said you “have a large array”.
@inte... | |
doc_13895 | This question covers all the methods I found so far but
*
*"keyword" data type is not an option because im interested in individual terms (so tokenisation is necessary)
*"significant term aggregation" is not an option because im interested in the most frequent, not the most significant terms
*"termvector" is not an... | |
doc_13896 | Is there any way to use the phone textmode to determine a mask for phone input without using JavaScript? I am interested in 2 alternative mask:
(123) 123-1234-123
(123) 12-1234-123
A: Don't use the textmode property in TextBox. You can use the Regular Expression Validator as below:
<asp:TextBox ID="phonebox" runat="s... | |
doc_13897 | I have a MainViewModel and a MainView which contains a Datagrid. The MainView contains also a ContentControl which display a ChildView (with DataContext as ChildViewModel).
I use DataTemplate to associate Views and ViewModels.
The DataGrid of the MainView is Binded to an ObservableCollection of the ChildViewModel.
I wa... | |
doc_13898 | Private Sub OpenPort()
MSComm1.Settings = "19200,8,N,1"
MSComm1.CommPort = 4
MSComm1.PortOpen = True
End Sub
A: The error means MSComm1 does not have a Settings property.
What type is MSComm1? Is it a control? Try viewing MSComm1 in the watch window after the error happens. Does it have a Settings?
... | |
doc_13899 | For some strange reason doing something like:
public static void UploadFile(CSImageDTO file)
{
var connection = new Connection(UserCredentials);
var containerItemList = connection.GetContainerItemList(ContainerName);
if (!containerItemList.Contains(file.Filename))
connection... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.