id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_2500 | *asfaa@asadaf:~/test$ git review -R
Could not connect to gerrit.
Enter your gerrit username: remote0
Trying again with ssh://<username>@<ip>:29418/test
Creating a git remote called "gerrit" that maps to:
ssh://<username>@<ip>:29418/test
This repository is now set up for use with git-review. You can set the
default ... | |
doc_2501 | d = {'state': ['United States', 'IT', 'Spain', 'JP', 'FR'], 'continent': ['North America', 'Europe', 'Europe', 'Asia', 'Europe']}
df = pd.DataFrame(data=d)
with two columns, df['state'] and df['continent']:
United States North America
IT Europe
Spain Europe
JP ... | |
doc_2502 | java.io.IOException: Error inserting: bucket: *****, object: *****
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageImpl.wrapException(GoogleCloudStorageImpl.java:1600)
at com.google.cloud.hadoop.gcsio.GoogleCloudStorageImpl$3.run(GoogleCloudStorageImpl.java:475)
at java.util.concurrent.ThreadPoolExecutor.runWo... | |
doc_2503 | PHP
$sum = 0;
for($i = 0; $i <= 1000000000 ; $i++) {
$sum += $i;
}
printf("%s", number_format($sum, 0, "", "")); // 500000000067108992
Node.js
var sum = 0;
for (i = 0; i <= 1000000000; i++) {
sum += i ;
}
console.log(sum); // 500000000067109000
The correct answer can be calculated using
1 + 2 + ... + n = n(... | |
doc_2504 | Has anyone successfully gotten this working? Thanks!
reproduction: https://gist.github.com/toraora/a9d4eb8679383fe659da04d3be5c2d6e (I'll put up the actual solution when I finish setting up SSH keys on this machine)
A: Ah, so the solution was to have:
CSharpSyntaxTree.ParseText(File.ReadAllText(srcfile), path: srcfile... | |
doc_2505 | Applied to a ToggleButton, the Outline is missing, and in some occasions, the Unchecked-state will be rendered as Checked. Moreover, the style references an Element named "BackgroundCheckedGlyph" which is not defined and leads to debug-errors when used in an AppBar.
Has someone already found or built a working Style fo... | |
doc_2506 | response = requests.get(url)
artists=re.findall(re.escape('<name>')+'(.*?)'+re.escape('</name>'),str(response.content))
print(artists)
This returns a list of strings. The problem is, some strings have unwanted characters in them. For example, one of the strings in the list is "Somethin\\' \\'Bout A Truck" and I'd... | |
doc_2507 | I tried the solutions of several similar questions from here, but sadly none of them worked in my case.
The Application worked like a charm before I decided to turn it into a cloud application by adding Eureka Server.
My stacktrace:
***************************
APPLICATION FAILED TO START
***************************
De... | |
doc_2508 | https://github.com/jamierumbelow/codeigniter-base-model
How do you validate the data in put method.
I have tried as like below.
config/form_validation.php
$config = array(
'create_put' => array(
array( 'field' => 'emailid', 'label' => 'email_address', 'rules' => 'trim|required|valid_email' ),
array( 'field' =... | |
doc_2509 | 1., S → 0S1 | 01
2., S → + SS | * SS
A:
Are these grammars left recursive
No.
and why?
In both cases you can never reach S (which is the only non-terminal) without consuming a terminal first. In the first grammar the only occurrence of S is preceded by the terminal 0 and in the second each occurrence is either pre... | |
doc_2510 | NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"my web service "]];
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:&error];
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
I create my user inte... | |
doc_2511 | First and foremost, this is an app for teacher to make attendance, the attendance will update back to my server. My TableViewCell is customised as below.
@interface TvcStudentClassSession : UITableViewCell
@property (strong, nonatomic) IBOutlet UILabel *lblStudentInfo;
@property (strong, nonatomic) IBOutlet UISegmente... | |
doc_2512 | <li id="coz"><a
onclick="doRequest('zemberek.jsp','YAZI_COZUMLE');">Cozumle</a></li>
by Jsoup?.How can I do?
here is original site : http://zemberek-web.appspot.com/
<html>
<head>
<script>
function doRequest(url, islem) {
var ajaxRequest = new AjaxRequest(url);
var hiddenFie... | |
doc_2513 | Runas /user:domain\user "cmd /C echo Test > C:\Program Files\Install2AgentService\Install2AgentWinService.exe.config"
The problem ist, this is only working if the path of the file has no blank spaces. And I can not put the path in quotation marks as usually because the whole CMD-command has to be in quotation marks.
... | |
doc_2514 | I don't want to use the default id as a parameter because it would be way too simple to 'parse' other estimations if the url looks ends with /3 or /4. You'd just have to try a few URLs and if it's your lucky day, you'd get to "hack" an estimation that isn't yours. I'm planning to use a cron job to delete these estimati... | |
doc_2515 | Ex:
{(0,0):2, (1,1):3}
would output to the following numpy array
([[2,0], [0,3]])
What would be the simplest way to convert this dense dictionary into a sparse array?
A: This should work, the only thing you need, you should know the dimensions for your output.
import numpy as np
d = {(0,0):2, (1,1):3}
S = 2
table... | |
doc_2516 | However, as soon as one part of the input matches, the submit button activates and a user can submit the form even if I put a number or capital letter. I want to disable this and not let a user click submit unless it matches perfectly as opposed to just finding one match and activating the button. I want the regex to o... | |
doc_2517 | json Object we receive is :
{
"1": {
"serverName": "abc"
}
}
we want to read the above response using $.ajax in jsp page.
when we try to read it, getting the error "Uncaught SyntaxError: missing ) after argument list" in browser console,
code snippet where we getting the error
$.ajax({
type : '... | |
doc_2518 | How can I solve this error?
#include<iostream>
#include<sstream>
using namespace std;
void separate(string product)
{
std::istringstream is(product);
double n;
int i = 0;
while(is >> n)
{
cout << i << ": " << n << " ";
i++;
}
}
int main()
{
string product1, product2;
ci... | |
doc_2519 | <?php
error_reporting(0);
/* function: returns files from dir */
function get_files($images_dir,$exts = array('jpeg','gif','png','jpg')) {
$files = array();
if($handle = opendir($images_dir)) {
while(false !== ($file = readdir($handle))) {
$extension = strtolower(get_file_extension($file));
if($extension && i... | |
doc_2520 | final MultiUserChat muc = new MultiUserChat(connection, chatName+"@conference.123");
try {
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
muc.create(chatName);
} catch (XMPPException e) {
Log.e("Exception", e.getMessage());
}
This gives an exception (not-authorized(401)).
Following ... | |
doc_2521 | I want to scale the the plot area to fit the plot in view.
I tried using
[plotspace scaleToFitPlots: [NSArray arrayWithObject:mainPlot]];
which worked, except that the axes were scaled independently:
The X axis is stretched relative to the Y axis. So that the slope of the line is shown accurately, it is important tha... | |
doc_2522 | Specific example. I have a class that accepts a CalculationMethod (interface) to do the calculation. There are several implementations of CalculationMethod. The GUI developer wants to only use data binding to present the choices to the user.
I have taken a few approaches.
Easiest is to create a class that returns a li... | |
doc_2523 | Is Quote the best way?
A: You can use DBI placeholders.
Here is an example (from this link):
#! /usr/bin/perl
use DBI;
print "Enter the city you live in: ";
chomp( $city = <STDIN> );
print "Enter the state you live in: ";
chomp( $state = <STDIN> );
$dbh = DBI->connect(your db info here);
$sth = $dbh->prepare( "SELE... | |
doc_2524 | Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at SQLite.Vm.step(Native Method)
at SQLite.Database.get_table(Database.java:314)
at SQLite.JDBC2z.JDBCStatement.executeQuery(JDBCStatement.java:120)
at SQLite.JDBC2z.JDBCStatement.executeQuery(JDBCStatement.java:168)
... | |
doc_2525 | table emp
eid ename age salary
1000 Lakmal 33 90000
1001 Nadeeka 24 28000
table works
eid did percentage
1000 Admin 40
1000 ITSD 50
1001 Admin 100
1002 Academic 100
1003 Academic 30
I want to Display ... | |
doc_2526 | Am I correctly understand that AddExtension method do what I expect?
public class MyUnityContainer : UnityContainer
{
public MyUnityContainer(MyUnityContainer containerParent)
{
if ( containerParent!=null )
this.AddExtention(containerParent);
}
public static void Test()
{
MyUnityContainer cont1 = new ... | |
doc_2527 |
So I want to do calculations like leading = screen_width/3 and trailing = screen_width/3
It is possible and it is a good solution ? How to do this or here is an better way ?
A: If the leading will be w / 3 and trailing is the same. So the image width itself is w / 3 as well. So set Width constraint to be width = supe... | |
doc_2528 | Test class:
@Tag("foo")
class SomeIT
{
@Test
public void testSomeStuff()
{
...
}
}
Suite class:
@RunWith(JUnitPlatform.class)
@IncludeTags({"foo"})
//@SelectPackages("org.foo")
public class SomeITSuite
{
}
My pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://w... | |
doc_2529 | from flask import Flask, request, Response
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World! I am running on port ' + str(port)
@app.route('/health')
def health():
return 'OK'
@app.route('/es', defaults={'path': ''})
@app.route('/es/<path:path>')
def es_status(path):
resp = Respons... | |
doc_2530 | // Inside webapp
const host = document.querySelector('#sdk-launcher');
if (host) {
const shadowRoot = host.attachShadow({ mode: 'open' });
const script = document.createElement('script');
if (script) {
script.type = 'text/javascript';
script.src = 'cdn.com/sdk-link.js';
script.onload = (... | |
doc_2531 |
A: Slight variation of Gerald's answer using keyword args
create pickleable object
image = {'data': im.tostring(), 'size':im.size, 'mode':im.mode}
or
image = dict(data=im.tostring(), size=im.size, mode=im.mode)
unpickle back to image
im = Image.fromstring(**image)
A: You can convert the Image object into data then... | |
doc_2532 | Date.valueOfYearMonthDay(int year, int month, int day);
But then I found that the resultant code using the API was not very readable. So I added:
Date.yearMonthDay(int year, int month, int day)
Date.ymd(int year, int month, int day)
Date.date(int year, int month, int day)
Then I started getting fluent:
Date.january()... | |
doc_2533 |
*
*A table test.domain(int id, text value) that stores possible values for a field. This data is dynamic.
*A table test.table(id int, domainn text) which domainn field references to the test.domain table.
*A view test.view_domain which is a view of test.domain.
I have defined a INSTEAD of trigger with the securi... | |
doc_2534 | I've been working on this for awhile and i'm stuck. Can someone help me! I've created a text file and tried to insert it in the the project but it still does not detect it. I don't know what else to do. Thanks in advance!!
#include <stdio.h>
#include "stdlib.h"
#include "string.h"
void Ouccpy_Routing_Table();
typede... | |
doc_2535 | Let's say I have a table called [student], with 4 columns: [name], [gender], [age], [country].
How to do a 'SELECT *' query that returns the rows that meet this requirements:
*
*student must be male
*only one student from each country
*if there are more than one students from a country, choose the oldest one
I t... | |
doc_2536 | I saw this question before. But the option from rbokeh produces a low quality graphic. I tried to use the second option, but it seems that there is an error in the code, because the function throws object 'vl' not found.
As that question is from three years ago, I think that there may be a better solution so far.
Examp... | |
doc_2537 | Example:
Common tables:
Client_ClientDepartment (Id, Value)
Client_ClientDesignation (Id, Value)
Client_ClientCompany (Id, Value)
What I want to do is to pass table name and Id to get the value. I have created a common method as
public string GetClientValue(string id, string tableName)
{
DatabaseCont... | |
doc_2538 | So basically when I do the PUT I want to provide the versionid of the document I started with, and get 409 conflict error if that version is no longer the current version.
I'm really hoping s3 supports this, but I've not been able to find an example yet.
A: There is no mechanism for this sort of conditional PUT in S3.... | |
doc_2539 | import numpy as np
from sklearn.tree import DecisionTreeClassifier
train_data = np.array([[0, 0, 1, 0],
[1, 0, 1, 1],
[0, 1, 1, 1]], dtype=bool)
train_targets = np.array([0, 1, 2])
c = DecisionTreeClassifier()
c.fit(train_data, train_targets)
p = c.predict(np.array([1, 1... | |
doc_2540 | But when I try to do a stored procedure call dbo.GET_ALL_USERS", it fails because SQLite doesn't support stored procedures...
So, how do you test an app that uses stored procedures?
Can I convert the stored procedure to multiple queries?
Can I mock the result of the stored procedure?
A: I use tSQLt for unit testing my... | |
doc_2541 | I made this code but by this only one radio button is working.
$(document).ready(function() {
$('#radio1').change(function() {
$("#lhr1").prop("checked", true)
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="container">
<h2 align="cente... | |
doc_2542 |
function timesTable()
{
var values = document.getElementById('value1');
var showTables = '';
for (var i=1; i<9; i++) {
showTables += values + " x " + i +" = "+ values*i + "\n";
}
var p_tables = document.getElementById('tables').innerHTML = showTables;
}
<label>Enter an integer fro... | |
doc_2543 | This is my code:
#include<Windows.h> //to use windows API
#include<iostream>
int main()
{
TCHAR a[] = TEXT("This is not ANSI anymore! Olé!"); //8bits each char
wchar_t b[] = L"This is the Unicode Olé!"; //16 bits each char
std::cout << a << "\n";
std::wcout << b << "\n";
return 0;
}
So I thought, ... | |
doc_2544 | while (currLine != null) {
// Check if current line holds the query ID
String regexp="\\.\\I\\s\\d";
Pattern pattern=Pattern.compile(regexp);
Matcher matcher;
if (pattern.matcher(currLine).matches()) {
queryBuffer.append(currLine);
currLine = buffR.readLi... | |
doc_2545 | We found that every time that Java updates itself, we have to once again re-install the Access Bridge components.
Is there a way to use an environment variable to point to either the Java Access Bridge or Java JRE to a folder that I can protect from getting updated?
A: When you update Java it installs it in a new fo... | |
doc_2546 |
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this er... | |
doc_2547 | I need to test to see what color(if any) is under a defined area.
Then determine if the font color should be Black or White.
I found a great routine Here (on StackOverflow). to help determine what color to use based on a color you send it. I was hoping to see if there was anyway to find that information out using ITex... | |
doc_2548 | Here's an example of my problem:
var dialog = {
open: function(x){
console.log(JSON.stringify(x))
},
type: {
settings: {
controller: '',
click: false,
clas: ''
},
foo: function(){
this.settings.controller = 'Foo controller'
... | |
doc_2549 | I was wondering if it would be possible to launch the main game once the user selects the "Start game" section of the menu. Currently I have two different .py files, one for my game menu and one for the game itself, is there a specific way I can get the menu.py to run the game.py once the "Start game" option is selecte... | |
doc_2550 | and also in just your opinion what is the future of 3d/2d/etc on web.
I know for the fact that websites will become like apps.
I know that the technology that is eventually going to win is has to be open source otherwise a company could just take on a direction of its own.
I also think that gap between 3d graphics and... | |
doc_2551 |
Developer mode and USB debug have been opened in my phone.
| |
doc_2552 | but I intend to add the COALESCE statement in the commented
out portion to this Script. Would anyone know how to write the
Script properly. When I combined them, there was an error.
CREATE VIEW [dbo].[VW_Bzo_D]
AS WITH today AS
(SELECT *
FROM [dbo].[Bz_DAYS]
WHERE [DATE] = CAST(GETDATE() AS DATE)
),
pd... | |
doc_2553 | // Include standard headers
#include <stdio.h>
#include <stdlib.h>
// Include glfw for window handling
#include <GLFW/glfw3.h>
int SCREEN_WIDTH = 1280;
int SCREEN_HEIGHT = 720;
GLFWwindow* window;
int main() {
if(!glfwInit()) {
fprintf( stderr, "Failed to initialize GLFW!\n" );
return -1;
}... | |
doc_2554 | ALTER TABLE `table_name` ADD COLUMN `column_name` varchar(128) NULL DEFAULT NULL;
This is being run using the mysql command line application.
Every time i try to run this it takes hours and then i get the error
ERROR 2013 (HY000): Lost connection to MySQL server during query
The database is running in a RDS instanc... | |
doc_2555 | I've lost my archives that had that dSYM particularly.
Can I do that? I need the dSYM to upload to Crittercism.
Thanks in advance.
A: Assuming you still have access to the app in iTunes Connect, it's now possible to download the dSYM from iTunes Connect, too. Login, go to My Apps, select your app, then tap on the Act... | |
doc_2556 | My following Code gives me all current students in alphabetical order, but I only want the first one.
for (char letter = 'A'; letter <= 'Z'; letter++)
{
Console.WriteLine(letter);
foreach (var studentName in _students)
{
if (studentName)
{
Console.WriteLine... | |
doc_2557 | My code:
while (!file.EndOfStream)
{
line = file.ReadLine();
bool isComment = (line[0] == '/') && (line[1] == '/');
bool isPoint = (line[0] == '(') && (line[line.Length - 1] == ')');
bool isWhiteSpace = string.IsNullOrEmpty(line);
Debug.Log("... | |
doc_2558 | Issue Resolved: Both Webview are different but when I logged in with user 'A' in WKFBView then the same user is automatically logged in WKFBView1.(This issue is resolved using cookies)
New Issue: I am facing new issues when I move from WKFBView1 to WKFBView, WKFBView1 cookies are used in WKFBView and user logged in W... | |
doc_2559 | However, in the skeleton code given, it is as such
; PACS initial, set the parallel port start from 00H
MOV DX, PACS
MOV AX, 0003H ; Peripheral starting address 00H no READY, No Waits
OUT DX, AX
They have set the PACS register start address to 0 based on the manual. I am not sure why they have done this as this would ... | |
doc_2560 |
A: There is not a template or file that will allow you to change the value of %%GLOBAL_ViewOrderStatusMsg%%. It is something that has been set within the BigCommerce core application and can only be changed by engineers.
You can change the variable to a static string/sentence as a workaround.
| |
doc_2561 | They are based on the activated route where they fetch the changes in URL and sends the call to the server and get the latest "filterMap " from it.
Component_A.html
<section class="abc">
<filter [filterMap]=[filterMap]></filter>
<div *ngFor="let item of courses">
<!-- code -->
</div>
</section>
Component_... | |
doc_2562 | Is there a way to fix Matplotlib default settings to plt.axis("equal") (as what is proposed by matplotlib.rcParams for most of the Matplolib paramaters) ?
Thanks,
Patrick
A: I have created an issue / feature request (8088) for this.
As it was pointed out there this rcParams doesn't work for pyplot.plot() yet. Hopefull... | |
doc_2563 |
*
*20 uppercase alphabetical chars or digits before the space, the number of digits is 6 strictly
*6 digits after the space
Here is what I've done so far:
public static boolean validateCode(String input)
{
String[] words = input.split("\\s+");
ArrayList<String> wordList = new ArrayList<String>(Arrays.as... | |
doc_2564 | <a4j:outputPanel id="listValues">
<a4j:repeat value="#{listBean.values}" var="aValue">
<a4j:outputPanel rendered="#{not empty aValue.value}">
<h:selectBooleanCheckbox id="selectRecordCheck"
value="#{listBean.aValueSelectedMap[aValue.value]}">
<a4j:ajax event="valu... | |
doc_2565 | =INDEX(C:C,AGGREGATE(15,6,ROW($C$1:INDEX(C:C,MATCH("zzz",C:C)))/(ISNUMBER(SEARCH(" " & $C$1:INDEX(C:C,MATCH("zzz",C:C)) & " "," " & A1 & " "))),1))
I'm thinking that I'm getting the error because there are "." in the string.
Any help would be appreciated.
A: The formula you have doesn't work in that case because of ... | |
doc_2566 | Here's the code that got me worried:
window.onload = function(){
var description = document.getElementsByClassName('description'),
buttons = document.getElementsByClassName('button');
var currD = 0; // this var stands for the current description that should be shown
var show = function(){
for( var i ... | |
doc_2567 | Unhandled Exception: System.AggregateException: One or more errors occurred. (An error occurred while sending the request.) ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The server name or address could not be resolved
However when running... | |
doc_2568 |
A: Well, it's pretty simple to animate avatar: you'll need a dance animation (those are pretty easy to find, or you could create your own), put it in a prim (which is basic building object in SL), and then create a simple script which first requests permission to animate desired avatar:
llRequestPermissions(agent_key,... | |
doc_2569 | Is there any way to calculate or pull the full height of an ItemsControl element with all Items generated/rendered? Currently if my window renders at 1920x1080 and I've got a ton of items in my ItemsControl - the ItemsControl actualHeight always matches the windows height; I need to be able to determine the full length... | |
doc_2570 | One extension is a WebP decoder.
The goal is to decode a WebP image in an IAsyncOperation from C++/Native code directly to an ImageData's data buffer.
I believe I'm having some problem with the lambda capture of a handle to an object of type WriteOnlyArray.
The C++ part:
Windows::Foundation::IAsyncOperation<bool>^
WebP... | |
doc_2571 | We are not even able to add any key-value inside this node.
| |
doc_2572 | ||
doc_2573 |
System Overview:
1) Customer Place new order (Client wait until order being processed by admin client).
2) The order is saved to the DB with ‘status=unknown ‘.
3) Admin is notified through hub about new order. (on a dashboard)
4) Admin accepts or decline new order then Order status is updated in database.
5) Cust... | |
doc_2574 | public class Member
{
// varibales declaration
private String email;
private int membershipNumber;
private boolean loggedInStatus;
/**
* Constructor for objects of class Member
*/
public Member(String memberEmail, int newMembershipNumber )
{
// initialise instance var... | |
doc_2575 | http_listener listener(U("http://localhost:10000/restdemo"));
listener.support(methods::GET, handle_get);
listener.support(methods::POST, handle_post);
listener.support(methods::PUT, handle_put);
listener.support(methods::DEL, handle_del);
This works fine when handle_get, handle_post, etc. are simp... | |
doc_2576 |
<div id="buttonpanel" style="display:None; float:left">
<apex:commandButton action="{!selectQuarter}" value="Go!" status="actStatusId2" reRender="pgBlckId,panelrender,panelrender1,panelrender14,panelrender15,panelrender24,panelrender23,panel... | |
doc_2577 | \d+%[^\.][^0-9]*?((?!original).)percentage*
And I want it to match from a percentage (i.e. 10%) until the word percentage
*
*10% "whatever" percentage
except if it contains the word "original":
*
*10% original percentage
So, "whatever" can be anything until the word "percentage" except if he word "original" is i... | |
doc_2578 | $(document).attr('key', 'value');
So far I've looked into
*
*document - it's not an element so you cannot call setAttribute on it
*document.documentElement - returns the html tag. This is not the same "element" that jquery is targeting
*$(document)[0] seems to return a shadow element in Chrome Inspector
*$(docum... | |
doc_2579 | runs smoothly when I run the program manually but when it runs with crontab, the program can't find the astrometry.net path and doesn't work.
i do that in terminal:
export PATH=$PATH:"/home/desktop/astrometry.net/bin"
but didn't work. Does anyone have any suggestions? (Ubuntu)
| |
doc_2580 |
New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic
linker cache of all system-provided libraries. As part of this change,
copies of dynamic libraries are no longer present on the filesystem.
Code that attempts to check for dynamic library presence by looking
for a file at a path or enumerating a dir... | |
doc_2581 | PROGRAM GENERATES_EIKM
IMPLICIT NONE
INTEGER I, M, N
PARAMETER (M=65, N=3)
REAL EIKM(1:M)
REAL ALFA, EPSILON, NU, PI
REAL U2RMS, KE, KEFISIENSI, KALI, KALE
REAL KM(1:M), LS
REAL KMLOW, KMHIGH, DELTAKM
KMLOW=100
KMHIGH = 10000
DELTAKM = (KMHIGH-KMLOW)/(M-1)
PI = 3.14
ALFA = 1.453
EPSI... | |
doc_2582 | import scala.collection.immutable.Queue
import scala.collection.mutable.ListBuffer
abstract class Exp[+T:Manifest] { // constants/symbols (atomic)
def tp: Manifest[T @uncheckedVariance] = manifest[T] //invariant position! but hey...
}
case class Sym[+T:Manifest](val id: Int) extends Exp[T] {
}
a... | |
doc_2583 | class Blog(models.Model):
title = models.CharField(max_length=80, blank=True, null=True)
content = models.TextField(blank=True, null=True)
pricing_tier = models.ManyToManyField(Pricing, related_name='paid_blogs',
verbose_name='Visibility', blank=True)
I want to cre... | |
doc_2584 | What is the best way to do this ?
1) By using BCC ?:
$from_addr = 'myemail@example.com';
$mailing_list = 'sub1@example.com', 'sub2@example.com', 'sub3@example.com0;
$message_subject = 'this is a test';
`$headers = array ("From" => $from_addr,
"Bcc" => $mailing_list,
"Subj... | |
doc_2585 | /filter/ - is my route defined in my extension.
Thank you in advance.
| |
doc_2586 | My Dockerfile
FROM python:3.10-alpine AS python
ENV PYTHONUNBUFFERED=true
WORKDIR /app
FROM python as poetry
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN python -c 'from urllib.request import urlopen; print(urlopen("https://install.python-poetry.org").read().... | |
doc_2587 | int APIENTRY wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
// Initialize COM for this thread...
CoInitialize(NULL);
<< Create Excel application >>
<< Create Workbooks collection >>
<< ... | |
doc_2588 |
The Databrick Workspace URL is not the same in all my environments so I need to parameterize it and include the parameter in the ARM template. I added a global parameter to the Data Factory and ticked "Include in ARM template" but when that was deployed, it removed the ADF's binding to the Git repo.
I have also tried ... | |
doc_2589 | I've the following mysql statement
$username and $password could be anything whatever
$query = mysql_query ("SELECT * FROM `settings` WHERE user='$username' AND pass='$password'")
i want to say
SELECT * FROM `settings` WHERE user='$username' AND pass='$password' or sos=$username and sos=$password
so my question is h... | |
doc_2590 |
gridView.setChoiceMode(ExpandableGridview.CHOICE_MODE_MULTIPLE_MODAL);
gridView.setMultiChoiceModeListener(new ExpandableGridview.MultiChoiceModeListener() {
@Override
public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) {
if(checked) {
... | |
doc_2591 | function weight(w)
{
Cap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
small = 'abcdefghijklmnopqrstuvwxyz'
spcl = "~!@#$%^&*()_+[]\{}|;':,./<>?"
num = '0123456789'
var p = []
for(i=0;i<w.length;i++)
{
if(Cap.contains(w[i])==true)
p[i] = Cap.indexOf(w[i]) + 2
else if(small.contains(w[i])==true)
p[i] = small.indexOf(w[i])... | |
doc_2592 | I tries using JTextArea, JTextField and many more, but they always seems to be disabled. I cannot change this behaviour. Do you have any ideas how can I change that?
| |
doc_2593 | Is there a way to fix this so that stops happening?
add_filter('pre_get_posts', 'query_post_type');
function query_post_type($query) {
if( is_category() ) {
$post_type = get_query_var('post_type');
if($post_type)
$post_type = $post_type;
else
$post_type = array(... | |
doc_2594 | The displayed directions all work fine except the b point (end). The b marker displays 781-815 county road 555 but it should display 4011 Kings highway. in the following code,
directionsDisplay.setPanel(document.getElementById('directions-panel'));
Is there any way to do a replace on 781-815 county road 555 and di... | |
doc_2595 | Result GUI
I am trying to add one string from main class to another gui when you hit the submit button. When the second gui comes up however, it comes up null on my firstname.
class 1 main
public class SubmitButtonHandler implements ActionListener{
public void actionPerformed(ActionEvent e) {
... | |
doc_2596 | $imghtml=CHtml::image('images/imageSlider/397498913','Test');
echo CHtml::link($imghtml, $this->createAbsoluteUrl('https://www.facebook.com/'));
This does display an image on the website but the link is wrong, when i click on this i go to the following link. http://localhost:63342/France2014/index.php?r=https://www.fa... | |
doc_2597 | This is something I know should be fairly simple, but I am having a mind blank today.
For example, my table is something like this:
CustName: Acct #: FavColor:
Mr Johnson 12345 Red
Barry Johnson 86749 Dark Red
Mike Johnson 90462 Blue
Ms Smith 85693 Light Blue
The ta... | |
doc_2598 | The input format json is as follows:
[
{
"part_number": "12312311",
"part_description": "HELIUM FILLING AND GAS CALIBRATION KIT",
"quantity": "3",
"available_quantity": "0",
"ordered_tool_id": "28",
"tool_id": "15",
"wh_data": [
{
"wh_name": "TI02 - (DHL)",
"wh_id":... | |
doc_2599 | Write a PHP class that inherits from PHP's ArrayObject class. Give your new class a public function called displayAsTable() that outputs all the set keys and values as an HTML table. Instantiate an instance of this class, set some keys for the object, and call the object's displayAsTable() function to display your da... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.