id stringlengths 5 11 | text stringlengths 0 146k | title stringclasses 1
value |
|---|---|---|
doc_23520600 | so much like a path, from a start node (main function) to an end node (program termination). Is this something that is possible in gcop or gprof?
Thanks
| |
doc_23520601 | <A>
...
</A>
<A1>Text</A1>
<A1>Text</A1>
<B1>Text</B1>
<C1>Text</C1>
<A>
..
</A>
<A1>Text</A1>
In the above example I want to select all the siblings of first A which are A1.If I put "following-sibling::*[self::A]" then it... | |
doc_23520602 | So I asked myself, why not make one? So, I already have it half-working (can connect to ftp-servers, download, upload, moving in and out folders, and create directories), however, it can't open folders with accented and/or special characters in them (á, é, ö, #, etc.), and they also appear in the listbox like this: "Ad... | |
doc_23520603 | When I try to install Spree I get the below error:
C:\Users\Ross\Documents\eCommerce\Spree\test_spree_store>spree install
Would you like to install the default gateways? (yes/no) [yes] y
Would you like to install the default authentication system? (yes/no) [yes] y
Would you like to run the migrations? (yes/no) [yes] y
... | |
doc_23520604 | period = list( c(24,24,5), c(24,12,5) )
alpha = list( c(0,5), c(0,5) )
s_samples = 100
A=50
O=50
simulatedData = data.frame(t=numeric(), v=numeric()) #initialise the output
daySteps = c(0, cumsum(unlist(period)[seq(3,length(unlist(period)), by=3)])) #set up the period starts and ends to set over, starting at 0
... | |
doc_23520605 | The code can be found here:
https://github.com/jordi-chacon/bcn_pollution
My development machine runs Ubuntu, so I am using Visual Studio Code.
I currently have my .NET Core webapp running on localhost:5000 just fine and now I want it to run on Azure App Service.
I have successfully configured Continuous Deployment on ... | |
doc_23520606 | I took part of the code and alternatively used a while loop but still got no results.
Below is the sample code.
$output = '';
$user_id = $_POST['user_id'];
$year = $_POST['ddlacyear'];
$term = $_POST['ddlterms'];
if ($year == '1' && $term == 'Term1') {
$cat1 = 'c111';
$cat2 = 'c211';
$cat3 = 'c311';
$exams =... | |
doc_23520607 | The only way I can think of is to use a script to ban every userid on a server, then print the bans list.
Is there a more efficient way to do this?
A: This is pretty straightforward if you use Client.get_user_info to get the User objects from the ids. str(some_user) is Name#Discriminator.
import discord
client = dis... | |
doc_23520608 | <v-btn
color="primary"
active-class="default-class"
flat
v-for="item in horizontalNavItems"
:key="item.title"
:to="item.link">{{item.title}}</v-btn>
</v-toolbar-items>
export default {
data () {
return {
};
},
computed: {
horizontalNavItems () {
return [
{ tit... | |
doc_23520609 |
A: that`s mine
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
# generated files
bin/
gen/
.metadata/
# Local configuration file (sdk path, etc)
local.properties
A: Essentially, you want to ignore generated and IDE specific files. This is the .gitignore recommended by... | |
doc_23520610 | As I plan to upgrade from VS 2013 to VS 2019 I ran some tests and was not able to let a class implement IDTExtensibility2 through the class view as there are no typelibs available for me to select from the registry. I installed the workloads for MFC and ATL as well.
Maybe someone is experienced and can give me a hint w... | |
doc_23520611 | My aim is to validate user in Custom Authentication Provider using database but the @Autowiring always throw Null Pointer Exception.
Here my code:
Custom Authentication Provider:
@Component
public class CustomAuthenticationProvider implements AuthenticationProvider {
@Autowired
private Validator iValidate;
... | |
doc_23520612 | It used to have:
<a href="details.aspx" class="btn_red">Read More <i class="fa fa-eye"></i></a>
and, I have tried a few things without luck... The closest I have come is to just drop the icon:
@Html.ActionLink("Read More", "Details", new { id = item.ID }, new {@class= "btn_red"})
How would I go about adding the icon,... | |
doc_23520613 | This is the current dataset
So, I am trying to return the data based on the Category Id as an input. But if keyword is not present for the category, then the data from its parent should be returned
This is an example
Input: 202; Output: ParentCategoryID=201, Name=Operating System,
Keywords=Teaching
This is what I have ... | |
doc_23520614 | My question is how I should complete the second file.
Here is the first file:
package u7a3;
/**
* generic binary search-tree with integer keys.
* Empty trees are encoded as null references.
*
* @param <T> The type of the things which are managed in the binary
* search tree
*/
public class BinarySearchTree<T> {
... | |
doc_23520615 | Here is the action that handles the login:
const mainPage = (response, dispatch) => {
if(POST_DATA_SUCCESS) {
this.props.history.push('/main');
}
dispatch({
type: POST_DATA_SUCCESS,
response,
});
};
export function loginUser(username1, password1) {
const promise = fetch('http://localhost:8080/users/login', {... | |
doc_23520616 | docker pull maven:3-alpine
On a different machine, the default registry is different, so this image is not found.
Is it possible to see where images come from? So I can include that when I pull the image?
For example
docker pull myregistry.com/somefolder/maven:3-alpine
A: If you just mean get the registry from image... | |
doc_23520617 | Here is the prism rendered without depth testing so all sides can be seen, so it looks like this part is at least correct:
These are the vertices:
static const float vertexData[] = {
0.f, 1.f, 0.5f,
1.f, -1.f, 0.f,
-1.f, -1.f, 0.f,
0.f, 1.f, 0.5f,
1.f, -1.f, 1.f,
1.f, -1.f, 0.f,
... | |
doc_23520618 |
Server Error in '/' Application. The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make
sure that it is spelled correctly.
All of ... | |
doc_23520619 | The technique is illustrated using this example (from http://ejohn.org/apps/learn/#25)
var object = {};
function fn(){
return this;
}
assert( fn() == this, "The context is the global object." );
assert( fn.call(object) == object, "The context is changed to a specific object." );
A: Please have a look at this e... | |
doc_23520620 | begin transaction
update trn_RatingAuto
set Rate = 0
where rate = (
SELECT ar.Rate
FROM trn_account ta
INNER JOIN trn_risk tr ON ta.AccountId=tr.AccountId
inner join trn_option ot on tr.riskid = ot.riskid
INNER JOIN trn_Rating ra ON ot.RatingId = ra.RatingId
IN... | |
doc_23520621 | Note that I do not want automatic line-breaks, but I want to decide myself where to put them.
Nor do I want to change the height of the button. No, I want to add extra linebreaks.
i.e. I want to be able to have a button with
Text
like
this
instead of
Text like this
Is there a way around this limitation?
A: Ok, there i... | |
doc_23520622 | any way to fix that?
appreciate your help
A: You can use Controls collection to gain access to controls of a container.
For example if you put your labels on form, you can use (don't forget to add using System.Linq;):
foreach(var label in this.Controls.OfType<Label>())
{
//Get or Set properties of label
//labe... | |
doc_23520623 | I do it by sending the URL in the json payload, load the bitmap and on successful image loading I show the notification.
My question is what is the best optimum resolution of the Image
Please help!
Thanks in advance.
A: The width of your image should be equal to the width of the screen as the width of the dropdown not... | |
doc_23520624 | #include <iostream>
struct A {
};
struct B {
};
struct C {
};
struct E : A {
int field;
};
struct F : A, B {
int field;
};
struct G : A, B, C {
int field;
};
int main() {
std::cout << _MSC_VER << std::endl;
std::cout << sizeof(E) << std::endl;
std::cout << sizeof(F) << std::endl;
s... | |
doc_23520625 |
A: To answer this one needs to check the train code for the rf model.
From the linked code it is clear that if grid search is specified caret will use caret::var_seq function to generate mtry.
mtry = caret::var_seq(p = ncol(x),
classification = is.factor(y),
len = len)
... | |
doc_23520626 |
A: By checking the classes I found that you have to override the presenter used by the Paginator.
Its done by calling render($presenter) your presenter must extend BootstrapThreePresenter If you wish to use bootstrap links and you just have to override the constructor and pass number of links you want on each side $t... | |
doc_23520627 | When I run the test command to test the model performance:
java -cp stanford-ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -loadClassifier ner-model.ser.gz -testFile jane-austen-emma-ch2.tsv
I get the following error:
Invoked on Thu May 10 15:40:41 IST 2018 with arguments: -loadClassifier ner-model.ser.gz -testFile jan... | |
doc_23520628 | The other domain site has a login page. I am doing successful login in browser and the calling the file_get_contents() function but still it is returning me login page HTML.
I want HTML of the page which I am passing in URL.
Here is my code after adding cookie file
$COOKIEFILE = dirname(__FILE__) . '/cookie.txt';
$form... | |
doc_23520629 | array:1 [▼
"Ice Coffee" => array:2 [▼
0 => "4,78"
1 => "7,57"
2 => "12,61"
3 => "2,89"
]
]
I need to sort it on the value behind the comma, is this possible?
57 -> 61 -> 78 -> 89
So the outcome will be:
array:1 [▼
"Ice Coffee" => array:2 [▼
0 => "7,57"
1 => "12,61"
2 => "4,78"
3 =... | |
doc_23520630 | This application implements a Chat Activity which have very a very simple feature: send text.
During debugging I noticed that the messages I was listing from the server were not displayed in the same order I had sent them on my application. My first thought was that the problem was comming from the server.
At first I ... | |
doc_23520631 | The font Lucida Console is configured within a shortcut to the script.
I'd like to provide the user with the ability to change the font size. The following module does just that, however the font is always reset to 'Raster Fonts': https://4sysops.com/archives/change-powershell-console-font-size-with-cmdlet/
I don't und... | |
doc_23520632 | In the 1990's, my predecessor built an Access database for my company (four of them actually). In the aughts, the next employee built a SQL Server 2008 Express on Windows Server 2003 and moved the data there. Now it's the 20's and I'm trying to upgrade to Windows Server 2019 and SQL Server 2019 Express. The database ha... | |
doc_23520633 | Now I want to import PortalModule and so I edit App.module.ts adding the following lines of code:
import {PortalModule} from '@angular2-material/core/portal/portal-directives';
...........
@NgModule({
imports: [
........
MdSidenavModule.forRoot(),
PortalModule.forRoot()
]
)}
(by the way this is extacly wha... | |
doc_23520634 | Basically I have a ConcurrentDictionary which acts as a cache for a database table. I want to query the DB every 10 seconds and update the db cache. There will be other threads querying this dictionary the whole time.
I can't just use TryAdd as there may also me elements which have been removed. So I decided instead ... | |
doc_23520635 | I want scale xAxis (Date axis) as date in example - 10:00:05, 10:00:05, 10:00:10, 10:00:15…—scaling for every 5 seconds.
But now when user start with 10:00:03 time, it looks as 10:00:03, 10:00:08, 10:00:13, 10:00:18…
I want that always be scaled of 5 seconds as 10:00:05, 10:00:05, 10:00:10, 10:00:15 and be independentl... | |
doc_23520636 | (,)(?=(?:[^']|'[^']*')*$)
I tried doing a search in Sublime and it worked out (around 700 results). When trying to replace the results it runs out of memory. Tried /(,)(?=(?:[^']|'[^']*')*$) in vim for searching first but it does not find any instances of the pattern. Also tried escaping all the ( and ) with \ in the ... | |
doc_23520637 | Selenium version:2.53.1
PhantomJS version:2.1.1
The Java code:
package phantomjs;
import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.phantomjs.PhantomJSDriver;
import org.w3c.dom.DOMException;
public class ... | |
doc_23520638 | from multiprocessing import Process, Semaphore, Queue
import time
from random import random
buffer = Queue(10)
empty = Semaphore(2)
full = Semaphore(0)
class Consumer(Process):
def run(self):
global buffer, empty, full
while True:
time.sleep(4)
print(full)
full... | |
doc_23520639 | I use discord.py to login to my account and I want to DM a user by inputting his user_id .
import discord
class MyClient(discord.Client):
async def on_ready(self):
print(f'Logged in as {self.user} (ID: {self.user.id})')
client = MyClient()
client.run('token')
async def send_message(user_id):
user = c... | |
doc_23520640 | function public_encrypt($plaintext){
$fp=fopen("mykey.pub","r");
$pub_key=fread($fp,8192);
fclose($fp);
openssl_get_publickey($pub_key);
openssl_public_encrypt($plaintext,$crypttext, $pub_key );
return(base64_encode($crypttext));
}
$_SESSION['caesar'] = public_encrypt($_POST["inc"]);
and then go to SendData to be de... | |
doc_23520641 |
Runtime Environment -
OS Version: Unix 10.3.0.0
CLR Version: 2.0.50727.1433 ( 2.6.4 (tarball Thu Apr 22 13:24:33 MDT 2010) )
ProcessModel: Default DomainUsage: Single
Execution Runtime: mono-2.0
** (/Users/smcho/bin/NUnit-2.5.5.10112/bin/net-2.0/nunit-console.exe:36800): WARNING **: The following assembly r... | |
doc_23520642 | I apologize for the unclear wording; I'm not very familiar with this subject.
Here's a portion of my code that shows my issue:
set /a Freq[%%z]value[!value!]+=%%y
echo Freq %%z value !value! is !Freq[%%z]value[!value!]!
As is, batch interprets !Freq[%%z]value[!value!]! broken up into different variables with the !'s,... | |
doc_23520643 | Is it possible to customize the name and the picture of the download ?
I have currently this :
Thanks in advance for your help.
A: You can set name by Content-Disposition: attachment; filename=FILENAME. File icon depends on the file type, so try to use proper file extension and Content-Type in http header.
| |
doc_23520644 | Is there a list of what can be included in query for Microsoft Query to be treated as valid? In my query I use a lot of SQL modelling - is it not supported?
A: I don't believe any of the MODEL features of Oracle are supported by any MS SQL variant.
But as that is an ORA message you are still executing against Oracle, ... | |
doc_23520645 | mysql> SELECT COUNT(facebook_posts.id) AS temphold
FROM facebook_posts
WHERE shares < 10 AND account_id=‘12345’ AND article_id IS NOT NULL
AND date(created_time) > '2016-10-01' AND date(created_time) < '2016-10-05';
+----------+
| temphold |
+----------+
| 104 |
+----------+
1 row in set (0.02 sec)
And then wi... | |
doc_23520646 | def iterate(sequence: str) -> str: # <- What does (variable: type) -> type do?
sequence = sequence+R+swapLetters(sequence[::-1])
return sequence
def swapLetters(sequence: str) -> str: # <- What does (variable: type) -> type do?
newSequence = ""
for letter in sequence:
if letter == R:
... | |
doc_23520647 | This is what I have done so far:
val format = new java.text.SimpleDateFormat("dd-MMM-yyyy")
format.format(new java.util.Date())
play.api.Logger.info(format.parse(ls.si_due_date.toString).toString)
A: That is the solution
val incommingDate = "2014-08-01"
val formatIncomming = new java.text.SimpleDateFormat("yyyy-MM-dd... | |
doc_23520648 | Thanks in advance.
A: Even on 1 core running multiple threads, you can still have what you are calling this "visibility" problem, as threads that have loaded a value from memory into a register will save this value to that thread's stack, and will not see the update if the thread is switched off then switched back on ... | |
doc_23520649 | The problem simply is that when I press a button (English or Arabic button) to change buttons' texts on that activities other than the current activity (MainActivity) I get the error:-
Unfortunately , appname has stopped.
But when I run the application without changing these Buttons' texts (Only changing MainActivit... | |
doc_23520650 | statement := `SELECT id from source where mgmt = $1 `
var exists string
errUnique := dr.db.QueryRow(statement, mgmt).Scan(exists)
if errUnique != nil && errUnique != sql.ErrNoRows {
return errUnique
}
The above code works for me. However, shouldn't my .Scan(&exists) have a by reference? This does not work. On the... | |
doc_23520651 | for our service we have the current working implementation (same behaviour for all other endpoints):
var _ = goa.Service("serviceDemo", func() {
goa.Method("secondEndpoint", func() {
goa.Payload(SecondEndpointRequestPayload)
goa.Result(SecondEndpointResponsePayload)
goa.HTTP(func() {
... | |
doc_23520652 | Do you guys have any clue as to whats going on?
/Users/seanfchan/.rvm/gems/ruby-1.9.2-p0@global/gems/gdata-1.1.1/lib/gdata.rb:21:in `require': no such file to load -- jcode (LoadError)
from /Users/seanfchan/.rvm/gems/ruby-1.9.2-p0@global/gems/gdata-1.1.1/lib/gdata.rb:21:in `<top (required)>'
from /Users/seanfchan/.rv... | |
doc_23520653 | Anyway, I have tracked it down to the applicationWillResignActive and the applicationDidBecomeActive methods in the app delegate. These get called for multitasking, but when I want to terminate, the app "resigns active." Any guidance on this issue is greatly appreciated!
A: Your application can opt out of multitaski... | |
doc_23520654 | I use these lines to change te user agent of my webview
let userAgent = " Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.52 Safari/537.36"
NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" : userAgent])
print(NSUserDefaults.standardUserDefaults(... | |
doc_23520655 |
A: The key is to disable zooms and scrolls.
In Objective-C:
self.mapView.zoomEnabled = false;
self.mapView.scrollEnabled = false;
self.mapView.userInteractionEnabled = false;
Or Swift:
mapView.isZoomEnabled = false
mapView.isScrollEnabled = false
mapView.isUserInteractionEnabled = false
By the way, if you want a st... | |
doc_23520656 | So I have an object called PointArray and another object called Graph. I am passing the object point to Graph as such
class Graph:
def __init__(self):
self.pointArray = PointArray()
description = "This is a class"
author = "Raaj"
def setPointArray(self,pointArray):
self.pointArray=... | |
doc_23520657 | import os
paths = os.walk('.')
next(paths)
for root, dirs, files in paths:
image_num = 1
for old_file in files:
new_path = os.path.join(root, str(image_num) + '.bmp')
old_path = os.path.join(root, old_file)
os.rename(old_path, new_path)
image_num = image_num + 1
The renaming s... | |
doc_23520658 | I'm using the arinc429 USB box and c and need to read information coming in from the buffer, which is fine, it's what to do with the data I get afterwards I'm having a little trouble with.
With each data item in the buffer I get a arinc_low and arinc_high unsigned longs which both represent the end and beginning of a ... | |
doc_23520659 | <select name="something[]" multiple="multiple">
<option value="1">1</option>
<option value="2">2</option>
</select>
and inside my form I can add these select muliple time dynamic by javascript
so it become
<!-- Control 1 -->
<select name="something[]" multiple="multiple">
<option value="1">1</option>
... | |
doc_23520660 | I have a dictionary:
var frequencyOfAnswers: [AnimalType: Int] = [:]
AnymalType is simply an enum with four cases. Then they perform a mapping on frequencyOfAnswers:
let responseTypes = responses.map { $0.type }
An so far everything is good. But in the following iteration:
for response in responseTypes {
frequenc... | |
doc_23520661 | Now creating 2 rows for the user if I have week1 and week2 for meetingHash 'Hold/Uncategorized' for the user Sarathy Devaraju in month may.
But i want to combine as { meetingHash: "Hold/Uncategorized", month: "May", UserName: "Sarathy Devaraju", Week1: 2, Week2: 0, Week3: 3, Week4: 0 }
expected as
[{"UserName":"Sarathy... | |
doc_23520662 | Document rest api
I i am trying bellow snippet code to create contact on clinchpad but its getting error We're sorry, but something went wrong..
so can any one tell me how do i go to achieve this.
$url = 'https://www.clinchpad.com/api/v1/contacts';
//$appId = 'YOUR_APP_ID';
$restKey = 'MY_API_KEY';
$headers = ... | |
doc_23520663 |
*
*"abc" = false
*"123" = true
*"ab2" = false
Is there a command, like IsNumeric() or something else, that can identify if a string is a valid number?
A: If you want to check if a string is a number (I'm assuming it's a string since if it's a number, duh, you know it's one).
*
*Without regex and
*using Mi... | |
doc_23520664 | jsFiddle
HTML
<input type="hidden" value="<!DOCTYPE html><html amp4email><head></head><body>...Content...</body></html>" id="ampHtml" />
Attempted Script:
var __amp_content = $("#ampHtml").val();
var __attr = jQuery(__amp_content).find('html').attr('amp4email');
if (typeof __attr !== 'undefined' && __attr !== false) {... | |
doc_23520665 | Connection code piece:
user = "MY_USERNAME";
passwd = "MY_PASSWORD";
db = "localhost:1521/my_instance_name";
env = Environment::createEnvironment(Environment::DEFAULT);
try
{
con = env->createConnection(user, passwd, db);
}
catch (SQLException& ex)
{
cout << ex.getMessage();
exit(EXIT_F... | |
doc_23520666 | and am running the commands from that location
docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/india-latest.osm.pbf
fails with
[error] Input file /data/india-latest.osm.pbf not found!
i just don't understand WHY it doesn't work. according to osrm documentation of the docker comm... | |
doc_23520667 | I am working on an application in which I have to create graph. For now I am using GraphStream.
Requirements for my graph is very complicated, which is :
I have a table named CDR(Call Data Record) in which I have 2 columns ANUMBER and BNUMBER. The structure of table is very clear that it shows that Anumber called Bnumb... | |
doc_23520668 | func hash(into hasher: inout Hasher){
hasher.combine(self)
}
A: I'm farily certain that hasher.combine(self) would either not compile or result in an infinite loop.
When hasher.combine() sees the type that it is given, it is going to look for that objects hash(into:) function, which will call hasher.combine() w... | |
doc_23520669 | I have a script which after login (managed in a previous scene) sends an API request to FB asking for friends, name and email and sends that info as a POST to a php website.
code:
[Serializable]
public struct FBData {
public string first_name;
public string email;
public string friends;
public string id;}
publi... | |
doc_23520670 | Thank you in advance for any help that may be offered.
string cellPhone = reader.GetString(reader.GetOrdinal("CellPhone"));
string suffix = reader.GetString(reader.GetOrdinal("Suffix"));
StringBuilder body = new StringBuilder();
cellPhone = cellPhone.Trim().Replace(" ", "").Replace("-", "").Replace("(", "").Replace(")"... | |
doc_23520671 |
A required anti-forgery token was not supplied or was invalid.
After some research, I found out that the reason is that we are using SSO (Single Sign On) for authentication and not Forms authentication, as mentioned here. But I cannot ignore action methods as mentioned in the link since we do not have control over v... | |
doc_23520672 | #include "Queue.h"
#include <Windows.h>
#include <fstream>
#include <mutex>
using std::ofstream;
ofstream myFile("result.txt");
Queue<int> myQueue;
DWORD WINAPI WritingThread(LPVOID lpParam);
DWORD WINAPI LockingThread(LPVOID lpParam);
int main()
{
// This thread will block myQueue for 3 seconds
CreateThrea... | |
doc_23520673 | The Camera is plugged in and works fine with the SoftwareSuite by Common Vision Blocks.
From command lsusb I got the following output:
Bus 002 Device 005: ID 1ab2:0001
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0cf3:e300 Atheros Communications, Inc.
Bus 001 Device 003: ID 1... | |
doc_23520674 | Can I do this any easier without typing it out x times?
[self.button.layer setBorderWidth:2.0];
[self.button.layer setBorderColor:[[UIColor blackColor] CGColor]];
[self.button.layer setCornerRadius:5.0];
A: For adding Multiple Property You can create Custom UIButton class. like create an class inherited UIButton like... | |
doc_23520675 | I am using following code:
$toZipDirectory = 'C:\Users\sadam.shaikh\Desktop\Automate\'
$zipFilePath = 'C:\Users\sadam.shaikh\Desktop\Automate\zip.zip'
$Newness= Get-ChildItem -Path $toZipDirectory | Where-Object {$_.PSIsContainer} |
Sort-Object LastWriteTime -Descending | Select-Object -First 1 | % { $_.FullName } |... | |
doc_23520676 | $firstRecordID = 1;
$records = Recordset::all();
I want to filter the recordset:
$filteredRecords = $records->find(function($record){
if($record->id == $firstRecordID)
return true;
else
return false;
});
Unfortunately, the closure has no clue what $firstRecordID is.
How do I pass in the ID?
A... | |
doc_23520677 | I am trying to display the name of the user who owns a project in Home page. This does not work. It returns a name error: undefined local variable or method `user'
Controllers are the following:
Project controller:
def create
@project = current_user.projects.build(project_params)
end
The home page controller show... | |
doc_23520678 | I already know some fields (not an expert in all if them but I have touched them) like:
HTML/CSS/JavaScript/Databases/C#(ASP.NET) and more, but I think that I am lost between all the requirements of the website and what should I do first?
For example:
*
*To start with the UserInterface or the Server Side?
*To thi... | |
doc_23520679 | However there are no coding side checking to check for user input. Currently the solution I search in internet is using
Dim sMatch As Boolean
sMatch = TextBox1.Text Like "[0-9]/[0-9]"
The only problem is it only accept single digit of number. For example 5/4, what I want is a dynamic input for example 123/1 or 9/12 o... | |
doc_23520680 | Everything works fine except the date columns.
Here's my setup.
View:
@(Html.Kendo().Grid<TrainingDTO>().Name("grid_training")
.Columns(c => {
c.Bound(a => a.Id).Width(50);
c.Bound(a => a.Start).ClientTemplate("#= (Start == null) ? ' ' : kendo.toString(Start, 'dd-MM-yyyy') #");
... | |
doc_23520681 | I am using pymqi to connect to a queue manager and query for all messageflow statistics topics using the topic string: $SYS/Broker/+/StatisticsAccounting/Archive/#
When using the existing java program messages are read from the topic without issue.
When using the new python code it is able to connect and query the topi... | |
doc_23520682 | I have tried to update the URL of my config.toml file from \ to my target web name https*.com\ .
Also, I created a netlify.toml at the root directory.
Both of them did not make any sense.
Local development is fine, while the netlify could not be deployed well.
failed during stage 'building site': Build script returne... | |
doc_23520683 | edit:
*
*step 1 should show this: X Y _
*Step 2: _ X _
*Step 3: _ Y X
A: final Object underScoreObjectWhateverThatIs = null;
final Object o1 = new Integer(1);
final Object o2 = new Integer(2);
final Object o3 = new Integer(3);
final Object o4 = new Integer(4);
final Object[][] m = new Obje... | |
doc_23520684 | 1) I am trying to move all these contents upwards as the keyboard appears without any of the views overlapping.
This is what I have and this is what happens when edittext is focused. There is this small layer that overlaps my scrollview content
I want to achieve this whatsapp-like content where all content moves upward... | |
doc_23520685 | My goal is to two fold
*
*What am I doing wrong? Have the two classes been structured right?
*Once I get the code working (regardless of time optimization), I would like to explore alternate ways / better ways to select rotate or switch.
The Board class
class MarblesBoard:
"""creates a marble board with number ... | |
doc_23520686 | I read on one of my own threads in stack overflow that objects perform better than arrays when searching by value. Because browsers use map algorithm/concept for objects. So I am using objects/maps extensively even if the data is not in key value pair format.
Is the usage of objects encouraged instead of an array even ... | |
doc_23520687 | with the below code I can able to receive the push notification. I can redirect to the URL which I send the first time. But the second time I can not redirect to the new URL instead, I redirect to the URL which i previously passed. Here is my code please help me regarding same.
const messaging = firebase.messaging()
me... | |
doc_23520688 | Below is the snippet code that called each time i need to store log in the mongo database.
const mongo = {}
const mongo_cli = require('mongodb').MongoClient
module.exports = {
log (l) {
mongo_cli.connect(the_mongo_url, (error, client) => {
if (error) throw error;
mongo.cli = client... | |
doc_23520689 | code:
async def ban(ctx):
await ctx.message.delete()
print(f"{colorama.Fore.CYAN}[+]{colorama.Fore.YELLOW} beginning test\n")
print(f"{colorama.Fore.CYAN}[+]{colorama.Fore.YELLOW} Banning has begun.\n")
try:
for member in ctx.guild.members:
await member.ban()... | |
doc_23520690 | client side method calls a webmethod via jQuery Ajax.
in OnSuccess event, need to fire the server side event.
Code snippet :
<asp:imagebutton id="imgbtn" runat="server" ImageUrl="/Images/icon.gif" OnClick="return CheckAPP();"></asp:imagebutton>
function CheckAPP() {
$.ajax({
type: "POST",
url: "te... | |
doc_23520691 | Requirements are that that my application should get access token from user and then using that access token, my application should be able to get backup of the twitter user tweets, followers list, timeline, messages etc.
I created an application on twitter and got the consumer key and secret.
Please tell me how i star... | |
doc_23520692 | However after building the dylib, making sure the install path / name points to the right place, and building my project with it, I invariably get a runtime error that it cannot find the .dll ... Needless to say I'm profoundly confused as to why it would even look for a dll on mac, but could anybody share some light on... | |
doc_23520693 | Example I have an xml document I have serialized into an object, now I want to do value checks. First and most basic idea I can think of is to use nested if statments and checks each property, could be from one value checking that it has he correct url format, to checking another proprieties value that is a date but m... | |
doc_23520694 | I tried most of the things from google like self.close(), self.destroy(),self.hide() self.window().hide(), self.window().destroy() none of them are working.
I don't want to do sys.exit() as this is closing complete application but just have to close secondWidgetWindow after clicking save button so that user can do ano... | |
doc_23520695 |
They have corporate policies that won't let them upgrade or use Chrome or FF. I tried using a clearfix and a comment before the doctype. No luck.
jsfiddle here
A: Consider using LABEL tags and a styled, unordered list, as a container for your form elements. This results in cleaner code and it makes more semantic se... | |
doc_23520696 | library(MASS)
data(crabs)
x1 <- crabs[crabs$sp=="B", c(4,6)]
x2 <- crabs[crabs$sp=="O", c(4,6)]
kt <- kde.test(x1=x1, x2=x2)
But unfortunately I'm not familiar in R and most of my work was done using Python, so it's hard to transfer my scripts to R. At the same time, the function of 'ks' (mainly kde.test) is important... | |
doc_23520697 | typeof SomeUndeclaredOne === 'undefined'
This method doesn't work in typescript because it produces a compilation error:
error TS2304: Cannot find name 'SomeUndeclaredOne'
So my question is: what is the easiest way to check if a class exists in a typescript?
I'm looking for a generic way that works not only in browse... | |
doc_23520698 |
error: The operator '[]' isn't defined for the type 'Object'. (undefined_operator at [mbpayment] lib\screens\transactionhistory\transaction_history.dart:61)
This is the code
StreamBuilder(
stream: FirebaseFirestore.instance.collection('transactionHistory').where('SenderEmail', isEqualTo: user.email).snaps... | |
doc_23520699 | Below is my code for service extension
import UserNotifications
class NotificationService: UNNotificationServiceExtension {
var contentHandler: ((UNNotificationContent) -> Void)?
var bestAttemptContent: UNMutableNotificationContent?
override func didReceive(_ request: UNNotificationRequest, withContentHa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.