id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23516200 | I tried this on console too and the same happend:
TesteMailer.welcome_email(User.first).deliver_later
and it returns:
Error performing ActionMailer::DeliveryJob (Job ID: e536b95d-fab5-4f9d-82ac-b2af12336fc2) from Async(mailers) in 10485.78ms: EOFError (end of file reached):
I also tried
TesteMailer.welcome_email(Us... | |
doc_23516201 | I have a collection of settings that have descriptions and settings. The problem is exposing one of them, as each is unique. I've tried something like this:
var appl = _service.GetSettings(id, app); //Call to service layer & repository
appl.Select(a => a.setting_value.Where(a.setting_name.StartsWith("Login")));
With l... | |
doc_23516202 | An existing simulation environment or Java library is ideal, but an algorithm will also be helpful. Hardware simulation environments like ns-2 are extreme overkill for the simple functionality I'm looking for.
A: A typical easy solution is to divide the space into a grid. If the communication range is R, you could use... | |
doc_23516203 |
A: think that you would have to roll your own here I'm afraid, as this is a pretty low level system function, I think that it's a little beyond what you could expect java to do for you.
This link points to some special options that you can set to alter the bind order, I don't think that they will tell you where the h... | |
doc_23516204 | Using ColdFusion Administrator I tried simply editing the URL of the server, but I get this error:
Connection verification failed for data source: xxxxxxxx
java.sql.SQLNonTransientConnectionException: [Macromedia][SQLServer
JDBC Driver]The SQL Server login requires an SSL connection. The root
cause was that: jav... | |
doc_23516205 | protected UIElement RealizeItem(int itemIndex)
{
var generator = ItemContainerGenerator;
var position = generator.GeneratorPositionFromIndex(itemIndex);
using (generator.StartAt(position, GeneratorDirection.Forward, true))
{
var isNewlyRealized = false;
va... | |
doc_23516206 | // https://bl.ocks.org/mbostock/3883245
// http://bl.ocks.org/d3noob/7030f35b72de721622b8
function LineChart(options) {
// Mike Bostock margin conventions.
// See http://bl.ocks.org/mbostock/3019563 for more info.
const margin = this.margin = {
top: 20,
right: 20,
bottom: 30,
... | |
doc_23516207 | My page layout at normal size is:
--------------------
|-------------------|
|| | | ||
|| | | ||
||Left| Mid |Right|
|| | | ||
|| | | ||
|| | | ||
|------------------||
|__________________||
When I resize smaller it becomes the layout shifts:
--------------... | |
doc_23516208 | someFunc(void* param){
char currFile[500000];
char currKeyBoard[24576];
char currImage[500000];
char currAddInfo[12000];
}
_beginthread( someFunc, 0,NULL );
The program crash whith stackoverflow exception.But when I do this
someFunc(void* param){
char currFile[500000];
char currKeyBoard[24576];
char currIma... | |
doc_23516209 | <FrameLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="64dp"
android:orientation="horizontal"
android:background="@android:color/white"
android:paddingLeft="@dimen/small_margin"
android:paddingRight="@dimen/small_margin... | |
doc_23516210 | I ll be appreciated for your help..
hier is the code @ my single.php
<?php echo '<div class="thecontent">' . apply_filters('the_content', get_the_content()) . '</div>';
I ve tried this one but I dont know how can I replace the code?
echo preg_replace('/<img[^>]+\>/i', '', get_the_content(), 1);
A: you can hide your ... | |
doc_23516211 | See the following script - works on touchscreens in FF and Chrome, and by using the mouse.
http://jsfiddle.net/daSL2/
Expected behaviour: The mouseleave event should only fire if I move away with the mouse or tap somewhere else by touch screen. (Tested on Lenovo Yoga 13)
JS:
$(function () {
$('a').on({
... | |
doc_23516212 | In particular, I am not interested in what changed, but which files changed in that directory.
E.g., supposing that between then and otherthen, only 2 files changed:
>hg hypothetical-command -r then:otherthen
foo.baz
bar.baz
>
What's the hypothetical command? I've tried diff and log, but I can't see how to convince th... | |
doc_23516213 | It seems to want me to structure pieces of my code in a very specific way or it won't work.
I have no idea why this causes a problem as both structures look the same to me but behave in different ways.
I am using Browserify and Babelify to transpile and gulp-uglify to minify my code. It can be that one or a combination... | |
doc_23516214 | is there a specific way on flutter to make it detect other mobile phones
A: You can only detect BLE devices that are advertising their services. A mobile phone often does not do that on its own. There are two solutions:
*
*Use an already available app on the other device to advertise some service. One of the possibl... | |
doc_23516215 | def replace_urls(self):
find_string_1 = '/blog/'
find_string_2 = '/contakt/'
replace_string_1 = 'blog.html'
replace_string_2 = 'contact.html'
exclude_dirs = ['media', 'static']
for (root_path, dirs, files) in os.walk(f'{settings.BASE_DIR}/static/'):
dirs[:]... | |
doc_23516216 | I'm thinking about fixing that control to handle other types of datasources, but would much rather go with something better if I can find one. I'd even be able to work with some kind of client side "calendar" if one was available.
A: We actually ended going with the calendar control out of the Club Starter Kit (http:/... | |
doc_23516217 | here is the code I currently have, it is not in html file, it is in js file.
var file_data = annotator.export();
var formData = dataURItoBlob(file_data);
var fd = new FormData(document);
fd.append("resultImage",formData);
url="upload/";
http.open("POST", url, true);
// headers
http.setRequestHeader("Content-type", "ap... | |
doc_23516218 |
A: Do you use any specific web server or publishing system? But perhaps one huge, recursive wget is enough?
A: what you need is a website crawler that can save retrieved pages to disk. There are many programs of this kind available on the Internet.
A: Visual Studio offers a Find In File (ctrl+shift+f). Search for wh... | |
doc_23516219 | I have been trying to use the $show() in my controller to enable the elements in the form, however it seems like the elements goes into viewing state again for example when using "onaftersave" when trying to save the values etc.
How do I do in order to always be in edit mode where the user never needs to enable editing... | |
doc_23516220 | Sub BMark()
' Select some text in the active document prior
' to execution.
ActiveDocument.Bookmarks.Add _
Name:="tableauxvdd", Range:=Selection.Range
End Sub
But i dont know how to fix the range, i have the idea to select the word with smthg like that :
With word_fichier.Application.Selection.Find
... | |
doc_23516221 | It is the smalldatetime data type if that makes a difference
A: Use the DateAdd() function.
UPDATE someTable SET Due_Date = DATEADD(day,1,Created_Date) WHERE ...
A: Actually, with respect to DAY, you can just add/subtract directly. I.e. (borrowing from @David):
UPDATE someTable SET Due_Date = Due_Date + 1 WHERE ...... | |
doc_23516222 | where the count is greater than 1.
SELECT media_set.id,
(SELECT COUNT(*)
FROM image_media_set
WHERE image_media_set.media_set_id = media_set.id) AS imageCount
FROM media_set
INNER JOIN image_media_set
ON media_set.id = image_media_set.media_set_id
WHERE image_media_set.image... | |
doc_23516223 | When I run the following script, I will get no errors but also the files are not added to the theme directory of my zip archive.
define('CLIENT_PATH', $_SERVER['DOCUMENT_ROOT'] . '/wp_theme/clients_templates/' . $_POST['title']);
$zip = new ZipArchive;
$zip->open('wordpress.zip', ZipArchive::CREATE);
foreach (glob(CLIE... | |
doc_23516224 | This works fine but The issue is the outlook creating new email and pasting procedure is getting displayed on the screen. Is there any way to disable or make this to background?
Sub Mail_Range()
Dim Sht As Excel.Worksheet
Set Sht = ThisWorkbook.ActiveSheet
With Application
.ScreenUpdating = False
... | |
doc_23516225 | The problem is that I can't actually test (On the simulator) for iOS 8.0.2 as the earliest version of iOS 8 I can use is 8.1
I am not supporting iOS 7, but did go back and try to see if I could catch the bug there as described by the tester who reported the crash. It did not occur no matter what I did, so I assume it ... | |
doc_23516226 | from win32com import client as wc
I hoped to invoke python program in java codes, so I used Jython.
But Jython don't recognition win32com module, throws exception like this
ImportError: No module named win32com
I searched some information in internet, someone says
"The problem is that the win32api module is implement... | |
doc_23516227 | Example of List
1. 1,2,3,4,5,6
2. 2,1,8,9,8,4
3. 6,5,4,3,2,1
Basically, I need to get the same groups of numbers which aren't necessarily in the same order. So for the example above, I would need to return either 1,2,3,4,5,6 or 6,5,4,3,2,1
I have the following which works for single numbers, but not 6 number groups.
va... | |
doc_23516228 | My node version is 10.
serverside.js:
var file = path.join(__dirname,'Rajesh.pdf');
fs.readFile(file, function(err, data){
res.contentType("application/pdf");
res.send(data)
})
clientside.js:
axios.get('/api/downloadcv')
.then(res => {
const url = window.URL.createObjectURL(new Blob([res.data]
... | |
doc_23516229 |
A: You can use the AzureDevOps Rest API
POST:
https://account.visualstudio.com/project/_apis/build/builds?api-version=4.1
Body:
{
"definition": {
"id": number
}
}
Refer my answer here
| |
doc_23516230 | I have a popup that request emails from users. Should they complete the email submit, I would like to apply a coupon code automatically should they subsequently make a purchase at checkout.
For coupon codes to be applied, all users have to do is access a link with /?coupon_code=xxxx at the end of the url.
This code was... | |
doc_23516231 | I would expected the authRole to be applied to anyone who is authenticated and my admins/editors group to provide additional permissions. If this is the way it works I am then expected to generate custom policies in my CloudFormation templates which already exist elsewhere, and they'd need to be dynamic to work for mul... | |
doc_23516232 | DECLARE @customerID INT
SET @customerID = @CustID
DECLARE @MyTable table(
Iden int NOT NULL IDENTITY(1,1),
ProductID int)
INSERT INTO @MyTable(ProductID)
SELECT P.ProductID FROM Product P WITH (NOLOCK)
left join Compunix_ProductMMY cpmmy with (nolock) on p.ProductID = cpmmy.ProductID
left join Compunix_CustomerMMY ccm... | |
doc_23516233 | SELECT * FROM foo WHERE name = 'Bob' ORDER BY address DESC LIMIT 25 OFFSET 1
Because I have records in the table with name = 'Bob' the query time is fast on a table of 10M records (<.5 seconds)
However, if I search for name = 'Susan' the query takes over 45 seconds. I have no records in the table where name = 'Susan'.... | |
doc_23516234 | <?xml version="1.0" encoding="UTF-8"?>
<A>
<B>
<C>
<E></E>
<E></E>
<F>false</F>
<F>true</F>
<F>false</F>
<G>
<H/>
</G>
</C>
<B>
<D>
<E>continue</E>
<G>
<F>false</F>
<E>1</E>
</G>
</D>
<B/>
... | |
doc_23516235 | I'm trying to do a simple shooting function, and the only thing it needs to do is to instantiate the bullet gameObject. But for some reason, what happens is that, when calling the RPC function to execute the shot, each player executes his shot in isolation, without interfering in anything on the other's screen (that is... | |
doc_23516236 | This is the website which has the issue
https://swipe-cards.herokuapp.com/
In local environment, it doesnt happen.
Does anyone know how to fix this?
A: *
*Make sure you use the appjs as in the official example
https://github.com/mui-org/material-ui/blob/master/examples/nextjs/pages/_app.js
*Make sure you use docume... | |
doc_23516237 | C# Code:
WebRequest request = WebRequest.Create("http://www.test.org/example.php");
request.Credentials = CredentialCache.DefaultCredentials;
request.Headers.Add("name", "test");
WebResponse response = request.GetResponse();
Console.WriteLine(((HttpWebResponse)response).Status... | |
doc_23516238 | old_content='Some text\t\t[1.00]\nSome other text'
So far i have code that does that, but doesn't feel pythonic.
open_indexes = [i for i, c in enumerate(old_content) if c == "["]
close_indexes = [i for i, c in enumerate(old_content) if c == "]"]
start = old_content[:open_indexes[-1]+1]
end = old_content[... | |
doc_23516239 | I have the following problem though and I am wondering if there is a solution that eludes me. The solution maybe vanilla Javascript, or React.js hooks like the Context API (useContext), or combination of more Javascript and React, or the solution might be for me to go back to the drawing board.
Please keep in mind I a... | |
doc_23516240 | I create an NSMutableArray and then put objects into the array like so
[nameOfMyArray addObject:Object30];
I need to be able to sort that array based on the name of the object (the number at the end).
I have been working on using the "sortUsingDiscriptors method to sort my array of objects but no matter what I do I ge... | |
doc_23516241 | The 3270-terminals are still much used and I respect the IMS/CICS/Cobol application designers for their work.
Users like the web application, but one thing they keep ask for is:
Functionkeys and shortcuts that navigates directly to different web forms.
Do you know a way to implement function key shortcuts in asp.net th... | |
doc_23516242 | In static mode:
<div *ngIf="col.key == 'MGA_ServiceDescription'">
<span >
{{ getServiceDescription(element[col.key]) }}
</span>
</div>
In Edit mode:
mat-form-field *ngSwitchCase="'listServiceDescriptions'" >
<mat-select [(value)]="element[col.key]">
<mat-option *ngFor="let c of filteredServic... | |
doc_23516243 | I don't know if it's good idea to use PHP+NodeJS for such things, but I want something like this:
User opens a website, in this moment Node.js is checking if user is logged. If so it grabs something from database(REDIS), let's call it 'patterns' and store it in temporary hash/list.
Then other user post something which ... | |
doc_23516244 |
*
*Where Nodes are added to the head of the list checking from the tail (Time complexity O(n))
*Where Nodes are added to the head of the list checking only the head (Time complexity O(1))
I wanted to run test and check the output of my code and more or less it's correct but I noticed this weird noises and I don't k... | |
doc_23516245 | my_list = {
"foo": ["a", "b", "c"],
"bar": ["d", "e", "f"]
}
How could I combine all lists in this dictionary into one large list in one line of code (meaning there would not be a temporary variable)? I came up with the following solution, however it is not very elegant:
def combine_list_dictionary():
temp... | |
doc_23516246 | Clearcase Version 7.1.2.6 FL5 & Schema 54
Both instances have their own Admin PVOB.
How do we move and amalgamate the PVOBS or reestablish the correct links once the vobs are moved?
Is this possible?
A: It depends if the servers have the same architecture or not.
The general idea is to follow the Administration Guide... | |
doc_23516247 | private static final Scanner in=new Scanner(System.in);
public static void main(String[] args) {
int n1=lerTamanho();
String [] vec1=new String [n1];
readVector(vec1); -> Line 11
}
private static int lerTamanho() {
System.out.print("Number: ");
int num=in.nextInt();
while (num<=0) {
Syste... | |
doc_23516248 | x1=c(1,2,3,4,5)
values=c(1.5,2.2,1.1,2.3,1.1)
d=data.frame(x1,values)
I devided x1 to
x=c(1,2)
y=c(3,4,5)
and then I calculate all pairs using expand.grid
e=expand.grid(x=x,y=y)
> e
x y
1 3
2 3
1 4
2 4
1 5
2 5
My question is how to calculate a third column that gives values(x)/values(y) ??
Like :
x... | |
doc_23516249 | The data sample:
id date score
11 1/1/2017 25.34
4 1/2/2017 34.34
25 1/2/2017 15.78
4 3/2/2017 47.2
25 7/3/2017 65.21
11 9/3/2017 96.09
25 10/3/2017 11.3
4 10/3/2017 27.12
Which is far from what I need, but I'm really lost. Clueless to be honest. Any idea?
Thanks
A: Try this:
... | |
doc_23516250 | For example, if I pass the --help option or an invalid parameter like -x (see below) process.exit or process.stdout.write are not called as they should looking at the commander sources.
import {Command} from "commander";
let mockExit: jest.SpyInstance;
let mockStdout: jest.SpyInstance;
beforeAll(() => {
mockExit ... | |
doc_23516251 | What actually happens when I do a casting? typescript <Class>object
class Animal {
name: string;
constructor(theName: string) {
this.name = theName;
this.toString();
console.log(`\tis Animal?: ${this instanceof Animal}`);
console.log(`\tis Snake?: ${this instanceof Snake}`);
... | |
doc_23516252 | This is my current code
#include <stdint.h>
typedef uint8_t BYTE;
typedef struct _ByteArray {
BYTE *arr[512];
} __attribute__((__packed__))
JPEG;
A: BYTE * arr[512];
^ ^ ^ ^
| | | |
| | | is an array of 512
| | arr
| pointers to
BYTE
You have to change it to:
BYTE arr[512];
^ ^ ^... | |
doc_23516253 | What I currently have is a library that includes code related to loading and drawing the texture information. The bit that I'm stuck on is how would I incorporate OpenGL (for windows) and OpenGL ES (for android) into the library?
I thought about having an interface that includes all the drawing functions and then imple... | |
doc_23516254 | Any s inside the word should be converted to a 5.
A: To match an s at the start of the word, use \b to match word boundaries and \w to match alphanumerics:
/\bs\w/
(as @Matthew points out, the \w is really superfluous:)
/\bs/
Once you've replaced all s at the start of a word, then the only remaining ones are in... | |
doc_23516255 | I've seen how to deep clone an object:
JSON.parse(JSON.stringify(instance))
And I have seen how to make a shallow copy of a class instance:
Object.assign( Object.create( Object.getPrototypeOf(instance) ), instance)
But my question is, is there a way to deep clone an instance of a class?
A: I recommend using Lodash's... | |
doc_23516256 | or can any one please provide the custom solution for the same.
Regards
A: Well, you can easily find out whether the day matches:
// Note: consider time zones...
DateTime today = DateTime.Today;
if (today.DayOfWeek == DayOfWeek.Monday)
{
...
}
and you know that the first occurrence of each day of the week will b... | |
doc_23516257 | @Resource
protected EJBContext context;
| |
doc_23516258 | For that, I use the following command, adapted from How to count total lines changed by a specific author in a Git repository?
git ls-tree -r -z --name-only HEAD -- */*.c | xargs -0 -n1 git blame \
--line-porcelain HEAD |grep "^author "|sort|uniq -c|sort -nr
However, I get the following error:
fatal: cannot stat path... | |
doc_23516259 |
A: You should never ask the user for his FB password on your own, use FB.logout to logout an authorized user and call FB.login to authorize another one. Of course this also works in a similar way with other SDKs, but the JS SDK is the recommended one.
| |
doc_23516260 | Now I want to map the suffix to the MIME type. This is relatively easy to do with a quick switch, but given that ImageIO has both
*
*static Iterator<ImageWriter> getImageWritersBySuffix(String fileSuffix)
*static Iterator<ImageWriter> getImageWritersByMIMEType(String MIMEType)
it must know the mapping between suffi... | |
doc_23516261 | //on dom ready...
window.addEvent('domready', function() {
/* ajax alert */ <br/>
$('ajax-alert').addEvent('click', function(event) {
//prevent the page from changing
event.stop();
//make the ajax call
var req = new Request({
method: 'get',
url: $('ajax-aler... | |
doc_23516262 |
[u'AMD', u'A10-7700K, 3,4 GHz (3,8 GHz Turbo Boost) FM2+ processor']
[u'\n 3.400 MHz\xa0\n ', u'\n 4 cores\xa0\n ', u'\n FM2+\xa0\n ']
For the record. I want it to output as a normal string without the unicode. I tried a bunch of things but none of it seems to work. I would write down all the things I've tried but I ... | |
doc_23516263 | Now I have another huge list of strings which is around ~35million in size. I need to read these 35million strings one by one and format them in a particular manner that is a separate method by itself (it is a very light processing).
Then I need to check if the result of the formatting done on one string from the list ... | |
doc_23516264 | What i want to do is very rudimentairy i guess. I want is to put a label/prompt/text before a EditText.
In html i would program something like this:
<form>
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
</form>
And get the a result like this:
First name: ___________
All ... | |
doc_23516265 | For that reason, I have function that I call after a successful upload (I use Retrofit) called markAsUploaded(). This function creates a RealmObject called CallLogUploaded (which is different from my regular CallLog model). This CallLogUploaded simply has one identifier which is the dateTime of the call, which should b... | |
doc_23516266 | File dir = new File("/sdcard/Images/1124/");
File[] files = dir.listFiles();
for (int i = 0; i < files.length; ++i){
Log.i(String.valueOf(files[i].getName()),"files");
}
I want to get something like that but with automatic values of files[i]:
String[] files = new String[] { "/sdcard/Images/1124/pic.jpg","/sdcard/Im... | |
doc_23516267 | void render_frame(void)
{
d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 40, 100), 1.0f, 0);
d3ddev->BeginScene();
d3ddev->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &surface);
D3DLOCKED_RECT locked;
surface->LockRect(&locked, NULL, 0);
*(BYTE*)locked.pBits=42;
surface->UnlockR... | |
doc_23516268 | header = ['EXPERIMENT_ID', 'SESSION_ID', 'TRIAL_END', 'TRIAL_START']
data = ([(1, 1, 85.3543804, 74.7716105),
(1, 1, 95.3867684, 85.3710747),
(1, 1, 105.4189535, 95.4033732)])
How do I make it such that all data[n][0] gets labelled as 'EXPERIMENT_ID', data[n][1] as 'SESSION_ID', data[n][2] as 'TRIA... | |
doc_23516269 | For example I have filtered the range A5:S500 by the column R and then I need a code that hides the arrows from the filer (the first row which is row 5)
I have tried this
Sub HideArrows()
Dim c As Range
With ThisWorkbook.Worksheets(1)
For Each c In .Range("A5:S5")
.Range("A5:S5").AutoFilter ... | |
doc_23516270 | How can I do that?
And also I want show the sheet (one at a time) in ASP.NET form. Please let me know how to do that.
A: Use this piece of code to get the sheet names and finally add them to any control e.g. TreeView control.
/// <summary>
/// This method retrieves the excel sheet names from
/// an excel workbook.
/... | |
doc_23516271 | When I ctrl F, 'toMillis' is not a word in any of my pages. I am unsure what could be causing this.
The error triggers when I use jquery to post/send to server and get a response, but I am using the same syntax and format here as in other scenarios where it does indeed work without error.
Client side js code:
var curr... | |
doc_23516272 | select
e.[ ACCOUNT_NUM] as acct_num
,'MTL' as src
,case
when isnumeric([TRANSACTION_AMT]) = 1 then SUM(ABS([TRANSACTION_AMT]))
when [TRANSACTION_AMT] = 'NA' then SUM(ABS(REPLACE([TRANSACTION_AMT],'NA','0')))
when [TRANSACTION_AMT] = '' then SUM(ABS(REPLACE([TRANSACTION_AMT], '', '... | |
doc_23516273 | Suppose I have a data frame df which has three columns called 'x', 'y' and 'f'. f=f(x,y) is supposed to be the value of a function at x,y.
ggplot(data=f, aes(x=x,y=y,z=f)) + stat_density2d(aes(color = ..level..))
will plot the contour map of this function. I would like to access the ..level.. data frame (whatever it ... | |
doc_23516274 | procedure TRyby_Form01.WyjazdyBTNClick(Sender: TObject);
var Wyjazd : string;
begin
Wyjazd := WyjazdEDT.text; // edit wchich is supposed to be table name
with wyjazdquery3 do
begin
parameters.ParamByName('wyjazd').value := wyjazd;
end;
wyjazdquery3.ExecSQL;
with wyjazdquery4 do
b... | |
doc_23516275 | I've made a topic branch in our Rails app that uses babel to transpile ES6 to ES5 via the asset pipeline. It works well, but as always I am weary of technical debt. Is there anyone that has good/bad reports of using such a system in production?
A: There is a growing list of users, some are detailed in this issue
Where... | |
doc_23516276 | Let's say I have user and role schema created in following way:
migration:
def change do
create table(:users) do
add :email, :string
add :username, :string
end
create table(:roles) do
add :name, :string, null: false
end
create table(:users_roles, primary_key: false) do
add :user_id, references(:users,... | |
doc_23516277 | a = [7, 5, 3, 2, 1, 4]
b = [2, 2, 1, 1, 2]
This is what I come up with:
def remove_it(num)
num.delete(num.sort[0])
end
Code works with a, but not b. It deletes both 1's in b. I only need to delete one 1.
How can I delete one smallest number in an array and keep the order?
A: Easy-peasy. Use .delete_at + .index:... | |
doc_23516278 | if(webView!=null){
try {
Class.forName("android.webkit.WebView")
.getMethod("onPause", (Class[]) null)
.invoke(webView, (Object[]) null);
} catch(ClassNotF... | |
doc_23516279 | So, is there any distinction between -T and --skip-test-unit, or are they effectively the same?
(For what it's worth, I'm using Ruby 2.0 and Rails 4.)
A: "-T" is short version of "--skip-test-unit" they do the same thing. You can see all possible options and their meaning by running rails new --help
| |
doc_23516280 | // Something that Scala is very bad at: don't try and figure out if every type I *could* possibly use supports it,
// just let me use it until I try a type that doesn't. Or at least have AnyValue provide an abstraction for all
// Numeric Types (Interface)
trait NumericValue[T] {
def +(rhs : T, lhs : T) : T
}
implici... | |
doc_23516281 | private void addLayoutInvoices() {
LinearLayout ll_invoices = new LinearLayout(getActivity());
ll_invoices.setGravity(Gravity.CENTER);
ll_invoices.setOrientation(LinearLayout.VERTICAL);
LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT... | |
doc_23516282 | Along that same axis there is another object.
I want to use onmouseover so when the cursor is over that object and I'm dragging my object, something happens.
Now, this won't work because while dragging, the dragged object is always over other objects.
How can I make JavaScript ignore the dragged object?
Edit : I use ht... | |
doc_23516283 | import csv
with open('addresses.csv', newline='') as addresses_csv:
address_reader = csv.DictReader(addresses_csv, delimiter=';')
for row in address_reader:
print(row['Address'])
A: In your csv.DictReader function, you are iterating over lines in addresses.csv and mapping each row to a dict. Check the quoted... | |
doc_23516284 | I'm trying to find a keystroke software that will display the keystrokes being used while I'm in VS Code. This would be for presenting or doing screencast.
I've tried Carnac which works anytime I do not have focus in VS Code. I know there are plenty of options that I have seen folks use for Mac's but the ones I have tr... | |
doc_23516285 | public class Parent
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual IList<Child> MyChildren { get; set; }
}
public class Child
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
publ... | |
doc_23516286 | When writing emacs --eval "(ediff "f1" "f2")", emacs is opened in ediff mode, comparing file f1 to file f2.
When trying to alias it, however, I didn't find a way to insert the files names from the command line.
The following code works for bash, but not for c-shell (because c-shell don't support functions):
function e... | |
doc_23516287 | String text = "\\n texttexttext \\n";
text = text.replaceAll("\\n", "");
System.out.println(text);
That string is similar to what I'm actually trying to use, but even with this one I can't find the newline character and replace it. The replaceAll just won't see it and I don't know why.
I've t... | |
doc_23516288 | {"results":[{"SwiftCode":"","City":"","BankName":"Deutsche Bank","Bankkey":"10020030","Bankcountry":"DE"},{"SwiftCode":"","City":"10891 Berlin","BankName":"Commerzbank Berlin (West)","Bankkey":"10040000","Bankcountry":"DE"}]}
What I want to get is a object[] in C#, where one object contains all the data what is in on... | |
doc_23516289 | I have a very simple setup:
*
*table ttt with data
*table counters with a counter (increment field)
*prePut corpocessor for the ttt table
When a row is being inserted/updated in the ttt, the coprocessor checks whether a value is present in the column d:k for the same row.
Should there be no value, coprocessor in... | |
doc_23516290 | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int ask_base(){
char num1[5];
puts("Insert base:");
fgets(num1, 5, stdin);
int base = atoi(num1);
return base;
}
int ask_exponent(){
char num2[5];
puts("Insert exponente:");
fgets(num2, 5, stdin);
int exponente= atoi(num2);
return exponent... | |
doc_23516291 | SELECT * FROM Products
WHERE Price BETWEEN 10 AND 20;
but when we change the order of value it will not show any result?
SELECT * FROM Products
WHERE Price BETWEEN 20 AND 10;
A: SELECT * FROM Products
WHERE Price BETWEEN 20 AND 10;
translates to
SELECT * FROM Products
WHERE Price >= 20 AND ... | |
doc_23516292 | <h2>heading A</h2>
<p>paragraph 1 of A</p>
<p>paragraph 2 of A</p>
<h2>heading B</h2>
<ul id="list-B">
<li>list B1</li>
<li>list B2</li>
</ul>
<p>paragraph 1 B</p>
<h2>...</h2>
..
I need to grab every "h2 and its content" and group them into something like this:
<div class="news">
<h2>heading A</h2>
<div class... | |
doc_23516293 | The problem: I want to create another List[Int] such that all elements e: Int of the s: List[Int] such that f(e) = true are replaced with transform(e).
I looked at cats-mtl FunctorEmpty (to adhere to functional programming style), but it does not seem to work in my case. Maybe some cats/scalaz data structures can be u... | |
doc_23516294 | Ex
|pn1 O | pn2 O | pn3 O|
pn1 pn2 pn3 are pannel names and O - Icon for those pannels... I just want to show Icons not Images..Which property i can use for that...
I am having pannel text,name image at runtime i have to hide name and show only the icon..is there any property to hide name on ... | |
doc_23516295 | public View getView(int position, View convertView, ViewGroup parent)
{
pos = position;
ApplicationInfo entry = ai.get(position);
String str = insatllApps.get(position);
System.out.println("Position============"+(insatllApps.get(position)));
//Log.d("Check>>:","size>>"+insatllApps.size());
... | |
doc_23516296 | In other words, if a type T is easily copyable (i.e. such as primitive types int, float, double, std::initializer_list<>, trivially copyable, etc...) and does not make a lot of copying effort, I want to have template instatiation pass by value, otherwise a const l-value reference to the passed type T.
After researching... | |
doc_23516297 | jsonPromise = response.thenApplyAsync(responseJSON -> responseJSON.getBody(WSBodyReadables.instance.json()));
JsonNode json = jsonPromise.toCompletableFuture().get();
logger.info("log json" +json);
json data
{"Key":"-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAtjtwYkEJStSEDI808nRrmfn/FH1fMwz8P08iLAliLMsIf... | |
doc_23516298 | I am using the JOptionPane for dialog and input.
After it asking for my first value it should open another and ask for my second value and so forth.
Instead of doing so it closes and doesn't provide me with the second dialog.
Here is my code.
import java.util.Scanner;
import javax.swing.JOptionPane;
public class Grade... | |
doc_23516299 | In next situation(which is just sample code for description).
If "trigger" is true, "position" and "normal" are not used in the fragment shader.
Then, are "position" and "normal" abandoned? or calculated by rasterizer?
Vertex shader :
layout(location = 0) in vec3 vertice;
layout(location = 1) in vec2 uv;
layout(locatio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.