_id stringlengths 2 6 | text stringlengths 4 46k | title stringclasses 1
value |
|---|---|---|
d9501 | which version of AOP are you using? does the error occur if you set the AOP url to apexofficeprint.com/api?
if you set the debugging to local from the AOP components settings, you should receive a JSON, if you send it to support@apexofficeprint.com we would gladly help you out with this issue.
EDIT: Bug on version 3.0... | |
d9502 | I looked into this a little deeper the basic problem is that gevent.spawn() creates greenlets not processes (all greenlets run in a single OS thread).
Try a simple:
import gevent
from time import sleep
g = [gevent.spawn(sleep, 1) for x in range(100)]
gevent.joinall(g)
You'll see the time this takes is 100s. Which pro... | |
d9503 | This sounds like a scope issue to me. I would need to see more of your code to be sure but let's assume that there is an instance of Notification that is created in RequestService. You can't directly access the variable no_emails. You would access like this:
// here is the instance of notification
Notification someNoti... | |
d9504 | Zam, this should be quite easy. You just need to create a new calculated field that calculates the average for ALL sales rep.
Let me walk you through it:
I used your data table and then added it to my PowerPivot (Excel 2013). Then I created those calculated measures:
1. Sales Average:
=AVERAGE(SalesData[SalesGP])
2. S... | |
d9505 | Changed Kernel: conda_tensorflow2_p38 | |
d9506 | I've been using mgwt/phonegap only a few months, so I'm definitely not an expert, but so far no major stumbling blocks. I like GWT, as it is well documented, robust and supported, although mgwt is a bit less so. There's an active google forum at https://groups.google.com/forum/?fromgroups#!forum/mgwt. Maybe if you have... | |
d9507 | Well, that code is OK. So this should mean your not including your JS correctly.
I just copied your code and pasted ( I just modified the begining of the script to hide all tabcontents)
var tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i... | |
d9508 | If you are absolutely sure the list is three elements long, you could use
readText :: [Text] -> MyRecord
readText [rOne, rTwo, rThreeText] = MyRecord {..}
where rThree :: Int = read rThreeText
Still, you might wish to make the pattern matching exhaustive, just in case:
readText :: [Text] -> MyRecord
readText [rOne,... | |
d9509 | You should have a service or something that will be updated like below :
private void refresh() {
startService(new Intent(this, UpdaterService.class));
}
then Refresh :
mSwipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);
mSwipeRefreshLayout.setOnRefreshListener(this);
mSwipe... | |
d9510 | Please check your expected output. I believe there are some mistakes.
Here is a tidyverse option:
library(tidyverse)
df %>%
gather(key, value, -Month, -Records) %>%
group_by(Month, key, value) %>%
summarise(freq = n()) %>%
mutate(freq = freq / sum(freq)) %>%
unite(col, key, value, sep = ".") %>%
... | |
d9511 | go build builds everything (that is, all dependent packages), then produces the resulting executable files and then discards the intermediate results (see this for an alternative take; also consider carefully reading outputs of go help build and go help install).
go install, on the contrary, uses precompiled versions o... | |
d9512 | Autocommit mode means that each statement implicitly begins and ends the transaction.
In your case, if autocommit is off:
*
*The client will implicitly start the transaction for the first statement
*The BEGIN will issue a warning saying that the transaction is already started
*The ROLLBACK will roll back all four ... | |
d9513 | You really only need to save the user_id in order to reference all of the other attributes.
I like to use options_for_select and pass it a two dimensional array when I'm saving an id. The first value will be what the user sees. The second value will be what I actually save. In this case, I'm guessing that you'd like t... | |
d9514 | Try with this code in your controller
this.childQuestionId = function(req, res, next){
try{
var userObj = {
'questionId' : req.params.questionId,
'score' : req.params.score,
//'time' : req.params.time
'time' : new Date().toISOString()
};
var childupdate = new childQuiz()... | |
d9515 | I have a var which is an index of one of the divs above, lets say it equals 2, so it's the one with 3.jpg as a background.
...
Now, I'm trying to get the index of the next div with class "slide", which index is greater than my var and which has no "background" in "style".
What you need for that literal requirement is ... | |
d9516 | Firefox loads the children within the scene from a .GLB file in the opposite order of all other browsers. This is detrimental if you plan on manipulating the contents such as alpha maps, etc... of a .GLB object using Three.js.
I figured out the issue by loading a simple .GLB object into a project and it worked in Firef... | |
d9517 | It seems to be a case of using improperly initiialized/uninitialized variables.
After I added the following line:
for(int i = 0; i < ARRAYSIZE; i++){
c[i] = 0;
aSumArr[i] = 0;
bSumArr[i] = 0;
binaryNumber[i] = 0; // add this line
}
I was no longer able to reproduce the issue. | |
d9518 | The problem you're describing can be solved by "advertising" an address for each broker over the internet via advertised.listeners
telnet and nc check that port is open (listeners config), but cannot check that the brokers bootstrap correctly back to the client, you can instead use kafkacat -L -b <bootstrap> for that, ... | |
d9519 | allfiles = glob.glob('*.csv')
allfiles.sort(key= lambda x: int(x.split('_')[1].split('.')[0]))
A: You can't do that with glob, you need to sort the resultant files yourself by the integer each file contains:
allfiles = glob.iglob('*.csv')
allfiles_sorted = sorted(allfiles, key=lambda x: int(re.search(r'\d+', x)... | |
d9520 | The :link pseudo class applies to the link even when you are hovering over it. As the style with the id is more specific it overrides the others.
The only reason that the :hover style overrides the :link style at all is that it comes later in the style sheet. If you place them in this order:
a:hover { color: red; }
a:l... | |
d9521 | Your thinking is correct. In some cases, for example, all the root entities reference one or two instances of another entity. It might be faster to do 2 or 3 small selects instead of a denormalized one (i.e. with joins)
There is a way to make this convenient in almost all cases: batch-size. If you set this attribute in... | |
d9522 | Use the NET Framework DateTime structure and its properties instead
If DateTime.Now.Day = 13 And DateTime.Now.Month = 9 Then
Console.WriteLine("Happy Birthday!")
End If
As hinted below in the comments, you are mixing calls to the VB6 compatibility library (Month(Now) from Microsoft.VisualBasic.dll) and calls to Da... | |
d9523 | use the id not the name of the input fields
e.g. var tipologia_auto = $("#tipologia_auto_1").val();
A: Ok, thank you! I need also to store these concatenated values into one field that will be saved into the MySql Database. | |
d9524 | Given class X and Y, what's the most idiomatic approach to creating instances of each other's class?
The most idiomatic approach, given your example code, is to not use type classes in the first place when they're not doing anything useful. Consider the types of the class functions:
class HasPoints a where
getPoin... | |
d9525 | Part of the problem is that you are using formatted html text, which includes the "extra space."
For example, your first html text line includes <p> </p> tags.
This code creates two green-background labels, each the same width, each with no height constraint:
class ViewController: UIViewController, UIScrollViewDelegate... | |
d9526 | I got it working. This is what I did:
In your custom template file /yourtheme/woocommerce/content-product.php you will change the a href.
Code that generated the new permalink (using the current selected category):
// HOOK FOR CORRECT ACTIVE SIDEBAR ELEMENT WHEN PRODUCT HAS MULTIPLE CATEGORIES
if(get_query_var(... | |
d9527 | I had this problem in rails. It was cors as mentioned above.
The rails server won't show logs so it looks like axios isn't sending the request at all.
Thankfully it's an easy fix.
For rails add this to your gemfile:
gem 'rack-cors'
Then add this to config/initializers/cors.rb
Rails.application.config.middleware.insert... | |
d9528 | Interfaces in Go are very different from interfaces in Java.
In Java a class has to formally agree to implement an interface:
public class Foo implements iFoo
In Go a user type implements an interface by simply doing so.
A function or property can then define what is expected:
func DoSomething(r io.Reader) {
buf :... | |
d9529 | I clear the GL_COLOR_BUFFER_BIT only when initializing the window
That's your problem right there. It's idiomatic in OpenGL to always start with a clear operation of the main framebuffer color bits. That is, because you don't know the state of your window main framebuffer when the operating system is asking for a redr... | |
d9530 | You could do it inline when building the string.
$(function() {
var people = [];
$.getJSON('data2.json', function(data) {
$.each(data, function(i, f) {
var tblRow = "" + "" +
f.name + "" + "" +
f.title + "" + "" +
f.company + "" + "" + "" + ... | |
d9531 | I think this could help you recognising bluetooth devices and managing them.
[BroadcastReceiver]
public class AndroidBluetooth : BroadcastReceiver
{
private static BluetoothDevice _bluetoothDevice;
private readonly BluetoothAdapter _bluetoothAdapter;
public BluetoothSocket _bluetoothSocket;
public rea... | |
d9532 | Maybe you would like to try something like this
<script>
// Sending and receiving data in JSON format using POST mothod
//
xhr = new XMLHttpRequest();
var url = "http://your.url.com/streams/1/sign";
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-type", "application/json");
xhr.onreadystatechange = function ... | |
d9533 | On my machine if I run "Node Command Prompt" a 2nd time, it opens a 2nd window.
If you want to do the same thing, the shortcut that Node installs just runs:
C:\Windows\System32\cmd.exe /k "C:\Program Files\nodejs\nodevars.bat"
so you should be able to run that, assuming your node install location is Program Files\no... | |
d9534 | call function isFeatureEnabled inside an async function during mount (before/after your wish)
example -
export const isFeatureEnabled = async (nameOfTheFeature) => {
return new Promise((resolve) => {
bulletTrain.init({
environmentID: BULLET_TRAIN_ENV_ID
});
bulletTrain.hasFea... | |
d9535 | /apache-sermfino_conf/cherry.jks" />
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="password"
file="A:/apache-ser/truststore.jks" />
</sec:trustManagers>
<sec:cipherSuitesFilter>
<!-- these filters ensure that a ciphersui... | |
d9536 | To find the position of a pixel is a simple concept with a complex execution. I've written some code here that takes a BufferedImage and searches through it for a pixel of a specific color.
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import javax.imageio.ImageIO;
import java.io.IOE... | |
d9537 | You'll need to calculate this yourself. Here's a quick way to see how long it takes for the response to arrive:
private long mRequestStartTime;
public void performRequest()
{
mRequestStartTime = System.currentTimeMillis(); // set the request start time just before you send the request.
JsonObjectRequest reque... | |
d9538 | This is by design. The winrt::array_view is an adapter that tells the underlying API that the bound array or storage has the appropriate binary layout to receive the data efficiently (typically via a memcpy) without some kind of transformation. std::vector<bool> does not provide that guarantee and thus cannot be used. ... | |
d9539 | The client module is not completely loaded when the extension try to load the client module.; Execution of client is occurred twice (Watch the output carefully).
So Test in client.py and Test in the extension module are referencing different objects.
You can workaround this by extracting classes in a separated module. ... | |
d9540 | I haven't solved the issue using my own code.The plugin suggested by Minzkraut (thank you!) is just too cheap, powerful and easy to use.
However the reason for my problem might have just been not setting Write access to External (SDCard) in the Player settings, but I am not sure about that. | |
d9541 | It is quite simple to do with a single query. As a bonus, the query will be updatable, not duplicated, and simple to use:
SELECT mammals.ID, mammals.Sex, mammals.id_code, mammals.date_recorded
FROM mammals
WHERE mammals.id_code In
(select id_code from
(select distinct id_code, sex from [mammals]) a
group by id_... | |
d9542 | Problem is, you set overflow: hidden on a parent container:
<div class="socialmediabuttons">
....
</div>
Remove that style and the comment box should reappear. Note that you need to change other styles as well as it will break the hairlines around the social media buttons (but it is doable).
EDIT
Try something alo... | |
d9543 | Probably you didn't link with the library. You should add this -lexpat to the compiler`s command line. For example:
g++ main.cc -lexpat -o exe
A more advanced (and more easy to use, when you get up to speed) option would be to use pkg-config as e.g. $(pkg-config --libs expat). | |
d9544 | Gunicorn doesn't recognize the argument --log-file-. The Procfile you shared with us doesn't contain anything like that, but I'm going to assume that it actually contains something like
web: gunicorn tutorial_two.wsgi --log-file-
since the error message specifically mentions that argument and this is almost a correct ... | |
d9545 | In order to geocode any phisical address, or get its coordinates , you should use a geocoding API, being google maps api v3 the most popular, which by the way gives you a free starting point of up to 2500 daily requests.
There is a bunch of documentation and starting guides, the best are the google maps's own.
Of cour... | |
d9546 | Ohai!
I think you actually want to use the PowershellOut Mixin found here in the Powershell cookbook.
Chef resources rarely return values, but that's what heavy-weight resources are for!
If you have the powershell cookbook, you can do this:
include Chef::Mixin::PowershellOut
cmd = powershell_out!('command')
cmd.stdout ... | |
d9547 | I do this:
use MooseX::Declare;
my $class = class {
has 'foo' => (is => 'ro', isa => 'Str', required => 1);
method bar() {
say "Hello, world; foo is ", $self->foo;
}
};
Then you can use $class like any other metaclass:
my $instance = $class->name->new( foo => 'foo bar' );
$instance->foo; # foo-bar... | |
d9548 | You should use your artifactid, rather than hard-coding the file name.
<build>
<finalName>${project.artifactId}</finalName>
</build>
A: Just add this to your pom.xml:
<build>
<finalName>TataWeb</finalName>
</build>
A: well, its not the Maven Way. Maven does have a version attribute.. use it.
A: You can avoi... | |
d9549 | If you're going to use jQuery UI, why not let it help you.
Example: https://jsfiddle.net/Twisty/wfqv3orm/
HTML
<div id="dialog1">
</div>
JavaScript
$(function() {
var dialog1 = $("#dialog1");
dialog1.empty();
var header = $("<h5>", {
class: "dialog-header"
}).text("By buffer").appendTo(dialog1);
$("<butt... | |
d9550 | You have to use @media queries. So let's say you have a <div> that should take up only 50% of the web page and then you need to show it full width once it enters mobile phone, say 640px width:
div {
width: 50%;
}
@media screen and (max-width: 640px) {
div {
width: 100%;
}
}
A: You can do it with @media que... | |
d9551 | Create an wrapper class based on IFilterProvider that returns the global FilterProviders.Providers.GetFilters() result, like this:
public class FilterProvider
: IFilterProvider
{
#region IFilterProvider Members
public IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor acti... | |
d9552 | Please change your column names in database L/C from to LC_Fromand L/C T0 = LC_To
I thing then i would not get any error .
private void button1_Click(object sender, EventArgs e)
{
con=new SqlConnection(@"Data Source=sqlserver;Initial Catalog=Position_List;Integrated Security=False;User ID=admini... | |
d9553 | maybe you mean this
char const * const words = "dog";
for (int i = 0; i < strlen(words); ++i)
{
char c = words[i];
}
now of course in c++ code you should realy be using std::string
A: You are consistently missing the second *.
Ignoring the const stuff, you are declaring a char** word, which is a pointer to a po... | |
d9554 | There is a developer guide showing how to implement tabbed activities/fragments http://developer.android.com/guide/topics/ui/actionbar.html
It's very important to follow new solution, because the method using TabActivity is deprecated since API level 13. | |
d9555 | Your background image doesn't have an alpha channel. This makes the PHP GD library do all of it's copying operations without using an alpha channel, instead just setting each pixel to be fully opaque or transparent, which is not what you want.
The simplest solution to this is to create a new image of the same size as t... | |
d9556 | td not closed properly
<table border="1" style="margin-top: 5px">
<thead>
<tr>
<th>rid</th>
<th>ciname</th>
<th>dId</th>
<th>ReqName</th>
<th>ReqType</th>
<th>bus</th>
<th>Req test</th>
<th>no trace</th>
<th>p r</th>
</tr>
</thead>
<tbody data-... | |
d9557 | Seems like OFFSET and FETCH would be more succinct here:
DECLARE @N int = 2,
@Date date = '20210716';
SELECT LogID, etime
FROM dbo.MYTABLE
WHERE etime >= @Date
AND eTime < DATEADD(DAY, 1, @Date)
ORDER BY etime ASC
OFFSET @N-1 ROWS FETCH NEXT 1 ROWS ONLY;
A: Imo the way you're doing it now is a really good ... | |
d9558 | Looks like the system was the culprit - I changed the open_table_cache to 400 and my php application is no longer having any issues preparing statements, even after the nightly backups of the databases. Looking at older mysql documentation, mysql 5.6.7 had a table_open_cache setting of 400, so when I upgraded to mariad... | |
d9559 | PXE is your only realistic hope:
Some on-site assistance is needed to press F12 at Bios before Windows XP boot:
A) On PC-A, setup DHCP server that refer DHCP-client to PXE server that download Linux ISO from a web server (of course all three can be a Windows machine in the same LAN segment onsite)
B) reboot PC-B onsi... | |
d9560 | You need to add an event listener to the img tag called load. Then in the callback you can call drawImage with the provided img element.
You can do something like this - I have added one stackoverflow image for representation:
const canvas = document.getElementById("canvas");
const context = canvas.getContext("2d");... | |
d9561 | *
*iterate over the file
*for each line check the first character
*
*if the first character is either '[' or '{' start accumulating lines
*if the first character is either ']' or '}' stop accumulating lines
a_s = []
b_s = []
capture = False
group = None
with open(path) as f:
for line in f:
if captu... | |
d9562 | The core thing to remember is that when you instantiate a Module class, you are creating a callable object, i.e. something that can behave like a function.
In plain English and step by step:
*
*When you write something like add5 = Add(5), what you are doing is assigning an "instance" of the PyTorch model Add to add5
... | |
d9563 | Note: for a TLDR, skip to the end.
Your problem is a very interesting textbook case as it involves multiple facets of Postgres.
I often find it very helpful to decompose the problem into multiple subproblems before joining them together for the final result set.
In your case, I see two subproblems: finding the most pop... | |
d9564 | The authentication has changed from mysql V8, you must use a compatible client and server.
BTW it's a bug : https://bugs.mysql.com/bug.php?id=91828
Here is a workaround without uninstalling the new workbench.
The most probable case is having an old server with a new workbench:
*
*get the server version
From a SQL ... | |
d9565 | You would do this with ajax. To understand what to do in your controller you have to understand the fundementals of an ajax call. jQuery makes this pretty easy.
<script>
$(function() {
jQuery.ajax({
type: method,
dataType: 'json',
url: url,
data: data,
error: function(jqXHR, textStatus, errorThr... | |
d9566 | You could use something like this:
SELECT t.SalesDate,
PreviousWorkingDay = d.CAL_DATE
FROM mytable t
CROSS APPLY
( SELECT c.CAL_DATE
FROM D_Calendar AS c
WHERE c.CAL_DATE < t.SalesDate
AND c.DayIsWorkDay = 1
ORDER BY c.CAL_DATE DES... | |
d9567 | maybe you forgot to link jquery
jQuery(document).ready(function(){
var clickElem = $('a.accord-link');
clickElem.on('click', function (e) {
e.preventDefault();
var $this = $(this),
parentCheck = $this.parents('.accord-elem'),
accordItems = $('.accord-elem'),
accordContent = $(... | |
d9568 | I found that the property to adjust is the AudioDeviceController.VolumePercent property. The following code implements this:
MediaCapture mediaCapture = new MediaCapture();
var captureInitSettings = new MediaCaptureInitializationSettings
{
StreamingCaptureMode = StreamingCaptureMode.Audio
};
await mediaCapture.Init... | |
d9569 | I'm not completely sure I understand you correctly, but if your first question is how to change element X when clicking on element Y, you need something along the lines of:
legendRect.on("click", function() {
gbars.transition()
.duration(500)
.style("display", "block")
// etc...
}
As for changing the fil... | |
d9570 | You're looping from 1 to n:
for (int row = 1; row <= n; row++){
for (int col = 1; col <= n; col++){
Indexes begin at 0, not at 1. The loops should be from 0 to n-1:
for (int row = 0; row < n; row++){
for (int col = 0; col < n; col++){
(This same error may likely be in other places than just the first line th... | |
d9571 | I would do a for loop with the sample sizes I am interested in, as follows:
sizes <- c(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
results <- c()
for (size in sizes) {
subset <- sample_n(data, size)
lm_fit <- lm(subset$response ~ subset$predictor)
conf <- confint(lm_fit, level = 0.95)
results <- rbind(resu... | |
d9572 | An empty JSON string looks like this:
[]
That is 2 characters.
Your error-detection will not work because it checks for 1 or less characters.
Change
if (strlen($test) < 2) {
$error = json_last_error();
}
To
if (strlen($test) == 2) {
$error = json_last_error();
}
And your error-detection should work.
If you a... | |
d9573 | As it turned out, ComIntern and Remy were right. I had completely misunderstood the whole stdcall and safecall interfaces.
The .ridl file now looks like this:
....
interface ILCCAMQM_Application: IDispatch
{
[id(0x000000C9)]
int _stdcall Connect(void);
[id(0x000000CA)]
int _stdcall Disconnect(void);... | |
d9574 | You can render this with:
{{ form.Container_id }}
In your form you should first pop the container_id from the kwargs, like:
class ObjectEditForm(forms.ModelForm):
class Meta:
model = Object
fields = ['TestField']
def __init__(self, *args, **kwargs):
# first pop from the kwargs
... | |
d9575 | The apparent discrepancy is most likely[1] between the number of columns in your data set and the number of predictors, which may not be the same if any of the columns are factors. You used the formula method, which will expand the factors into dummy variables. For example:
> head(model.matrix(Sepal.Width ~ ., data = i... | |
d9576 | holder.layout2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
/* if(clicktime=true)*/ if(clicktime==true) {
Toast.makeText(getContext(), "datachanged", Toast.LENGTH_SHORT).show();
notifyDataSetChange... | |
d9577 | Not tested, but it should work (edited after comments)
lapply(mylist, write, "test.txt", append=TRUE, ncolumns=1000)
A: Format won't be completely the same, but it does write the data to a text file, and R will be able to reread it using dget when you want to retrieve it again as a list.
dput(mylist, "mylist.txt")
... | |
d9578 | I don't know where you get the dynamic ids, but you could actually maybe put them in the providers array and use dependency injection like you would with injection tokens. If it is possible to create a factory method for the ids of course
Service
export class Item3Service {
constructor(
@inject(LOCALE_ID) privat... | |
d9579 | So do I get that correct that the link is supposed to send the form? That will not work, as a link on its own is not able to trigger a submit. You need an input of type submit.
<input type="submit" class="btn btn-success" value="Login"> | |
d9580 | In this bit of code:
await imagemin(
[`tmp/${fileSlug}.${fileType}`],
'/tmp',
{ use: [ imageminWebp({quality: 50})] });
It looks like you're building a different string to the tmp file than you did when you built tmpFilePath. It's missing the leading slash. Any reason why you wouldn't use this ins... | |
d9581 | The Windows version of the APOPT solver crashed and wasn't able to find a solution. However, the online Linux version of APOPT is able to find a solution. Get the latest version of Gekko (v1.0.0 pre-release) available on GitHub. This will be available with pip install gekko --upgrade when the new version is published b... | |
d9582 | You can use DismissAction, because PresentationMode will be deprecated. I tried the code and it works perfectly! Here you go!
import SwiftUI
struct MContentView: View {
@State private var presentNavView1 = false
var body: some View {
NavigationView {
List {
NavigationLi... | |
d9583 | You should actually be using the first approach and you can access the child elements refs in the parent
class Parent extends Component {
clickDraw = () => {
// when button clicked, get the canvas context and draw on it.
const ctx = this.childCanvas.canvas.getContext('2d');
ctx.fillStyle = "#00FF00";
... | |
d9584 | This might fix the issue.
e.Graphics.DrawImage(img, e.MarginBounds);
or
e.Graphics.DrawImage(img, e.PageBounds);
or
ev.Graphics.DrawImage(Image.FromFile("C:\\My Folder\\MyFile.bmp"), ev.Graphics.VisibleClipBounds); | |
d9585 | try this
<!DOCTYPE html>
<html>
<body>
<?php
$row = "A1 Header";
$compulsary = FALSE;
$mutable = TRUE;
$included = FALSE;
if ($compulsary == FALSE and $mutable == TRUE) {
echo "<textarea style=background-color:yellow; name=\"message\">Please... | |
d9586 | Use of mysqli is quite simple actually just need to call the query function of a mysqli object, equivalent would be:
//Instantiate mysqli db object
$sqli = new mysqli('host', 'user', 'password', 'db');
if ($sqli->connect_error)
die ("Could not connect to db: " . $db->connect_error);
... | |
d9587 | You would need to do this:
myReader.GetString(0);
However, there is a bit more that needs done here. You need to leverage the ADO.NET objects properly:
var sql = "select BillNumber from BillData";
using (SqlConnection cn = new SqlConnection(cString))
using (SqlCommand cmd = new SqlCommand(sql, cn))
using (SqlDataReade... | |
d9588 | --secondsLeft updates the variable. To check if the next decrement will be 0, use if (secondsLeft - 1 == 0)
Each tick is decrementing the variable twice.
Additionally, this will trigger the "Completed" text on 1, not 0. Below is a better way to handle this:
-(void) updateCountdown {
int hours, minutes, seconds;
... | |
d9589 | Your code has already consumed the first two columns from the stream and the position of the stream is past those columns. In turn, it isn't necessary to call ignore to move the stream position past those columns. Besides ignore ifstream provides some additional functions that you may find useful. | |
d9590 | I believe that the real answer is that you can't. The file path won't be sent by the browser for security reasons. The file name will be sent, however I don't believe it gets sent without an actual upload.
The closest you could come, afaik, would be to forcibly kill the connection just when the upload starts. That w... | |
d9591 | Your loop control variable i is incremented by one in the for loop:
for(i=0; i<40; i++)
and then by a further 3 by:
i=i+3;
So i is overall incremented by 4 in each iteration. Pointer arithmetic accounts for the size of the object pointed to. Here you are pointing to a 32 bit (4 byte) integer, and incrementing by 4... | |
d9592 | Assuming you don't care about HTML-encoding characters that are special in HTML (e.g., <, &, etc.), a simple loop over the string will work:
string input = "Steel Décor";
StringBuilder output = new StringBuilder();
foreach (char ch in input)
{
if (ch > 0x7F)
output.AppendFormat("&#{0};", (int) ch);
else... | |
d9593 | I didn't have a solution, just a workaround.
Windows Vista onwards has an inbuilt command called clip that takes the output of a command from command line and puts it into the clipboard. For example, ipconfig | clip.
So I made a function with the os module which takes a string and adds it to the clipboard using the inb... | |
d9594 | That is not necessary - if your application has no more references to the HashMap, then it will be garbage collected automatically at some point in the future.
If you really have a huge hash map that you want to get rid off to avoid its memory consumption trigger GC cycles after doSomething completes, you can call Syst... | |
d9595 | A delete operation should have a business meaning. For example, just because someone deleted a product from the inventory collection, does not mean it should be deleted from users invoices.
If there is a real need for a delete. You can always define an index in RavenDB and update the entities containing that aggregate ... | |
d9596 | You can avoid this by using the insomnia plugin | |
d9597 | Firstly your arguments to replace() are the wrong way around. Secondly, you need to actually set the value after making the replacement. Lastly you'll also need to provide another function argument to hover() that sets the original image back on mouseout. Try this:
$(".navbar-nav li a").hover(function() {
$(this).... | |
d9598 | In the UI, you should add, click,doubleclick or hover:
plotOutput("plot1", click = "plot_click")
And in the Server will be input$plot_click, X and Y coordinates
Here a Shiny explanation:
https://shiny.rstudio.com/articles/plot-interaction.html
And I wrote for you a simple example:
library(shiny)
library(ggplot2)
libr... | |
d9599 | Check this link - http://code.google.com/mobile/afma_ads/docs/ it explains it all (well most of it to get started!)
I went on a similar path looking for a ad serving support in my android app - eventually I settled for Mobclix - I am happy :-) Check the question I had posed at Serving Ads in Android App - | |
d9600 | accuracy: 0.9925; val_accuracy: 0.8258
Clearly the model is overfitted,
*
*Try using regularization techniques such as L2,L1 or Dropout, they will work.
*Try to Collect More data(Or use data augumentation)
*Or search for other Neural Network Architectures
*The best method is plot val_loss v/s loss
r = model.fit(x... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.