id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23532100 | In all the places where the method can return, I am returning either a Try(String) or Failure(Exception). Given that why does compiler think I am returning Option[Serializable]?
def m1(arg1 : String, arg2 : String): Try[String] = {
for {
x1 <- getM1(arg1)
x2 <- getM2(arg2)
} yield {
val id : E... | |
doc_23532101 | Possible Duplicate:
Uninitialized values being initialized?
void Encrypt( FileContent *pFile )
{
/* Get the key total ascii value */
DWORD asciiKeyValue;
for (DWORD i=0; i < pFile->keyLength; i++)
{
asciiKeyValue += pFile->encKey[i];
}
_tprintf(_T("[*]DEBUG The encKey ascii value is:... | |
doc_23532102 | This is my first time posting on the site so please bare with me and my question. My class was tasked with individually creating a password generator using JavaScript. Thankfully I had gotten most of the application operating correctly, but I've gotten stuck on a problem.
Example: The user chooses to have 8 characters ... | |
doc_23532103 | Once execution starts, I get an exception in the command prompt and execution stops without the browser even opening (Attaching the log.html file screenshot and snippet)
Suite setup failed:
WebDriverException: Message: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-stri... | |
doc_23532104 | <p class="sent hover 00 06">text 01</p>
<p class="sent hover 06 11">text 02</p>
<p class="sent hover 11 18">text 03</p>
<audio controls id="audioB"><source src="lev01/english.mp3" type="audio/mpeg"></audio>
js
$(document).on("click", ".sent", function() {
var a=$(this).attr("class").split(" ")[2];
var b=$(this... | |
doc_23532105 | I have a form which POST's to MailChimp:
<form id="mailchimp_signup" action="http://MY_MC_ACCT.us2.list-manage.com/subscribe/post" method="POST">
...
<input type="submit" class="button" name="submit" value="Subscribe to list">
...
But I need this form to send out an additional email if certain conditions (a selected c... | |
doc_23532106 | regards
A: so basically you want to login using your Facebook Credentials right?
This might help:
Connecting with FourSquare API V2 using PHP
A: If the user you want to connect to your app has a Facebook account linked to their Foursquare account, they will be able to login through Facebook. Assuming this user isn't ... | |
doc_23532107 | 1 xyz-warPU INFO [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.jdbc.JDBC - Using dictionary class "kodo.jdbc.sql.KodoOracleDictionary" (Oracle Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production ,Oracle JDBC driver 11.1.0.6.0-Production+).
112 xyz-warPU ... | |
doc_23532108 | #include <iostream>'
#include <cv.h>'
#include <highgui.h>
#include "package_bgs\bgslibrary.h"
#include "package_bgs\FrameDifference.h"
int main(int argc, char **argv)
{
CvCapture *capture = 0;
capture = cvCaptureFromCAM(0);
if(!capture){
std::cerr << "Cannot initialize video!" << std::endl;
return -1;
... | |
doc_23532109 | By pressing the specific button in Form2, Form1 appears, and then by pressing the button in Form1 the button in Form2 has to be pressed and show a message.I don't want to use a module with global variable because I have done it this way. Is there a way to get the specific instance of Form1 and not a new one? The 2 clas... | |
doc_23532110 | #include <string.h>
#include <stdio.h>
int* createArr(int len);
/*
Convantional problem in Code:
There is no descreption to main.
Bugs:
1.line 32 - in scanf there is no & to the variable that'll stor the user input, scanf("%d,size") -> scanf("%d,&size")
2.line 33 - should be getchar(); and then the rest of the code.
... | |
doc_23532111 | I'm now trying to configure accessibility for these HTML elements and running into some problems. Each "attachment" consists of a button-like background which is actually constructed from 3 images: one for the left side of the button, one for the right side of the button, and a middle portion which is stretchable (this... | |
doc_23532112 | For example, I have data set:
01|456|AAAA|James Bond|AAAA|207085
02|AAAA|BBBB|Marco Polo|BBBB|937311723
03|321332|BBBB|Brad Pitt|AAAA|6296903
04|3213|AAAA|AAAA|BBBB|62969
I want to change every "AAAA" value to "XXXX", but only between 4th and 5th pipe character ( | ). So, expected output will look like:
01|456|AAAA|Ja... | |
doc_23532113 | We made a 2d scrolling Android game using the book 'Beginning Android Games.' So far, the things went smooth but when we added a lot of bitmaps, the game crashes on all devices. So we removed the bitmaps and it run on gingerbread, honeycomb, and jellybean devices. But it doesn't really work in ICE CREAM SANDWICH device... | |
doc_23532114 | #include <stdlib.h>
#include <stdio.h>
#include <limits.h>
void print(size_t i)
{
printf("%zu\n", i);
}
int main()
{
print(-1);
return 0;
}
The output:
18446744073709551615
Is it possible to validate that the size_t i variable is greater than 0? If so how can I do this? gcc doesn't like me checking for ... | |
doc_23532115 | NullPointerException might be thrown as 'a' is nullable here". Below is simple code sample for the error.
The class :
class A {
int a1;
int a2;
public A () {
}
public int getA1() {
return a1;
}
public int getA2() {
return a2;
}
}
Then I have a method which use the class above as param :
public boolean testM... | |
doc_23532116 | Maven variable in web.xml :
<env-entry>
<env-entry-name>spring.profiles.active</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${profileName}</env-entry-value>
</env-entry>
and maven variables are replaced by maven-war-plugin during build process :
<plugin>
... | |
doc_23532117 | Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com... | |
doc_23532118 | Problem is, on the frontend, only the first handful of specs are displayed.
If I move attributes up and down in the "Manage Attribute Sets," I can get ones further down the list to display on the frontend, at the expense of other attributes that get moved down the list.
(Setting up different attributes in different gro... | |
doc_23532119 | this.userDetailsData.user_context.forEach(async data => {
const userContext = this.createJobForm.get('user_context') as FormArray;
this.parent_id = this.parentList.find(parent => parent.parent_name === data.parent_name)?.id;
this.toyList = this.parentList.filter(toy => toy.id === this.parent_id).... | |
doc_23532120 | All of my views are in a unique StoryBoard so I get my TabBar in my Appdelegate.m by this way :
// Add logout tab to tabbar
storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UITabBarController *tabbar = (UITabBarController *)[storyboard instantiateViewControllerWithIdentifier:... | |
doc_23532121 | When I run this code, I get the following error:
ExecuteSQL: step failed: unable to open database file
I do have 2 threads which open g_MainDB but I thought that since temporary tables are not created in the main database that this wouldn't have been a problem?
Can somebody please provide me with an example of how to ... | |
doc_23532122 | #include<math.h>
#include<stdio.h>
int main()
I want to replace #include<math.h> with <span class="header">#include<math.h> </span> and #include<stdio.h> with <span class="header">#include<stdio.h></span>. The final filtered string will looks like:
<span class="header">#include<math.h></span>
<span class="header">#in... | |
doc_23532123 | I try with the following code.
HttpServerUtility ser = new HttpServerUtility();
ser.UrlEncode(pfile.FileName);
That's wrong but however I would like to use Server.UrlEncode so let know the way.
A: HttpContext.Current.Server.UrlEncode
... or you can use the methods of Uri such as EscapeDataString which I tend to prefe... | |
doc_23532124 | In general, I want to be able to define any invocation of find that I could run on the command line, and exec it inside a subshell. And in particular, I want to be able to exclude filenames containing linefeed=LF=newline=$'\n'.
When I invoke the sample script below with argument easy, it prints all filenames containin... | |
doc_23532125 | df = pd.pivot_table(df, index=['PC', 'Geo', 'Comp'], values=['Bill1', 'Bill2', Bill3],
columns=['Month'], fill_value=0)
dataframe before pivot table
desired output
please note that the output is based on current month
if today's date >15
if today's date <15
A: You can modify your code as b... | |
doc_23532126 | When I set up machine A, the xml files were set so that I could use the HDFS shell to find the HDFS on machine A.
I can rewrite the xml files on machine A so that the HDFS shell invoked from machine A sees a different HDFS by default.
However, I would like to be able to access all filesystems conveniently, without rese... | |
doc_23532127 | {
Thread t = new Thread(
() => textBox4.AppendText(getman(textBox3.Text)));
t.Start();
}
List<string> getman(string url)
{
List<string> result = new List<string>();
try
{
HttpWebRequest r = (H... | |
doc_23532128 | Any help is appreciated.
A: Take a look at UISearchDisplayController. It is used together with a UITableView to provide search. You can probably get started by looking here or just google with your favorite search engine for UISearchDisplayController.
A: You have to use a background thread to update the table period... | |
doc_23532129 | Questions.
*
*Is it possible to catch MouseEvents in Mathematica graphics ( for example with using a Java class or otherwise? )
*Or is the use Java then call Mathematica from Java the advised route?
*Or ( I hope not ) is developing interactive graphics programs beyond of what one should do with Mathematica?
A: Ev... | |
doc_23532130 | The Joomla installation is the same in both servers.
Old server (working well): Debian 8 / Apache 2.4.10 / PHP 7.1.30 / Joomla 3.9.10;
New server (with error): CentOS 7.6.1810 / Apache 2.4.6 / PHP 7.3.7 / Joomla 3.9.10.
When I submit a form that should create a PDF on a folder like 'cache' (so the url will be http://ww... | |
doc_23532131 | var _sftpClient = new SftpClient(_hostName, _userName, _password);
using (_sftpClient)
{
_sftpClient.Connect();
// Other code to follow
}
Error:
Value cannot be null.
Parameter name: At least one element in the specified array was null.
Exception stacktrace:
at System.Threading.WaitHandle.WaitAny(Wait... | |
doc_23532132 | [debug] [2020-05-20T16:21:50.072Z] ----------------------------------------------------------------------
[debug] [2020-05-20T16:21:50.073Z] Command: /usr/local/Cellar/node/13.13.0_1/bin/node /usr/local/bin/firebase deploy
[debug] [2020-05-20T16:21:50.073Z] CLI Version: 6.8.0
[debug] [2020-05-20T16:21:50.073Z] ... | |
doc_23532133 | I'm using astrotomic/laravel-translatable and I created a new Provider for the 'Food' in en_US and in hr_HR.
So I seed the database with both en and hr, but they give random stuff where the translations are not correct.
For example.... Food name is 'pasta' in en(english), and 'pasta' in hr(croatian) is 'tjestenina'...
... | |
doc_23532134 |
println(InetAddress.getByName("0.0.0.0").isAnyLocalAddress)
true
println(InetAddress.getByName("0.0.0.1").isAnyLocalAddress)
false
Can I check somehow with any java.net.InetAddress native method or with com.google.common.net.InetAddresses if IP address is from within the range 0/8?
A: I'm not sure about those types... | |
doc_23532135 | I know there is some sample code for using multiple input textures with GPUImage, but I have not seen anything for multiple output textures. For single-byte output I believe I could use GL_ALPHA textures(?), so I am guessing it is a matter to binding multiple textures into variables in my filter kernel.
Thanks!
A: Pro... | |
doc_23532136 | The image blow shows a small example. However, imagine that KW, KVAR, and KVA repeat 3 more times before continuing some 50 rows later.
My goal as to create a simple python script that would make the data into a data frame with the columns: DATE, TIME, KW, KVAR, KVA, and DAY.
The problem is my script returns ... | |
doc_23532137 | I would like to update text of button on click.
When button is clicked and lightbox is reopened text on button is changed.
How to change text on button without reopening a lightbox?
Glightbox documentation can be found here
<!DOCTYPE html>
<head>
<link href="https://fonts.googleapis... | |
doc_23532138 | onTap(){
///my logic
}
I want reload api call. So, how could i reload this "onTap"?
A: In the onTap add your call using an object or variable that is in the State of the widget (note the Widget should have a future builder or when tapping the button nothing will happen until the API call completes and eff... | |
doc_23532139 | {
"doc_flat":[
{
"key":"timestamp",
"type":"date",
"key_type":"timestamp.date",
"value_date":[
"2023-01-20T12:00:00Z"
]
},
{
"key":"status",
"type":"string",
"key_type":"status.string",
"value_string":[
... | |
doc_23532140 | Is this an example of hoisting? Is it something specific to do with jquery?
var test_var = 'original test_var';
$(document).ready(function() {
$(function() {
test_var = 'test_var has been altered!';
console.log("test_var 1");
console.log(test_var); //displays 'test_var has been altered!'
}... | |
doc_23532141 | can any one please help me i have used ROW_NUMBER() to get the number row number and used between to retrieve data.
please give a optimized way to get records
The stored procedure creats a sql query as given below
I have 6,00,000 records and i want to fetch 10 records from them as i want to display only 10 records in ... | |
doc_23532142 | Once we have captured an image we store it as a bitmap. Downstream we have the ability to add annotation to the image, for example letters in a fixed size font.
In one of our desktop environments, the annotation has started appearing at half the size that it normally appears at. This implies that the image we are merg... | |
doc_23532143 | It uses threading to show the form via a static method. I'm still something of a threading novice, so when I got errors I was a bit confused as to what and why.
Turns out my code is perfectly fine when I run it outside the Visual Studio debugger. But when I run it from inside the debugger, I get the exception:
"Cross-t... | |
doc_23532144 | I want to create a new spreadsheet and I have google api sheets turned on.
Is it easier to use google-spreadsheet npm package or use examples from Google docs?
I tried ts-node this but it gets killed
import {google} from 'googleapis';
const sheets = google.sheets('v4');
async function main() {
const authClient = awa... | |
doc_23532145 | with t as (
select
time_slice(to_timestamp_ntz(record_timestamp),5,'second') as timestamp,
name,
availableseconds
from
schemaName.dbName.tableName
)
select count(*) from t;
I wanted to convert this to the Snowpark python version and so I have done this ..
from snowflake.snowpark import Session
fro... | |
doc_23532146 | while(sc.hasNext()){
Arrays.sort(array);
sum=sc.nextDouble();
double op=0;
while(op < 9){
array[op]= sum;
op++;
}
}
A: Just in case you ever need to actually do something special with the first and last elements of the array, and not just dismiss them, here is an easy way to do that.
doub... | |
doc_23532147 | They have provided the solution as to create Linked template and deploy it via reference.
Please Check the documentation here
Nested Template
So, Is there any tool/scripts through which we can manually divide the ARM template to Linked ARM Template maintaining all the dependencies?
A: At present, we do not have this t... | |
doc_23532148 | It seems as if the module does not only check the direct project dependencies but also the indirect dependencies - which does not really make sense (in most of the scenarios).
I did not find an option to just check the packages listed in the pom - but not the indirect dependencies of these packages.
Is there such an op... | |
doc_23532149 | For example ,
$HADOOP_HOME/bin/hadoop jar $HADOOP_HOME/hadoop-streaming.jar \
-input myInputDirs \
-output myOutputDir \
-mapper myPythonScript.py \
-reducer /bin/wc \
-file myPythonScript.py
This the normal command to execute python script using hadoop streaming. How to mention if the myPythonScr... | |
doc_23532150 | This works fine; ServicePulse alerts me when I stop/start my local and remote windows services, Databases, Flux Capacitors, etc.
I now want to build a windows service / nServiceBus Endpoint, like ServicePulse, but with logic that can attempt recovery, send emails etc. I don't really want to put this code into the 3rdP... | |
doc_23532151 | var User = $resource('/user/:userId', {userId:'@id'});
var user = User.get({userId:123}, function() {
user.abc = true;
user.$save();
});
But how to write code to reload a single object
A: The above does load a single object. In standard $resource (you can override it), the following returns an object:
u... | |
doc_23532152 | Workflow for now is that I am sending my JSON to my server. My server is changing one information inside that object and response with modified one JSON. Problem is happening when I am trying to accept my server response in javascript.
Error: SyntaxError: Unexpected token < in JSON at position 0
Also When I am doing ... | |
doc_23532153 | Create a new scene,
Create a cylinder,
Scale the cylinder to (0.005, 1.0, 0.005),
Put the following script on the cylinder
#pragma strict
var pos1 : Vector3;
var pos2 : Vector3;
var objectHeight = 2.0; // 2.0 for a cylinder, 1.0 for a cube
function Update () {
if (Input.GetMouseButtonDown(0)) {
pos1 = Vector3(Input.m... | |
doc_23532154 | sno Code
1 17750
2 17775
3 63204A06
4 63204A07
5 F16D078
6 8186
7 8100
8 63513A52
My sql query is
SELECT sno, iif(Len([Code])<=5,[Code],Mid([Code],3)) AS Codeno FROM table1
And more condition to satisfy with code column is, if code is starts with letter then it... | |
doc_23532155 | Here is my code:
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
;
public class LoginActiv... | |
doc_23532156 | For iPhone it's working but not for Android, it disabled my field css (borders, colors etc...)
Edit:
I want to be able to use iPhone OS3, OS4 and Android 1 and 2
Why ?
A: Found it!
http://diveintohtml5.ep.io/forms.html
How to get rid of placeholder on password field taken over from label
| |
doc_23532157 | so i wrap my controller in try and catch, and the catch method is emitting (req, res) handler from controller and later will be handled by a function that send response back to the client.
the code is more or less like this :
const errorExceptionHandler = fn => (req, res, next) => {
fn(req, res, next).catch((err) ... | |
doc_23532158 | public class MainActivity extends Activity {
ListView listView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Get ListView object from xml
listView = (ListView) findViewById(R.i... | |
doc_23532159 | I have the following caching method:
@Cacheable(value = "MY_CACHE", keyGenerator = "myKeyGenerator")
public List<CloudEntity> getTestMetaRecords(final String someParam) {
...
return aRetrievedList;
}
What I want is to skip caching values not related to caching method.
I know that there is the unless parameter ... | |
doc_23532160 | I want to change a color of non-white turtle back into white if a condition is fulfilled. I put inequality as the condition.
for example, if the amount of red turtle > = 5, then [ do something ].
No error message for the code, but I found that [ do something ] codes are executed before the condition is fulfilled. For... | |
doc_23532161 | mytimer = tmr.create()
mytimer:register(5000, tmr.ALARM_SINGLE, function() digitalWrite(16, HIGH) end)
But, before 5 seconds, I want delete this timer with another function, because if I want (before 5 seconds) launch a function like:
digitalWrite(16, LOW)
If I don't delete timers, it toggle state of led.
So, how can... | |
doc_23532162 | First file for start page:
import tkinter as tk
from tkinter import ttk
import first_window as fw
import second_window as sw
class Library_Management_System(tk.Tk):
def __init__(self, *args, **kwargs):
tk.Tk.__init__(self, *args, **kwargs)
#create a frame who's contain the frames
container =... | |
doc_23532163 | ||
doc_23532164 | [venv] sccj019251> pip install repo/openpyxl-2.5.6.tar.gz
Processing ./repo/openpyxl-2.5.6.tar.gz
Collecting jdcal (from openpyxl==2.5.6)
Retrying (Retry(total=4, connect=None, read=None, redirect=None,
status=None)) after connection broken by
'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnecti... | |
doc_23532165 | <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Ash\GiftWrapFee\Setup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
/**
* @codeCoverageIgno... | |
doc_23532166 | class Card{ }
class CardUnit extends Card {
int attack = 4;
}
ArrayList<Card> listCards;
Is there any way to put both Cards and CardUnits in my listCards array and still be able to access the attack variable of the CardUnits that are in the list? Or must I put the variable in the Card class too?
A: If you add a ... | |
doc_23532167 | public class ActivityLogHubIngress
{
private readonly ICustomerDbService _customerDbService;
private static ConcurrentDictionary<string, string> _customerIdLookup => new ConcurrentDictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
public ActivityLogHubIngress(IC... | |
doc_23532168 | I have:
SELECT * FROM Professor
WHERE picpath IS NULL;
Is it possible to form this all in a subquery perhaps? Can someone help
A: How about, you could do
update professor set picpath=<newvaluehere> where picpath is null
A: Using SQL Server's OUTPUT clause (MSSQL208 and above) you can kinds of do the same but the ot... | |
doc_23532169 | Before we were able to locate instance name here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\RS\MSSQLSERVER
But now in 2017 MSSQLSERVER is missing and it has SSRS instead.
Based on this article it should be still under MSSQLSERVER but it's not. Did we missed some installation setting t... | |
doc_23532170 | I have demonstrated it in this Weaver. To the right of line three in the CSS window is a yellow icon, which, when hovered over, says that it is improper to use IDs as a selector. I was under the impression that that is specifically for the purpose of being used as a selector for a single DOM element, as opposed to clas... | |
doc_23532171 | <ImageButton
android:id="@+id/myButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/my_button"
android:background="@null" />
The button displays a circle image with a transparent plus in the middle. When the user is scrolling I want to change the ... | |
doc_23532172 | After some time the jvm (java 8) gets an "Out of Memory: metaspace" error.
The same issue happens on some older jboss 4 servers with permgen (java 6).
We upgraded jasperreports from 3.7.2 to 6.3.1 and the problem still exists.
The size of permgen/metaspace is big enough (Max 512 MB).
Our other applications that do not... | |
doc_23532173 | <application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
... | |
doc_23532174 | vinayb@carbon ~ $ sudo fuser 80/tcp
vinayb@carbon ~ $ sudo ss -pt state listening 'sport = :80'
Recv-Q Send-Q Local Address:Port Peer Address:Port Process
vinayb@carbon ~ $ curl http://localhost:80
404 page not found
vinayb@carbon ~ $ curl -vv http://localhost:80
* Trying 127.0.0.1:80...
* Conne... | |
doc_23532175 | The error I am getting is the following:
Module not found: Error: Can't resolve 'core-js/modules/es.string.replace' in 'C:\path\'
@ file.jsx
This is on a React project, and the function I am trying to use is on one of my jsx components.
My package.json looks like this:
"devDependencies": {
"@babel/cli": "^... | |
doc_23532176 | user_roles - Join table between user and role
<code>db.user = require("../models/user.model.js")(sequelize, Sequelize);
db.role = require("../models/role.model.js")(sequelize, Sequelize);
db.role.belongsToMany(db.user, {
through: "user_roles",
foreignKey: "roleId",
otherKey: "userId"
});
db.user.belongsTo... | |
doc_23532177 | In Perl I know that module. With it I can create a PDF in just 3 lines:
use PDF::FromImage;
...
my $pdf = PDF::FromImage->new;
$pdf->load_images(@allPagesDir);
$pdf->write_file($bookName . '.pdf');
I need to do something very similar to this, but in Python. I know the pyPdf module, but I would like something simple.
... | |
doc_23532178 | For a valid input it is displaying the error Invalid Input.
I've removed that mat-error condition the field is turning red while entering data.
The status inside the control is showing the field is valid on submit.
The error conditions are in in global constants file.
-Global const ts
export class globalConstants{
p... | |
doc_23532179 | Why can't I load the properties? If I copy A.properties to the resources of project B, it works.
Properties prop = new Properties();
FileInputStream file;
InputStream is =
getClass().getResourceAsStream( "/com/projectA/others/A.properties");
try {
prop.load(is);
... | |
doc_23532180 |
*
*I am not getting any error messages. The column names appear fine, but the table is entirely empty.
*When I try to send over a single column (i.e. data.ix[2]), it actually works.
*However, if I try to send over more than one column (data.ix[1:3]), I again get a completely blank table in sql.
I have been us... | |
doc_23532181 | Detecting shapes in a bitmap
Problem statement: In image analysis, it is common to analyze a bitmap and observe the shapes present in it. For this problem, design an algorithm to detect shapes in a given bitmap. The shapes present in the map shall be from the set Square, Rectangle, Triangle and Parallelogram.
In the bi... | |
doc_23532182 | I have 2 scripts in an external file named scrip.js and it is included with a simple
<script src="/media/javascripts/scrips.js"></script>
the two scripts in scrips.js are
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(... | |
doc_23532183 | ( NB - I am using a 32-bit Windows 8 that runs on x86 processor )
Tried to define environment variables to a path -
JAVA_HOME C:\Program Files\Java\jdk1.7.0_21\bin
JAVA_JRE C:\Program Files\Java\jre7\bin
But still, it doesn't work.
On trying to run android.bat, I get a window that says..
ERROR: No suitable Java foun... | |
doc_23532184 | I need to ignore the first line (but keep)
read lines 2+ and write (first line) and lines 2+ on out to a new file dependant on field 8
for /r %%a in (*) do (
echo %%a >>D:\Scripts\Cash_Files\list_Files.txt
)
for /f "tokens=5 delims=\" %%a in (D:\Scripts\Cash_Files\list_Files.txt) do (
for /f "skip=1 tokens=1-8 delims=... | |
doc_23532185 | c = []
l = [['A1','A2'], ['B1','B2'], ['C1','C2'] ]
for i in range(0, len(l) - 1):
for j in range(i+1, len(l)):
c.append(sorted([l[i][0],l[i][1],l[j][0]]))
c.append(sorted([l[i][0],l[i][1],l[j][1]]))
c.append(sorted([l[i][0],l[j][0],l[j][1]]))
c.append(sorted([l[i][1],l[j][0],l[j]... | |
doc_23532186 |
*
*SHA1 Fingerprint.
*APIs enabled.
*Correct Package.
*Correct App ID.
*Google Play Service libs imported and added.
*Config file imported.
*Admob, Analytics and crash reports are working fine.
*GET ACCOUNTS already added, still the same.
My problem is, no Account chooser/picker is showing, and it's not eve... | |
doc_23532187 | describe('send', function() {
var $httpBackend, userManager, apiClient;
beforeEach(inject(function($injector) {
$httpBackend = $injector.get('$httpBackend');
apiClient = new APIClient($httpBackend, userManager);
}));
it ('Should check if send() exists', function() {
expect(apiC... | |
doc_23532188 | I have census data I query from the database. Ultimately I will put his in a excel pivot chart. I am trying to take a count of the total individuals(case_num) based on their opened_date and have to total individuals count be shown by the last 6 months. In other words, what is the total census on the first of the month.... | |
doc_23532189 | 'registry_logo' => [
'driver' => 'local',
'root' => storage_path('app/public/registry_logo/'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
Pretty basic, yes I have already ran php artisan storage:link
So now how do I store the logo that gets uploaded?
public... | |
doc_23532190 | @Module({
controllers: [AppController],
providers: [AppService],
imports: [
SequelizeModule.forRoot({
dialect: 'postgres',
host: 'localhost',
port: 5432,
username: 'postgres',
password: 'root',
database: 'nest',
models: [],
autoLoadMode... | |
doc_23532191 | <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" />
<title>Local Schools</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
integrity="sha384-1q8mTJOASx8... | |
doc_23532192 | <a asp-area="Quizzes" asp-controller="Home" asp-action="Index">Quizzes</a>
But when they are rendered into HTML I see this URL:
/Home/Index?area=Quizzes
Why isn't that coming out like the usual
/Quizzes/Home/Index
what am I missing here.
A: app.UseMvc(routes =>
{
//Order Matters...
routes.MapRoute... | |
doc_23532193 | Unfortunately, the virtual keyboard always shows the settings' key:
I can't figure out how I can hide it.
The problem is that malicious users use it to change system settings, making the kiosk unusable.
How can I prevent these malicious operations? Any suggestion will be appreciated.
Thank you in advance
| |
doc_23532194 | I would like to ultimately run the "query user" command and use the returned output in python version 3.7.x - No matter what subprocess method I use, I cannot get this done for some reason.
I have had some success doing this in python version 3.6. However, using the same code in python version 3.7 does not work.
impor... | |
doc_23532195 | I am in the process or making a custom kernel for android and when I flash it it says my external sd card is empty or is not supported.
I have went the the kernel config and made sure file systems ( ext2, ext3, ext4, NTFS.) But still no dice.
When I plug my external sd card in a adapter and view on my computer I see al... | |
doc_23532196 | When I start up the website and visit one of the pages that uses the URL rewriting, the page is rendered correctly. However if I then visit another page the site stops working and I get a 404 not found. I also find that my breakpoint in the URL rewriting module is not getting hit. It's almost as if IIS forwards the fir... | |
doc_23532197 | My app allows users to submit daily updates, answers to a set of questions about their health. Whenever a user does this I update the child path /userId/lastDailyUpdate with a date in form yyyyMMdd (ie. 20170805) as an Integer. I do this so that I can hide the questions and submit views if a user has already submitted ... | |
doc_23532198 | my @sysaccounts = qw(
root bin daemon adm lp sync shutdown halt mail
news uucp operator games gopher ftp nobody nscd
vcsa rpc mailnull smmsp apache pcap ntp dbus
avahi rpcusder nfsnobody sshd haldaemon xfs defang
clamav monit mysql decode webmaster mailer-daemon
nagios
);
foreach $acct(@sysaccounts){... | |
doc_23532199 | ERROR: type should be string, got "https://code.google.com/codejam/contest/3214486/dashboard\nI have implemented the solution using minimum hamming distance between string consisting binary's of 98765432109876 and the given string of N.\nI am unable to understand cases when there result will be unambigious to print ERROR!.\nHere is my solution-\n#include<iostream>\n#include<cstdio>\n#include<cstring>\n#include<algorithm>\nusing namespace std;\nint main()\n{\n int t;\n cin>>t;\n char str[]=\"111101111111111110000101111110110110110011111100111011010110000111111011110111111111111000010111111011011\";\n int l=strlen(str);\n\n for(int k=1;k<=t;k++)\n {\n int n;\n cin>>n;\n l=10*7+(n-1)*7;\n char num[50];\n for(int i=0;i<7*n;i++)\n {\n char ch;\n cin>>ch;\n if(ch!=' ')\n num[i]=ch;\n\n }\n int ok[7]={0};\n for(int i=0;i<7*n;i++)\n {\n ok[i%7]=ok[i%7]|(num[i]-'0');\n }\n\n int mn_dst=10000,dt=0,f=0,pos=0;\n int xor_res[9]={0},txor_res[9]={0},z=0;\n\n for(int i=0;i<=(l-(7*n));i=i+7)\n {\n dt=0;\n z=0;\n memset(txor_res,0,sizeof(int)*9);\n\n for(int j=0;j<7*n;j++){\n if((str[j+i]=='1'&&num[j]=='0'&&ok[j%7]==1)||(str[j+i]=='0'&&num[j]=='1'))\n {z=1;\n break;\n }\n if(str[j+i]!=num[j])\n {dt++;\n txor_res[j%7]=1;\n }\n\n }\n if(z==1)\n continue;\n\n if(dt==mn_dst)\n {f=1;\n break;\n }\n if(mn_dst!=10000)\n {f=1;\n break;\n }\n if(dt<mn_dst)\n {\n mn_dst=dt;\n dt=0;\n pos=i;\n for(int h=0;h<=7;h++)\n {\n xor_res[h]=txor_res[h];\n txor_res[h]=0;\n }\n\n }\n\n }\n\n if(f==1||mn_dst==10000)\n cout<<\"Case #\"<<k<<\": \"<<\"ERROR!\\n\";\n else\n {\n cout<<\"Case #\"<<k<<\": \";\n\n pos=pos+7*n;\n for(int i=pos;i<(pos+7);i++)\n {\n\n cout<<str[i];\n }\n cout<<\"\\n\";\n }\n\n }\n}\n\nI don't want to bother anyone by understanding my code.Instead I want a new approach.\n\nA: I am facing the same problem in understanding the question as you. I downloaded A-small-practice.in. I ran someone's correct solution and we produce different outputs in the following cases -\nCase 1\nInput\n1 0001011\n\nMy Output -\nCase #18: 0100011\n\nCorrect Output -\nCase #18: ERROR!\n\nCase 2\nInput\n1 0011111\n\nMy Output -\nCase #27: 0011011\n\nCorrect Output -\nCase #27: ERROR!\n\nCase 3\nInput\n1 1001111\n\nMy Output -\nCase #66: 1001011\n\nCorrect Output -\nCase #66: ERROR!\n\nCase 4\nInput\n1 1111110\n\nMy Output -\nCase #73: 1111011\n\nCorrect Output -\nCase #73: ERROR!\n\nCase 5\nInput\n1 1011101\n\nMy Output -\nCase #74: 1011001\n\nCorrect Output -\nCase #74: ERROR!\n\nCase 6\nInput\n2 1001001 1001101\n\nMy Output -\nCase #77: 0000000\n\nCorrect Output -\nCase #77: ERROR!\n\nCase 7\nInput\n1 0111011\n\nMy Output -\nCase #81: 0111111\n\nCorrect Output -\nCase #81: ERROR!\n\nCase 8\nInput\n1 1011011\n\nMy Output -\nCase #94: 0110011\n\nCorrect Output -\nCase #94: ERROR!\n\nAll of the cases where my output doesn't match, it is because the correct output is \"ERROR!\", while I am able to find an unambiguous next state. Can you or someone else point out why my solution is not the only unambiguous state? :) Any other pointers would be appreciated too.\nLet's figure out the exact meaning of this problem together one case at a time :D\n" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.