id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23529700 | std::vector<int> v{0,1,2,3,4,5};
std::copy_n(v.begin(),
3,
std::ostream_iterator<int>(std::cout, ":"));
I can use the new C++20 ranges to take several ints from a vector putting them to standard output with | operator in a for loop, one value at a time using <<.
for(int n : std::views::all(v)
| std::views:... | |
doc_23529701 | What is the best way to persist that ArrayList?
onSaveInstanceState only seems to support primitives and I've been unable to set up a case where onRetainNonConfigurationInstance actually gets called. So in onCreate, the XML data is loaded from the server ever time I switch to that Activity. I have made the models that... | |
doc_23529702 | this is the method I'm using
register(BuildContext context) {
http
.post(Uri.parse('http://reqres.in/api/register'), body: _user)
.then((value) {
var valJson = json.decode(value.body);
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(content: Text("$valJson")));
... | |
doc_23529703 | This is my code
const app = require('./app');
const config = require('./config/config');
const logger = require('./config/logger');
let server;
server = app.listen(config.port, config.host, () => {
logger.info(`Listening to port ${config.port} on host ${config.host}`);
});
app.get('/:sid/:ui', (req, res, next) => {... | |
doc_23529704 | I'd like to know how I can map my search response directly to my ViewModel class without any transforming in C#.
I have an ElasticIndex called "PublicLegislationResult", and a ViewModel called "ViewEntities.PublicLegislationDetail" with a subset of the properties that exist in the ElasticSearch index.
The properties in... | |
doc_23529705 | How do I go from here?
g.append('g')
.attr('class', 'axis')
.attr('transform', 'translate(0,' + height + ')')
.call(d3.axisBottom(x));
A: Put this is the CSS:
.axis path, .axis line {
fill: none;
stroke: none;
}
Here is a demo:
var svg = d3.select("svg");
var x = d3.scaleLinear().domain([1, 10]).range([... | |
doc_23529706 | module SomeStuff
class Widget < ActiveRecord::Base; end
end
class WidgetsController < ApplicationController
def create
w = Widget.create(params)
location = url_for w
render :json => w, :location => location
end
end
The problem is Rails wants a "some_stuff_widget_path" to exist and it doesn't because... | |
doc_23529707 | I have created several branches which each branch have a new feature.
-> Master
-> Feature 1
-> Feature 2
...
-> Feature 80
I have an idea to create a simple web-page where the users can choose which features they want to include. Then I want to merge all selected features (branches) into the master and create a new r... | |
doc_23529708 | SELECT
item,
[2018-05]=CEILING(SUM(CASE WHEN New_Date = '2018-05' THEN Qty Else NULL END)),
[2018-06]=CEILING(SUM(CASE WHEN New_Date = '2018-06' THEN Qty Else NULL END)),
[2018-07]=CEILING(SUM(CASE WHEN New_Date = '2018-07' THEN Qty Else NULL END)),
[2018-08]=CEILING(SUM(CASE WHEN New_Date = '2018-08' THEN Qty Else NU... | |
doc_23529709 | Hello,
I'm working on a project in which the main part of the data has a complex structure as you can see in the above picture.
Now, the object, in reality, is much complex than that but what I showed it servers the purpose.
Because in DB they are linked together in tables relationship the first time when the website i... | |
doc_23529710 | I've got the following code:
// Bank Interest
$res = $db->query("
SELECT uid,
id,
rm_days,
bank
FROM sys_users
LEFT JOIN sys_users_stats ON sys_users.id = sys_users_stats.uid
") or die($db->error);
while ($row = $res->fetch_object()) {
$multiply = ($row->rm_days >... | |
doc_23529711 | I want result like:
required - binary name, doc test name
optional - doc name1, doc name2, doc name3
<?xml version="1.0" encoding="UTF-8"?>
<test>
<required>
<item type="binary">
<name>binary name</name>
<url visibility="restricted">test.exe</url>
</item>
<item type="... | |
doc_23529712 | I need to replace "\n\s*(\n)" with "$1". It seems that is not possible with short regex.
So I wonder is it possible to write such macros?
A: Netbeans macros cannot handle regex. Your regex/replace works for me so I would use replace in files for this operation.
I suggest to use format source feature (ALT + SHIFT + F).... | |
doc_23529713 | Thank you so much
| |
doc_23529714 |
A: You can start by reading: http://www.gpwiki.org/index.php/SDL:Tutorials:Using_SDL_with_OpenGL
You will use SDL to create an OpenGL context within which you will do all of your OpenGL based rendering.
By events do you mean user input? If so, then simply at the end of each frame/loop make use of SDL to check for inpu... | |
doc_23529715 | I have tryed so many things now without success. I really hope some of you can help me out or maybe point me to a simular example.
For example, if I put in four names in the textarea and then presses "Generate Notes", it should generate three notes where the first note should show up empty in both fields and the names ... | |
doc_23529716 | What I want to be able to do is to remove the circled horizontal bars from the graph axes.
Does anyone know how to do this?
My current code is as below
var p = new ExcelPackage(new FileInfo(fileName));
var openSheet = p.Workbook.Worksheets.First();
var scatterChart = openSheet.Drawings.AddChart... | |
doc_23529717 | julia> using HTTP, XLSX, DataFrames, GZip
julia> file = HTTP.get("http://www.tsetmc.com/tsev2/excel/IntraDayPrice.aspx?i=35425587644337450&m=30")
julia> write("c:/users/shayan/desktop/file.xlsx.gz", file.body);
julia> df = GZip.open("c:/users/shayan/desktop/file.xlsx.gz", "r") do io
XLSX.readxlsx(io)
... | |
doc_23529718 | I need sth like this:
COL1-(PK) | COL2-(some int value) | COL3-max(COL2)
1 0 3
1 3 3
1 2 3
2 10 15
2 7 15
2 15 ... | |
doc_23529719 | I have a UIPageViewController and I want to test it with Calabash. I've tried using
Then I swipe right
which didn't work with UIScrollView or PageView. Then I found this which worked with UIScrollView but still nothing with PageView.
Then /^I swipe pageView to the (left|right|up|down)$/ do |direction|
scrollViews... | |
doc_23529720 | scp username@host.com:/dir/of/file.txt \local\dir\
It looks like it was successful, but it only ends up creating a new folder labeled 'localdir' in the remote directory /dir/of/.
How can I copy the file to my local computer over SSH?
A:
Make sure the scp command is available on both sides - both on the
client and ... | |
doc_23529721 | How would I go about colouring the black lines individually, or adding floating labels?
Cheers!
vpspec=frq1.*spectrumb;
figure(4)
semilogx(frq1,vpspec);
xlim([frq1(1),0.5]);
hold on;
top=max(get(gca,'ylim'));
semilogx([K1 inertial, M2;K1 inertial,M2],[0 top],'color','k','LineStyle','-');
grid on
hold off;
legend
xla... | |
doc_23529722 | Example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When I call registerReceiver() for that action with a null BroadcastReceiver — I get the Intent that was last Broadcast for that action.
Whenever I find the last value by:
//In Activity
val batteryIntent = registerReceiver(null, Inte... | |
doc_23529723 | this is my code below for getting the images.
$sql = $conn->prepare("SELECT * FROM ewsc_picture_gallery WHERE ewsc_picture_gallery_folder = '".$_GET['gallery']."'");
$sql->execute();
$result = $sql->get_result();
$numrows = $result->num_rows;
if ($numrows==1){
while($show = mysqli_fetch_a... | |
doc_23529724 | server: windows 10 PC
client: Android 7.1 linux version 4.4.63
testing in 5 ghz network...
Is there any options left over to try.
timers below added shows that more time is consumed in kernel_recvmsg. even perf tool calls shows more time is consumed in kenrel_recvmsg.
t_usb.rx_rcv_start = ktime_get();
while (total_rc... | |
doc_23529725 | A sample string is:
info = "name: joe", "name: jerry", "name: kate"
Here is what I'm doing:
import re
string = 'info = "name: joe", "name: jerry", "name: kate"'
array = re.findall(r'"(.*?)"', string)
for x in array:
x = x.replace(" ","") #remove spaces because there might be space before colon occasionally
... | |
doc_23529726 | public static class Database
{
public static bool HasAccess(string userId, string documentId) { return true; }
}
Now it's quite easy to have someone key documentId instead of userId and vice versa. One could prevent that by abstracting the data type of the arguments:
public class UserId
{
public string Value { g... | |
doc_23529727 | I want to replace \n with an HTML break and want to display it as below:
I recommended Garden Solutions for this Tender Contracting on the basis of
1)Top Scorer for tender
2)Professional Experience in Building Services
3)Approved Service Providers
I am using JavaScript's replace function
var val = recommend.replace(... | |
doc_23529728 | auth_method: odbc
## MySQL server:
odbc_type: mysql
odbc_server: "localhost"
odbc_database: "chat"
odbc_username: "admin"
odbc_password: "admin"
## If you want to specify the port:
odbc_port: 3306
modules
...
mod_mam:
db_type: odbc
Full ejabberd.yml
###
###' ejabberd configuration file
###
###
### Th... | |
doc_23529729 | #include <iostream>
using namespace std;
int main()
{
int gt1, gt2;
cout << "Hello World!" << endl;
return 0;
}
Just for 0.5 sec a black box shows up and it closes.
Is there anything I can do to prevent this?
A: Set a breakpoint in your code, such that you can debug it. Just click on the bar on the left... | |
doc_23529730 | Is it possible to use jQuery (or otherwise) to
1- detect if an iframe with class="iframe1" appears on a given page and
2- if it does exist, to remove the primary navigation bar with id="main-header" ?
I'm currently using this custom CSS to hide the navigation globally:
#main-header {
display:none !important;
}
and t... | |
doc_23529731 | However, two days ago, the checkout layout got changed automatically from the classic one to the mobile-responsive version. Previously when I had the callback for instant update defined it automatically used to switch from the mobile-friendly version to the classic version. Now that is no longer the case and the instan... | |
doc_23529732 | The function will be called from a nested loop, requesting the vector (and processing it's elements) million times, so unnecessary (re)allocations should be avoided.
Bjarne Stroustrup recommends returning collections by value, due to C++11 move semantics. However it seems to me that the second approach (doStuff2) is be... | |
doc_23529733 | if firstoption = go and second = true I want MASK in value "A"
if firstoption = stop and second = true MASK = "B"
etc
It's possible using without managebean set inputbox and can change value in inputbox?
<composite:interface>
<composite:attribute name="value" type="java.lang.String" />
<composite:attribute name... | |
doc_23529734 | When I run my program, it creates a CSV file in my Netbeans project folder. However, when I open the CSV file - it is blank.
In my main method, I show the user the array and then call the writeCSV method as shown below:
//show the user the sorted array
System.out.println( "The sorted array is: ");
for ( in... | |
doc_23529735 | <html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=6" />
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function BuildActivityTypeSubTypeDropDown(ActivityTypeId) {
var ActivitySubTypeId = 0
var arrActivityTypeId... | |
doc_23529736 | I have some little problem. I need add project to some user profile page. For example: User has to go to the pages of projects, and use button "add to profile".
It should add the project to the User Profile.
But when I use "add"
ActiveRecord::RecordNotFound (Couldn't find Profile with 'id'=):
app/controllers/projec... | |
doc_23529737 | If something like "Foobar Café" is entered, it is stored in the MySQL database as "Foobar Café". Why is it doing that?
Both the HTML page and database table are set to UTF-8 encoding (the "business_name" field has a collation of "utf8_unicode_ci"). Shouldn't that take care of everything? What exactly could be causing... | |
doc_23529738 |
If the requested type is image/jpeg,
then the second argument, if it is
between 0.0 and 1.0, is treated as
indicating image quality; if the
second argument is anything else, the
default value for image quality is
used. Other arguments are ignored.
But on practice I get: Security error" code: "1000.
Is it ... | |
doc_23529739 | I am passing ReviewFormViewModel I want to pass the ListAdhoc to the partial controller and add items to it then pass it back to the view.
public class ReviewFormViewModel
{
...// other fields
public List<AdhocViewModel> ListAdhoc { get; set; }
}
public class AdhocViewModel
{
public int? ReviewId { get; se... | |
doc_23529740 | Please suggest what to do?
A: If your website is not on intranet, add it to compatibility view. This way, the responsexml object returned will be of type IXMLDOMDocement2 which will have methods to select nodes.
For us also, we were firing ajax request for which the output was XML string. After obtaining response, th... | |
doc_23529741 | PLEASE, I'm not talking about Firebase Cloud Storage.
A: To delete a file, first create a reference to that file. Then call the delete() method on that reference, which returns a Promise that resolves, or an error if the
Promise rejects.
import { getStorage, ref, deleteObject } from "firebase/storage";
const storage ... | |
doc_23529742 | @Controller
@SessionAttributes({ WebKeys.OBJECT_SIX, WebKeys.DSP_LOGIC, WebKeys.NEW_CARD_FORM })
In each of my API, I am calling the function:
@RequestMapping(value = "/apiA.do", method = RequestMethod.POST)
public String doAPIa(Model model) {
setInfo(model);
}
@RequestMapping(value = "/apiB.do", method = Reques... | |
doc_23529743 | I want to add two items in Headers tab in SOAP screenshot.
A: The problem's been solved. Since the wsdl address was created as https, it was fixed as http in the stub file and the header was added with the following method.
ServiceClient serviceClient = stub._getServiceClient();
List headers = (List) serviceClient.get... | |
doc_23529744 |
A: By design interceptors work only for public, protected and package-private (default visibility) methods.
During Quarkus deployment any interceptor on private methods is just ignored but should leads to a a failed build if this property is setted.
Quarkus allows interception of non-private static method
| |
doc_23529745 | I am pulling the version in from the package.json and storing it in the jwt/session to have for comparison of which version the user authenticated from and what version is now running.
// pages/api/auth/[nextauth].ts
const version = require('../../../package.json').version
import NextAuth from 'next-auth'
import { sign... | |
doc_23529746 | I want the box to be shown without having to click the marker first.
I thought i could solve this by imitating a click after the website has loaded, but i can't find out how to address that specific marker to click.
Could anyone hint me to a solution? I couldn't solve this without breaking the whole Map :/..
Thanks a... | |
doc_23529747 | When I write the package name it shows me this error
I checked 3 months ago so there was no such problem.
| |
doc_23529748 |
*
*I need to see Bahasa Malaysia language translation on a spinner in android
*How to call another program; say Google hangouts into the app?
I already got the translations in values-ms
Please I really need this thanks
A: i found the answer
String[] language= { "English", "Chinese (Simplified)", "Bahasa Malays... | |
doc_23529749 | but The parent page is (php).
I found article about that; http://kerneltrap.org/node/65367.
I have now HTML file and .JS file that hide the location bar after signed it.
But there is a php file, php's file that call the html to do what i need.
I found jar protocol can call html without any problem; but Jar can't call p... | |
doc_23529750 | I have a html form with some checkboxes say A,B,C,D & E and
I am posting the form through ajax to one of the controllers.
I would like to distinctly identify if each check boxes are checked from the controller and perform some action based on the selected checkbox value.
I would like to know the best practise to acheiv... | |
doc_23529751 | ImgList: ["904u3jg8orut390jgg","09re8im09mj3895gh","509tgj390h359"].
I tried and googled the errors each and every one of them, but I could not find a solution. I have even tried to enable longpath in Windows, but it did not work for me. If someone could help me, I would be very grateful. Here is my code.
EDIT: I think... | |
doc_23529752 | view function:
def blog(request):
posts = Post.objects.all().order_by('-date_posted')
paginator = Paginator(posts, 2)
page_number = request.GET.get('page')
page_obj = paginator.get_page(page_number)
context = {
'posts': posts,
'page_obj': page_obj,
'title': 'Blog',
'... | |
doc_23529753 | void computeFPS()
{
numberOfFramesSinceLastComputation++;
currentTime = glutGet(GLUT_ELAPSED_TIME);
if(currentTime - timeSinceLastFPSComputation > 1000)
{
char fps[256];
sprintf(fps, "FPS: %.2f", numberOfFramesSinceLastFPSComputation * 1000.0 / (currentTime . timeSinceLastFPSComputation));
glutSetW... | |
doc_23529754 | [LuisIntent("bookConfRoom")]
public async Task BookConferenceRoom(IDialogContext context, LuisResult result)
{
IDialog<RoomBooking> roomBookingDialog = MakeRootDialog();
context.Call(roomBookingDialog, RoomBookingComplete);
}
MakeRootDialog() builds the FormFlow form:
internal static IDialog<RoomBooking> Mak... | |
doc_23529755 | My problem is no matter what I do this firebase query seems to think there are documents in my DB that do not exist. Every time I go to accept the service it displays the toast. Meaning there is a collection "services" where a document has the field "serviceCompleted" which is equal to "false" but in my DB there is no ... | |
doc_23529756 | -code is same in both environments
-.NET 4.0 web application deployed to IIS
-log4net.config is same in both environments
-logs to text file on same drive as application that runs it
-logger is instantiated in static class, used through whole application.
-global.asax application_start configures logger by buildin... | |
doc_23529757 | So the obvious thing here is that tile of size d x d could tile the floor of size a x b if gcd(a, b) mod d = 0. So the simplest way would be:
*
*go over all sizes of floors
*for each size of floor:
a. calculate gcd(a, b)
b. go over all tiles and check how many of them divides by gcd(a,b)
But this seems to be too sl... | |
doc_23529758 | const { useRef } = React
const Main = props => {
const textInput = useRef()
const EN = useRef()
const move = useRef()
var randomize = Math.floor(Math.random() * 1320)
const [change, setchange] = React.useState(1)
const cursors = {
pointerEvents: "none",
borderRadius: "50%",
widt... | |
doc_23529759 | So, using this guide I created python server that listens for webhooks and exposed it via NGROK service.
from flask import json
from flask import request
import requests
from flask import Flask, request, url_for, redirect, render_template
app = Flask(__name__)
@app.route('/')
def api_root():
return "WEBHOOK"
@ap... | |
doc_23529760 | In other words, I wanted #page-content to have a width that is equal to the width of all the images inside it. This is because i would like the page-content div to be wider than the browser window, so that the user can scroll from left to right.
the code I had was as follows:
<div id="page-content">
<div id="ga... | |
doc_23529761 | The official website prints out the requirement of 3.1.0 but at the same time it provides the wrong package 3.0.0.
https://www.tensorflow.org/versions/r0.12/get_started/os_setup.html#protobuf-library-related-issues
A: I just changed 3.0.0 to 3.1.0 in the URL, so
https://storage.googleapis.com/tensorflow/linux/cpu/prot... | |
doc_23529762 | char item_availablity[16];
I can encode it with 2 bytes where every bit is mapped with one item id where 1 represents available and 0 represents unavailable
For ex 0000100010001000
This number has information that Items with id 4,8,12 are available
I need to encode this information by using less than 2 Bytes.
Is this ... | |
doc_23529763 | For reference the Web API GET controller method that creates the cookie looks like
...
HttpResponseMessage resp = new HttpResponseMessage() {
Content = new JsonContent(results)
};
if (results.Token != null) {
var cookie = new CookieHeaderValue("XSRF-TOKEN", result... | |
doc_23529764 | I've added if statement to sort by select statement like this:
I've tried to add an if statement to sort manually by selecting but, no results changing.
Am I missing something or how do I fix it?
public function search(Request $request){
$cityKey = $request->cityKey;
$key = $request->key;
$doctors = ... | |
doc_23529765 | All i want is an <img src="" /> in a <a> tag.
The A has a given width, height and overflow:hidden;
Now how can I show only center part of img without knowing the image size?
Here is a fiddle and this is the code I've got:
<a href="">
<img class="center" src="http://images2.fanpop.com/images/photos/7000000/Nature-Ar... | |
doc_23529766 | error: invalid use of non-static data member
Here's the code sample:
Player.h:
#ifndef _PLAYER_H_
#define _PLAYER_H_
#include "Segment/Dynamic_Segment.h"
class Attributes_P;
class Player;
class Attributes_P : public Attributes_DS{
protected:
Player *rel;
int inv_mcols, inv_mrows;
public:
Attributes_P(... | |
doc_23529767 | response-code: 400 details: name: DPRP_DISABLED message: DPRP is disabled for this merchant. details: null debug-id: *********** information-link: https://developer.paypal.com/webapps/developer/docs/api/#DPRP_DISABLED
at com.paypal.base.rest.PayPalRESTException.createFromHttpErrorException(PayPalRESTExcept... | |
doc_23529768 | Recently, my ISP was giving me lots of trouble and then I decided to change to a VPS to have more control of the system.
I have installed on this VPS everything my App needs to work (MySQL, php, apache, phpmyadmin) everything is working fine.
I started to move the databases and PHP files to the VPS and made the necessa... | |
doc_23529769 | <input type="text" value="Enter Password" class="password" />
... onclick/onfocus, I'd like to change the input type to 'password' and value removed, like so:
<input type="password" value="" class="password" />
This doesn't seem to work:
$('input.password').click(function () {
$(this).attr('type', 'passwo... | |
doc_23529770 | In my development machine, it is building by Visual Studio 2013 successfully.
But when I try to build same sources on Linux Mono environment with xbuild, it is failing.
Here is the output:
root@jannes:/home/hitly/hitly/src/Hitly.Service# xbuild
XBuild Engine Version 12.0
Mono, Version 3.2.8.0
Copyright (C) 2005-2013 V... | |
doc_23529771 | I want to be able to call this API from another server server2. This server calls the API of server1 without any user interaction (for backup purposes, amongst other things).
What would be the best way to authenticate server2 when calling the server1 API ?
I could create a specific technical user which has the role 'RO... | |
doc_23529772 | See code below
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http... | |
doc_23529773 | I'm looking for any suggestions about how to scrape the web page. The only option I see right now is finding the chrome process, triggering the inspector, clicking inside, then running the Javascript. Needless to say, this sounds fragile.
I also haven't been able to find anything on capturing the Ajax calls from selen... | |
doc_23529774 | mongo mydb myscript.js --eval "parameter = 'value'"
However, I want the script to still work without requiring the --eval.
If this were browser-based JS, I'd just do a var internalParameter = window.parameter || null sort of thing to get around the ReferenceError thrown by checking for an undefined variable, but mongo... | |
doc_23529775 | class Foo {
std::vector<Thing>things;
void bar();
}
I need to modify the Thing's stored in things in bar:
void bar(){
//How do I read a Thing stored in the vector, without making a copy?
Thing thing = things[0]; // Doesn't this make a copy ?
//.....
}
How do I read a Thing stored in the vector, with... | |
doc_23529776 | If using command prompt-say user press -r and then enter key, then the license header is removed from all the files and if user presses -a then license is added to all the files and replaces the previous one. I tried license maven plugin but it was not removing the headers and on adding header it automatically adds one... | |
doc_23529777 | You can edit the task by just clicking on it. At the first attempt, it works properly and the localStorage is updated. But, when we try to edit the same item again, its reading it as undefined. And hence an error is thrown:
Cannot read property 'toLowerCase' of undefined
Its at this line:
if($("#new_data").val().toLow... | |
doc_23529778 | E.g. When the values of data 1 is the same of values in data 2, there's an confirmation box will pop up and open new tab.
But when data 1 and 2 are both different values there's a two confirmation box will pop up, first is for data 1 and open new tab. Second, for data 2 and open new tab again (for data 2)
Please help m... | |
doc_23529779 | With the scripting options (part of SMO) I'm able to choose which parts of script should be included, like Foreign indexes, constraints, etc.
$opcionesscript = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$opcionesscript.DriAll = $true
However, the property 'ScriptBatchTerminator' which refers to 'G... | |
doc_23529780 | So i've got to the point where i want to replace stupid mesh generation with culling.
View of a terrain with no between-chunks culling:
View inside a terrain:
It worked fine but when i try to also cull those blocks between chunks, things go weird.
View of a terrain when added between-chunks culling:
Here is the code... | |
doc_23529781 | I'm only targeting modern browsers. But I also appreciate answers that target older browsers.
A: This seems to work. Not tested it that well though.
<textarea></textarea>
<script>
var textarea = document.querySelector('textarea');
textarea.addEventListener('input', function() {
textarea.style.height = ... | |
doc_23529782 | Under a project, in the node "References" you now see ".NET Framework 4.5.1" and ".NET Platform 5.4".
Now, I'm working on an application which is being hosted on Mongo and when installing that through Nuget, the reference only gets added to .NET Framework 4.5.1
When I'm building my application, I see a lot of errors re... | |
doc_23529783 | #import "Custom.h"
@interface Custom ()
@property (nonatomic, retain) UILabel *label;
@end
@implementation Custom
@synthesize label;
- (void) dealloc {
[label release];
[super dealloc];
}
@end
A: I like to do this to create private interfaces. If a property is only used in your impl... | |
doc_23529784 | Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbook.Worksheets.Count
For I = 1 To WS_Count
Dim strSQL As String
strSQL = "select * from ActiveWorkbook.Worksheets where ActiveWorkbook.Worksheets(I).Name = VLANs and VLAN = 2"
Debug.Print strSQL
Next I... | |
doc_23529785 | Class Client
Class Project
Class Ticket
Class Reply
Clients have a sub collection of projects, projects have a sub collection of tickets and tickets have a sub collection of replies.
var data = ctx.Set<Ticket>().Include(p => p.Client).
Select(p => new { Ticket = p, LastReplyDate = p.Replies.Max(q => q.DateCreated)});
... | |
doc_23529786 | If the updated_at from database is > fetched_at return a response indicating that the record has been updated since it was fetched for edit and prompt the user for a refresh.
In this case the user will refresh the record and redo the editing desired.
Is there a better way to approach this? I mean is it possible to lock... | |
doc_23529787 | Since I ran low on ideas, I used an old article from ReignDesign.com to tweak the database file a bit. I also happen to be using a 2016 version of SQLDroid, which does appear to work fine.
The file is in " ~/assets/database/test.db ".
Here is the basic code I am using:
public class AndroidLauncher extends AndroidAppli... | |
doc_23529788 | I've used an text document. Only becaue of the sd card i wanne achieve an connecting between the two scripts
Reading part:
#loops for Barcode_Data
def Create_File():
file = open("Barcode_data.txt", "w")
file.write(" // ")
file.close()
empty = ''
def Barcode_Read():
Barcode_Data= input("Input: ",)
... | |
doc_23529789 | from selenium import webdriver
driver = webdriver.Chrome('/path/to/chromedriver)
A: Download driver and give the path according to where it saved
https://chromedriver.chromium.org/downloads
webdriver.Chrome(executable_path="your path")
| |
doc_23529790 | Here's the MATLAB code:
xm_row = -(Nx-1)/2.0+0.5:(Nx-1)/2.0-0.5;
xm = xm_row(ones(Ny-1, 1), :);
ym_col = (-(Ny-1)/2.0+0.5:(Ny-1)/2.0-0.5)';
ym = ym_col(:,ones(Nx-1,1));
And here is my very rough attempt at trying to do the same thing in python:
for x in range (L-1):
for y in range (L-1):
xm_row = x[((... | |
doc_23529791 | In my case I have tested for collinearity prior to modelling, e.g. using VIF, and everything checks out. However, the ranking (using IC) of different models makes me uncertain whether it truly can separate between the predictors.
Any ideas?
ps! Can someone with higher rep than I add a more relevant tag such as collinea... | |
doc_23529792 | My gopath is apparently C:/Users/me/go as it should be.
*Edit Except if I run cd $GOPATH/src, it says C:\src doesnt exist, it looks in C: not C:/Users
Method 1. (running go get -u golang.org/x/blog)
I open Powershell and run that in my Users/me/go/src directory and it says:
can't load package: package golang.org: no G... | |
doc_23529793 | pnp.sp.web.lists.ensure("listName").then((ler : ListEnsureResult) => {
listEnsureResults = ler;
if (!ler.created) {
resolve(ler.list);
return Promise.reject(LIST_EXISTS);
}
ret... | |
doc_23529794 | I've got enums
UNDEFINED(-1),
FIS(0),
MANUELL(1)
defined as
public enum Ausloesungsart { UNDEFINED( -1), FIS( 0), MANUELL( 1); }
however at runtime i'm adding another enum if it's not contained in the list as UNDEFINED with the parsed code, as in 123.
Here is how I take the Enum:
public static Ausloesungsart fromIde... | |
doc_23529795 | I created a form where the user can insert his email and if the email is in database, it will automatically send an email with a link for password reset. This link has a specific token that is created for each user when they click on the button for receiving the email. This token is inserted in the database and also th... | |
doc_23529796 | There doesn't seem to be adequate documentation yet on WinRT. Also, if it's not possible with SDL can I achieve this (a simple arcade-style game) with some other graphics library/game engine ?
A: XAML support for SDL/WinRT is planned, but not yet implemented beyond a barely-functional (and largely non-functional), pro... | |
doc_23529797 | I am trying the following code:
Jersey:
@GET
@Path("/get-zip")
@Produces("application/zip")
@Consumes(MediaType.APPLICATION_JSON)
public Response getZip() throws IOException{
File fileObj = new File('myfile.zip');
return Response.ok((Object)fileObj)
.header("Content-Disposition", "attachment;... | |
doc_23529798 | option_settings:
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: "waifu_database.settings"
PYTHONPATH: "/opt/python/current/app/waifu_database:$PYTHONPATH"
aws:elasticbeanstalk:container:python:
WSGIPath: waifu_database.wsgi:application
However, I still have the R... | |
doc_23529799 | Insert, Delete, Update, Search and Select.
All the functionalities work well except for update. Following is the code for update:
stmt_update = conn_update.createStatement();
stmt_update.executeUpdate("UPDATE Conference SET C_NAME = '" + confname + "', C_YEAR = " + yr
+ ", START_DATE = to_timestam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.