id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23100 | I need to color the concatenated result according to what color is in the original cells.
For example, as in the original cells cells have colors, in the concatenated result it should also apply: pe should be gray, pd blue, email orange... and so on... But in the concatenate string below all text is black.
Is this poss... | |
doc_23101 | NSLog(@"%@", mapView.userLocation.location.coordinate);
I am waiting until the phone finds the location as well...
A: mapView.userLocation.location.coordinate is a struct while the %@ format specifier expects an object. This will work:
NSLog(@"%f, %f", mapView.userLocation.location.coordinate.latitude,
... | |
doc_23102 | The declaration in the string.xml is like this :
<string name="AboutThisApp"><![CDATA[
<div>
<p>here is the list of functions: </p>
</div>
<ul>
<li> Sportsmanship</li>
<li> Participation</li>
<li> Safety/Risk Minimization</li>
<li> Sound Traditions of the Sport</li>
<li> Support for USA Footva... | |
doc_23103 | The first one is P1 = 2147483647 and the other is P2 = 1
This should overflow the type int so I wrote this to try to prevent the computer from doing the overflow
if((P1 + P2) > sizeof(int)){
halt = 1; /*halt is just a flag*/
}
But the computer obviously still tries to do the sum to check it, giving me a runtime e... | |
doc_23104 | The serial part of the calculation is of the form:
for (int i = 2; i<size; i++)
{
result[i] = oldArray[i] + result[i-1];
}
Other than launching a kernel on a single thread for this calculation, is there a way to force threads or calculations to run in a specific order?
EDIT:
The problem is slightly more complicate... | |
doc_23105 | ||
doc_23106 | username: string;
totalScore: number;
...
loadUserData() {
this.spinnerDialog.show();
this.firebaseServie.loadUserData().then(() => {
this.username = this.sessionData.getUser().getUsername();
this.totalScore = this.sessionData.getUser().getTotalScore();
....
});
firebase.servic... | |
doc_23107 | essentially, i'm parsing through server logs regex'ing for specific strings that i'm going to use to run some sql queries with. I've gotten this to work on a smaller scale where a loop is not needed.
I need to wait for all of the ppsid's to run through _cssPPSID, which is generating a dictionary object and my query fil... | |
doc_23108 | Running Command: npm ci && npm run prod && rm -rf node_modules
npm ERR! cipm can only install packages with an existing package-lock.json or npm-shrinkwrap.json with lockfileVersion >= 1. Run an install with npm@5 or later to generate it, then try again.
npm ERR! A complete log of this run can be found in:
npm ERR! ... | |
doc_23109 | - (void)loadImage:(NSString *)name
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
UIImage *image = [Reader loadImage:name];
dispatch_sync(dispatch_get_main_queue(), ^{
[self displayImage:image];
});
});
}
the loadImage method of Reader is ... | |
doc_23110 | This person does not belong to the gcloud account that I'm using and has his own account and project
A: In Using Identity and Access Management (IAM) Permissions you can see how to control who has access to your buckets and objects. Please follow the instructions in Adding a Member to a bucket-level policy:
*
*... | |
doc_23111 | @RepositoryRestResource(collectionResourceRel="option", path="option")
public interface OptionRepository extends CrudRepository<Option, Long> {
@Override
@PreAuthorize("#id == principal.id || hasRole('ROLE_ADMIN')")
public Option findOne(@Param("id") Long id);
@Override
@SuppressWarnings("unchecke... | |
doc_23112 | player_info, game, score, creation_date
I want to fetch the records with the highest score of each player for a particular game.
Any help is appreciated.
EDIT:
class Game(models.Model):
name = models.CharField(max_length=50)
description = models.TextField(max_length=1000)
logo = models.URLField()
resour... | |
doc_23113 | I tried two approaches:
1) Using a whole-viewport-fixed div with ng-if="showOverlay". First this div is shown and the actual start page is hidden with ng-if="!showOverlay". I toggled it using ng-click.
Problem: This worked quite fine, BUT at loading the page the whole actual-page-part briefly also was rendered and show... | |
doc_23114 | role_profiles = Table('roleprofile', Base.metadata,
Column('role_id', Integer, ForeignKey('role.id')),
Column('profile_id', Integer, ForeignKey('profile.id'))
)
class profile(Base):
__tablename__ = 'profile'
# Columns...
roles = relationship('role', s... | |
doc_23115 | I know the graphs can be made using jQuery but how would I feed data that far?
The only idea I have so far is to run the "top" command every few seconds, save it to a .txt file, strip away the unnecessary information and have the jQuery poll the .txt file as data points? Is this even possible? Is there an easier way t... | |
doc_23116 | I'm looking to use System.AddIn to make an ASP.NET MVC application extensible.
A: The examples I have seen all use the Managed Extensibility Framework.
The Managed Extensibility Framework
(MEF) is a new library in .NET that
enables greater reuse of applications
and components. Using MEF, .NET
applications c... | |
doc_23117 | Is there a way i can run a method after everything is inflated and initialized?
Thanks
A: try running it into onResume()
It is the last called method of the fragment lifecycle
A:
The view does not load until the method is over
That is because you are doing some long task in UI thread. Then even you put that metho... | |
doc_23118 | One is the start time.
The other is the end time.
What I would like to do is that when the user picks the start time, I change the minHour option of the end time datebox to the hour they selected.
Is that possible? If so, how?
Thanks
A: From what I can see minHour seems to default the time picker popup to the right ho... | |
doc_23119 | npm init
npm install express --save
But node_module package not appeared inside my working directory. It throwing some error like below.
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/express failed, reason: connect
ETIMEDOUT 104.16.27.3... | |
doc_23120 | FROM node:13-alpine as build
WORKDIR /app
COPY package*.json /app/
RUN npm install -g ionic
RUN npm install
COPY ./ /app/
RUN npm run build
FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/dist/ /usr/share/nginx/html/
When it run the command npm run build it is going to create the D... | |
doc_23121 | (Data from .txt files will be used for initializing an array)
Current code I created gives Compile error Invalid Use of Property for line of code: folder2 = ActiveWorkbook.path
I know that folder2 is defined as a Folder data type, and thus assigning the string ActiveWorkbook.path variable (to find current working fold... | |
doc_23122 | My DB Helper Class:
class DBHelper {
var db : OpaquePointer?
var path : String = "YOUFC.sqlite"
init() {
self.db = createDB()
self.createTable()
}
My createDB Function:
func createDB() -> OpaquePointer? {
let filePath = try! FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appro... | |
doc_23123 | To elaborate on what happens when I face that undefined behavior, if I set QDialog's parent in createEditor(), then QDialog doesn't show at all, if I don't set it, it shows up and then when I drag it around it disappears (this is wrong anyway and I think I have to always set the parent because otherwise I'll have a mem... | |
doc_23124 |
*
*I bower installed the fontawesome
*I have added the scss file to the config.yml
*I have changed the path name to fonts folder
https://postimg.org/gallery/1h018wsm8/
What I get in my browser is weird symbols and for some reason it is not working. Can you please tell me what I am missing? Thanks...
A: You have... | |
doc_23125 | I want it on the right of modal for that I gave a 'position: absoluteorposition: fixedand modified thetopandright` it.
The problem is that in doing so the button becomes unusable. From what I gather, there is a conflict between the data-dismiss: modal (attribute that makes the element closing the modal) with the 'posit... | |
doc_23126 | An example dataframe is presented below:
a <- c(1:10)
b <- c(10:1)
df <- data.frame(a,b)
library(ggplot2)
g = ggplot(data=df) + geom_point(aes(x=a, y=b)) +
xlab("x axis")
g
I just want to learn how I change the text size of the axes titles and the axes labels.
A: I think a better way to do this is to change the bas... | |
doc_23127 | Sometimes when I hit refresh they display normally but other times they continue to show separated in a list where I can see the bullet next to each one.
Here's the code I'm using:
Update: I changed to the actual HTML
<ul id="mycarousel" class="jcarousel-skin-tango">
<li>
... | |
doc_23128 | In IE7 the sample page works perfectly fine.
In FireFox3 (Win) the colors are incorrect in the flash.
In Safari/FF3 (Mac) the Flash is not transparent at all.
I can use z-index to send it behind everything for the same effect, but then the divs on top do not allow the menu to be clicked.
I made a test page to demonstr... | |
doc_23129 | $this->User->update($user_id, $payment_id, $this->request->data['User']['upgraded']);
The following code fixes it, but is there a way to handle it without having to add the additional IF statement:
$upgraded = false;
if(isset($this->request->data['User']['upgraded'])) {
$upgraded = $this->request->data['User']['u... | |
doc_23130 | async.map([1, 2, 3, 4, 5], async function(url) {
console.log(url);
return Promise.resolve(url);
}, (err, results) => {
if (err) console.log("ERR", err);
console.log("RESULTS", results);
});
The urls log out, but I never get the results to log out. I have also tried it with ... | |
doc_23131 | 1) Since checkremote and backup method are dependent on the sshlogin method, is there another way to write it so that my object is fully initialized?
2) If there isn't a better way, where do I write the procedure for the PhoneBook Class to execute in the following manner (1 - checklocal, 2 - sshlogin, 3 - checkremote, ... | |
doc_23132 |
This link suggests it should be on the top level of my C: drive, but it isn't there.
I tried to search for it, but searching my entire drive I only find C:\Program Files\eclipse\features\oracle.eclipse.tools.glassfish_8.6.1.201603011333 which doesn't seem to be what I'm looking for and Eclipse agrees.
I found this wor... | |
doc_23133 |
A: http://guides.rubyonrails.org/i18n.html
A: The active_admin translations is here:
https://github.com/gregbell/active_admin/tree/master/lib/active_admin/locales
choose one file, put it on your config/locales directory, change the first line with Portuguese locale, and start translating
A: Encoding::CompatibilityE... | |
doc_23134 | Something like this
Or this
A: The best solution for what you are looking for is the SubScene, a built-in JavaFX container:
The SubScene class is the container for content in a scene graph. SubScene provides separation of different parts of a scene, each of which can be rendered with a different camera, depth buff... | |
doc_23135 | Python code:
def _date_start_end_validate(self, cr, uid, ids, context=None):
sr_ids = self.search(cr, 1 ,[], context=context)
for self_obj in self.browse(cr, uid, ids, context=context):
if self_obj.date_start >= self_obj.date_end:
return False
return True
_constraint... | |
doc_23136 | I am using drupal views exposed filters, and it sorts content by ajax calls.
That means i click 'Sort by name', and content below sorts without page refresh.
Than i decided to add special class to active sort link.
$(document).on('click', '.form-item-sort-bef-combine', function(){
$(this).addClass('selected-link');
});... | |
doc_23137 | a black screen appears or just the firemonkey icon when i launch the application . if i use a new project with a simple button and just add as header : #include and develop on my device, the problem is the same !!!
do i have to do something special to be able to run a bluetooth application on my mobil phone
Than... | |
doc_23138 | WebForm - default.aspx:
ServiceClient sc = new ServiceClient();
Response.Write(sc.DoWork(1) + "<br />");
WebOperationContext c = WebOperationContext.Current; --Current is null
//WCF Interface
[ServiceContract]
public interface IService
{
[OperationContract]
[WebGet]
int DoWork(int num);
}
/... | |
doc_23139 | How can I amend my UDF to account for this?
Function RedText(Rng As Range) As String
Dim X As Long, S As String
S = Rng.Text
For X = 1 To Len(Rng.Text)
If Rng.Characters(X, 1).Font.Color <> vbRed Then
If Mid(S, X, 1) <> vbLf Then Mid(S, X, 1) = " "
End If
Next
RedText = Replace(Replace(Applicati... | |
doc_23140 | This is the code Seleccion Activity:
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.support.v7.app.AppCompatActivity;
import ... | |
doc_23141 | I read in one article referenced in another SO question and it said that grid design was in all sorts of development, even application form design. That made me think of things like snap to grid, etc. and I didn't know if the grid in the web design sphere was the same. I was hoping someone could give me a brief but n... | |
doc_23142 | I want to use ingress with my Amazon account and/or private cloud and want to assign external IP.
It is possible to assign external ip for services :
Services documentation - chapter external IP
but cannot find a way to do that for Ingress : Ingress documentation.
My question is direct especially to Kubernetes team.
Si... | |
doc_23143 | Route::get('url1', function() {
return Redirect::to('/');
}
Route::get('url2', function() {
return Redirect::to('/');
}
Route::get('url3', function() {
return Redirect::to('/');
}
How can I make just a single route so I dont have to repeat it like maybe:
Route::get('url1','url2','url3', function(){
r... | |
doc_23144 | http://jsfiddle.net/cYYEt/
If there is another way we should be binding/creating our array/etc that would work too. I have solved this problem by either using a list or spans
Thanks!
JS
var mainViewModel = function () {
var self = this;
this.Items = ko.observableArray();
this.init = function () {
... | |
doc_23145 | Crashed: com.apple.main-thread
0 goForDream 0x1023f22ac BasePostCell.collectionView(_:cellForItemAt:) + 4304741036 (<compiler-generated>:4304741036)
1 goForDream 0x1023f2340 @objc BasePostCell.collectionView(_:cellForItemAt:) + 4304741184 (<compiler-generated>:4304741184)
2 UI... | |
doc_23146 | Code:
#include <iostream>
#include <fstream>
#include <cmath>
typedef char sint8;
typedef unsigned char uint8;
typedef signed short int sint16;
typedef unsigned short int uint16;
typedef unsigned int uint32;
using namespace std;
#define PI 3.14159265F
#define DEG2RAD(value) ((float)(value... | |
doc_23147 | const GameState = function(socket){
this.socket = socket
//quite a large constructor so I removed most of it
};
//defining all the prototype methods
GameState.prototype.getSocket = function() {
return this.socket
}
module.exports = GameState;
I'm able use this GameScreen constructor in my gamescreen.js file, b... | |
doc_23148 | public class UsersModel
{
[Key]
public int UserId { get; set; }
[Required]
[StringLength(100, ErrorMessage = "Invalid Name Minimum Length is 5", MinimumLength = 5)]
public string Name { get; set; }
//20150090
public int? student_ID { get; set; }
[Di... | |
doc_23149 | #define VLOG_IS_ON(lvl) \
((lvl) <= ::tensorflow::internal::LogMessage::MinVLogLevel())
#endif
#define VLOG(lvl) \
if (TF_PREDICT_FALSE(VLOG_IS_ON(lvl))) \
::tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::INFO)
const int INFO = 0; // base_logging::INFO;
const int WARNING = 1; ... | |
doc_23150 |
(mysql.connector.errors.DatabaseError) 1265 (01000): Data truncated
for column 'log_return' at row
The data in the dataframe looks like the following:
date price log_return
0 2017-02-14 105.800 -0.006125
1 2017-02-13 106.450 0.004236
2 ... | |
doc_23151 | Here is a picture of what I am looking for
I found a couple of code snippets on the internet, but I am not sure how to put them all together. If you could help me, I would appreciate it so much!
And if you are just passing by I hope that you have a fantastic day!
HTML
<input type="text" value="Hello World" id="myInput... | |
doc_23152 | I am using the below code to to open camera for video streaming:
import cv2.cv as cv
cv.NamedWindow("camera", 1)
capture = cv.CaptureFromCAM(0)
while True:
img = cv.QueryFrame(capture)
cv.ShowImage("camera", img)
if cv.WaitKey(10) == 27:
break
A: Buttons aren't possible... | |
doc_23153 | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class ItemLister extends React.Component {
constructor(props ) {
super(props);
this.state = { items: [] };
}
componentDidMount() {
let url = "http://localhost:8888";
let iterator = fetch(url, {method: 'GET'});
ite... | |
doc_23154 | It has what looks like 15-20px padding left and right, so there're white vertical stripes at the sides of it.
I'm testing this on a real device with Android 8
import * as React from 'react';
import { Text, SafeAreaView, View, StyleSheet, Button, Dimensions } from 'react-native';
import { NavigationContainer } from '@re... | |
doc_23155 | I tried this by using unbind event but did not get success.
I tried :
$('li.main-menu').unbind('click').bind( "click", function() {
alert( "click sub menu" );
});
HTML:
<li class="main-menu"><a href="/" class="active"><span class="menu-item-inner-wrap">Main Menu</span></a>
<ul class="menu">
<li class="sub-menu... | |
doc_23156 | My code snippet is:
Backend
try {
const user = await User.findOne({ email: req.body.email });
if (!user) {
return res.status(400).send({ error: 'Incorect email or password' });
}
// Password check
// Return error if password does not match
res.send(user);
} catch (err) {
// Server error
}
Redux Ac... | |
doc_23157 | But I have a launch screen size problem.
I created a simple project, and AppDelegate's code is:
#import "AppDelegate.h"
#import "ViewControllerOne.h" //xib screen size is 4 inch.
#import "ViewControllerTwo.h" // xib screen size is 4.7 inch.
#import "ViewControllerThree.h" // xib screen size is 5.5 inch.
@implementati... | |
doc_23158 | You enter password and Username and post back to the server, whilst moving onto the main application page.
I have java code within the main page that requires the login data from the last page to populate the table on screen. I have tried ActionRedirect but it keeps bring back nullpointerexception:
ActionRedirect redir... | |
doc_23159 | ||
doc_23160 | ||
doc_23161 | How should i create the custom tailwind css path in my nuxt.config.ts file?
A: To config a custom path with tailwind, you must configure it in tailwind.config.js :
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./components/**/*.{js,vue,ts}",
"./layouts/**/*.vue",
"./pages/**/... | |
doc_23162 | My function is this:
bool Student::isOverEighteen() {
int date[3]; // D/M/Y
char *pdata;
pdata = strtok(Anagrafica::birth, "/"); // Anagrafica is the base class
for (short i = 0; pdata != NULL; i++) {
data[i] = pdata;
pdata = strtok(NULL, "/");
}
time_t t = time(NULL);
tm *locale = localtim... | |
doc_23163 | app.js
var express = require('express')
, routes = require('./routes')
, http = require('http')
, tasks = require('./routes/tasks')
, mongoose = require('mongoose');
// MongoDB Connection
mongoose.connect('mongodb://localhost/task_tracker');
var app = express();
app.configure(function(){
app.set('port', 3... | |
doc_23164 | For example if I try to access the methods in the railties class AppBuilder.
require 'rails/generators/rails/app/app_generator'
g = Rails::AppBuilder.new
puts g.rakefile.inspect
I get an error message activesupport-3.1.3/lib/active_support/secure_random.rb:5:in `': uninitialized constant SecureRandom (NameError)
I do... | |
doc_23165 | split -b 500m my_matrix.txt output_
This large matrix results from a computation and is 14.000 rows per 14.000 columns. Is it possible to split the main matrix (file) in sub files but still maintaining the number of columns equal to 14.000? Obviously only the number of rows will change.
A: From man split
-l, --li... | |
doc_23166 | I have a matrix A that is of size [N x C], and a matrix X that is of size [N x D]
For each nth row in A, compute it's outer product with the corresponding nth row in X. Each outer product will yield a matrix, of size [C x D]. Then, sum up all those matricies together to get the final matrix.
Is there a simple non-for-... | |
doc_23167 | From an application in the host system (not in docker), we want to read the files of the container.
We only can find information about the inverse case (mount system file into docker container).
A: Normally it is not possible. You can however export the filesystem of a container:
docker container export {container_nam... | |
doc_23168 | https://docs.github.com/en/rest/overview/resources-in-the-rest-api#oauth2-keysecret
plz let me know the workaround for the authentication.
A: In WebDriverManager 5, you simply need to specify a GitHub token (and not the token/secret anymore). Take a look to the documentation.
| |
doc_23169 | But in tcphdr there is no field that relates to tcp scaling
This is my netinet/tcp.h struct tcphdr
struct tcphdr
{
__extension__ union
{
struct
{
uint16_t th_sport; /* source port */
uint16_t th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ac... | |
doc_23170 |
A: I'd also suggest parsing and changing the xml files directly / or via poi. If you rename the docx file to zip and unpack it, you can perform a full text search in order to find the correct xml and spot r'to change.
| |
doc_23171 | For example, the following records are conceptually the same:
id fromcity_id tocity_id
1 100 200
2 200 100
A: This will require a trigger, because you need to examine other rows. Alernately, you could do this at the application layer.
A: Another option is to create an indexed view with... | |
doc_23172 | This is my simplified code:
User
@Entity
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
//my custom validator
@UniqueUsername
private String username;
public int getId() {
return id;
public void setId(int id) {
this.id = id;
... | |
doc_23173 |
To support immediate shutdown, tasks should handle interrupts
correctly
Would anybody be able to articulate the point? What's the relation between tasks and interrupts and the shutdown method? Does it only mean if there is a task waiting for something it must throw InterruptedException?
Thanks in advance.
A: What ... | |
doc_23174 |
A: df = pd.DataFrame({'a': [1, 2, 3, 4, 5],
'b': [50, 0, 0, 30, 10],
'c': [0, 1000, 2000, 0, 0]})
a b c
0 1 50 0
1 2 0 1000
2 3 0 2000
3 4 30 0
4 5 10 0
df[ (df[['a', 'b', 'c']] > [1, 10, 100]).sum(axis=1) >= 2 ]
a b c
1 2 0 100... | |
doc_23175 | cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
fileUri = getOutputMediaFileUri();
cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
startActivityForResult(cameraIntent, CAMERA_REQUEST);
The issue is when I take picture , or even cancel taking picture and g... | |
doc_23176 | Here you can find an example of the application tag of my android app. Here you see the theme is set to Theme1, but it can be Theme2,Theme3,...
<application
android:name="be.genius.gticket.adapter.MyApplicationClass"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="gticket... | |
doc_23177 | When i try to open the IIS website from within Visual studio i get the following error:
Error opening Web https://10.1.0.4 unable to open the website https://10.1.0.4 The web server could not be found.
Error Message
I have installed all the relevant frameworks, am running Visual studio as admin, and have debuging enabl... | |
doc_23178 | The XHTML is valid, but the CSS isn't totally. Wondering if I can fix without totally remedying every CSS element.
http://www.writershore.com/ltlaw
Thanks for any help!
A: The z-index of your div.main style is set to -1. Because of this, it is located under some other div. Just set it to something higher and everythin... | |
doc_23179 | I found how to read file, but I can't find how to write file.
I set permission like this.
AndroidManifast.xml
<application
...
android:requestLegacyExternalStorage="true"
...
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:nam... | |
doc_23180 | x => x.Name
Now, I don't know the type of x.Name at compile time, but I now it at runtime since it's stored in a Type.
How can I convert my expression to be of type Expression<Func<TDocument, TOutput>> where TOutput is a Type and not known at compile time?
A: You just need to wrap the original expression's Body in a ... | |
doc_23181 | +----+---------+
| id | Col1 |
+----+---------+
| 1 | 6050000 |
+----+---------+
| 2 | 6050000 |
+----+---------+
| 3 | 6050000 |
+----+---------+
| 4 | 6060000 |
+----+---------+
| 5 | 6060000 |
+----+---------+
| 6 | 6060000 |
+----+---------+
| 7 | 6060000 |
+----+---------+
| 8 | 6060000 |
+----+-------... | |
doc_23182 | SELECT * FROM `meow` WHERE profile LIKE '%$username%'
But the problem I'm facing is if someone puts the letters 'a' it will pull everything that contains a and that's a bit of a security risk on my end, How do i search just 1 column to see if it matches $username exactly? not the whole table?
A: For exact string matc... | |
doc_23183 | var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
app.get('/', function(req, res){
res.sendfile('index.php');
});
io.on('connection', function(socket){
socket.on('chat message', function(msg){
io.emit('chat message', msg);
});
});
http.listen(3000,... | |
doc_23184 | $data = DB::table('information')
->select(DB::raw('SUM(working) as working'))
->where('name', '=', 'ismael')
->get();
error_log($data);
it print: [{"working":"23"}]
how can I get the 23? without the "working"
A: $data = DB::table('information')
->select(DB::raw('SUM(working) as working'))
->where('name', '=', 'ismael... | |
doc_23185 | Edit :
I'm sorry guys for not giving you more information
Okay .. the library that i'm using is this
https://github.com/wg/scrypt
this is the out put that i'm getting
"$s0$e0801$eX8cPtmLjKSrZBJszHIuZA==$vapd0u4tYVdOXOlcIkFmrOEIr1Ml2Ue1l2+FVOJgbcI="
this is over than the AES engin can handle so how can i use it
A:... | |
doc_23186 |
So the question is: how can I achieve this?
I already provisioned the main region with the ARM templates and it's working fine. Now I need to provision the slave regions, but I can't find enough information on how to achieve this.
Can I use the clone function in Azure and modify config files later?
Thanks in advance
... | |
doc_23187 |
display.setStatusBar( display.HiddenStatusBar )
mainGroup:insert(director.directorView)
director:changeScene("titlescreen")
end
I'v not used this code instead directly called
director:changeScene ( "splash" )
its running but then why we do the above coding.
A: *
*display.setStatusBar(display.HiddenS... | |
doc_23188 | So this is how I'm getting the path, it's working fine in other Android versions but Android 9. Any guide would be appreciated
val dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).absolutePath
A: Well, Android 9 (API 28) should not have this problem. However, as the Android docs sp... | |
doc_23189 | document.write('<script type="text/javascript">window.jQuery || document.write(\"<script src=\'http://code.jquery.com/jquery-1.10.2.min.js\'></script>\")</script>');
This is inside B.js which is loaded as script on A.html. But I get error. The end script tag inside double quotes is treated as if it's nested script tag... | |
doc_23190 | below is my code:
import org.apache.spark.SparkConf
import org.apache.spark.sql._
import org.apache.spark.sql.types._
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
object XXXX extends App{
val sc = new SparkConf()
val DataRDD = sc.textFile("/Users/itru/Desktop/XXXX.bz2").cache()
}
my... | |
doc_23191 | if(isset($_GET['q'])){
$sql = "SELECT klantnr, persnr, naam, voornaam FROM gegevens WHERE voornaam LIKE % :voorwaarde % OR naam LIKE % :voorwaarde %";
$stmt = $db->prepare($sql);
$stmt->bindParam(':voorwaarde', $_GET['q']);
$stmt->bindParam(':voorwaarde', $_GET['q']);
echo $stmt->queryString;
$... | |
doc_23192 | But Remember that the app needs access to the computers webcam. Thanks!
Addition Info: Nodejs application that uses the Tokbox, express, and socket.io APIs
A: Just make sure your web server is listening on a routable IP like "0.0.0.0", which you specify when you call http.createServer(port, ip, handler). Then point th... | |
doc_23193 | I've tried this:
SELECT Name FROM Customers WHERE Weight=60.5
SELECT Name FROM Customers WHERE Weight=cast(60.5 as real)
SELECT Name FROM Customers WHERE Weight=cast(60.5 as decimal)
SELECT Name FROM Customers WHERE Weight=convert(real,'60.5')
SELECT Name FROM Customers WHERE Weight=convert(decimal,'60.5')
These queri... | |
doc_23194 | http://moboscope.appspot.com/x/http://slashdot.org/
When I look at the source of the page, it appears to be correct, its just being rendered as a blank page, at least when I test it in Chrome on a Mac.
Can anyone see what is wrong here?
A: Look in the browser's JS console:
Uncaught ReferenceError: dfp_tile is not def... | |
doc_23195 | class Server
{
...
public:
void loop()
{
while(_run_flag)
{
// do something
}
}
void stop()
{
_run_flag = 0;
}
...
private:
volatile sig_atomic_t _run_flag = 1;
};
namespace
{
std::function<void()> callback_wrapper;
void signal_handler(int)
{
callback_wrapper();
}
}
int main()
... | |
doc_23196 | Client side:
<html>
<head>
<script type="text/javascript">
var client = [
{"clientName":"", "clientNickName": ""},
{"clientName":"", "clientNickName": ""},
{"clientName":"", "clientNickName": ""}
... | |
doc_23197 | g
.V("user-11")
.repeat(bothE().subgraph("subGraph").outV())
.times(2)
.cap("subGraph")
.next()
When I run it using gremlin-python, I receive the following response:
{'@type': 'tinker:graph',
'@value': {'vertices': [v[device-3], v[device-1], v[user-11], v[card-1]],
'edges': [e[68bad734-db2b-bf... | |
doc_23198 | def main():
print("Thank you for taking the Quiz")
score= 0
question1 = input("How many donuts are in a dozen? ")
if question1 == "12":
print("Correct")
score = score +1
else:
print("Incorrect")
question2 = input("How many mb are in a gb? ")
if question2 == "1024":... | |
doc_23199 | While the static routes are generated fine, my dynamic routes are not. Once I remembered they were hidden in my dropdown menu - duhh - I created a /generate page which renders all my dynamic routes using the nuxt-link component. My assumption was that the crawler should find the /generate/index.vue page and thus the li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.