id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23525600 | Set-Mailbox <identity> -UserSMimeCertificate <MultiValuedProperty>
The problem is, I have the S/MIME certificate as a .pfx file. How do I convert the .pfx file to a <MultiValuedProperty>?
A: A pfx file is a PKCS#12 file. userSMIMECertificate is designed to hold a PKCS#7 signed message which contains the public certifi... | |
doc_23525601 |
For example, in the attached image, the deltas are between 0.015 to 0.13. The current scale doesn't show the real scenario, since all cell sizes are equal.
Is there a way to place the ticks in their realistic positions, such that cell sizes would also change accordingly?
Alternatively, is there another method to gener... | |
doc_23525602 | Until now, I was following this approach:
https://vikrammnit.wordpress.com/2016/03/28/facing-navigation-drawer-item-onclick-lag/
So I navigate in onDrawerClosed instead than in onNavigationItemSelected to avoid the glitch.
This has been a very common issue, but it is back again. Using the Navigation Component, it is la... | |
doc_23525603 | If I was using a framework like React or Ember, the rendered template would automatically be inserted into the DOM (in the least invasive way due to virtual DOM diffing). But these libraries just give me a string of HTML. How do I use that?
Is it as simple as finding the desired parent DOM node and setting innerHTML? I... | |
doc_23525604 | I'm sure there is a simple way to do this it's just a pain as I need to ensure the page doesn't get changed in the url e.g. details.aspx stays as is but can show current content or previous versioned content.
cheers in advance
A: Views are supposed to be "stupid" (and have single responsibility)
I don't think you full... | |
doc_23525605 | I have an interface
public interface InventoryRepository
{
List<Location> GetLocations();
List<InventoryItem> GetItems();
List<InventoryItem> GetItems(int LocationId);
HomeMadeItem GetHomeMadeItem(int ItemId);
StoreBoughtItem GetStoreBoughtItem(int ItemId);
Location GetLocation(int LocationId)... | |
doc_23525606 | I made the ajax call from frontend using the below code:
useEffect(() => {
fetch("/api/orderCreateWebhooks")
.then((response) => response.json())
.then(({ fact }) => console.log(fact))
.catch((error) => {
});
}, []);
And In my backend code, I have below code.
Route::get('/api/orderCreateWebhooks'... | |
doc_23525607 | $(function() {
$( "#datepicker" ).datepicker({
onSelect: function(dateText, inst){
$("input[name='date']").val(dateText);}
});
} );
I am unable to store it either locally or into my database, or even alert it. I have received errors such as [object Object] and [object htmlinputelement].
I wo... | |
doc_23525608 | public List<EntityA> getAllEntityAByAAndDPaginated(
Collection<Long> a,
Collection<Long> d,
int numberOfResults,
int page
) {
TypedQuery<EntityA> q = entityManager.createNamedQuery(EntityA.GET_BY_A_AND_D,
EntityA.class);
q.setParameter(A... | |
doc_23525609 | When I check in my console ->Network->page.html ,
*
*Status Code is OK
Response Headers
*HTTP/1.1 200 OK
*Pragma: no-cache
*Refresh: 1; URL=http://balbla.com/page.html
*Connection: Close
*Content-Type: text/html
Then in the Response Tab - > <HTML></HTML>
My question is how can I validate in the success funct... | |
doc_23525610 | I want to create a Dictionary of string, string, with "Id" as the key for each entry and the contents of the list as the value.
i.e.
myList= { "string1", "string2", ...etc }
and therefore
myDictionary = {{"Id1", "string1"}, {"Id2", "string2"}, ...etc}
I have been trying to create a dictionary using the List.ToDiction... | |
doc_23525611 | I've setup wamp to allow remote connections to my site so they can view it, but
the URI's don't work as intended for other people visiting the site.
When other people uses the navbar on the site the URI don't change but the correct content displays
E.G:
For me: www.mysite.com/pencils
Others: www.mysite.com
i'm using .h... | |
doc_23525612 | @Override
public RemoteViews getViewAt(int position)
{
if (mWidgetItems == null || position > mWidgetItems.size() - 1)
{
return getLoadingView();
}
WidgetUiUser user = mWidgetItems.get(position);
RemoteViews views = new RemoteViews(mContext.getPackageName(), R.layout.widget_grid_item);
... | |
doc_23525613 | Anyways, I'm trying to create a form for Merchants to sign in. I have a MerchantSessionsController that tries to create a new session based on signin form input:
This is what I have in my
app/views/merchant_sessions/new.html.erb
<%= form_for(:merchant_session, :url => merchant_sessions_path) do |f| %>
<div class="fi... | |
doc_23525614 | The Curl Request c&p'd from the google developer tool:
curl \
'https://people.googleapis.com/v1/contactGroups?key=[YOUR_API_KEY]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--compressed
And my php cURL request:
$ch = curl_init();
curl_setopt($ch, CURLOPT_... | |
doc_23525615 | I also followed official link-> [Angular JS Eclipse Github setup link][1]
I installed, “Angular JS” from “Eclipse->Help Menu->Eclipse Marketplace”
It got installed and restarted.
Then, Eclipse->New->Static web project
Then, Convert the project to Angular. Right click Project, Configure-> Convert to Angular JS project
T... | |
doc_23525616 | Is it possible to get the current page roles in my code (without parsing the ylm file 'by hand') ?
Thanks
A: Its duplicate of : Symfony2 get to the access_control parameters located in the security.yml
use Symfony\Component\Yaml\Yaml;
$file = sprintf("%s/config/security.yml", $this->container->getParameter('kernel.... | |
doc_23525617 | I have a HorizontalScroll view outlined in my main_activity.xml and I want to add LinearLayout containers to it with data, each time a user presses a button. So my scroll view will start with nothing, and each button push will add another entry to it.
I tried something with a separate layout for the containers to be a... | |
doc_23525618 | For example, short alpha code representing the insurance (e.g., 'BCBS' for 'Blue Cross Blue Shield'):
txtDesc.text = "Blue Cross Blue Shield";
string Code = //This must be BCBS..
Is it possible? Please help me. Thanks!
A: Without Regex:
string input = "Blue Cross Blue Shield";
string output = new string(input.Where... | |
doc_23525619 |
A: I didn't understand what you meant by the last few lines, but when you have a specific output like yours, you usually have to write you own.
def sci_not(v,err,rnd=1):
power = - int(('%E' % v)[-3:])+1
return '({0} +/- {1})e{2}'.format(
round(v*10**power,rnd),round(err*10**power,rnd),power)
This ... | |
doc_23525620 | <tr class="simplehighlight" onclick="window.location.href='./games/game191.php';">
<td>06/09/2007</td><td>Jennifer Woods Memorial Grand Prix</td><td>C54</td>
<td>Nikolayev, Igor</td><td>2431</td><td>Parry, Matt</td><td>2252</td><td class="text-center">1-0</td></tr>
I want to read in a delimited file, make an array, an... | |
doc_23525621 | #if DEBUG
#include <iostream>
#include <ostream>
#define LOG(x) std::cout << x << std::endl;
#else
#define LOG(x) // LOG(x) is replaced with nothing in non-debug
#endif
How would an equivalent function look like that allows this?:
LOG("This is a Test message" << " with " << testVariable << " a variable");
my current... | |
doc_23525622 | Structure:
apps:
*
*project_a
*project_b
Project_a and project_b are both --sup applications and I want to use the GenServer from project_a in project_b. I've included the project in my deps.exs file, but I don't know what to do next...
If I open the observer I see both application in the menu, but I keep get... | |
doc_23525623 | func addFavouriteColumn() -> Bool
{
var querySql = "ALTER TABLE 'Media' ADD COLUMN Favourite INTEGER DEFAULT 0"
guard let queryStatement = try? prepareStatement(sql: querySql) else {
return false
}
defer {
sqlite3_finalize(queryStatement)
}
return sqlite3_step(queryStatement) == ... | |
doc_23525624 | Also is there anyway we could reverse an array without TEMP value?
for (int i = 0; i < numbers.length / 2; i++) { // why divide by 2
int temp = numbers[i];
numbers[i] = numbers[numbers.length - 1 - i];// what this does?
numbers[numbers.length - 1 - i] = temp;`i];
numbers[numbers.length - 1 - i] = te... | |
doc_23525625 | Is it configurable in Kafka Server configurations?
A: I don't think it's possible to accomplish this. One of the key differences between Kafka and other messaging systems is that Kafka uses the underlying OS's to handle storage.
Another unconventional choice that we made is to avoid explicitly
caching messages in... | |
doc_23525626 | This is my seekBar:
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<SeekBar
android:id="@+id/seekBar"
android:layout_width="match_parent"
android:layout_height="match_parent">
... | |
doc_23525627 | this.transactionTemplate.execute(new TransactionCallback<E>() {
@Override
public E doInTransaction(TransactionStatus status) {
// update entities
TransactionSynchronizationManager.registerSynchronization(new NotificationTransactionSynchron... | |
doc_23525628 | Expected behavior
Stated warning should NOT be displayed.
Actual behavior
Every time I make a change and trigger a re-deployment, I get an error like:
WARN[0064] image [gcr.io/wired-benefit-XXXXX/demoapp] is not used by the deployment
Yet the image is modified with the updated change, so I'm not sure what the error i... | |
doc_23525629 | If you're using git, then any time you regularly commit your work like a good developer, you can no longer see which lines or files you have modified.
It would be nice if I could tell PhpStorm "please consider the deploy-candidate branch to be 'the last update', so I can easily see what I've actually changed in my curr... | |
doc_23525630 | It's a next.js app that only has basic CRUD functions (I'm following Brad Traversys next.js course on udemy)
In this component I want to make a request to my Strapi backend to fetch user data
import React from 'react'
import Layout from '../components/Layout'
import { parseCookies } from '@/helpers/index'
import { API_... | |
doc_23525631 | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'qualityAuditTokenService' defined in URL [jar:file:/home/www/webapps/ROOT/WEB-INF/lib/product-service-2.0.1-SNAPSHOT.jar!/com/company/product/services/QualityAuditTokenService.class]: Unsatisfied dependency expressed throug... | |
doc_23525632 | Error LNK2005 mkl_serv_allocate already defined in mkl_intel_thread_dll.lib(mkl_intel_thread.dll) test C:\Users\user1\test\build\mkl_core.lib(mkl_memory_patched.obj)
Error LNK2005 mkl_serv_malloc already defined in mkl_intel_thread_dll.lib(mkl_intel_thread.dll) test C:\Users\user1\test\build\mkl_core.lib(... | |
doc_23525633 | What I did was first making datetime object of US/Eastern timezone, converting it to UTC timezone, and converting it back to the US/Eastern timezone. It is expected the first and last US/Eastern timezone datetime objects are identical. But it turned out that the two are printed differently.
What am I missing here?
Code... | |
doc_23525634 |
*
*documents
*document_revision_fields
I need to migrate some of the columns of some of the records (based on the value of one of the columns) inside the document_revision_fields to a new table document_fields.
This is how the new table is being created:
await knex.schema
.createTable('document_fields', (tabl... | |
doc_23525635 | "NetworkError: 404 Not Found - http://localhost/drupal/tooltip/css/layout.css"
my files path like this
/* mytheme.info */
stylesheets[all][] = tooltip/css/layout.css
stylesheets[all][] = tooltip/css/typo.css
This files are in my Theme folder
Folder: MYTHEME
File: mytheme.in... | |
doc_23525636 | I can successfully emulate the call using postman. DataSource definition below:
constructor(
injector: Injector,
private _route: ActivatedRoute,
private _router: Router
) {
super(injector);
let authString = "Bearer " + getToken();
this.gridDataSource = {
store: {
type: 'odat... | |
doc_23525637 |
A: You can refer my case :
*
*Machine A (192.168.1.1): Centos
*
*Download and install SonarQube, MySQL http://192.168.1.1:9000
*Machine B (192.168.1.2): Centos
*
*SonarQube Runner
*Jenkins http://192.168.1.2:8080
*SCM like ClearClear, Git
*Build tools (JDK, Maven, Ant,...)...
A: There are lot of links... | |
doc_23525638 | The Event has a start_date property.
I need to get the IDs of the duplicated events that start from 2 months to now. A duplicated event is an event that is a the same location at same hour.
// Create the pipeline
pipeline := []bson.M{
bson.M{
"$match": bson.M{
"start_date": b... | |
doc_23525639 | a14,2T,50,33.26:a14,3T,50,33.26,a14,4,50,33.26,
a17,2T,50,33.26:a17,3T,50,33.26,a17,4,50,33.26,
a4,2T,50,33.26:a4,3T,48,33.26,a4,4,49,33.26,
a3,2T,50,33.26:a3,3T,47,33.26,a3,4,48,33.26,
a9,2T,50,33.26:a9,3T,50,33.26,a9,4,50,33.26,
a2,2T,50,31.48:a2,3T,50,33.26,a2,4,50,33.26,
a12,2T,50,33.26:a12,3T,49,33.26,a12,4,49,33.... | |
doc_23525640 | URL normalization (or URL canonicalization) is the process by which URLs are modified and standardized in a consistent manner. The goal of the normalization process is to transform a URL into a normalized or canonical URL so it is possible to determine if two syntactically different URLs are equivalent.
Strategies in... | |
doc_23525641 | var time = new Date().getHours();
if(time == 11) {
alert("this works");
}
but that only detects the user's time. how can i do pacific time only?
A: Combination of getTimezoneOffset() and PST (-7), currently Pacific Daylight Time!
var offset = new Date().getTimezoneOffset() / 60;
var localHour = new Date().getHo... | |
doc_23525642 | "require": {
"components/jquery": "1.9.*"
},
This has created a components folder with jquery in it.
My question is:
*
*Can I specify where query is downloaded to, I'd prefer it to go in public/src
*The above downloads loads of things like require-built, require.js, jquery-migrate. Is there a way to specify ju... | |
doc_23525643 | I have the following interface:
public interface MyInterface{
/**
* Some contract
**/
public String convert(String arg);
}
Now I have a bunch of MyInterface implementations: MyInterface1Impl, MyInterface2Impl, MyInterface3Impl, etc...
The issue is that I want to test the general contract defined in Ja... | |
doc_23525644 | url: http://localhost:15672/api/policies/vhost123/DLX
body:
{
"pattern":".*",
"definition": {
"dead-letter-exchange":"DLX123"
},
"priority":0,
"apply-to": "all"
}
Is there any way to do this within the C# driver?
A: There doesn't appear to be a way to do this through the C# interface bu... | |
doc_23525645 |
A: NFC reading and writing logic should be independent of what you use to construct the view layer of your app – whether that's UIKit or SwiftUI doesn't matter.
Check out the documentation for the Core NFC framework, which allows for reading and writing NFC tags, and check other iOS NFC questions/answers on Stack Ove... | |
doc_23525646 |
A: As long as you're on Windows 7+
DisplaySwitch.exe /clone
will duplicate displays.
This will extend displays:
DisplaySwitch.exe /extend
Hope this helps.
Also you can use Win+P if you want a quick shortcut.
A: There is no general solution for this using batch-files. However Nvidia drivers do provide a option fore... | |
doc_23525647 |
adapter = new SimpleAdapter(
this, list_data, R.layout.list_item_detail,
new String[]{"title","desc","icon"},
new int[]{R.id.title, R.id.desc, R.id.icon}
);
listview.setAdapter(adapter);
private List<Map<String, Object>> list_data_add(String title, String desc, Bitmap i... | |
doc_23525648 | here i have created a client using the command from command prompt now trying to create a soap Message,but I am very new to this concept so unable to find the correct way so does any one have Idea regarding this?
A: Sample code to create soap request
using System;
using System.IO;
using System.Net;
using Syste... | |
doc_23525649 | device_name = tf.test.gpu_device_name()
if not device_name:
raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))
it returns Found GPU at: /device:GPU:0Metal device set to: Apple M1 Max.
Furthermore, the profiler shows that I'm only using the host:
TF Op Placementinfo
generally de... | |
doc_23525650 | I can do this, what I can't do is to make the new movieclip selectable and draggable.
This is how I create the new movieclip
new_btn.addEventListener(MouseEvent.CLICK, newMc);
function newMc (event:MouseEvent):void {
var mc:MovieClip = new MovieClip();
mc.graphics.beginFill(0xFF0000);
mc.graphics.drawRect(... | |
doc_23525651 | (base) C:\Users\LENOVO>pyspark
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [subcommand]
jupyter: error: one of the arguments --version subcommand --config-dir --data-dir --runtime-dir --paths is required
when i execute spark-shell, it is working fine
A: There was an ... | |
doc_23525652 | Here is a link to a mocked up version of my site, as the visual will help best convey the issue I am seeing - https://pub.s7.exacttarget.com/c1i011a1jlr. This issue is occurring on Slides 2 and 3.
Thank you,
Allison
A: $('#PGECarousel').on('slide.bs.carousel', function(e) {
if (e.from < 2) {
$('.carousel-item')... | |
doc_23525653 | I tried with this:
try (CallableStatement callableStatement =
dbConn.prepareCall("{ CALL prueba1(?,?) }")) {
callableStatement.setString(1,mun);
callableStatement.setString(2,edo);
callableStatement.execute();
callableStatement.close();
}
And wit... | |
doc_23525654 | import java.util.Random;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author yolk3
*/
public class clcikerUI extends javax.swing.JFrame {
/**
* Creates new ... | |
doc_23525655 | i wanted to capture the trailing "555" in the request url.
i tried using the logic below(python) in lambda but unfortunately i cannot capture the "555" part since queryStringParameters is null
productid=list(event['queryStringParameters'].keys())[0]
The event doesnt have any trace of the product id
{
"resource": "/... | |
doc_23525656 | From other questions here, I've gotten up to using Runtime.exec(cmdArray, null, workingDirectory); but I keep getting "CreateProcess error=2, The system cannot find the file specified". I've checked, and both the path and file exist, so I don't know what is going wrong. Here is the code I'm using.
String [] fileName = ... | |
doc_23525657 | I'm trying to add a banner that changes every time a page refreshes. I have set up 2 examples in my database called "link 1" and "link 2". I will want to add more as and when I get them.
What I want to happen is this:
I want to display one of the 2 images on my site and when the user refreshes the page, it will selec... | |
doc_23525658 | I have not gotten very far, I am just trying to make a square of random size and random color appear on the screen, but I can't even manage that. See my code below:
<script type="text/javascript">
function Shape () {
this.x = Math.floor(Math.random()*850);
this.y = Math.floor(Math.random()*850);
this.draw();
}
... | |
doc_23525659 | [
key => data => [
key1 => data => [...]
=> expires => 123456
key2 => data => [...]
=> expires => 123456
]
=> expires => 123456
]
This can be many levels deep (sometimes 10-15 levels).
What I would like to do is return only the values... | |
doc_23525660 | What is the best or recommended method for building this singleton type class in Swift?
Or has Swift even come up with something for this yet?
| |
doc_23525661 | public void setClockTimeScheduler(Context ctx) {
// TODO Auto-generated method stub
Calendar current = Calendar.getInstance();
Calendar cal = Calendar.getInstance();
cal.set(cal.get(Calendar.YEAR),
cal.get(Calendar.MONTH),
cal.get(C... | |
doc_23525662 | When I try the following command this is what I get:
(my_env) crigano@crigano-desktop:~$ python3.8 -m pip install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing
Collecting numpy
Using cached numpy-1.20.2-cp38-cp38-manylinux2014_aarch64.whl (12.7 MB)
Collecting ninja
Using cached ninja-1.10.0.post2.... | |
doc_23525663 |
A: Instead of recursive CTEs and while loops, has anyone considered a more set-based approach? Note that this function was written for the question, which was based on SQL Server 2008 and comma as the delimiter. In SQL Server 2016 and above (and in compatibility level 130 and above), STRING_SPLIT() is a better option.... | |
doc_23525664 | Now i want to send this image along with user's email ID. How can i send this image directly without letting user save it on his local system.
A: I'm thinking you need some javascript magic, and because you already use HTML5 canvas, that shouldn't be a problem.
So, an onclick event on the submit button that will make ... | |
doc_23525665 | import java.awt.Component;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
public class gass extends JFrame {
String title[] ={"Box", "Weight", "Priority"};
public gass() {
int nb=interface1.BNumber;
Object[][][] data = new Object[nb][nb][nb];
int E1... | |
doc_23525666 | (function($) {
$.fn.simpleSpinner = function(options) {
var settings = $.extend({
size: 'large',
step: 1,
}, $(this).data('spinner'), options);
return this.each(function(e) {
var self = $(this);
......
});
};
}(jQuery));
Then I i... | |
doc_23525667 | Is there some way that I could modify my web.config file (just for local testing) so that it would actually go to the index.html (load that up) and then to the /home/about state?
Here's my current web.config:
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFr... | |
doc_23525668 | SomeKeyValueTypedPipe
.mapWithValue(dictForKeys) { case ((key, value), dictForKeys) =>
(dictForKeys.get.getOrElse(key, key), value) }
.mapWithValue(dictForValues) { case ((key, value), dictForValues) =>
(key, dictForValues.get.getOrElse(value, value)) }
I was just wondering whether there's a more com... | |
doc_23525669 | MSISDN, CARDNUMBER AND ACCOUNTNUMBER
I am trying to add data in the accountnumber column. The value here is Min 1 and Max 4.
so if an msisdn has 2 cardnumbers registered, his accountnumbers will be 1,2 and the next msisdn in the next row will have 1 for his first cardnumber.
i have 10,000 rows and i cannot update all... | |
doc_23525670 | Expected type
class 'protorpc.messages.MHistoryActivityViewMessage'
for field items,
found
MHistoryActivityViewMessage\n body: u'Test Here'\n activity_id: 'WS-MHistory_ag9zfm1jYS1kZXJyaWNrLTFyGQsSEE1IaXN0b3J5QWN0aXZpdHkYsbyuBAw'
[...]
I have run across this issue many times where the expected type is 'absolute.path... | |
doc_23525671 | data = list(a = factor(c(1,1,2,2,3,NA,NA)),
b = factor(c("a","b","b")),
c = factor(c(3,4,NA,3)))
data = lapply(data, FUN = function(x) {
if (any(is.na(x))) {
x = addNA(x)
levels(x)[length(levels(x))] = "Missing"
}
})
Any help would be appreciated.
A: We can try
lapply... | |
doc_23525672 | I am trying to enable ModelsBuilder in API mode.
As far as I learned in my version of umbraco Umbraco.ModelsBuilder.Api should have already been part of the Umbraco.Core and installed.
However when I check in my Developer > ModelsBuilders tab I can see this:
ModelsBuilder is enabled, with the following configuration:
... | |
doc_23525673 | I see that some kind of unit test framework is used. It probably somehow calls task0 but the IDE shows no references to task0 except one from todoTask0. The only reference to todoTask0 is in task0. So we have circular references but nowhere do I find an external reference to call up one of these functions.
Can someone ... | |
doc_23525674 | <repositories>
<repository>
<id>MDM</id>
<url>My devnexus URL</url>
<name>My Repo</name>
</repository>
</repositories>
<dependencies>
...
<dependency>
<groupId>com.melissadata</groupId>
<artifactId>mdPhone</artifactId>
<version>2.0</version>
</dependency>
...
<dependenci... | |
doc_23525675 | I'm just using
System.out.print("(。•́︿•̀。)");
But this ends up printing (ᄑᄀ¬タ꼬チᄌ¬タ꼬タᄑᄀ)
I also tried using \ to escape formatting in case that was the issue, like:
System.out.print("(\。\•́\︿\•̀\。)");
But this resulted in an illegal escape character error.
A: All files on all modern systems are stored as a sequ... | |
doc_23525676 | I've just installed the android development bundle on my windows 8 laptop. I'm trying to install the first app "hello world" (http://developer.android.com/training/basics/firstapp/creating-project.html) to my Nexus 7 (2012) version 4.4.2 but its not working.
Using the logcat viewer (whilst the build is taking place) I ... | |
doc_23525677 | var pdf = new jsPDF('p', 'mm', 'a4');
pdf.text(30, 30, 'Hello world!');
pdf.save('hello_world.pdf');
here's an example code.
when i run this it downloads the file but don't show the print page. all i want is to show the print page instead of downloading the file then printing it.
Thank You!!!
A: Just use doc.output()... | |
doc_23525678 | Main Frame
- CView derived class
- CWnd derived class
--- CMFCTabCtrl derived class
---- CDialog derived class
The CMFCTabCtrl can hold in turn the CWnd derived class and so on and so on...
If you think of it as a tree of windows lets define the above to be at depth 0.
The problem occurs when the depth of the tree ... | |
doc_23525679 |
ClassLoader currentCls=Thread.currentThread().getContextClassLoader();
InputStream template = currentCls.getResourceAsStream("system/CompartmentTerraformTemplate.json");
ObjectMapper _mapper = new ObjectMapper();
JsonNode obj=_mapper.readTree(template);
String template... | |
doc_23525680 | I was able to create a Turing machine that adds two unary, and two binary numbers.
I have a general idea of how to solve this problem:
While first number > 0:
Decrement first number.
Increment the second number.
How do you actually decrement a decimal number?
A:
This way, we can add two numbers.
| |
doc_23525681 | But I don't know how to do the same for Flow. It doesn't seem to accept Babel plugins. Maybe it parses code completely on its own and doesn't even use Babel? I don't know. Does Flow itself take plugins? I don't know.
Is there some simple way for me to plug a function into SOME tool or other in order to arbitrarily... | |
doc_23525682 | I have sorted the array, but I think this's still not helping much.
Here's my pseudocode:
sort boxA
sort boxB
for i in boxA:
for j in boxB:
if i+j < value:
break
else if i+j > value:
count+=1
print the count
set count = 0
The question is asking to output how many c... | |
doc_23525683 | I have some experience with AngularJS and promises and have searched Stackoverflow but cannot find any solution to this problem.
HTML:
<div ng-repeat="area in vm.areas">
<span>{{area.name}}</span>
<span>Close to: </span> <span>{{vm.getCity(area)}}</span>
</div>
JS:
vm.getCity = function(area){
var center = getCente... | |
doc_23525684 | Uncaught ReferenceError: $ is not defined
I have tried placing a JQuery script within the app and it does not work.
I just want the data to append to the #resultContainer when the page is loaded
app/views/locations/show.html.erb
<div id="resultContainer"></div>
app/assets/javascripts/application.js
var _PremiumApiBase... | |
doc_23525685 |
df = pandas.DataFrame([[2001, "Jack", 77], [2005, "Jack", 44], [2001, "Jill", 93]],columns=['Year','Name','Value'])
Year Name Value
0 2001 Jack 77
1 2005 Jack 44
2 2001 Jill 93
For each unique Name, I would like to keep the row with the largest
Year value. In the above example I w... | |
doc_23525686 | So everytime I rake db:migrate a few migrations are run and then it stops at a "Table already exists" or "Column already exists"
Is there a way to tell rake what is going on, or even better, a argument that I can pass to rake db:migrate to tell it to ignore "already exists" errors and just move the hell on.
A: You can... | |
doc_23525687 | I want that the 2 textviews will be side by side, so the second view will start at the end of the first view.
Please help :-)
A: Though this is the simplest one , if you want them to occupy the same space then you can use layout_constraintVertical_chainStyle.
<?xml version="1.0" encoding="utf-8"?>
<android.suppor... | |
doc_23525688 | I want to be able to add a section where I can add a alt tag to the image - because I use some images more than once on different pages using the standard wordpress alt tags means I would need to upload the image multiple times.
I have used visual composer on other sites that has been customized by the theme author and... | |
doc_23525689 | dgvReport.DataSource = new DataView(dt, "StudentID = " + txtSearch.Text, "StudentID", DataViewRowState.CurrentRows);
Any help would be appreciated. Thank you.
A: you can use RowFilter Property for this
DataView dataView = new DataView(dt);
dataView.RowFilter = "age > 14 and age < 19";
dgvRep... | |
doc_23525690 | list = ['bill gates','elon musk','aamir khan','larry page']
allPosts = Post.objects.filter(author=list)
When I change list filter can work dynamically
A: You can use __in:
my_list = ['bill gates','elon musk','aamir khan','larry page']
allPosts = Post.objects.filter(author__in=my_list)
Note: Never use python built in... | |
doc_23525691 | Usually I run
git log
Then I create a branch for each commit and investigate each sequentially.
Is there a way to create a branch for each commit and name them sequentially like 01, 02 ...etc.
A: This bash script will do the trick, creating a branch called Bn starting at B1 for each commit. I assume you don't wan... | |
doc_23525692 | Method:
public void setIncludeAllSubaccounts(JAXBElement<Boolean> paramJAXBElement)
{
this.includeAllSubaccounts = paramJAXBElement;
}
This does not compile:
returnMessageFilter.setIncludeAllSubaccounts(true);
A: A JAXBElement is generated as part of your model when a JAXB (JSR-222) implementation would ... | |
doc_23525693 | class Test(models.Model):
owner = models.ForeignKey(Member)
name = models.CharField(max_length=6
score = models.IntegerField(validators=[MinValueValidator(1), MaxValueValidator(10)])
service = models.ForeignKey(Service)
feel = models.ForeignKey(feel)
....
If I do
t, created = Test.objects.get_... | |
doc_23525694 | The bottom axis is supposed to look like the top, being placed right below the tip of the highest chart. I have tried to .orient the bottom axis to both "top" and "bottom" to little avail. Any ideas?
var width = 960,
fullHeight = 850,
height = 350;
var y = d3.scale.linear()
.domain([0, d3.max(data)])
.range(... | |
doc_23525695 | I heard this isn't possible, but maybe it changed, or if not is there any other way around.
A: You can do it now!
context:System:device:deviceId
As far as I can tell it only works on real devices. So if you are testing in the developer's Skills Manager you don't get the field, but when used with a real Alexa device, i... | |
doc_23525696 | And there is a desktop computer with linux on board(but really I presume there is no difference). I need to type on web browser address like someaddress.com and to see website situated at my server.
My /etc/hosts:
127.0.0.1 localhost
105.123.123.123 someaddress.com
105.123.123.123 www.someaddress.com
But it doe... | |
doc_23525697 | In the UI I am showing Start Date and End Date
.where('createdAt', '>=', startDate)
.where('createdAt', '<=', endDate)
The query works as expected, but when I have the same date on both fields I don't get the results on that date and instead I get an empty result.
Is there a way to fetch a single date results while se... | |
doc_23525698 | How to retrieve variables of each task in a process ?
A: For a userTask with id="taskTest" you can use this code:
RuntimeService runtimeService;
ProcessEngine activitiProcessEngine
TaskService taskService = processEngine.getTaskService();
runtimeService = activitiProcessEngine.getRuntimeService();
taskService =... | |
doc_23525699 | What field should I add to the SelectProperties object ? or where I can find these information.
KeywordQuery keywordQuery = new KeywordQuery(SPContext.Current.Site);
keywordQuery.QueryText = queryText;
keywordQuery.ResultsProvider = SearchProvider.Default;
var selecProperties = keywordQuery.SelectProperties;
selecProp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.