id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23526700 | What can I do to fix it?
CREATE DATABASE `moodle`
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER ‘moodle-owner’@’localhost’;
CREATE USER ‘moodle-owner’@’127.0.0.1’;
CREATE USER ‘moodle-owner’@’::1′;
SET PASSWORD FOR ‘moodle-owner’@’localhost’ = PASSWORD(‘moodle123$%’);
SET PASSWORD FOR ‘moodle-owne... | |
doc_23526701 | getContext().getResources().getIdentifier(resName, "string", getContext().getPackageName());
where Context would be MyApplication in the App and TestMyApplication in Robolectric tests.
With Robolectric 3.0 this no longer works when an applicationIdSuffix is added to the build file, the call returns 0.
Is this a known ... | |
doc_23526702 |
I have an HTML input element where the user types in a search query. Now, if the user starts by entering a diacritic mark, I'd like to be able to display that to the user, and if a diacritic it written without a preceding base character in front of it it will be placed a bit off to the left – and I'd thought I'd just ... | |
doc_23526703 | Part of my UI also enables cells to be repositioned horizontally. I would like these cells to not be re-positioned each time the table's data is refreshed, but unfortunately, [tableview reloadData] does just that.
What is the ideal way to update the data in a tableview without repositioning it's rows? Should I override... | |
doc_23526704 | in{1} = [10, 20, 30, 40, 50, 60, 70, 80, 90];
in{2} = inf;
in{3} = "last";
in{4} = "first";
out = cell(4, 1);
[out{1:3}] = find(in{1 : 3}); % line which I do not understand
So at the end of this section, we have in looking like:
in =
{
[1,1] =
10 20 30 40 50 60 70 80 90
[1,2] = Inf
[1,3] = last
[1,4] = fi... | |
doc_23526705 | The date is a DatePicker.
What I have done is added a binding to a "submit" button to make sure that the users have inputted all the information before the button becomes available, however, I don't know how to bind to the LocalDate.
I tried this method which works (except for the date.getValue() at the end):
public B... | |
doc_23526706 | <div class="image" id="image">
<img src="blah.jpg">
<div class="btn-edit">Edit</div>
</div>
I've also tried it with preventDefault() and stopPropagation() but the bug is still there. The console.log statement only prints once so subsequent click events are not registered.
$('.btn-edit').click(function(e){
... | |
doc_23526707 | Possible Duplicate:
What's the correct encoding of HTTP get request strings?
One of my clients sent me they require HTTP requests to be encoded in ISO-8859-2,
so I wonder about what charset is used for HTTP communication, and if this request is somehow technicaly right.
A: Pure ASCII is all that's allowed in HTTP he... | |
doc_23526708 |
// Block I
if(condition1)
{
// Do something
}
else
{ if(condition2)
{
// Do something
}
else
{ if(condition3)
{
// Do something
}
else
{ if(condition4)
{
... | |
doc_23526709 |
Input Size | Encrypted Size
. | .
. | .
6 bytes | 8 bytes
7 bytes | 8 bytes
8 bytes | 16 bytes
9 bytes | 16 bytes
. | .
. | .
Is it normal? Is it the way it is supposed to work. Here is how I am trying to use triple DES:
class TripleDESEncryption
{
... | |
doc_23526710 | Is the reference here to the actual condition variable declared as pthread_cond_t
OR
A normal shared variable count whose values decide the signaling and wait.
?
A:
is the reference here to the actual condition variable declared as pthread_cond_t or a normal shared variable count whose values decide the signaling and... | |
doc_23526711 | import tensorflow as tf
a = tf.ones([1000])
b = tf.ones([1000])
for i in range(int(1e6)):
a = a * b
My intuition is that this should require very little memory. Just the space for the initial array allocation and a string of commands that utilizes the nodes and overwrites the memory stored in tensor 'a' at each ... | |
doc_23526712 | Will the timestamp passed to the punctuator always represent milliseconds since UNIX epoch? It'd be helpful to know what Java code is being used to get wall clock time?
A: Yes, for WALL_CLOCK_TIME punctuation the passed timestamp will be the system timestamp, i.e., UNIX epoch ms timestamp, returned by System.currentTi... | |
doc_23526713 | So in my plugin I have this swift File: /ios/src/TestClass.swift
open class TestClass {
@objc public func testTestClass() {
return "It Works!"
}
}
but when I try to generate type information for this class using ns typings ios, No types are generated for this class.
I've also tried annotating the class ... | |
doc_23526714 | var req = new XMLHttpRequest();
req.addEventListener("load", reqListener);
req.open('GET', tab.url,false);
req.send();
if(req.status == 200)
alert(req.responseText);
But there is only one issue. I could see the code in the browser View Source section in Chrome But could not able to extract it. I gue... | |
doc_23526715 | If Index.html runs first.
Main.ts or better say Main.js (after transpilation) can't run by itself as it is a javascript file at the end, and Index.html file is the one that contains the reference of main.js at the bottom before the closing body tag, obviously, the webpack does all this.
Now, let's say from the configur... | |
doc_23526716 | The strange thing is that I can not editing "href" attribute. Other attributes can be edited.
This element does not work:
{
type: 'text',
id: 'url',
label: 'URL',
commit: function(element) {
element.setAttribute('href', this.getValue());
},
setup: function(element) {
this.setVal... | |
doc_23526717 |
A: Solr is awesome. I don't know your exact use case, but solr will probably handle it.
A: I never ended up finding any better in-app solutions other than Compass and Hibernate Search. We implemented search with Compass. In retrospect, I find it hard to get answers to my questions and while it works respectably well,... | |
doc_23526718 | In hive, I have a table t with two columns:
Name, Value
Bob, 2
Betty, 4
Robb, 3
I want to do a case when that uses the total of the Value column:
Select
Name
, CASE
When value>0.5*sum(value) over () THEN ‘0’
When value>0.9*sum(value) over () THEN ‘1’
ELSE ‘2’
END as var
From ... | |
doc_23526719 | For example, in the following image I have a project "Proj" and I want to create a new issue in one of the subprojects. As one can see, there are more statuses available for me to choose, than I would like to have for this project. I only need displayed 4 statuses out of 7.
Is it possible to limit the statuses availab... | |
doc_23526720 | Is this possible to be done in asp.net (or asp.net mvc4)?
*i have the username/password
*the site login form is : http://exat.ru/toursearch/
Thanks ,
A: I think you are talking about web scraping, and ASP.net might not be the best fit for what you are trying. There are a number of web scraping frameworks out there, e... | |
doc_23526721 | I get the following crash frequently while playing the video:
08-03 11:18:25.289 15393 15393 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void iqe.a(boolean)' on a null object reference
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at ioy.onFilterTouchEventForSecurity(Sourc... | |
doc_23526722 | So the query will only involve the Users table and I have to do a query like:-
Select Users
FROM Users
WHERE Dateleft is less than 30 days from date jointed.
Database is MS SQL 2008.
What I have so far is:-
SELECT * FROM Users WHERE (Dateleft >= Datejoined - 30)
But it doesn't work.
http://sqlfiddle.com/#!3/f2da70/1... | |
doc_23526723 | I have a content security policy that works as expected on desktop, but it breaks the site on mobile (safari). The content security policy is inside meta tags. I am using nonces and hashes. On mobile I get the error stating that it refused to execute inline script because it violates the Content Security Policy direct... | |
doc_23526724 |
A: When (x-1)! is divided by (x-1) for x > 1, the remainder will always be 0. Since it's given that the remainder is x, you need to find all x such that x is congruent to 0 modulo x-1. (Notice that x itself is congruent to 1 mod x - 1).
| |
doc_23526725 | $test = array("a","b","c");
$treevar = "test";
${$treevar}['k'] = array(1,2,3); # Works
$letter = "l";
${$treevar[$letter]} = array(1,2,3); # Gives error
$treevar = "test['m']";
${$treevar} = array(1,2,3); # Does nothing (visible)
$treevar = 'test["n"]';
${$treevar} = array(1,2,3); # Does nothing (visible)
$t... | |
doc_23526726 | So before editing it, I thought I should try compiling it as it is to see if this works fine. If not, I would have to solve that problem first before editing the code.
And here I am since its not working. I get errors since because of "undefined references" and I dont know why.
99% of the errors are because some emlrtA... | |
doc_23526727 | I followed his indication on what to put on my hmtl/css/js files, but after a week of not getting anywhere I came to ask if I could get a little help.
Here is my javascript file :
'use strict';
angular
.module('myApp', ['mwl.calendar', 'ui.bootstrap', 'ngTouch', 'ngAnimate', 'oc.lazyLoad', 'hljs'])
.config(functio... | |
doc_23526728 |
Exception: cvc-complex-type.2.1: Element 'Date' must have no character or element information item [children], because the type's
content type is empty.
Basically in my XML file Date element is empty
My XML Date element:
<Date> </Date>
Generated XSD file:
<xs:element name="Date">
<xs:complexType/>
</xs:element... | |
doc_23526729 | I've been using this code to generate US city names with an LSTM model. The code works fine and I do manage to get city names.
Right now, I am trying to save the model so I can load it in a different application without training the model again.
Here is the code of my basic application :
from __future__ import absolute... | |
doc_23526730 | I Have all the movement of the pieces down apart from the Pawn which is the hardest because the Pawn has to be able to make to different moves
The Pawn should be able to move twice at the start and then only one after that
Currently I have set the pawn to only move twice but I am stuck on getting the rest of the logic... | |
doc_23526731 | currently its above
as shown in below image
does any one knows this?
my layout is
1st for facebook comment
<reference name="product.info">
<block type="facebookcomments/catalog_product_comments" name="product.info.facebookcomments" template="facebookcomments/catalog/product/comments.phtml"/>
2nd is for facebook li... | |
doc_23526732 |
A: I think that's a problem, because you can only add a role to an existing app via the Graph API if you have a User Access Token of one of the administrators of this app:
https://developers.facebook.com/docs/graph-api/reference/app#roles
An App Access Token (which you could generate with App Id and App Secret) is not... | |
doc_23526733 |
state
district
month
rainfall
max_temp
min_temp
max_rh
min_rh
wind_speed
advice
Orissa
Kendrapada
february
0.0
34.6
19.4
88.2
29.6
12.0
chances of foot rot disease in paddy crop; apply urea at 3 weeks after transplanting at active tillering stage for paddy;......
Jharkhand
Saraikela Kharsawan
february
0
35.... | |
doc_23526734 | HTML:
<html>
<body>
<div></div>
<div></div>
</body>
</html>
CSS:
body {
width: 80%;
height: 100%;
}
div {
width: 40%;
max-width: 500px;
padding-top: 100%;
background-image: url(http://placehold.it/500x500);
background-repeat: no-repeat;
background-position: center center;
-... | |
doc_23526735 | Now,my question is, there are multiple processes running on the system, and how does it is possible for all the processes to have one to one mapping with the physical addresses??
For example, when kernel is accessing a kernel logical address on process A's context, and now the preemption happens, and what happens... | |
doc_23526736 | I am using following code to implement authentication
<?php
set_time_limit(0);
ini_set('default_socket_timeout',300);
session_start();
//----------Instagram API Keys-----------//
define("CLIENT_ID",'7f56a1c25fea4949bb8d718809e11a88');
define("CLIENT_SECRET",'purposely hidden');
define("REDIRECT_URI",'localhost/dp/... | |
doc_23526737 | this query should get all records that do not have "registrationType1" field empty/blank
query:
{
"size": 20,
"_source": [
"registrationType1"
],
"query": {
"bool": {
"must_not": [
{
"term": {
"registrationType1": ""
}
}
]
}
}
}
the results below still contains "registrationType1" with empty values
results:
**"_sourc... | |
doc_23526738 | using
*
*pytest 3.4.1
*python 3.5 and above
This is my test case under tests/test_8_2_openpyxl.py
class TestSomething(unittest.TestCase):
def setUp(self):
# do setup stuff here
def tearDown(self):
# do teardown stuff here
def test_case_1(self):
# test case here...
I use un... | |
doc_23526739 | Short example:
(arrays used with a single value for this example, but that's just to shorten the example)
=COUNTIFS(B:B;">="&A1) --> does work
=COUNTIFS(B:B;{">="&A1}) --> returns an error
Same issue if I try to nest a formula within the array
=COUNTIFS(B:B;">="&EDATE(TODAY();-6)) --> does work
=COU... | |
doc_23526740 | Please help! Thanks!!
dateDiff: function(date1, date2){
var diff = {}
var tmp = date2 - date1;
tmp = Math.floor(tmp/1000);
diff.sec = tmp % 60;
tmp = Math.floor((tmp-diff.sec)/60);
diff.min = tmp % 60;
... | |
doc_23526741 | <html>
<body>
<div id="parent" style="width:300px;overflow:scroll;">
<div class="child" style="width:80px; float:left;">lorem</div>
<div class="child" style="width:80px; float:left;">ipsum</div>
<div class="child" style="width:80px; float:left;">dolore</div>
<div class="child" style="width:80px; float... | |
doc_23526742 | I can't totally access to my webservice. When i want to consume my webservice a have this error (this is not in my code but in System.ServiceModel.WasHosting.dll) :
[NullReferenceException: The object reference is not defined to an instance of an object] System.Runtime.AsyncResult.End(IAsyncResult result) +390
System.S... | |
doc_23526743 | dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
Referenced from: /usr/local/opt/libevent/lib/libevent-2.1.6.dylib
Reason: image not found
Trace/BPT trap: 5
A: These steps are worked for me.
brew uninstall --ignore-dependencies openssl
brew install openssl
A: Reinstalling openssl did not w... | |
doc_23526744 | Some document says python shell job is suitable for simple jobs whereas spark for more complicated jobs, is that correct? Could you please share more experience on this?
Many thanks
A: Use AWS Glue Python shell when you do not need too much of a compute power to run light ETL workloads. Use AWS Glue with Spark when yo... | |
doc_23526745 | I am having two grids and a button. Initially the second grid will remain empty and the first grid will have some records.. When I select a few records in the first grid and click on the button, then the second grid should get populated with the only the selected rows of first grid.
Here is my code:
Ext.QuickTips.init(... | |
doc_23526746 | Thus I installed YouCompleteMe & compiled it. Originally I got an error because a trial of Kite shut the server down. But this I deactivated and now I restart and restart the server just to get it shutdown.
And the YcmToggleLogs does not show anything :-(
I followed all of the advice given here: YCM error. The ycmd ser... | |
doc_23526747 | import matplotlib.pyplot as plt
import numpy as np
from pylab import *
l1=1.
l2=5.
t1=20.
t2=50.
tf=120.
def f1(t):
if t<t1:
L = l1
elif t1<=t<t2:
L = l2
else:
L=l1
g=L*t
return g
a=np.linspace(0.,100,1000)
values1=map(f1,a)
fig1=plt.figure(1)
plt.plot(a,values1,color='red')... | |
doc_23526748 | PHP is set to GMT and JavaScript is set to UTC; how do these standards differ, and could this be causing the problem?
A: From Coordinated Universal Time on Wikipedia:
Coordinated Universal Time (UTC) is a time standard based on International Atomic Time (TAI) with leap seconds added at irregular intervals to compensa... | |
doc_23526749 | omp_set_num_threads(num_t);
#pragma omp parallel shared(a,b,c) private(i,j,k) num_threads(num_t)
{
#pragma omp for schedule(static)
for (int i = 0; i < m; i++)
{
std::cout << omp_get_thread_num()<< "\n";
for (int j = 0; (j < n); j++)
{
c[i + j*m] = 0.0;
for (... | |
doc_23526750 | Could somebody explain briefly what it is, and maybe how to do it, if you could refer me to a site which explains in an easy manner i would be grateful.
an example of code one could deadlist:
\x90\xb8\x02\x00\x00\x00\x83\xf8\x03\x74\x07\xb8\x73\x80\x04\x08\xeb\x01\xd8\x31\xc0\x50\xbb\x9e\x9a\x9a\x99\xf7\xdb\x53\xbb\x9c... | |
doc_23526751 |
The problem is that when I run the app I get this:
Neither of the buttons that I added are there. Here is my .h file:
//
// RootBeerTVCViewController.h
// BaseApp
//
// Created by Blaine Anderson on 10/12/12.
// Copyright (c) 2012 UIEvolution, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ... | |
doc_23526752 |
*
*Calculate distances between all points and the initial centroids.
*Assign all points to their closest centroid.
Here is my code:
def init(ds, k, random_state=42):
np.random.seed(random_state)
centroids = [ds[0]]
for _ in range(1, k):
dist_sq = np.array([min([np.inner(c-x,c-x) for c in centroids]) for x in d... | |
doc_23526753 | I have also seen the thousands of posts online that say that you can put any generic class that extends a particular base class into a collection of the type of the base class. I understand this perfectly well.
My problem differs from the linked post above and the others in one basic way - my generic classes have a bas... | |
doc_23526754 | I originally used the AVAudioPlayer for playback, and in the simulator at 120 bpm, playing 16th notes it sung beautifully, but on my handset, as soon as I
upped the tempo a little over 60 bpm playing just 1/4 notes, it ran like a dog and wouldn't keep in time. My elation was very short lived.
To reduce latency, I trie... | |
doc_23526755 |
A: Just use a before_action callback to set the default locale.
class Admin::DashboardController
before_action :set_default_locale
# ...
private
def set_default_locale
I18n.default_locale = :en
end
end
A: before_action :set_locale
def set_locale
I18n.locale = params[:locale] || I18n.default... | |
doc_23526756 | This is my PagerTabStrip class
public class maintabs extends Fragment {
FragmentPagerAdapter adapterViewPager;
PagerTabStrip pagerTabStrip;
View rootView;
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.ta... | |
doc_23526757 | I am using following code.
$headers = 'From: My Name <test12df432abc@gmail.com>' . "\r\n";
wp_mail($to, $subjects, $message, $headers); // not working
wp_mail($to, $subjects, $message ); // working
I think this happening is because my From: address doesn't match to the domain i'm sending the email from. But is there a... | |
doc_23526758 | header("Content-Type: text/x-vcard;charset=utf-8;");
header("Content-Disposition: attachment; filename=card.vcf");
header("Pragma: no-cache");
header("Expires: 0");
echo $vcard_serialized;
on chrome from Pc, it downloads card.vcf, but from mobile it downloads card.vcf.html... why?
A: I have the same issue, but now I... | |
doc_23526759 | Then I have an ArrayList<GameObject> selector that contains items that the user currently has selected. Let's say the user clicks on a tank, then this tank would be stored in selector. If he then right click somewhere he is telling the tank to go to the mouse's coordinates. And I also need to tell all other players thi... | |
doc_23526760 | Wanted to understand a little better operation, I take the location permission and bluetooth.
After the scan starts, I turn Bluetooth on my phone to off, on Moto G2 Android 6.0 Scan still keeps giving me the expected result when I test on a Samsung S8 Android 9 and Sony Xperia T2 Ultra Android 5.1 in the log I get whic... | |
doc_23526761 | I have this:
protected void onPostExecute(String result) {
super.onPostExecute(result);
try {
JSONObject jsonObject = new JSONObject(result);
JSONArray jsonArray = new JSONArray(jsonObject.getString("cast"));
But I want to avoid calling JSONArray jsonArray = new JSONArr... | |
doc_23526762 | When I call my child component in my parent component, I get an error:
Type '{}' is missing the following properties from type 'IProps': className, disabled ts(2739)
I thought that because I have default props on my child component, they would fill in for any missing props when calling the component from other componen... | |
doc_23526763 | I think the answer will be "port-forwarding".But how can I do that ?
A: You can use SSH port forwarding to access your services from host machine in the following way:
ssh -R 30000:127.0.0.1:8001 $USER@192.168.0.20
In which 8001 is port on which your service is exposed, 192.168.0.20 is minikube IP.
Now you'll be abl... | |
doc_23526764 | root\
default.aspx
web.config
subfolder\
page.aspx
web.config
If I access page.aspx by going to locahost/subfolder/page.aspx it reads the web.config in the subfolder just fine.
However, I have a route to the page setup like so:
protected void Application_Start(object sender, EventArgs e)
{
RegisterRo... | |
doc_23526765 | Below is the code I tried:
#include "contiki.h"
#include "stdio.h" /* For printf() */
#include "stdlib.h"
PROCESS(random_process, "Random process");
AUTOSTART_PROCESSES(&random_process);
PROCESS_THREAD(random_process, ev, data)
{
PROCESS_BEGIN();
int r=rand();
printf("Hello, world. Random Number is %d",r);
PROCESS_END(... | |
doc_23526766 | I'm having problems while deploying because npm started using ^1.2.3 version notations and it's not compatible with the current npm in my application:
remote: npm ERR! Error: No compatible version found: through@'^2.3.4'
remote: npm ERR! Valid install targets:
remote: npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.1.0","... | |
doc_23526767 | $html = file_get_contents($url);
$pattern = '/[A-Z0-9._%+-]+(@|\(at\)|\[at\])[A-Z0-9.-]+\.[A-Z]{2,4}\b/i'; //also (at) and [at]
preg_match_all($pattern,$html,$emails);
foreach ($emails[0] as $m)
{
$m[] = $m;
}
foreach($m as $n){echo... | |
doc_23526768 | // Get the modal
var modal = document.getElementById('reserveer-modal');
// Get the button that opens the modal
var btn = document.getElementById("reserveer-knop");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the mod... | |
doc_23526769 | Can Visual Studio do the same thing like XCode?
Thank you!
A: I believe what you are looking for is solution build configurations, check this link out:
http://msdn.microsoft.com/en-us/library/kwybya3w(v=vs.110).aspx
Here is a good example of including a reference for a specific configuration.
Visual Studio Project: Ho... | |
doc_23526770 | My question is, how can I see the exact xcodebuild command line that xcode is using to build a working simulator build. I just need to copy that into my shell script but it's proving elusive. I did a find in the build logs from xcode but there's no mention of xcodebuild there.
A: You can't. Xcode itself doesn't invoke... | |
doc_23526771 | I want the audio data as numpy array to process it, but I don't seem to be able to convert the blob properly.
The audio blob contains:
[Float32Array[32768], Float32Array[32768]]
In python, I tried:
@socketio.on('gotaudio')
def get_audio(blob):
//CONVERT THE BLOB
data = blob[0]
dat = np.array(json.loads(d... | |
doc_23526772 | In the past 2 days I was trying to export this table to excel file. Finally i was able to do this by using an xml builder template.
Here is my file
xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
xml.Workbook({
'xmlns' => "urn:schemas-microsoft-com:office:spreadsheet",
'xmlns:o' => "urn:schemas-... | |
doc_23526773 | ODATA -> Blob storage (JSON)
JSON -> Snowflake table
Copy Data -> Copy Data - Lookup
Both copy data is working fine.
In the lookup (query), i have given. (Need to add 1 value in table, its a variant column)
Update T1 set source_json = object_insert(source_json,device_type,web_browser,TRUE);)
W... | |
doc_23526774 | The problem is that my heroku app fails to connect to the socket.
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((daemon_socket_vars['host'], daemon_socket_vars['port']))
s.send("Hi!")
s.close()
The heroku app fails on the second line after timing out. When I run something identical on either my ... | |
doc_23526775 | How can i best go about this without crucially breaking play framework?
A: The simple answer would be to tell you that ZooKeeper is not meant to be used as a general datastore/database; however, I am inclined to believe that you are really looking for something like MongoDB.
Check out MongoDB Replica Sets and Election... | |
doc_23526776 | The usual use-case is N <= 8 and M <= 128
I do this operation a lot in an innerloop on an embedded device. Writing a trivial implementation is easy but not fast enough for my taste (e.g. brute force search until a solution is found).
I wonder if anyone has a more elegant solution in his bag of tricks.
A: int nr = 0; ... | |
doc_23526777 |
A: You can also try this.
sql = "INSERT into table_name (r_id, r_name) VALUES (1, null)"
records_array = ActiveRecord::Base.connection.execute(sql)
A: How about nil instead of #{nil}
Table.column = nil
A: try this
Model.find_by_sql "SELECT * FROM table where column is NULL"
A: Model.find_by_column(nil)
This w... | |
doc_23526778 | I am getting this error:
org.apache.jasper.JasperException: /WEB-INF/pages/calendarEntry.jsp (line: 5, column: 46) According to TLD or attribute directive in tag file, attribute var does not accept any expressions
Here's my jsp file
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt... | |
doc_23526779 | So I defined a shared LSTM Network like so:
def build_LSTM(layer_1_units=64, layer_2_units=128, dense_units_1=16, dropout=0.2, end_activation='softmax', optimizer='Adam'):
model = tf.keras.models.Sequential([
kl.LSTM(layer_1_units, return_sequences=True, input_shape=(SEQ_LEN, 56), name='Encoder/LSTM_1'),
... | |
doc_23526780 | Hello dear,
On flutter:1.12.13+hotfix.8, when I build release apk file get some error Like below:
Thanks!
| |
doc_23526781 | I'm using this script on a landing page separate from Joomla. I had check the phpinfo and this is what it's show.
mail.add_x_header On On
mail.force_extra_parameters no value no value
mail.log no value no value
sendmail_from no value no value
sendmail_path no value no value
I'm wondering if the ... | |
doc_23526782 |
doesn't exist: SHOW FIELDS FROM gateway_options
A: I've had the same problem. Basically, there's a way to define the order in which extensions are loaded but not when their migrations are ran.
config.extensions = [:all, :site]
More info here.
The way I do it, is simply by renaming the "db" folder of the extensions... | |
doc_23526783 | If i put no location in and search it returns all results regardless of location, which is fine. If i put in a location that does not exist and some keywords, It returns all results matching the keywords and seems to ignore the location.
Also if i leave the keywords empty and search by a location that does exist, it se... | |
doc_23526784 | Ex: n=3, myString = "001" or "002" or ... "999" (except number 0 at begin)
p/s: I am using Ruby 1.8.7
A: n.times.map { (0..9).to_a.sample }.join
A: If it's for a password or something:
require 'securerandom'
random_number = SecureRandom.random_number(10**n)
formatted_number = "0#{random_number}"
Edit: If it doesn'... | |
doc_23526785 | Note that I don't want to reserve
A: The other way is to define static array as large as possible and write your own malloc/free subroutines. It is simple especially if there is no multithreading or other kind of shared usage of the allocated blocks. You keep the address of first empty block and in the beginning of e... | |
doc_23526786 |
A: The migrate Task has a "target" attribute which lets you specify that.
target - The target version up to which Flyway should consider
migrations. Migrations with a higher version number will be ignored.
The special value current designates the current version of the
schema.
Doc for CommandLine: https://flywaydb.o... | |
doc_23526787 |
Is it possible to handle such error in Python script? By handle I mean keep trying to save file after some time by using time.sleep function. I have tried with most common approach:
import shutil
try:
shutil.copy2('Track_Changes_Testing.xlsx', destination_on_sharepoint)
except Exception as err:
print(err)
Bu... | |
doc_23526788 | >>>import scrapy
>>>dir(scrapy)
['Field', 'FormRequest', 'Item', 'Request', 'Selector', 'Spider', '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', '_txv', 'exceptions', 'http', 'item', 'link', 'selector', 'signals', 'spiders', 'twisted_version', 'utils', 'version_i... | |
doc_23526789 | On https://www.npmjs.com/package/cordova-sqlite-storage it says that:
The following features are available in litehelpers /
cordova-sqlite-ext: ...
- Pre-populated database (Android/iOS/macOS/Windows)
So what I need is a sqlite database outside the webapp and a phonegap plugin that can read from this db. So, is i... | |
doc_23526790 | How can i handle this better? Not have it logged so many times would be nice.
fetchData = (url) => {
return new Promise((res, rej) => {
fetch(url)
.then((r) => r.text())
.then((text) => {
res(text);
})
.catch((e) => rej(e));
});
};
getLogs = async () => {
... | |
doc_23526791 | <audio src="bg.mp3" autoplay="autoplay" loop="loop"></audio>
Can anyone help me in this.
A: I think you must use JS (jQuery) function to do get document ready
$(document).ready(function()
Play an audio file using jQuery when a button is clicked
You have answer here (if I follow you right)
A: You're going to need ... | |
doc_23526792 | My problem is the following:
I have a few prices and dates in number format that I want to plot, for example:
Prices = repmat([10; 5; 3; 4; 11; 12; 5; 2],10,1);
Dates = [726834:726834+8*10-1]';
If I plot them like this:
plot(Dates,Prices)
dateaxis('x',17)
I get x-axis values that I don't want, because they look ... | |
doc_23526793 | Can anyone help me in this.. I am not able to find out any IMAP Server module in perl.. ?
A: I don't know how you searched, but searching for metacpan imapserver points you to Net::IMAPServer.
But, this module is far from simple because IMAP itself is a complex protocol. This means writing a server which is both simpl... | |
doc_23526794 | For instance, I might get 08/10/2018, but I want my end result to be 08/01/2018.
Is it possible to do something along the lines of this below (obviously doesn't work but looking for suggestions).
SELECT TO_CHAR(sysdate,'MM/01/YYYY') FROM DUAL;
In this case, sysdate would be replaced with a big list of case statements ... | |
doc_23526795 | I tried following code but this is rendering output to the browser after process completes.
$v = view('users.account_varification',compact('AccessToken'));
$content = $v->render();
echo $content;
Please help me.
A: I have used following code to show loading while process is going on.
PHP outpu... | |
doc_23526796 | Now, Material Design generally says you should use a "500" color as a primary and a "700"-shade of that same color as the primary dark color. But since Chrome automatically calculates this value (and the 500/700 difference depends on the color) it doesn't completely match the Material colors and is difficult to predict... | |
doc_23526797 | I find that the entries made by the TelegramBot are not retrieved with this command, only message from users.
My question is what do I need to do to be able to have the bot channel posts in my getupdates?
| |
doc_23526798 | "RestartPolicy": {
"Name": "",
"MaximumRetryCount": 0
},
when Name is "", what is the restart policy?
Thanks,
A: Moreover whatever the restart policy is you can update the restart policy of the existing container with
docker update --restart=unless-stopped my-container
| |
doc_23526799 | Please see below example data structure. In reality, all data are normalized already.
A1
A2
A3
B1
B2
C1
C2
D1
D2
D3
protein1
15
30
28
6
7
9
30
45
66
43
protein2
2
4
3
56
54
23
25
12
13
5
protein3
2
4
3
56
54
23
25
12
13
5
protein4
2
4
3
56
54
23
25
12
13
5
A: One way to do this:
First reshape the dat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.