id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23528100 | function myfunction(){
eval("return;");
echo 'this line has to not show up';
}
For technical reasons, the decision to return (or not) from the function, has to be made in the eval instruction, but the above approach doesn't work. How can I make this work?
A: You can't. The contents of the eval are considered ... | |
doc_23528101 | I am trying to login to a site and download a file using VBA and an InternetExplorer object. The problem is that once the code clicks on the hyperlink I get a prompt from Internet Explorer (version 10 in my case): "Do you want to open or save "file.xls"? What do I do now?
Here is what I have tried:
*
*URLDownloadToF... | |
doc_23528102 | Steps to reproduce my issue:
*
*User open a new HOME tab in firefox.
*He/she visits my app -> app stores some data in session storage
*He/she clicks move back button. -> user again is on the home tab.
*He/she clicks move forward -> again user visits my app.
At this point, session storage is empty (checked it throu... | |
doc_23528103 | scala version: 2_10_6
code example
trait Service {
def process(s: String)
}
object ServiceImpl extends Service{
override def process(s: String): Unit = {
println(s)
}
}
object Register {
var serviceInst : Service = ServiceImpl
}
object Client1 {
def process1(l: List[String]): Unit ={
l.foreach... | |
doc_23528104 | Second, here is my AndoidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Alan.Gym_Rat"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:... | |
doc_23528105 | when I assign setCharacters(arrayOfObj);
export type CharacterItem = {
filepath: string;
group: string;
id: string;
isClicked: boolean;
}
export type Character = {
name: string;
items: CharacterItem[]
}
xxxxxx
const [characters, setCharacters] = useState([]);
xxxxxx
setCharacters(arrayOf... | |
doc_23528106 | I have abstract state "course", and if I resolve the data just in that abstract state, the data didn't refreshed when routing between sub views.
state('course', {
url: '/course/:courseId',
abstract: true,
resolve: {
courseId : ['$stateParams', function($stateParams){
... | |
doc_23528107 |
*
*If the desired temperature is higher than the current temperature,
this popup message should show: "Turn the heater on?".
*If the desired temperature is lower than the current temperature,
this popup message should show: "Turn the cooler on?"
I have tried to produce this but my code doesn't seem to be producing ... | |
doc_23528108 | I have a basic grid where the 2 columns should be taking up 50% each but it looks like the gap is throwing this off. How would I account for that and maintain body margins?
.grid-container {
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: 200px 200px;
grid-gap: 20... | |
doc_23528109 | The code I have so far is below:
Private Function RunScript(ByVal scriptText As String) As String
' create Powershell runspace
Dim MyRunSpace As Runspace = RunspaceFactory.CreateRunspace()
MyRunSpace.Open()
' create a pipeline and feed it the script text
Dim MyPipeline As Pipel... | |
doc_23528110 | Does ES have to do anything with it?
A: Take a look at Suggesters
"The suggest feature suggests similar looking terms based on a provided text by using a suggester. Parts of the suggest feature are still under development."
A: you can use this:http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/sea... | |
doc_23528111 | I have encoded ransom note from Locky(the pkt2 below). And I have decompiled C code to decode the ransom note(in comments). I tried to translate the C code to Python. Below is what I have:
# v29 = 0;
# v30 = -1342924972;
# while ( v29 < v62 )
# {
# v31 = (int *)v60;
# v32 = __ROL4__(v30, 3);
# v33 =... | |
doc_23528112 | I have the sample xml as below:
<ns0:Person xmlns:ns0="http://temp.poc">
<name>
<value>temp</value>
<status>T</status>
</name>
<age>
<value>tempval</value>
<status>F</status>
</age>
<cellNumber>
<value>9971760613</value>
<status>T</status>
</cellNumber>
<city>
... | |
doc_23528113 | <?php
$q = mysql_connect('localhost', 'xxx', 'xxx');
mysql_select_db('xxx', $q);
?>
<?php
$sth = mysql_query("SELECT inkoop, verkoop FROM prijs WHERE inkoop >= 1 ");
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
$rows[] = $r;
}
print json_encode($rows);
?>
<?php
$sth = mysql_query("SELECT tijd FROM prijs W... | |
doc_23528114 | Thank you.
Here is my code:
public class ButtonController implements Initializable{
@FXML
private Button bubu;
@FXML
private Button bb;
@FXML
private TabPane tp;
List<Button> buttonlist = new ArrayList<>();
List<Tab> tablist = new ArrayList<>();
Main parent;
public void setPa... | |
doc_23528115 | <td>
<fieldset class="rating">
<input type="radio" id="param1" name="srating" value="5"/>
<input type="radio" id="param1" name="srating" value="4"/>
<input type="radio" id="param1" name="srating" value="3"/>
<input type="radio" id="param1" name="srating" value="2"/>
<input type="radio" id="param1"... | |
doc_23528116 | Here's my code:
final FirebaseAuth _firebaseAuth = FirebaseAuth.instance;
final GoogleSignIn _googlSignIn = new GoogleSignIn();
Future<FirebaseUser> _signIn(BuildContext context) async {
Scaffold.of(context).showSnackBar(new SnackBar(
content: new Text('Sign in'),
));
final GoogleSignInAccount ... | |
doc_23528117 | I have used this
private void ButtonFilterClick(object sender, EventArgs e)
{
PixelFormat pxf = PixelFormat.Format24bppRgb;
Bitmap bitmap = ((Bitmap)(_smartLabForm.pictureBox1.Image));
Rectangle rect = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
BitmapData bmpData =
bitmap.LockBits(rect, ImageLockM... | |
doc_23528118 | As in Part 1, I like to sum the values in the second column based on the values in the first column as well, but this time like this: Table
Her is my data frame:
df <-data.frame('V1' = c('A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'A', 'A', 'B', 'B', 'B', 'C', 'A', 'A', ... | |
doc_23528119 | I've used the Standard Assets package from unity on the asset store, but I want to make them myself (the sprites and animations)
Are there any good tools for this and if it's something like blender are there any tutorials? It needs to be free.
Thanks in advance!
PS. It must be 2d sprites.
A: It depends on what you w... | |
doc_23528120 | z = "1.24"
x = "3.43"
z.to_f
x.to_f
@check = z/x
A: The to_f call does not change the variable itself (but returns a float, roughly speaking). You have at least following options:
1. Assign return value of to_f to a new variable
x = "3.43"
z = "1.24"
x_float = x.to_f
z_float = z.to_f
@check = z_float/x_float
2. Ca... | |
doc_23528121 | const aKeys = [];
for (let key of aKeys) {
...
}
Is transpiled to:
var aKeys = [];
for (var _i = 0, aKeys_1 = aKeys; _i < aKeys_1.length; _i++) {
var key = aKeys_1[_i];
}
What's the point of aKeys_1 here?
You can also view this live in Typescript playground here.
A: Because you could reassign aKeys in the loop ... | |
doc_23528122 | I have it working with this Order model:
clientId Client @relation(fields: [clientId], references: [id])
clientId Int
But wanted to also include the client name. Something like this doesn't work:
client Client @relation(fields: [clientName, clientId], references: [name, id])
clientN... | |
doc_23528123 | 123
1.23
1.23e4
1.23d4
123_txt
1.23_txt
1.23e4_txt
The JavaScript code read these data from a file and should math using the rexexp pattern
What is the simple regexp pattern to match above data?
A: Your regex [+-]?[0-9][0-9_]*\.[0-9de+-]* does not match 123 and 123_txt because these values are not containing a dot \.... | |
doc_23528124 | I used keith ito's implementation of tacotron and I woud like to use TFLite.
But I don't know how to change the code. TFLite is about only the Inference?
Apparentley, I can't use Session, Variable and other things, righ?
| |
doc_23528125 | Using arrays, I have created a system for adding new items to the menu and having them printed in a text file. This all works fine.
The issue arises when I need to edit an item,
for example, if I have added 3 dishes and use the edit option, only the first line of the text file is edited and the item number returns to 0... | |
doc_23528126 | @Override
public void deleteNode(Integer nodeId) {
SqlParameterSource in = new MapSqlParameterSource()
.addValue("nodeId",nodeId)
.addValue("user", "DUMMY");
SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(ebDataSource)
.withSchemaName("SCHEMA")
.withCatalogNa... | |
doc_23528127 |
Could not connect to the debugger
I googled for answers and I found out that there is a problem with the gnome-terminal, that it no longer accepts the --disable-factory argument and something about unchecking the "Run on external console". I unchecked that and when I press to run, it closed it immediately.
A: Try ex... | |
doc_23528128 | Is there a way to find out all the table dependencies and objects dependent on it?
For sybase, DBArtisan gives a really easy way to find dependecies. Is there any such tool for MySQL?
A: SHOW CREATE TABLE mytable;
It'll show you (along with some other stuff) the foreign key relationships for the table.
| |
doc_23528129 | # database code
with sqlite3.connect("password_vault.db") as db:
cursor = db.cursor()
# creates a table for masterpassword if one doesn't already exist
cursor.execute("""
CREATE TABLE IF NOT EXISTS masterpassword(
id INTEGER PRIMARY KEY,
password TEXT NOT NULL,
email TEXT NOT NULL);
""")
I would like to store the entr... | |
doc_23528130 | How can I show text in a JTextArea from another class?
Thank You!
private void botonReservarActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String nombre = "";
String telefono = "";
nombre = JOptionPane.showInputDialog("Nombre de la pe... | |
doc_23528131 | If Dir(Filenamepath) <> "" Then 'don't overwrite the packing list if it exists
Else
PackList.ExportAsFixedFormat Type:=xlTypePDF, _
FileName:=Filenamepath, _
OpenAfterPublish:=False 'True
End If
This loops through a number of times, e.g. 10, in order to create twn packing lists. Whenever the ExportAsFixed... | |
doc_23528132 | Table structure is as folllows:
PropertyOwner
*
*Number (primary key)
*PropertyId (primary key)
*OwnerId
Property
*
*PropertyId (primary key)
*LoanId (primary key)
Now, if I have a LoanId, how can I find all properties of property ownerId's who have taken the given LoanId?
I am having the below now but it ... | |
doc_23528133 | If we want to work with istio through rest call, what options we have?
I'm new to istio.So help me, please!
A: You can use Kubernetes API groups for Istio CRD
For example the apiVersion: networking.istio.io/v1alpha3 can be accessed at /apis/networking.istio.io/v1alpha3.
GET /apis/networking.istio.io/v1alpha3/gateways ... | |
doc_23528134 | I figured I could just apply -moz-transform and friends and be done with it, but then I realized that my browser does not seem to "push" elements out of the way like I expect, resulting in this:
My question is: is there a way for me to rotate the image, while having my browser move the elements around it in respect to... | |
doc_23528135 | This is my webpage. The first picture is made with usemap, and I made an area for each one of those people. When I click on each one, it loads the description in a different tab, and I don't want that.
So, can I load the description and the name of the men there in the bottom table, at the click event on that photo?
... | |
doc_23528136 | main()
{
int i=1,n,s=1;
printf("enter the value of n");
scanf("%d",&n);
while(i<=n)
{
s=s*i;
i++;
if (i==n+1)
{
break;
}
}
printf("factorial of n=",s);
}
it is giving the result as shown in the picture below.
A: Your problem is ... | |
doc_23528137 | I get the provider in the onCreate() of my Activity (it extends LocationListener)
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
provider = locationManager.getBestProvider(criteria, false);
location = locationManager.getLastKnownLocation(provider);
I... | |
doc_23528138 | I found some CLI tools but those are running only on windows. those are
*
*AzCopy
*cloudcopy
So can anybody suggest one best azure CLI tool, which can run on linux machine and able to perform upload and download operations??
It would be great if that supports partial read and partial write.
A: There's support f... | |
doc_23528139 | select recordings.ident,users.first_name,users.last_name,recordings.agent_number,recordings.device_id from recordings
join agent_phones
on recordings.agent_number=agent_phones.phone_id
join users
on agent_phones.agent_id=users.uid
is there a way to do some sort of "if" in the query? so that "if" t... | |
doc_23528140 | In the xlsx download section, I encountered this error when putting the "stream" variable into IWorkbook.
"System.ArgumentException: 'Update mode requires a stream with read, write, and seek capabilities.'"
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.... | |
doc_23528141 | HTML:
<div class="containdiv">
<label>Phone <img src="circle.gif" /></label>
<input type="text" name="phone" maxlength="4" size="4">
<input type="text" name="phone" maxlength="4" size="4">
<input type="text" name="phone" maxlength="4" size="4">
</div>
<div class="containdiv">
<label>Preferred Conta... | |
doc_23528142 | To simplify slightly, there are three roughly equal frames side by side. All three of them scroll vertically. The best approach I can think of now is to float everything left, with appropriate width and margin-left, and use overflow-y (and, where horizontal scrolling makes sense, overflow-x) settings for the DIVs in qu... | |
doc_23528143 | The hashing function generates a different hash every time for the same piece of data, but it can determine if a particular hash was generated with the piece of data or not.
Eg:
hash_func(xyz): abc123
hash_func(xyz): jhg342 // different hash, even if the data was same.
decode_hash(jhg324) == xyz
This gives true, becau... | |
doc_23528144 | Consider I have to search for 10 documents out of a total 1000 documents based on a condition (not id).
*
*Would it be better to query using document _id's (after storing the required id's in another collection beforehand by checking for the condition whenever insertion is done)
OR
*Would it better to traverse all t... | |
doc_23528145 | a
a
a
b
b
a
c
a
c
b
I want out put
a
b
c
Can we do it using grep or awk
A: In awk:
$ awk '!u[$0]++' file
a
b
c
Nice thing with this solution is the file doesn't need sorting first.
A: The simplest approach:
sort -u INPUT > OUTPUT
| |
doc_23528146 | #standardSQL
WITH table AS (
SELECT
*
FROM
`project.dataset.ga_sessions_*`
WHERE
_TABLE_SUFFIX = '20180118'
)
SELECT
date,
device.deviceCategory,
CASE WHEN totals.newVisits IS NOT NULL THEN 1 END newUser,
(SELECT COUNT(DISTINCT returningUser) FROM (SELECT CASE WHEN totals.newVisits IS NULL THEN fullVisito... | |
doc_23528147 | The idea is, we want to know every message that goes across the ws without having to modify either program to install this logging mechanism.
A: Yes it is. After a few days of playing around, you can use node-http-proxy to set up a proxy using node's socket library. This npm package also includes websocket proxying th... | |
doc_23528148 | I have one project done in Windows Game and another project done in WPF.
I need to open the Game1 from DemoScene project by clicking a button in WPF.
And this is method in WPF project on button click...
private void Playgame_Click(object sender, RoutedEventArgs e)
{
System.Diagnostics.Process.Start(i d... | |
doc_23528149 |
*
*project-a
*project-b
*lib
Each of these folders have a tsconfig.json file. I have setup these tsconfig files according to the typescript docs and to my older SO answer here: https://stackoverflow.com/a/54772741/681803
In visual studio code, I simply change my build script in my package.json from tsc to tsc --... | |
doc_23528150 | getTwitters('name', {
id: 'account',
count: 3,
withFriends: false,
enableLinks: false,
ignoreReplies: true,
newwindow: true,
template: '<span style="blabla">%time%</span><p style="blabla">%text%</p>'
});
Does anyone have an idea:
*
*why there are only two calls for fetching tweets?
*why one of the... | |
doc_23528151 | class CreateTodoList {
constructor(list) {
this.todoList = list;
this.todos = [];
}
Then let's just assume that I have built addTodo() function which takes text parameter where an user enters her/his todo.
addTodo(text) {
this.todos.push(text);
this.todoList.appendChild(CreateTodoList.addtoList(te... | |
doc_23528152 | I used the following code
void MainWindow::test()
{
QLoggingCategory::setFilterRules("qt.network.ssl.warning=false");
QNetworkAccessManager* manager = new QNetworkAccessManager(this);
QUrl url;
url.setHost("xx.xxx.xx.xx");
url.setPort(3389);
url.setUserName("administrator");
url.setPassword(... | |
doc_23528153 | The data code is this:
CombinedMetricScore<-c("zero", "5", "10", "15", "20", "25", "30", "35", "40",
"45", "50", "60", "M11", "MICKEY", "MEANING", "MICKEYTWO",
"MICKEYTHREE", "MIKE", "PASTA", "MCIDandPASS",
"M... | |
doc_23528154 | I almost got it working.
I needed to change js.src assignment from js.src = "//connect.facebook.net/en_US/sdk.js"; to: js.src="https://connect.facebook.net/en_US/all.js";
But now when I enter the login screen I have this error:
Can't Load URL: The domain of this URL isn't included in the app's
domains. To be able to... | |
doc_23528155 | when updating the same application i got this error.
I need help, i searched but nothing worked for me.
I am using android studio when i updated studio to 2.2 preview 1 i am getting this error.
java 1.8.0_92 installed in my System.
A: I found the solution , just extract apk with 7zip and deleted the META-INF folder a... | |
doc_23528156 | This is the code I tried:
string readGZipLog () {
try {
using namespace boost::iostreams;
ifstream file(currentFile.c_str(), std::ios_base::in | std::ios_base::binary);
boost::iostreams::filtering_istream in;
in.push(gzip_decompressor());
in.push(file);
std::stringstream strstream;
... | |
doc_23528157 | For example, I can store my variables as either strings or integers (as below). In this case, which of the columns would be more efficient, for a 1 million row dataset, and why?
string_col int_col
code1 1
code2 2
code3 3
A: A rough approximation (this may change when you put it into a dataframe, wh... | |
doc_23528158 | Several old machines functioned as "servers" in our environment and when I newly started working here, I wanted to change this cluster into something more appropriate. So I calculated how one big server would cost us a certain amount of money but we would save it in electricity-bills etc.
The server finally arrived (HP... | |
doc_23528159 | <*> --
Does it mean that it cover any state (Initial + all the ones declared with /x) ?
A: Yes, that's exactly what it means. See the start conditions section in the flex manual.
Note that start conditions can be declared either with %x or %s. The difference is explained in the manual section linked above.
| |
doc_23528160 | public void btnFacebookClicked(View view) {
openActiveSession(this,true,statusCallback);
}
Session.StatusCallback statusCallback = new Session.StatusCallback()
{
@Override
public void call(final Session session, SessionState state, Exception exception)
{
if(session.isOpene... | |
doc_23528161 | export const useNavMenuOptions = () => {
const intl = useIntl()
const profile = intl.formatMessage({ id: 'profile.navMenu.profile' })
const addresses = intl.formatMessage({ id: 'profile.navMenu.addresses' })
const myOrders = intl.formatMessage({ id: 'profile.navMenu.myOrders' })
const navMenuOptions: NavMen... | |
doc_23528162 | "Could not load file or assembly 'DTI.FaxManJr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)' sqlrd7 C:\Visual Studio Projects\pbrs\LC"
I am workin with in a 64-bit Windows 10 OS and my project is using the f... | |
doc_23528163 | I use protoc to generate python code, then create a transaction object, then update the data script_sig. In some case it should be None, but if I set it None, it occurs the error : TypeError: None has type NoneType, but expected one of: bytes
Here is my code:
message Transaction {
repeated TxIn vin = 2;
repeated... | |
doc_23528164 | targetSDKVersion 19
and trying to use
compile 'com.android.support:recyclerview-v7:19.0.+'
is giving me an error failed to resolve ...
When I go to SDK Manager, I can only see Android Support Library rev 23.1.1 available for download.
If I use that version 23, then I have the error this support library should not us... | |
doc_23528165 | <Window.Resources>
<Style x:Key="TrackingButton" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Style.Triggers>
<!--Default Base-->
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Content">
... | |
doc_23528166 | The problem occurs at the beginning of a function witch gets a year and returns 0, 1 weather it's a leap year or not.
22 p = inputParser;
23 p = p.addRequired('Year',@(x) all(isnumeric(x)));
24 p = p.parse(Year);
The error I get is:
error: value on right hand side of assignment is undefined
error: called from
l... | |
doc_23528167 | I need all the functionality of the current Cart Rules. I am looking at the AdminCartRulesController and ofcourse all the code is there.
How can I "extend" or copy and modify it so that I will add one more input to the form, and the loop adding to database by form value? Is it possible ?
A: You need to create the fi... | |
doc_23528168 | I've spent many hours trying the different fixes listed on Stack Overflow and other sites. I'm trying to get the logos in my wait panel to remain horizontal as the outer div rotates. This works perfectly in Chrome, Safari, Edge and Firefox. Just not in IE 11 (I'm not concerned with older versions of IE).
As shown, even... | |
doc_23528169 |
A: You can specify the artifact-name with the maven boot plugin:
In this case, it will be NewJarName.jar
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage<... | |
doc_23528170 | http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application
And i am using method below to query EF
public virtual IEnumerable<TEntity> Get(
Expression<Func<TEntity, bool>> filter = null,
Func<IQueryable<TEntity>,... | |
doc_23528171 | My intention is to use the aws configure / aws credential helper method as I prefer this, in this context, to a username / password.
When attempting any git operations I get:
aws codecommit credential-helper $@ get: aws: command not found
I'm then able to then use a username and password but this invalidates the point... | |
doc_23528172 | How do I add the title which should be a row with cell merged and also show the filter parameters on which the data is generated in the excel sheet?
var mystyle = {
headers: true,
column: { style: { Font: { Bold: "1" } } },
};
let dataCopy = JSON.parse(JSON.stringify(dataFiltered));
alasql('SELECT * INTO XLSX(... | |
doc_23528173 | I found topics with similar issues but none of the solutions worked for me. I read that I needed to replace navigationOptions by defaultNavigationOptions however this did not solve the issue.
Any one have an idea how I can fix that?
const tabNavigator = TabNavigator.createStyles();
export default createBottomTabNaviga... | |
doc_23528174 | Creat_Dttm Month
2014-01-01 00:33:58.000 = 1/1/2014
2014-01-01 07:40:01.000 = 1/1/2014
2014-01-03 01:50:12.000 = 1/1/2014
2014-02-18 11:42:13.000 = 2/1/2014
2014-02-20 07:49:11.000 = 2/1/2014
2014-04-09 06:02:36.000 = 4/1/2014
A: select CAST(MONTH(Creat_Dttm) AS VARC... | |
doc_23528175 | But I'm always getting an error: 'QuerySet' object has no attribute 'get_quantities_sold'
Here is my model:
generate_ref_no = str(uuid.uuid1())
class Transaction(models.Model):
business = models.ForeignKey(Business_Account, on_delete=models.CASCADE)
customer = models.ForeignKey(Customer, on_delete=models.SET_N... | |
doc_23528176 | sample_photo_rep["photo"]["tags"]["tag"]
for sample_tags_list in sample_photo_rep["photo"]["tags"]["tag"]:
print [sample_tags_list['raw'].decode('utf-8')]
current output:
[u'Nature']
[u'Mist']
[u'Mountain']
correct output: [u'nature', u'mist', u'mountain']
A: In each loop, you're printing a list containing a s... | |
doc_23528177 | What I have:
indexAarrays = [['bar', 'bar', 'baz', 'baz', ],
['one', 'two', 'one', 'two']]
indexTuples = list(zip(*indexAarrays))
index = pd.MultiIndex.from_tuples(indexTuples, names=['firstIndex', 'secondIndex'])
colAarrays = [['c1', 'c1', 'c2', 'c2', ],
['d1', 'd2', 'd1', 'd2']]
colTuples = list... | |
doc_23528178 | import pandas as pd
import matplotlib.pyplot as plt
df=pd.read_csv('F:/ex2data2.txt', sep=",", header=None)
X=df.iloc[:, :2]
y=df.iloc[:, 2]
def plotData(X,y):
fig=plt.figure()
pos = y==1
neg = y==0
plt.plot(X[pos, 0], X[pos, 1], 'k*')
plt.plot(X[neg, 0], X[neg, 1], 'ko')
plt.show()
plotData(... | |
doc_23528179 | public Timer timer = new Timer();
private string jsonContents;
private string currentTickerPlaylist;
private int i = 0;
private List<string> playlistTickers;
public void StartTickerTimer(int seconds, string selectedPlaylist)
{
currentTickerPlaylist = selectedPlaylist;
InitPl... | |
doc_23528180 | It is distinct from cross field validation in which a value of one field is dependent upon the value(s) of one or more of the rest of the fields.
Given below a simple scenario.
<p:inputText id="txt1" value="#{testBean.txt1}" required="false" maxlength="45"/>
<p:inputText id="txt2" value="#{testBean.txt2}" required="fal... | |
doc_23528181 | But I want them to be autonomous : they should be able to create their own service accounts on the scopes I allow.
The issue is that if I give them the IAM editor permisson, they can grant themselves any other permission in the project.
The Kubernetes's RBAC API is very well designed for that and a user who is able to ... | |
doc_23528182 | What are the best practices to perform that task?
A: *
*Stage 1 - take a look at this module node-xlsx or more robust and possibly better for your needs xlsx.
*Stage 2 - Writing the file to JSON - if the module can return a JSON format then great. If you use xlsx it has an option to JSON --> take a look here.
*Sinc... | |
doc_23528183 | Any help would be great : )
A: Because you mentioned flash I think you search a player for web pages, am I right?
If yes, then you could take a look at jsmad. It's a decoder (aka player) written in JavaScript (but therefore needs a decent browser).
Or you could use the audio-Tag of HTML5.
| |
doc_23528184 | class Tiger extends Animal { ... }
class Deer extends Animal { ... }
Now I wanted to have a namedQuery as
class Animal {
...
static namedQueries = {
findAllAnimalBySpecies{
... some logic for fetch only Tiger
... some logic for fetch only Deer
}
}
}
In controller,
d... | |
doc_23528185 | I want to be able to add topics not selected in the list to the lookup table where the topic_fk does not already exist for the specimen_fk:
CREATE TABLE IF NOT EXISTS `specimen_topic_lookup` (
`specimen_topic_lookup_pk` int(6) NOT NULL AUTO_INCREMENT,
`specimen_fk` int(6) NOT NULL,
`topic_fk` int(3) NOT NULL,
P... | |
doc_23528186 | Does anybody have an idea what's going wrong here? Thanks a lot!
EDIT: Here comes the code:
#include <stdio.h>
#include <pthread.h>
#include <time.h>
#include <sys/time.h>
// replacement function because OS X doesn't seem to have clock_gettime()
static int clock_gettime(int clk_id, struct timespec* t)
{
struct tim... | |
doc_23528187 | When passing parameters instead the first parameter (%1) should be PARAM and the
other parameters are shown in the list.
%epin% or %1 contains the file with full path and no extensions for input files
%epout% or %2 contains the file with full path and no extensions for output files
%epinext% or %3 contai... | |
doc_23528188 | But also have reserved url's, such as url.com/categories, url.com/login etc.
I have states setup for the reserved url's e.g.
.state('categories',{
url:'/categories', // i.e. url.com/categories
...
});
Then I've tried to provide a regex for the root state that would match for usernames and not m... | |
doc_23528189 | I'm working on Eclipse, I build with clean install and run the app with springboot:run.
I've setup a controller and a couple of template and css but it seems that thymeleaf cannot find the css, in the browser it shows the template (es. 'panda.html') without loading the css but if I open manually the .html the browser... | |
doc_23528190 | function user_data($user_id) {
$data = array();
$user_id = (int)$user_id;
$func_num_args = func_num_args();
$func_get_args = func_get_args();
if ($func_num_args > 1) {
unset($func_get_args[0]);
$fields = '`' . implode('`, `', $func_get_args) . '`';
$data = mysql_fetch_a... | |
doc_23528191 |
How to print the contents of (CrystalDecisions) ReportDocument.ExportToStream(Type=PDF) without creating a file?
Because we are having issues on access rights of the ASP.NET server printer when executing RptDoc.PrintToPrinter
(Users would log in our system using their Active Directory Account, the printer right is gr... | |
doc_23528192 | Thanks!
A: Jison docs would be a good place to start. A breakdown of how it's used to build a parser for the CoffeeScript grammar may be helpful in seeing the big picture.
References
*
*npm: An UriTemplate implementation of rfc 6570
| |
doc_23528193 | My understanding is that to be able to send a single Push I need an Endpoint ID. My issue is that I can't find a way for my web app to be able to look for an Endpoint ID in the AWS cloud based on, say, user ID. Does anybody thinks there is a way?
Thanks!
Michal
A: If you are trying to target endpoints (devices) based ... | |
doc_23528194 | import pyodbc
cnxn = pyodbc.connect(driver ='{SQL Server}' ,server ='host-MOBL\instance',database ='dbname', trusted_connection = 'yes' )
cursor = cnxn.cursor()
cursor.execute("""SELECT * FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = N'TableName'""")
def checkTableExists(cnxn, TableName):
cursor = c... | |
doc_23528195 |
*
*Using the bind, I tried to change the font size of the button, and it works well with only one button. However, when two buttons were applied, it worked at first but suddenly program fails with the warning sign:
import traceback
File "", line 1024, in _find_and_load
File "", line 170, in enter
File "", line 196, i... | |
doc_23528196 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles/style.css">
<title>Document</title>
</head>
<body>
<div class="container">
<di... | |
doc_23528197 | Now, I want to automatically test my API via features. So I successfully set up a guard server which starts cucumber and rspec.
Does cucumber start my application and provide my API entry point under any port? So that I can use a HTTP client inside my step definitions and point it to http://127.0.0.1:8989/api for exam... | |
doc_23528198 | However, I want to access the backend database in order to perform SQL queries and see all the tables in my website.
I managed to find the .html, .jsp pages which is located at C:\Program Files\Apache Foundation\Tomcat5.5\webapps\root. I also managed to get snippets of the code which might be of help.
--
<%@page langua... | |
doc_23528199 | Is there any way to make sure each task in those n tasks always finishes (callback is called) in case is callback is not called?
A: This is a hard question without any specific code because the ways to address this issue are all related to specific code. The best way to fix it would be to go into each specific operat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.