id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23520800 |
A: I'm not sure if this is possible in MySQL, but an alternative solution would be to:
*
*Add the new column with the new type with a new name
*Set the new column values (given the old column values)
*Drop the old column
*Rename the new column to have the same name as the old column
A: create the new column ne... | |
doc_23520801 | LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
Location location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));
To get the last locations when the app is opened, but some u... | |
doc_23520802 |
A: I had very similar issues trying to get started with publishing to the App Store and Apple did not make getting up and running very easy to understand so hopefully I can help with the very muddy waters you're about to tread through.
There are 3 main resources you need to keep in sync and those are the iOS Provision... | |
doc_23520803 | I have defined the animation below to animate the intended graph (again, the ins and outs of the functions inside of animate() are quite convoluted, but can be found in the link).
def animate():
"""
This function animates the graph
:param i:
:return:
"""
inputs = get_inputs(charges,resolution)
create_graph(inputs[0],i... | |
doc_23520804 | For example, if I want to draw a sphere to the 3D texture, I would draw the appropriate cross-section of the sphere to each layer of the texture.
This works fine at small resolutions or for small number of shapes, but quickly slows as resolution or complexity increases.
Is there some more correct or faster approach? I'... | |
doc_23520805 | This is what I have tried so far and I dont know what else I can change.
cityb<-select(JCCitiBike,"tripduration", "start.station.id", "start.station.name","latitude","longitude", "usertype","gender" )%>% mutate(start=percent_rank(start.station.name))
#filter areas with most traffic identifying them with usertype.
ci... | |
doc_23520806 | I already have some kind of a filter but it is not working well. if the in put is "afgegq" it will be filter and ask me again for input. But if it's 156FFAGFAE. it will be not filtered.
#include <stdio.h>
#include <stdlib.h>
int main()
{
for (;;)
{
int versnelling[5] = {1, 2, 3, 4, 5};
float s... | |
doc_23520807 | What I do is:
*
*From an activity I set an alarm that at certain time and date will call a receiver
*From the receiver I call a service
*From the service I send a notification (on the notification bar) to the user.
My questions are:
*
*I set up an alarm 5 minutes from now. Say I turn off the phone and turn i... | |
doc_23520808 |
A: Twilio developer evangelist here.
If you are looking to build with Twilio Functions on your local machine, then I can recommend the Twilio Serverless Toolkit. It's a set of tools that allow you to develop, run and deploy your Twilio Functions on your local machine. It includes an integration with ngrok to help you ... | |
doc_23520809 | In effect I want a sizeof() that works for a Foo*, whether it be an object of the base class or of any of the subclasses.
Clearly I could make my own SizeOf() method, and require all subclasses (that add fields) to override this to return the updated SizeOf(). But that's not pretty, it requires work, and it'd probably... | |
doc_23520810 | Microsoft (R) Build Engine Version 2.0.50727.4927
[Microsoft .NET Framework, Version 2.0.50727.4927]
Copyright (C) Microsoft Corporation 2005. All rights reserved.
However, the solutions I'm trying to build produce an error because the .NET 2.0 version of MSBuild is being called instead of the 3.5 or 4.0.
How and wher... | |
doc_23520811 | Watir::Browser.new :chrome, switches: ['--ignore-certificate-errors']
But I get the error:
ArgumentError: {:switches=>["--ignore-certificate-errors"]} are
unrecognized arguments for Browser constructor from
/var/lib/gems/3.0.0/gems/watir-7.1.0/lib/watir/capabilities.rb:79:in
`process_browser_options'
3.0.2 (dev)[1] »... | |
doc_23520812 | If I store the SVG compressed (as svg.gz) and use "Content-Encoding: gzip", the image renders properly on the page, however I get a "contentDocument is null" error when I try to access it (even after it has fully loaded).
Why does this happen, and is there any way I can access the contentDocument of pre-compressed SVG ... | |
doc_23520813 | What I want is to display all the resultset with Closed status on top, then all the open and then all new. How to go with it.
Thanks in advance.
A: order by FIELD(statusColumn, 'Closed', 'Open', 'New')
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_field
| |
doc_23520814 | I would like to use Asp.Net Identity for user authentication but IdentityUser this very coupled to Asp.net and a domain model object should not have dependencies.
This is leading me to think that authentication may be a different BoundedContext that is not implemented using DDD.
I would like to know if anyone has be... | |
doc_23520815 | This is the class to update
public function set ($iStatus)
{
$this->iStatus = $iStatus;
}
public function create ()
{
if ($this->iStatus != 0 || $this->iStatus != 1 || $this->iStatus != 2)
{
echo "Your idea must have a valid status";
}
else
{
//update the database
}
}
and th... | |
doc_23520816 | The why is, i some image name i have accent character what i dont' need, and need to rename to simple character.
Eg.:
Bas-v-s-Broek-DTR-025-Dobszék-állítható-magasságú.jpg
to
Bas-v-s-Broek-DTR-025-Dobszek-allithato-magassagu.jpg
I'm doing now this work with find and rename:
find . -type f -exec rename 's/ ö|ő|ó|ö/o/g'... | |
doc_23520817 | localStorage.setItem("Employeekey", JSON.stringify(this.registrations));
I ,now want to do the same operations into a local text file where the changes are reflected after adding data,deleting data,or modifying data.
I tried to use the file handling of Node.js using the 'require' but it didn't work since 'require' coul... | |
doc_23520818 | public static float convertDpToPixel(float dp, Context context){
return dp * ((float) context.getResources().getDisplayMetrics().densityDpi / DisplayMetrics.DENSITY_DEFAULT);
}
What context should I use?
Application Context: tied to the Lifecycle of an Application
Activity Context: tied to the life cycle of activi... | |
doc_23520819 | when producing test reports or test run dumps in -w mode I'd like to supress the stdout output of steps, which are run as Background steps.
I have control over the output produced via an environment variable but I'm not able to detect when to set it, dependent on if the step is in Background or not.
Even better for me ... | |
doc_23520820 | ||
doc_23520821 |
A: Update: I found that making a PointManager script and AddPointOnClick script, and using it on the GameObject works!
Watch this for more detail: https://youtu.be/YUcvy9PHeXs
| |
doc_23520822 | HTML
<ul>
<li><a href="#">Foobar</a></li>
<li class="active"><a href="#">Foobar</a></li>
<li><a href="http://line25.com/tutorials/how-to-create-flat-style-breadcrumb-links-with-css">Foobar longer</a></li>
<li><a href="#">Foobar</a></li>
<li><a href="#">Foobar</a></li>
</ul>
CSS
ul {
margin: 20px 60px;
}
... | |
doc_23520823 |
app.py
from flask import g
import sqlite3
def get_db():
DATABASE = 'C:/path/to/db'
db = getattr(g, '_database', None)
if db is None:
db = g._database = sqlite3.connect(DATABASE)
return db
@app.route('/dashboard')
def dashboard():
cur = get_db().cursor()
team_members = cur.execute(... | |
doc_23520824 | class Facility < ActiveRecord::Base
has_and_belongs_to_many :categories
end
class Category < ActiveRecord::Base
has_and_belongs_to_many :facilities
end
Say I have three possible Category records, with name: "Category A", "Category B", and "Category C".
I want to get all Facility records which are in both "Categor... | |
doc_23520825 | Intent intent = new Intent(getActivity(), Movie_rev_fulldis_activity.class);
intent.putExtra("mov_pos", position + "");
startActivity(intent);
this working fine all data visible to my second activity but i want to display
one filed item to third activity when i click second activity image
here my second activity
yo... | |
doc_23520826 | ||
doc_23520827 | let foo = MyView()
let nav = UINavigationController(rootViewController: foo)
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = nav
window?.makeKeyAndVisible()
Or something like that in AppDelegate.swift and have a navigation controller up and running. However, what if my intended navigation... | |
doc_23520828 | I've got a Canvas inside a ScrollViewer. I'd like to be able to zoom in and out on that Canvas and have the ScrollViewer adjust appropriately.
Here's the code:
XAML:
<Window x:Class="scrollerProblem.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com... | |
doc_23520829 | Procrustescoords <- list()
for (a in 1:length(flightfiles)){
Procrustescoords <-c(Procrustescoords,gpagen(array(data=Flights[,,a],dim=c(8,2,1)), Proj= TRUE, ShowPlot = TRUE, ProcD = TRUE, PrinAxes = TRUE, curves = NULL, surfaces = NULL)[1])
Which produces outputs for each individual of;
$coords
, , 1
[,1]... | |
doc_23520830 | I have a Bitmap in memory, and all I want to do is paint over the whole thing with a HashBrush, but preserve the alpha channel, so that the transparent parts of the bitmap don't get painted.
The bitmap in memory is not a simple shape, so it will not be feasible to define it as a set of paths or anything.
EDIT: In resp... | |
doc_23520831 | here is my setting in appdelegate
Appirater.setAppId("...")
Appirater.setDaysUntilPrompt(0)
Appirater.setUsesUntilPrompt(0)
Appirater.setTimeBeforeReminding(30)
Appirater.setSignificantEventsUntilPrompt(10)
Appirater.userDidSignificantEvent(true))
Appirater.appLaunched(true)
and then I put below code in my view contr... | |
doc_23520832 | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Person(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE,null=True)
#first_name = models.CharField(max_length=30)
#last_name = models.CharField(max_length=40)
#usern... | |
doc_23520833 |
document.querySelectorAll('.toggleMe').forEach(function (query) {
query.onclick = function (e) {
e.target.classList.toggle('open');
}
});
.toggleMe {
background: #e3e3e3;
max-height: 1.3rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
t... | |
doc_23520834 |
this is the loop with the modal
<?php
require 'connect.php';
require 'header.php';
?>
<!-- modal -->
<div class="modal fade print" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content row" id="p... | |
doc_23520835 | I have tried as follow.
The picture didn't show in the browser.
<img :src="'../assets/'+item.picture">
If I wrote as below, the picture is shown.
<img src="../assets/6cb38c91115bcdf0c824124e4b5ecb71.jpeg">
Thank you very much!
| |
doc_23520836 | I want to use socket.io for the multiplayer part and Firebase for the database. But I have read that it is redundant to use these technologies. Why?
A: Firebase Realtime Database already uses a websocket to send and receive database updates in real time. Adding another socket almost certainly wouldn't add much value,... | |
doc_23520837 | dir1
|--dir2
| |--a
| |--b
| |--c
|--dir3
| |--dir4
| |--file1
| |--file2
| |--file3
| |--dir5
| |--test1
| |--test2
| |--test3
|--dir6
| |--fileA
| |--dir7
| |--fileB
Say I had to execute a series of commands in every one of these directories and... | |
doc_23520838 | ar suiteletPath = url.resolveScript({
scriptId: 'scriptId',
deploymentId: 'deploymentId',
returnExternalUrl: false
/*params: {
'send_item_id': item
}*/
| |
doc_23520839 | The minimize, maximize buttons of the finder handle bar are not reachable
since they are at a negative y position (outside the desktop screen)
Fullscreen can be called via menu entry, but this is no help.
A: Close the IDE and open its configuration file ($HOME/Library/Preferences/ZeroBraneStudio Preferences, as descri... | |
doc_23520840 | Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> def ignore(it: String) = 42
ignore: (it: String)Int
scala> ignore(null.asInstanceOf[Nothing])
res0: Int = 42
And:
Welcome to Scala version 2.10.0 (Java H... | |
doc_23520841 | I already have a function that can append a new line of text to a .txt file with if condition. But it don't know how to make the number of the text increase from 1 to n.
I'm not good at code. Can someone explain to me how to create a function in python?
The condition is like this :
If the value in column dataframe ['si... | |
doc_23520842 |
A: It isn't private, it's package-private (no visibility modifer) and both Thread and ThreadLocal are in the java.lang package.
A: It is not private, but package-private. And java.lang.ThreadLocal and java.lang.Thread are in the same package.
| |
doc_23520843 | Possible Duplicate:
Dealing with “java.lang.OutOfMemoryError: PermGen space” error
In Catalina.out log, I am getting the below mentioned exception. Application is too slow.
java.lang.OutOfMemoryError:PermGen space
What I need to do?
A: Try increasing the heap size.
Maybe this:
export CATALINA_OPTS="-Xms1024m -Xmx204... | |
doc_23520844 | The function is outputting NaN values but for only a specific combination of the three values.
Code:
import numpy as np
from sklearn.metrics import mean_absolute_error
from statsmodels.tsa.holtwinters import ExponentialSmoothing
# In[2]:
def auto_hwm(timeseries, val_split_date, alpha=[None], beta=[None], gamma=[Non... | |
doc_23520845 | class Grid
Square = Struct.new(:state)
def initialize
@grid_strings = Array.new(6) { Array.new(7) {Square.new} }
@grid_columns = @grid_strings.transpose
end
And I have a method that puts a symbol to the end of chosen column by changing the state attribute of proper Square instance:
def put_to_column(c... | |
doc_23520846 | mapping = sns.light_palette("green", as_cmap=True)
df = df.style.background_gradient(cmap=mapping)
I am trying to use the following code to save it to a csv file called "output.csv":
df.to_csv('output.csv')
But the following error is being returned:
AttributeError: "Styler" object has no attribute 'to_csv'
Any ideas... | |
doc_23520847 | kubectl create secret generic mysecret -n mynamespace \
--from-literal=etcdpasswd=$(echo -n "PASSWORD" | base64)
How do I do it using the create_namespaced_secret API of the kubernetes Python client library?
A: Try this:
from kubernetes import client, config
from kubernetes.client.rest import ApiException
import... | |
doc_23520848 | Source - http://wiz1.net/channel5?61612516
Iframe - src="http://www.wiz1.net/ch5" scrolling="no" allowtransparency="no" frameborder="0" width="642" height="460">
Thanks
Marty
A: In the Iframe snippet you have Width and Height defined. Just change them to desired values.
<iframe src="http://www.wiz1.net/ch5"
scr... | |
doc_23520849 | I realize there are some preventatives that can be taken, but that's not always the case. Would it be better to only offer email/password to avoid these issues, especially for websites where the user's data is critical (games, courses, etc).
A: There is no magic wand for the users who has forgotten what oauth provider... | |
doc_23520850 | Here is the general idea.
USE [AdventureWorks2012]
ALTER TRIGGER [Person].[sPerson] ON [Person].[Address]
FOR INSERT AS INSERT INTO AdventureWorks2012.HumanResources.AuditTable(PrevValue) select
AddressID,AddressLine1,AddressLine2,City, StateProvinceID, PostalCode, SpatialLocation, rowguid, ModifiedDate FROM Ins... | |
doc_23520851 | It has a "AutoExec" procedure that creates a new item in the CommandBar("Text") collection (right click menu) and a "AutoExit" that deletes this created item.
As an example, I tried the code below that create an item "How Many Pages?", which executes a macro displaying the number of pages in the active document.
This i... | |
doc_23520852 |
However, this line looks smooth and out-of-place compared to the pixellated style of my game. I would prefer a result that looks more like this:
Can someone please give me some tips on how I can get OpenGL to draw a pixellated line like this?
Here is my renderLine() method (using immediate mode, I'm afraid):
public s... | |
doc_23520853 | \s*\w+\s\w+\([A-Za-z,]*\)\s*\;\{
The thing is that after the words or the semicolon, the following part of the pattern can or cannot occur in the next line AND the pattern can occur in a single line too, depending on the file.
Thanks in advance for the replies. I have been stuck at this step for almost a week! Any kin... | |
doc_23520854 | How this is possible..
By using String I was get the String value.The following code show the result.
String pass = pass.substring(0, Math.min(pass.length(), 3));
pass=pass+"f";
This gives me String value like0.1f ,But I want only Float value like 0.1f.
A: It would be appropriate place where you should use DecimalF... | |
doc_23520855 | repositories {
mavenLocal()
jcenter()
}
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
classpath("net.serenity-bdd:serenity-gradle-plugin:1.0.47")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'net.serenit... | |
doc_23520856 | There are some libraries like JXSL(for writing) and DHXLS (for reading),
But I want to edit the existing file.
Any help will be appreciated
| |
doc_23520857 | I have three models - Sectors, Industries, Companies.
Companies is the viewable resource and are oraganised into Sectors and Industries.
Sectors contain Industries. Industries contain companies.
Previously this was achieved by a table column containing comma separated values of the industry and sector IDs - tacky, I kn... | |
doc_23520858 | I have built a powerapps to take a picture from the app and save it to sharepoint. On the create file action I always get this error:
Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '2598': 'The template language expression 'dataUriToBinary(triggerBody()['Createfil... | |
doc_23520859 |
*
*Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
*OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
*TensorFlow version (use command below): 1.14
*Python version: 3.7.3
*GPU model: Titan X (Pascal)
*CUDA Version: 10.1
Problem Statement
So... | |
doc_23520860 | <element></element>
Convert to
<element />
If I press "Alt + Enter" shows me that option, but I would like to access this option directly
:(
P.S. I'm sorry for my English.
A: If you have a tag like:
<element></element>
and want to convert it to
<element/>
then the simplest way is to type a slash / within the open... | |
doc_23520861 | As the document in the link specifies:
Unfortunately this has a side-effect: the native viewer selection mechanism has to deal with meshes that do not have the properties it expects.
It can be fixed but you likely have to edit the code of the viewer and load a custom version, see my fix below (viewer3D.js #L21962). An... | |
doc_23520862 | list1 = [['0900', '0930', 'M', None, None, None, None]]
list2 = [['0930', '1050', 'M', None, None, None, None], ['0930', '1050', None, None, 'W', None, None]]
list3 = [['1200', '1250', 'M', None, 'W', None, None], ['1200', '1250', None, None, None, 'Th', None], ['1200', '1250', None, None, None, None, 'F']]
The first ... | |
doc_23520863 | The marked line is giving the error.
class Student{
public:
//Student(string x, int y, string z[]);
void getinfo();
void printinfo();
private:
string name;
int numClasses;
string arr[numClasses]; // the error is here it's not allowing me to put numClasses as the size of
... | |
doc_23520864 | | append(self, object, /)
| Append object to the end of the list.
|
| clear(self, /)
| Remove all items from list.
|
| copy(self, /)
| Return a shallow copy of the list.
|
| count(self, value, /)
| Return number of occurrences of value.....
| |
doc_23520865 | @Override
public void onNonBeaconLeScan(BluetoothDevice bluetoothDevice, int i, byte[] bytes) {
}
Is it possible to set scanning period for this method?
A: The library is primarily designed for beacon detection, but it's scan cycling applies to non beacon detections, too. It schedules scans at a configurable rat... | |
doc_23520866 | ifstream in("in.txt", ios::in | ios::binary)
ofstream out("out.txt", ios::out | ios::binary | ios::trunc);
if(in.is_open() && out.is_open())
{
//TODO
}
else
{
cout << "\nUnable to open file. Error!!\n";
}
in.close();
out.close();
After operation above, can I delete in and out during program processing?
A: N... | |
doc_23520867 | > df1
col1 col2
1 0/0:6:6,0 0/0:6:6,0
2 0/0:6:6,0 0/1:6:6,0
...
6 1/1:6:6,0 0/0:6:6,0
7 0/0:8:8,0 0/0:8:8,0
What I want is to substitute long entries like "0/0:6:6,0" with just 0 if they start with "0/0", 0.5 if they start with "0/1" etc.
So far I have tried this:
1) replace-starts_with
df %>% mutate(... | |
doc_23520868 | #include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<unistd.h>
#include<string.h>
void Login()
{
char name[20];
int pfd[2];
pid_t pid;
pipe(pfd);
if((pid=fork()) == -1)
{
exit(1);
}
if (pid==0)
{
close(pfd[0]);
FILE *fp = fopen("loginuser.txt", "r");
printf("name:");
scanf("... | |
doc_23520869 | The first that comes to mind is Mustache. Any others?
Anyone doing this successfully ?
EDIT
I keep a compilation Here.
A: Try Mustache. (Twitter used it in their recent redesign, so they can share templates between server-side Ruby and client-side JavaScript.)
It's also available in Ruby, JavaScript, Python, Erlang,... | |
doc_23520870 | i will need this user/password to use in the connection string eg:
uid=*user*;pwd=*password*;
A: As of SQL Server 2005, you should basically create users in two steps:
*
*create a "login" to your SQL Server as a whole
*create users for this login in each database needed
You'd go about doing this like so:
CREATE... | |
doc_23520871 | var background = document.getElementById("rect");
setInterval(function() {
for (i=0;i<255;i++) {
background.style.backgroundColor = 'rgb(' + [i, i, i].join(',') + ')';
}
}, 900);
A: By changing the colors in a loop, you're effectively doing it all at once. Instead, do one change per interval callback... | |
doc_23520872 | Every user is supposed to input data into a database table on the website and the users should only see their input not the whole table.
I have two tables, one for login/user table and a Sales table, so I have a userID in both tables, what I need is for the userID to fill in automatically in the sales table on the log... | |
doc_23520873 | <img src="http://origincache-prn.fbcdn.net/1597216_736275239737299_176271816_a.jpg" />
You can follow the above source link to the image, and this is how the img tag is set in html, but it will not display in the browser.
Any suggestions?
Thanks in advance.
A: I'm not sure but can this have something to do with REFER... | |
doc_23520874 | var SERVER = "stun:stun.l.google.com:19302";
var pc1 = new window.webkitRTCPeerConnection({"iceServers": [{"url": SERVER}]});
pc1.createDataChannel('my_channel');
Canary throws me the following exception : NotSupportedError: DOM Exception 9
Does anybody know why is that happening?
A: Chrome requires some connection... | |
doc_23520875 | In our first tests we have an API Proxy that invokes 3 web services, exist a json transformer with payloadfactory and class mediators.
We have performed the tuning recommended by WSO2 EI for production envirment.
The results indicate that we have Latency per transaction between 2 and 3 seconds (average) with 16 TPS, wh... | |
doc_23520876 | I have this code:
import * as express from 'express'
and the system gives me an error:
Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.
So, I change to:
import express from 'ex... | |
doc_23520877 | i still get the error:
nov. 01, 2016 8:15:08 AM io.vertx.core.http.impl.HttpClientRequestImpl
GRAVE: java.net.ConnectException: Connection refused: localhost/127.0.0.1:80
final HttpClient httpClient = vertx.createHttpClient();
final HttpGet getRequest = new HttpGet(uri);
httpClient.request(apiMethod.g... | |
doc_23520878 | DLL Header File:
#include <s2wc.h>
#include <wc2s.h>
#include <windows.h>
using namespace std;
#ifdef __cplusplus
extern "C"
{
#endif
wchar_t* DLL_EXPORT Fonksiyon(wchar_t* wchtAlinanMesaj);
#ifdef __cplusplus
}
#endif
#endif // __MAIN_H__
DLL Cpp File:
#include "main.h"
//String
string strMesaj;
//wchar_t*
... | |
doc_23520879 | I have fileupload control of PF to upload a file and then display the uploaded file in the datatable below. This works fine in firefox but in IE the uploaded file does not show in the bottom datatable. I am also saving the uploaded file in db which does gets saved after file is uploaded, it just does not show in bottom... | |
doc_23520880 | My problem is when i click to share popup open and shows me "like an object" (See attached).
I have done the following things
FB.init({
appId: 'xxxxx',
xfbml: true,
version: 'v2.5'
});
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) {return}
... | |
doc_23520881 | like in this example >
External link for larger view:
i have not figured out the difference in the types of dependencies that causes the doclet to choose one representation vs. the other. anyone else figure this out ?
thx in advance
cb
A: For package dependency diagrams, yDoc keeps count of how many individual... | |
doc_23520882 | Manifest code:
<activity
android:name=".TracksListActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCH... | |
doc_23520883 | Imagine created class without toString() overriding. So what is the point in that class if you can't display it properly ??
And please try not to explain how constructor chaining works or something like that.
I know how it works. I want to know does anyone do this in real life
because without toString() overriding i d... | |
doc_23520884 |
A: You will need a flag of some sort. So either a new queue which is monitored or a DB update.
Then have a new thread started in your worker role that monitors for these cancellation messages/flags, picks the right thread and stops it.
I wouldn't recommend doing anything within the thread that is processing because it... | |
doc_23520885 | int strbuf = 100;
char string[strbuf];
char *exit = "exit";
while(!strcmp(string, exit)){
printf("Enter a word to search. Enter exit to quit");
scanf("%s", string);
state = present(fIndex, string);
if(state){
printf("The word %s was found on line %d", string, state);
}
}
EDI... | |
doc_23520886 | class JsonTable(models.Model):
data = JSONField()
type = models.IntegerField()
I tried next query, which works for normal sql fields:
JsonTable.objects.filter(type=1).values('type').annotate(Avg('data__superkey'))
But this throws next error:
FieldError: Cannot resolve keyword 'superkey' into field. Join on 'd... | |
doc_23520887 | public double nestedParamArrayLoop(function delegatedFunction, LoopControllers loopControllers)
{
double total = 0;
NestedLoopControllers loopControllers = new NestedLoopControllers(loopController, loopMaxes);
foreach(LoopController loopController in loopControllers);
{
nestedfor (loopControll... | |
doc_23520888 | I am trying to find an elegant solution in order to reduce the following boilerplate code each time I want to modify a part of an object which is only accessible through a const Getter and a non const Setter.
Content c = container.GetContent();
c.SetX(3);
container.SetContent(c);
I know I could have a non const gette... | |
doc_23520889 | This is my code, I write two methods for my task, help please with your suggestions
class Template
def initialize(template_string, local_variables)
@template_string = template_string
@local_variables = local_variables
end
def compile()
@template_string.gsub()
end
end
puts Template.new("I like... | |
doc_23520890 | <i className="fas fa-tachometer-alt fa-fw "></i>
Instead of using the 'official react way' like:
import { faHome } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
<FontAwesomeIcon icon={faHome} />
Thanks in advance.
A: You can hotlink the css from a CDN li... | |
doc_23520891 | I use get_model() to get model from a .robot file. Then modify, the model using ModelTransformer() which works on the basic idea of AST(Abstract Syntax Trees).
But after finishing the modification, when I try to save the modified model into a new .robot file using .save() function, this completely changes the format of... | |
doc_23520892 |
A: You can achieve Byzantine fault tolerance in several possible ways, the most straight forward is all nodes talk to all nodes, telling what value they plan to accept. This required n * (n-1) messages in the network, with each on n nodes sending n-1 messages to other n-1 nodes.
Later down the line, someone proposed t... | |
doc_23520893 | Let's say there are a total of 3 elements, I would like to look back last 5 minutes and find the sum for each customer.
*
*{"event_time": 12:01, "customer": "A", "amount": 10.00} -> look up last 5 minutes (from event time 11.55 to 12.00) and sum (result: 0)
*{"event_time": 12:02, "customer": "A", "amount": 20.00} ->... | |
doc_23520894 | Naturally using a wifi router and a proper lan addressing does the trick, but I need to use usb connection instead. Any hint ?
edit:
Just added different scenarios to let everyone understand better:
1. Emulator-based scenario:
*
*standard java server running on my pc @localhost:15000
*android java client running on... | |
doc_23520895 | I registered a new servlet with the errorpage pattern as "400" like the following:
@Component(
service=Servlet.class,
property= {
"osgi.http.whiteboard.servlet.errorPage=java.lang.IllegalArgumentException",
"osgi.http.whiteboard.servlet.errorPage=400"
},
scope=ServiceScope.PROTOTYPE)
public ... | |
doc_23520896 | Here is how I'm doing it:
$ cat t.pl
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
our %Opt = (
a => 0,
b => 0,
);
our %Options = (
"a=f" => \$Opt{a},
"b=f" => \$Opt{b},
"override=f" => sub { $Opt{$_} = $_[1] for qw(a b); }, # $_[1] is the "trick"
);
GetOptions(%Opt... | |
doc_23520897 | Below is the code
$('.nav li a').click(function (e) {
var $this = $(this);
if (!$this.hasClass('active')) {
$this.addClass('active');
}
});
this works fine but when current menu page loads it is becoming inactive.
How to set ac... | |
doc_23520898 | If I set these environment variables in my shell:
export PYTHONHOME=${HOME}/anaconda
export DYLD_INSERT_LIBRARIES=${HOME}/anaconda/lib/libpython2.7.dylib:${HOME}/anaconda/lib/libmkl_rt.dylib
If I launch my application directly, it works properly. However, if I call it through a bash script I have written, the DYLD_IN... | |
doc_23520899 | What i do not understand in the typescript-webpack skeleton is, why do i need to install babel when i use typescript and targeting es2015 in tsconfig.json? Is it used as a compiler? Or as a transpiler or polyfill at runtime?
I thought it should work like that: install the ts-loader for webpack, webpack uses typescript ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.