id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_25000 | I'm trying to make a books app that I can update and add new books through firebase. I've books collection (to show books cover on the home screen) and pages as subcollection( will show pages when I select a book). the listener for the books collection work perfectly books covers appear on the home screen but the liste... | |
doc_25001 | A little background; I am working with a Angular1, Heroku-Postgresql, Nodejs, Ruby&Rails application. Previously developed by someone else and has been passed down to me.
When I run in Windows Powershell
heroku rake db:migrate -a [app]
my console returns
Running rake db:migrate on [app]... up, run.7474 (Free) bash: r... | |
doc_25002 | I'm working on a simple ASP.NET MVC project, and I'm trying to inject dependencies into a Web API Controller with Unity. The basic structure is:
EmailController <- NotificationEngine <- EmailAccessor
EmailAccessor's constructor needs to have injected values from Web.config AppSettings. EmailController and Notification... | |
doc_25003 | #include <iostream>
#include <list>
struct St {
int32_t arr[1024];
};
int main() {
std::list<St> struct_list;
for(int32_t i = 0; i < 1024; ++i) {
St st; // stack allocated and memory gets deallocated after each loop
std::cout << &st << std::endl;
struct_list.emplace_back(st... | |
doc_25004 | var arr = [1,2, 'a', 'b']
for(var i = 0; i < arr.length; i++)
if(typeof arr[i] === "string"){
var index = arr.indexOf(arr[i]);
if(index > -1){
arr.splice(index, 1)
}
console.log(arr);
}
A: You're modifying the arra... | |
doc_25005 | class WriteDemo{
public static void main(String args[]){
int b;
b = 'x';
System.out.write(b);
System.out.write('\n');
}
}
*
*How can we use the character 'x' for the variable b which is an integer?
*The result of the program that appears on the screen is x. in case i remove the final line... | |
doc_25006 | Precondition:
*
*use Windows 8 with Eclipse Juno and Play 2.1
*check that port 9999 is not in use
*create a play project and "eclipsify" it
Workflow:
1. start play with "play debug run"
- http listening port = 9000 and jpda = 9999
2. setup debug config: Java Remote Application; Socket Attach; host = locahost; po... | |
doc_25007 | giving an error:
DBSCAN() got an unexpected argument eps
The input is not my actual input just test values but I have this problem now.
I would be grateful if you can help
from sklearn.cluster import DBSCAN
import numpy as np
def clusterCenter(ll:list):
x=0
y=0
for el in ll:
x=x+el[0]
y=y+e... | |
doc_25008 |
(source: nasa.gov)
I didn't get any satisfactory results from edge detection.
I did read about grabcut but again nothing satisfactory from that either. Any ideas on how I should proceed?
PS - My ultimate goal is to mark these rocks in the image with a different color.
UPDATE 1:
Here is the code that I used for edg... | |
doc_25009 | I have read that a common recommendation is to use property change events to alert when a change happens and then I could potentially do what I need to do on that event.
However I sort of need it to automatically as well newly created items as well, and not just existing properties.
Basically I want an audit trail of... | |
doc_25010 | FAIL - Application at context path /Sign_Up could not be started
all other deploy war file[struts1.3, .net etc] working fine but mine alone is not working.
here is web.xml file code
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/200... | |
doc_25011 | I have a distributed read-write locking mechanism (since multiple application instances) ensuring that only one thread refreshes the token of the oauth component, while the rest wait to get the updated one. The updateComponent and getComponent methods each create their own new transaction within a transaction in the h... | |
doc_25012 | Please help me finding out a best method to secure passwords.
A: Sure SHA1 is more secure that MD5, but for most purposes it is not secure enough.
You will probably find useful the video How NOT to Store Passwords by Computerphile - 9 minutes and 24 seconds long.
You must realize that there is much to cover when it co... | |
doc_25013 | https://docs.google.com/spreadsheets/d/1DQ4UMP4imUE0j5wHxFbnC0zVdCnfCXQRF9y9H3Lrxps/edit?usp=sharing
It currently has four sheets within it. I will be adding a sheet to it weekly. The first sheet is set up as a master or summary sheet that contains data (First and last Names) from every other sheet.
I’m running a scrip... | |
doc_25014 | I'm using wordpress 3.6.1 with theme-horse-attitude, I'm trying this with "HTML Javascript Adder" but getting an Error.
The code I'd like to place is this:
<div id="meinWettbewerb1">
</div>
<script type="text/javascript">
var wettbewerb1 = new fussballdeAPI();
wettbewerb1.setzeWettbewerb('01HLJMM2Q4000000VV0AG8... | |
doc_25015 | Authentication : We are using IdentityServer4 authentication for our project.
Startup.cs
services.AddAuthentication("Bearer")
.AddIdentityServerAuthentication(options =>
{
options.Authority = "http://IdentityServerDomainURL:8081/";
options.RequireHttpsMetadata = fal... | |
doc_25016 | An example
File common.h
__device__ int x;
File A.cu
__global__ void a()
File B.cu
__global__ void b()
a(),b() both use x. what should I do?
In C language, I should write something like
extern device int x;
Then I define device int x in another place. But in CUDA I can not do it. If I do, it tells me ‘..........’ ... | |
doc_25017 | Heres my code so far to explain:
string = 'oboe'
def count_vowels(string):
count = 0
if 'a' or 'A' in string:
count += 1
if 'e' or 'E' in string:
count += 1
if 'i' or 'I' in string:
count += 1
if 'o' or 'O' in string:
count += 1
if 'u' or 'U' in string:
... | |
doc_25018 | alt text http://docs.google.com/a/delorenzodesign.com/File?id=dgr4q2dh_25sq4dnxd9_b
I've tried running this stored procedure on my database and it's successful:
EXEC sp_fulltext_database @action = 'enable'
But I still get the above window and my full-text searches don't return any results when they should.
What am I m... | |
doc_25019 | I've worked for companies that use Stored Procs a lot for their ETL processes as well as some of their websites. I've seen the scenario where they need to retrieve specific records based on a finite set of key values. I've seen it handled in 3 different ways, illustrated via pseudo-code below.
Dynamic Sql that concat... | |
doc_25020 | Say I have two independent ruby applications, one rails, one sinatra. How could I share a single sidekiq process between the two applications? Is this possible?
The basics state this: "The Sidekiq client runs in your web application process (typically a Rails unicorn or passenger process) and allows you to push jobs in... | |
doc_25021 | PHP
ob_start();
$preview_contents = include( get_template_directory() . '/framework/newsletters/includes/preview.php' );
$content = ob_get_contents();
ob_end_clean();
PHPMAILER
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->IsHTML(true);
$mail->SMTPAuth = true;
$mail->Host = $host;
$m... | |
doc_25022 | #!/bin/bash
declare -a arr
let i=0
MyMethod(){
adb devices | while read line #get devices list
do
if [ ! "$line" == "" ] && [ `echo $line | awk '{print $2}'` == "device" ]
then
device=`echo $line | awk '{print $1}'`
echo "Add $device"
arr[$i]="$device"
let i=$i+1
fi
done
ech... | |
doc_25023 | While there are several great plugins for deploying to ftp (doing the upload part), like grunt-ftpush, grunt-ftp-deploy, grunt-ftp-upload and grunt-ftpscript, I haven't been able to find one which performs the download part.
There a node module like https://nodejsmodules.org/pkg/ftp-get, but nothing for grunt.
A: Have... | |
doc_25024 | Here is my NotificationService:
export class NotificationSharedService {
private emitChangeSource = new Subject<any>();
changeEmitted = this.emitChangeSource.asObservable();
emitChange(change: any) {
console.log(change);
this.emitChangeSource.next(change);
}
getData(): Observable<a... | |
doc_25025 | I got a significant improvement in the performance when used jsonb_array_elements.
For example:
Table students
CREATE TABLE students
(
id BIGSERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL,
age INT NOT NULL,
average_score NUMERIC(2) NOT NULL
)
Insert SQL
INSERT I... | |
doc_25026 | import pandas as pd
df = pd.DataFrame({'a':[['a', 'b', 'c'], ['e', 'f', 'g']]})
a
0 [a, b, c]
1 [e, f, g]
Desired output:
a
0 [a, b]
1 [e, f]
I was looking into .apply(), but I cannot find the appropriate function to apply to the list to get out the items.
A: With your shown samples, could y... | |
doc_25027 | public class MapViewer extends Activity {
private GoogleMap map;
private Database db = new Database(this);
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mapviewer);
try {
map = ((MapFragment) getFragmen... | |
doc_25028 | I know that it can be done with SparkSQL and Wildcards in Databricks, but it would be better if I could use wildcards directly in Azure Data Lake gen2 rest API. I’ve looked for this, but I’ve found documentation not clear. Does everyone know if it is possible, or not, to use something like wildcards in Azure Data Lake ... | |
doc_25029 |
I need to create separate chains from points whose lines overlap but I’m having real trouble doing this efficiently.
I have an array of simple Point objects, in no particular order, and I can loop through them and test them with a simple "intersect" function. I need to end up with an array of chains, each with an orde... | |
doc_25030 | devtool: '#eval-source-map'
Includes a source map in the output
Original issue
As stated, the webpack build produces an enormous bundle/vendor file with Vue as my only import. I cannot see for the life of me how people get it down to 80kb.
As far as I can see, there is a vue-loader and the file gets minified, so why w... | |
doc_25031 | class IsProduct {
IsProduct.fromDocument(DocumentSnapshot doc) {
name = doc['name'] as String;
//I tried this but it doesn't work
image = doc['images'][0] == [] ? '' : doc['images'][0] as String;
pid = doc['pid'] as String;
description = doc['description'] as String;
storeId = doc['storeId'] as String;
i... | |
doc_25032 | -Make a calender that I can easily edit, preferably on my phone
-Make this calendar public
-Display this calendar in the sidebar of a wordpressblog
-Enable people to subscribe to this calendar, preferably on phone.
The most logical thing for this in my mind would be an iCalendar .ics file, but I'm struggling for a ligh... | |
doc_25033 | I wanted to display the ids differently on different div for my droppable.
How do I do it? Do I need array all my image? now only display everything on one div.. I wanted if drag and drop inside droppable.. It's take the value inside droppable and display out in different div.
jsFiddle
https://jsfiddle.net/xInfinityMin... | |
doc_25034 | ''' public class SMSController : TwilioController
{
[HttpPost]
public TwiMLResult Index(SmsRequest request)
{
var response = new MessagingResponse();
UserProfile _userProfileFrom = UserProfileService.GetByTwilioFromPhone(request.From);
...
return TwiML(response);
}
[HttpG... | |
doc_25035 | CARTS
- id
- name
- choi_id;
- inserted
I tried for:
UPDATE carts SET inserted = inserted + 1 where choi_id = 1030;
A: You could try this:
UPDATE carts
SET `inserted` = DATE_ADD(`inserted` , INTERVAL 1 DAY)
WHERE `choi_id` = 1030;
The DATE_ADD MySQL function adds a specified time interval to a date, seconds, min... | |
doc_25036 |
A: do a replace: replace(replace(range(xxx).Comment.Text),chr(13),""),chr(10),"") to remove the newlines
| |
doc_25037 | select id, name from entity_table where date_creation + 10_minutes < current_time()
I cant get how to do that with HQL. I DONT want to make extra-queries, process date in java code an so on. This must be done on HQL level.
Can you please help me?
A: HQL does not support arithmetic with date and time, so it is not pos... | |
doc_25038 | import 'package:flutter/material.dart';
class TabStories extends StatelessWidget {
@override
Widget build(BuildContext context) {
final title = 'Grid List';
return ListView(
children: List.generate(100, (index) {
return Card(
child: Row(
children: <Widget>[
... | |
doc_25039 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define RGB_COMPONENT_COLOUR 255
#define height 1080
#define width 1920
typedef struct
{
unsigned char red, green, blue;
} PPMPixel;
typedef struct
{
int x, y;
PPMPixel *data;
} PPMImage;
int main(PPMImage *readPPM())
{
char key = 0;
do
... | |
doc_25040 | I'm trying to show a dropdown list that show all of them.
I see many developer suggest using CultureInfo of ASP.NET but it's missing some countries because Culture & Country are different things.
So how can I get a list of all countries for my purpose please ?. I really appreciate your help.
A: In ASP.NET a DropDow... | |
doc_25041 | I am having an issue with the isotope jquery plugin - filtering.
I have created a sample page here
http://www.csr500.co.uk/websites/v9/preview.html
Now my issue is when I filter using the buttons in the top right of the page, then the filtering works, however I would like the non selected items / elements to fade out ... | |
doc_25042 | ends_partial_dict = {
'PLAIN END' : 'PE',
'MPT' : 'MNPT',
'PE': 'PE',}
original_description = (r'Pipe SA-106 GR. B SCH 40 PE 24" WALL smls'.upper())
item_split = original_description.split()
Returns: ['PIPE', 'SA-106', 'GR.', 'B', 'SCH', '40', 'PE', '24"', 'WALL', 'SMLS']
def item_end_partial() :
not_f... | |
doc_25043 | #!/usr/bin/python
import sys
def string_gen():
return "string_file.txt"
if __name__ == "__main__":
sys.exit(string_gen())
In the make file, a target might look like
.PRECIOUS: $(FILE_STRINGS)
$(STRING_DICT): $(STRING_DIR)/string_gen.py $(PYTHON)
$(V)if [[ $(IF_BUILD_STRING_DICT) ]]; then STRING_FILE=... | |
doc_25044 | The input looks like below:
Xapple
+apple1
+apple2
.ends
Xboy
+boy1
+boy2
V2
Xcat
+cat1
+cat2
Xcat
The output should look like below:
Xboy
+boy1
+boy2
A: This will do the job in sed, but really this problem is more complicated than sed is intended for. You'd be better off using perl or python.
$ cat foo... | |
doc_25045 |
C:\Users\ted\AppData\Local\Temp\1351877287607-0\testsgameflash.as(145): col: 220 Error: Incorrect number of arguments. Expected no more than 1.
function $replace_0(this$static,from,to){var regex;if(from<256){regex=toPowerOfTwoString(from);regex='\\x'+'00'.substring(regex.length)+regex}else{regex=String.fromCharCode(... | |
doc_25046 | if ($value > 0 && $value !== 'null') { }
or
if (empty($value)) { }
A: PHP has an elegant is_null function to check if a variable is actually NULL.
if (is_null($value)) {
// so something
}
empty, on the other hand, checks for empty strings (''), zeroes (as integers, floating points or even the string '0'), FALSE... | |
doc_25047 | The HTTP POST request seems to work as required but then no results.
Public Sub parsehtml()
Dim http As Object, html As New HTMLDocument, vessels As Object, titleElem As Object, detailsElem As Object, vessel As HTMLHtmlElement
Dim i As Integer
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "POST", "http://www.me... | |
doc_25048 | approach for creating index in couchbase was taken from this post:
https://forums.couchbase.com/t/indexing-array-of-strings/14977
CREATE INDEX idx_emaillist ON api (DISTINCT ARRAY k FOR k IN emails.emaillist END);
query I am using to search is:
SELECT * FROM user AS u WHERE ANY k IN u.emails.emaillist SATISFIES k = "a... | |
doc_25049 | #ifndef NODE_H_INCLUDED
#define NODE_H_INCLUDED
using namespace std;
class Node
{
private:
int rollNumber;
string FName; // first name
string LName; // last name
string Batch;
float gpa;
int height; // height of node
int balanceFactor;
Node * lc; /... | |
doc_25050 | String s = 1 + 2 + " whatsgoingon " + 3 + 4 + 5;
System.out.println(s);
Returns:
3 whatsgoingon 345
Can someone explain this behaviour? Why are the first two numbers added together and then converted to a string, but the last three numbers are converted to strings and then concatenated.
A: Because in the expression:
... | |
doc_25051 | A nested for loop is probably best suited for this but I cant quite understand how I should adress individual strings in an array
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char board [5][8]={" | | ","--+--+--"," | | ","--+--+--"," | | "};
printf("%s",board[1][0]);
}
A: Because y... | |
doc_25052 | I can access the mysql db through port forwarding (127.0.0.1:3307 local -> 127.11.255.130:3306) using my local client and I have populated the database no probs.
I then try to access the db using my node.js script (running on the same domain in openshift):
var connection = mysql.createConnection({
host : '12... | |
doc_25053 | cursor = db.foo.aggregate([...])
if not await cursor.fetch_next:
raise SomeException
doc = cursor.next_object()
This code appears to not retry during a cluster failover, because it's internally calling getMore I assume. I'm not entirely clear whether that's the case or not. Not to mention that fetch_next is depr... | |
doc_25054 |
A: Just we need to do the barchart widget from the following way:
Field Calculation Function :
def _get_daily_statistics(self, cr, uid, ids, field_name, arg, context=None):
""" Get the daily statistics of the mass mailing. This is done by a grouping
on opened and replied fields. Using custom format in context,... | |
doc_25055 | Auth.signIn({ username: email, password: password})
or
Auth.federatedSignIn({ provider: 'Google' }); // or 'SignInWithApple' || 'Facebook'
and it is easy to sign out of a Cognito session via
Auth.signOut();
Possibly worth noting that we are using expo-web-browser to launch in-app browser sessions, and not directing ... | |
doc_25056 | I have tried to use flex box on android for an hour now, and could not seem to get it to work. So I have taken a simple snippet from the react-native site to demonstrate my issue.
Main Issue
exampleContainer: { flex: 1 }
will not account for android screen space.
Picture Proof
ios vs Android
Code Snippet
export defau... | |
doc_25057 | For instance:
var Parent = React.createClass({
getInitialState: function() {
return { num: '' };
},
componentDidMount: function() {
$.ajax({
url: '/urltogetdata',
method: 'GET',
dataType: 'json',
success: function(data) {
if (this.isMounted()) {
this.setState({nu... | |
doc_25058 | e2e/app/framework/element-functions.ts(43,29): error TS2349: Cannot invoke an expression whose type lacks a call signature.
e2e/app/framework/wait-functions.ts(45,18): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Promise<{}> | Condition<{}> | ((driver: WebDriver) => {})'.
Type 'Func... | |
doc_25059 | My iterator is this:
class myIterator : std::iterator<std::input_iterator_tag, char>
{
char *p;
public:
// Definitions
typedef typename std::iterator<std::input_iterator_tag, char>::difference_type difference_type;
typedef typename std::iterator<std::input_iterator_tag, char>::value_type value_type;
... | |
doc_25060 | ||
doc_25061 | I have a component that calls an add function in a service:
save(){
this.aService.new();
}
In the service I have a standard angular fire add function:
new(){
this.afs.collection<any>(`col/doc/col`).add({
title: "A new Title",
});
}
I would like to react to a successful add, update or action in my component... | |
doc_25062 | The problem I have is each time a user sends a message via websocket to the endpoint it seems a brand new redis subscription is made, resulting in the accumulation of subscribers on the redis message topic and the websocket responses are increased with the number of redis topic message subscribtions as well (example us... | |
doc_25063 | Problem: The slide-card elements are put in the wrong order when the drags items. Because sometimes slide-card elements are not indexing as they appear in the dom.
The html file is below.
<div class="c-side-bar__opened__container__navbar" v-model="isSidebarOpen" ref="slideCards">
<template v-for="(slide, index... | |
doc_25064 | I found out that i should use pointers instead of arrays inside the struct. But im having problems allocating pointer that should represent 2 dimensional array.
The original structure:
struct data {
// KB/s
float rxs;
float txs;
// peak KB/s
float rxmax;
float txmax;
float max;
float max... | |
doc_25065 | What i'm trying to do is to scroll a div, placed somewhere in a page, when it reach the center of the screen or it is almost visible, then when it end its scroll i need to continue the page scrolll.
Actually i have a "slider" like this: JSFIDDLE
Actually, I can get an advise when the element is visible on the page afte... | |
doc_25066 | And what is about the other direction from outside in: how could be prevented that private fields are overridden?
The only solution to this seems to create data transfer objects (dto).
To use an "automapper" wouldn't be the solution unless one can not specify what fields to map.
So, forces JAX-RS the developer to crea... | |
doc_25067 | But I don't want this animation to happen during program startup. What is the best way to prevent the animation to run at program start?
Part of the view model:
public enum TargetValue
{
Value1,
Value2,
}
public class MainWindowViewModel : INotifyPropertyChanged, IDisposable
{
public TargetValue _targetVal... | |
doc_25068 | token = LogonUser(...)
WindowsIdentity newId = new WindowsIdentity(token);
WindowsImpersonationContext impersonatedUser = newId.Impersonate();
However when calling a WCF service after this I'm not able to use the impersonated identity. I think this is because impersonatedUser.ImpersonationLevel equals Impe... | |
doc_25069 | $('#title').on('keyup', function (e) {
e.preventDefault();
var str = $(this).val();
str = str.replace(/\W+/g, '-').toLowerCase();
$('#url').val(str);
});
But here is the issue, If i enter Big "Fish" Little "Fish" JQuery will convert this to: big-fish-little-fish-. So the question is how do i re... | |
doc_25070 | import os, sys
import matplotlib.pyplot as plt
dtnums = [1,2,3,4,5]
pop = [20,25,75,32,5]
obs = [0.0, 0.0, 0.21, 0.30, 0.10]
fig, ax1 = plt.subplots( figsize=(8,5) )
ax2 = ax1.twinx()
#--- Try #1
ax1.plot(dtnums, pop, color='blue', linewidth=3)
ax1.grid(True, axis='y')
ax2.bar(dtnums, obs, color='g')
plt.show... | |
doc_25071 | Rscript -e 'rmarkdown::render("index.Rmd")'
After updating to macOS Catalina (10.15) I started getting the following error:
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
However, if I knit index.Rmd directly in RStudio, it works fine. And, when ... | |
doc_25072 | How can I correct this?
| |
doc_25073 | Where to add color details so that default colors of the grouped sub-bars and their legend will be unique as needed.
def grouped_barplot(df, cat,subcat, val , err):
u = df[cat].unique()
x = np.arange(len(u))
subx = df[subcat].unique()
offsets = (np.arange(len(subx))-np.arange(len(subx)).mean())... | |
doc_25074 | So
alert(123); var hello = 0;
console.log(hello);
Will become:
var hello = 0;
console.log(hello);
Someone suggested using regex, so I dove into that.
Now this is what I found online:
something(.*?)something will grab the text between the words "something" and "something", but when I try to do with with the word "ale... | |
doc_25075 | Sample data:
datetime = pd.date_range(start = '01/03/2019', periods = 60) #60 days = 2 months
data = [2000]
for i in range (29):
data.append(data[-1]*1.05) #first 30 days - growth 5%
for i in range(30):
data.append(data[-1]*1.15) #last 30 days - growth 15%
plt.plot(datetime, data... | |
doc_25076 | originalMessage: 'Cannot navigate to invalid URL'
My code below. Can someone please help me out .
const sitemapper = require('@mastixmc/sitemapper');
const SitemapXMLParser = require('sitemap-xml-parser');
const url = 'https://edition.cnn.com/sitemaps/sitemap-section.xml';
/*If sitemapindex (link of xml or gz file) is... | |
doc_25077 | IQueryRequest queryRequest = QueryRequest.Create(queryString);
queryRequest.ScanConsistency(ScanConsistency.RequestPlus);
var queryResult = await bucket.QueryAsync<dynamic>(queryRequest);
if (!queryResult.Success)
{
}
foreach (var row... | |
doc_25078 | Ref(schema_ref, id)
client.query(
q.Update(
q.Ref(q.Collection('posts'), '192903209792046592'),
{ data: { text: "Example" },
)
)
However, I'm wondering if it's possible to update a document without knowing its id. For instance, if I have a collection of users, can I find a user by their email, and then up... | |
doc_25079 | Problem at line 398 character 29: Insecure '.'.
if (password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/))
Problem at line 398 character 41: Unescaped '^'.
if (password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/))
I understand that JSLint may be being "over-cautious". I read the comments on a similar question, Purpose of JS... | |
doc_25080 | the following code works in all browsers, except in IE9 when chaning it to IE8 in the developer tools.
var img = $('<img/>').load(function (e) {
$('.md').append(e.target);
}).attr({ 'id': 'imgprofile', 'src': "http://upload.wikimedia.org/wikipedia/commons/thumb/2/28/HelloWorld.svg/512px-HelloWorld.svg.png", 'style'... | |
doc_25081 | {
"menu_text": 1,
"menu-meta_description": "My Website",
"enable_page_title": "0",
"page_title_heading": "h2"
}
I only want to update the enable_page_title key to 1, for every record in the table. I need to leave all other json values intact.
How can I achieve this?
A: You can use JSON modification function J... | |
doc_25082 | strSystolicBloodPressure =etSystolicBloodPressure.getText().toString();
strDiastolicBloodPressuretDiastolicBloodPressure.getText().toString();
strTemperatureCelcius = etTemperatureCelsius.getText().toString();
strSmokingType = etSmokingType.getText().toString();
strSmokingAmount = etSmokingAmount.getText().toString();
... | |
doc_25083 | I have two different applications.
One is coded in C++ and running on a Linux Ubuntu Server. The other one is coded in C# and running on my local Windwos 7 Home-PC.
The two applications connect over TCP and I want to create a secure connection between them. I decided to use the RSA-Algorithm.
I created a Key-Pair on th... | |
doc_25084 | function TopStocks(props) {
const [stockInfo, setStockInfo] = useState([]);
const symbols = ["AAPL", "NFLX", "GOOGL", "TSLA"];
let temp = [];
useEffect(() => {
fetchSymbols();
props.onInitialSet(
stockInfo[2].symbol,
stockInfo[2].percentage,
stockInfo[2].close
);
}, [setStockInfo]);
... | |
doc_25085 | def get_models():
choices = [ct.model_class().__name__ for ct in ContentType.objects.all()]
return choices
and my Model:
class Action(models.Model):
model = models.CharField(max_length=70, null=False, blank=False, choices=lazy(get_models, list)())
act = models.CharField(max_length=3, null=False, blank=... | |
doc_25086 | Thanks for your time!
A: Answered? Found some helpful information here on changing the filename of uploads.
| |
doc_25087 | Here is my C++ code where I load my file.
extern "C" int turtle(unsigned char *commands, unsigned int commands_size);
int main(void)
{
FILE *fptr1;
fptr1 = fopen("./input.bin", "rb+");
fseek(fptr1, 0, SEEK_END);
unsigned int length1 = ftell(fptr1);
fseek(fptr1, 0, SEEK_SET);
unsigned char ... | |
doc_25088 | When I click the select button the animation effect should take place, but I don't know how to associate the function UversePlanSelector.prototype.click with the select button.
Not working code
Working code
<div class="plan">
<div class="plan_head"><span class="hdr">Max plus</span><span class="tag">$54.95</span>
</... | |
doc_25089 | (Thursday 12/8) - (Monday 16/8)
Is this possible to achieve somewhat easily?
A: You can use the datetime.weekday() method and datetime.hour attribute to check if your dates are in your desired range. No need to compare the string representation of the time points.
| |
doc_25090 | library(readxl)
library(openxlsx)
path = "S:\\YJB\\Shared\\corpdata\\Community Division\\Team\\Divisional BAU\\21. Serious Incidents from June 2021\\Serious Incidents Notification Forms\\All_Data"
filenames <- dir(path, pattern ="*.xlsx")
filenames <- paste("S:\\YJB\\Shared\\corpdata\\Community Division\\Team\\Divisio... | |
doc_25091 |
../../../node_modules/@angular/fire/angularfire2.d.ts(1,40): error TS2307: Cannot find module '@angular/core'.
../../../node_modules/@angular/fire/angularfire2.d.ts(2,42): error TS2307: Cannot find module 'rxjs'.
../../../node_modules/@angular/fire/database/database.d.ts(1,24): error TS2307: Cannot find module '@angul... | |
doc_25092 | class Login extends React.Component {
constructor(props) {
super(props);
this.state = {
username: null,
password: null,
}
this.handleOnChangeUserName = this.handleOnChangeUserName.bind(this);
this.handleOnChangePassword = this.handleOnChangePassword.bi... | |
doc_25093 | Sample Rate: 44100
Format ID: lpcm
Format Flags: C
Bytes per Packet: 2
Frames per Packet: 1
Bytes per Frame: 2
Channels per Frame: 1
Bits per Channel: 16
kAudioFormatFlagIsSignedInteger
kAudioFormatFlagIsPack... | |
doc_25094 | Is there a possibility to create a query, export the query to Excel, change the featureID and publish it again?
I already did some attempts but in most of the attempts the connection with the original feature was lost.
We are using TFS 2013.
A: You can use Backlog in TFS web access to drag User story from one Feature... | |
doc_25095 | brownturkey_rows <- grep("brown",Dataframe$color)
For which I get
brownturkey_rows int [1:5] 3 6 7 8 9
Now I need to check a certain condition in each of those rows and return which rows fail. For example looking at row 6:
Dataframe$age[6] < Dataframe$limit[6]
In perl, I would have used a foreach loop. What is the ... | |
doc_25096 | http://nlb-creations.com/2013/06/26/installing-ruby-on-rails-and-redmine-with-xampp-on-windows-7/
Step 12 requires installing rmagick, I followed the steps correctly till I reached 12-d :
In the cmd window, run the following:
gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=... | |
doc_25097 | function transfer(address _to, uint256 _value)
I need to now connect to this contract using web3, and then send a certain number of tokens generated to another account. I've been struggling with how to do this for quite some time and hoping this community could help. Here is what I have thus far, using web3 version 0.... | |
doc_25098 |
*
*When I use WMS (r2 commented, r3 uncommented) it works.
*When I use OSM (r2 uncommented, r2 commented) it wont work.
I want to use OSM, what am I missing here?
var map = new OpenLayers.Map('map');
//osmLayer = new OpenLayers.Layer.OSM();
osmLayer = new OpenLayers.Layer.WMS("OpenLayers W... | |
doc_25099 | for i in $(cat numbers.txt);
do echo $i;
wget -a output.txt --no-check-certificate http://localhost:9001 --post-file=netev.xml;
done
but the netev.xml has a fieled which is defined by the variable $1, this $1 needs to corrospond to value of i for that iteration......
how can i make this work?
thanks
A: Create a templ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.