id
stringlengths
5
11
text
stringlengths
0
146k
title
stringclasses
1 value
doc_23524600
var importOrders = function (req, res, next) { var orders = req.body; var processOrder = function (order) { if(i<orders.length-1){ try { if (orders[i].Order.Company === "Mondial") { parseMondial(db, orders[i].Order, processOrder(orders[i++]), log); ...
doc_23524601
Code runs on eclipse nicely and displays the icon in a JFrame. The way I add it is by adding it to a JLabel and then adding that JLabel to the JFrame. I export the project into a runnable Jar file and when I double click the jar. It doesn't run. I tested out just adding a normal JLabel onto the JFrame without the icon ...
doc_23524602
For standard plots : Warning messages: 1: In doTryCatch(return(expr), name, parentenv, handler) : no font could be found for family "Arial" For plots with ggplot2 : Error in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : polygon edge not found Any suggestions how I can proceed to find the pro...
doc_23524603
Reading files and writing to files on the SD card is no problem as long as i don't scan a RFID card. When input is received from the RFID scanner it is no longer possible to read or write to the sd card. The connection seems to be "disconnected" as soon as RFID input is received. I tried using different pins for the RF...
doc_23524604
var mongo=require('mongodb').MongoClient; var db; mongo.connect('mongodb://path/to/db',function(err,db1){ if(err){ console.log(err); }else{ console.log('mongo connection established'); db=db1; } }); I then try to update a preexisting collection: if(db){db.test.save({hello:'world'});} I get an error saying...
doc_23524605
You can reproduce the problem using the Date & Time settings panel. Uncheck "Set date & time automatically" and click on the current year part of the field, 2014. Now just type 19 and pause. After about 1 second it fires some event and changes the date to 1969. My users don't seem to type as fast as the NSDatePicker ex...
doc_23524606
M = [[10, 1000], [11, 200], [15, 800], [20, 5000], [28, 100], [32, 3000], [35, 3500], [38, 100], [50, 5000], [51, 100], [55, 2000], [58, 3000], [66, 4000], [90, 5000]] And a matrix R: [[10 20] [32 35] [50 66] [90 90]] I want to use the values in column 0 of matrix R as start value of a slice and t...
doc_23524607
In this case there are two rows being selected: Assignee maxTime Jim Smith 11:31:05 James Smith 17:50:16 I want to only select a single row that has the greatest time. Output I want: Assignee maxTime James Smith 17:50:16 This is my code: select Assignee, MAX(TimeResolv) as max...
doc_23524608
Here's the code I have written so far that sort of works. It takes in the item object of the file or folder and a reference to a string. It scans the access and then builds a list of users separated by semicolon and returns true if one of the spuser objects is a user and not a group: /// <summary> /// Provides lis...
doc_23524609
I have a file with one hundred FASTA sequences arranged like this: >gi|192567|gb|AAA37417.1| cystic fibrosis transmembrane conductance regulator [Mus musculus] MQKSPLEKASFISKLFFSWTTPILRKGYRHHLELSDIYQAPSADSADHLSEKLEREWDREQASKKNPQLIHALRRCFFWRFLFYGILLYLGEVTKAVQPVLLGRIIASYDPENKVERSIAIYLGIGLCLLFIVRTLLLHPAIFGLHRIGMQMRTAMFSLI...
doc_23524610
I have CSS/HTM modules that I need minified. The CSS is written inline using <style> I swear I have used a grunt tool to do this before but both these tools did not work: grunt.loadNpmTasks('grunt-contrib-htmlmin'); grunt.loadNpmTasks('grunt-contrib-cssmin'); I use one for html and one for CSS but I need a tool that...
doc_23524611
E:\caffe-ssd-microsoft\Build\x64\Release\pycaffe>python E:\caffe-ssd-microsoft\examples\ssd\ssd_pascal_webcam.py --cpu Traceback (most recent call last): File "E:\caffe-ssd-microsoft\examples\ssd\ssd_pascal_webcam.py", line 151, in <module> for file in os.listdir(snapshot_dir): WindowsError: [Error 3] : ...
doc_23524612
I want to let user change this using a UI. So, how and where such parameters should be defined so that user can change them and changed value comes in effect without need to redeployment. Further explanation: Lets say I have a java servlet that takes the back up of few files. I have scheduled this to run daily at noon...
doc_23524613
* *Why would binary data be corrupted by intermediate systems? If I am sending an image from a server to client, any intermediate servers/systems/routers will simply forward data to next appropriate servers/systems/routers in the path to client. Why would intermediate servers/systems/routers need to interpret somethi...
doc_23524614
When use the createQuery()and find() methods of EntityManager ? What the advantages about each of them ? Thank you for answer me. A: You use find when you want to look up an entity by primary key. That means you know exactly what you're looking for, you just want to pull it out of the database. You use createQuery whe...
doc_23524615
A: You can use vw which is the ratio of the viewport width. .text { font-size: 5vw; /* 5/100th of the view port width */ } <div class="text">I am variable</div> Or you can use this plugin if you need a wider browser support, uses JS though: FitText A: As @Manoj Kumar said you can use vw but it's only support...
doc_23524616
Extract_32charcters_From_Begining = Text[0:32] Extract_16charcters_after32index = Text[32:16] in the above example I expected to get the first 32 characters at the beginning of the text then extract 16 characters after index 32 in the text. Extract_16charcters_after32index always returns 0 length. any idea what i am ...
doc_23524617
Category Subcategory Total Assets Fixed Assets All Assets Other Assets All Assets All All I would add this to rows and then add my account description dimension on rows as well. The problem is that I can't get any subtotals for any of the categories listed above without putting my account descriptions in the actual set...
doc_23524618
view define([ 'text!html/tplDirection.html', 'models/direction', 'core' ], function (template, Direction) { return Backbone.View.extend({ el: '', template: _.template(template), initialize: function (options) { this.model = new Direction(); this.model.set({rtnm: options.routeNumber})...
doc_23524619
A: I've had some problems getting Git to pick up the .gitignore file on Windows. The $GIT_DIR/info/exclude file always seems to work though. The downside of this approach, however, is that the files in the $GIT_DIR directory are not included in the check-in, and therefore not shared. p.s. $GIT_DIR is usually the hid...
doc_23524620
I am trying to convert the .pth model to onnx. My code is as follows. import io import numpy as np from torch import nn import torch.utils.model_zoo as model_zoo import torch.onnx from torchvision import models model = torch.load('output_object_detection/model_final.pth') x = torch.randn(1, 3, 1080, 1920, requires_gr...
doc_23524621
I am sending some messages with websockets from a python script. Since I don't have any experience with websockets and Javascript, I have simply taken some example code and customized the message sent to my needs. Sending the message is fine but I need to include newline commands inside of the message. I have tried in...
doc_23524622
Right now I'm trying "aeson". What I want to do is parse MSFT quote request from https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=MSFT&apikey=demo This is what it looks like { "Global Quote": { "01. symbol": "MSFT", "02. open": "105.3500", "03. high": "108.2400", "04. ...
doc_23524623
let fixedWidth = textView.frame.size.width textView.sizeThatFits(CGSize(width: fixedWidth, height: CGFloat.max)) let newSize = textView.sizeThatFits(CGSize(width: fixedWidth, height: CGFloat.max)) var newFrame = textView.frame newFrame.size = CGSize(width: max(newSize.width, fixedWidth), height: newSize.height) textVie...
doc_23524624
* *Crashlytics: 3.14.0 *Fabric: 1.10.2 *Firebase (Core / Analytics): 6.9.0 The official Firebase documentation at https://firebase.google.com/docs/crash/disable-sdk?hl=en tells me to use the following code: Crash.sharedInstance().crashCollectionEnabled = false But this doesn't work / seems to be outdated as * ...
doc_23524625
I get the following array returned from a webhook and I want to map the response attributes to fields in Marketo as shown in Image 1 attached. * *Using entities[0].properties.categories I can get the array of JSON blocks for categories *Using entities[0].properties.categories[0].value I can get the value of "Hospita...
doc_23524626
http://faq.pygtk.org/index.py?req=show&file=faq23.041.htp Now that I swiched from PyGtk ("import gtk") to GObject-introspection ("from gi.repository import Gtk"), what can I use instead? A: The _PyGObject_API interface has changed at some point. I needed to drop the register_sinkfunc function. The following works: fro...
doc_23524627
invalid conversion from 'char' to 'void*' [-fpermissive] char *p= new ('$') char[100]; This is how I overload the new operator: void *operator new(size_t sz,int setvalue) { void *p; p=malloc(sz); if(p==NULL){ memoryWarning(); } memset(p,setvalue,sz); return(p); } int main() { ...
doc_23524628
Possible Duplicate: Difference between $.ajax() and $.get() and $.load() What's the difference between $.get() and $.ajax The code I've been given uses calls like this: $.get(href) .success(function (content) { $('#content') and: $.ajax({ cache: false, url: href + params.param, dataType: 'html...
doc_23524629
doc_23524630
For the image_picker Cancel-button to work properly, I needed to be able to Navigate.pop() at the moment the user presses the Cancel-button inside the image_picker Plugin. The main question for this image_picker-Cancel issue is: How can I navigate back (i.e. Navigator.pop(context)) inside a builder of a Widget ? The fo...
doc_23524631
public static List<PerformanceLog> getStatistics() { return entityManager().createQuery( "SELECT NEW de.veliqi.selperf.model.PerformanceLog(o.useCase, o.description, o.totalTime) FROM PerformanceLog o", PerformanceLog.class).getResultList(); } But I need to get the average of o.totalTime a...
doc_23524632
I tried different way to do it but confirming the delete it always calls the default confirmation popup of the grid. Regards A: For example create button in each row, which trigger your function. Inside the function open custom popup and remove row direct from datasource. Something like this: onRemoveRow = function(e)...
doc_23524633
(sleep 10 & sleep 1); wait returns after 1 second instead of 10, and so it's failing to wait for sleep 10 to finish. Why is that, and how could I fix it? A: The parentheses create a subshell—an entirely new shell process just for those two commands. The wait command only waits for a shell’s own children (in fact, tha...
doc_23524634
but the problem is when I press the icons sometimes o get undefined sometimes its works I don't know why please explain to me what I did wrong. <body class="main-content"> <header class="section sec1 header active" id="home"></header> <main> <section class="section sec2 about" id="about"></section> ...
doc_23524635
Thanks in Advance. A: Put the font-family declaration into a body selector: body { font-family: Algerian; } All the elements on your page will inherit this font-family then (unless, of course you override it later). A: Here's a list of web safe fonts to choose from HTML <html class="myFontClass"> </html> css ....
doc_23524636
So far I achieved ok-ish results by applying classic unsupervised clustering, using DBSCAN algorithm, but still this is way tοo limited on the geometric distance of the samples and so the resulting groups cannot resemble the "words" I am aiming for. So I am searching for a way to influence the results of the clustering...
doc_23524637
<input type="text" name="text1" class="easyui-validatebox" value="<? echo $varPhp; ?>" size="53"/></td> My php function like this.. <?php $query = "SELECT MAX(kode_barang) as maxID FROM tb_barang"; $hasil = mysql_query($query); $data = mysql_fetch_array($hasil); $idMax = $data['maxID']...
doc_23524638
Any help is appreciated. <div id='fi-form'></div> <script> CQ.Ext.onReady( function(){ var card = new CQ.Ext.Panel({ applyTo : 'fi-form', title: 'Example Wizard', layout:'form', activeItem: 0, bodyStyle: 'padding:15px', defaults: { // ap...
doc_23524639
print "Content-type: text/html\n\n"; Without using \n it will not execute. But, inside the HTML body, we do not use \n because \n can't make any sense, for new line we use <br> tag. Why \n is necessary in the header line? A: Content-type: text/html is the HTTP header, not HTML. For detecting the end of HTTP header mu...
doc_23524640
Basically, can I have appname.dev with a development environment loaded, and appname.test with a test environment? A: You might be able to use a variation of this Gist to determine the domain being accessed, and have the Rails app behave accordingly from then on. You'd add a before_filter on your Application Controlle...
doc_23524641
maxCumulativeTime = 10 * 60 * 1000; let dispatchTimeNSEC = Int64(Double (maxCumulativeTime) * Double(NSEC_PER_MSEC)) let delayTime = DispatchTime.now() + Double(dispatchTimeNSEC) / Double(NSEC_PER_SEC) DispatchQueue.main.asyncAfter(deadline: delayTime) { doSomething() } if delayTime is short,...
doc_23524642
'myapp.mainpanel has no method setActiveItem' I am trying to build a sencha touch web app using the card layout mechanism. I make use of the following handler on a button on the landing page: handler:function(){ myapp.mainpanel.setActiveItem(myapp.cards.vehicleSearchResults, { type: 'slide', cover: false, d...
doc_23524643
<!DOCTYPE html> <html> <head> <title>Facebook Login JavaScript Example</title> <meta charset="UTF-8"> </head> <body> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script> function getUserData(response) { if(response.authResponse) { FB.api('/me', function(respons...
doc_23524644
I was thinking you could count the lines first and that's by knowing the line-height. If that's the case, what's a good method to grab the text of a div that makes it over 200px and push it to a new div? How do I iterate through lines of text in a div that ONLY has the natural breaks? Another method is to max the heig...
doc_23524645
A: There's two things you can do: * *You can write the state object such that A, B, C and D are all listed as participants. However, the contract code for this state object should be written such that it only allows B and C to update the state object. An example might be a bilateral agreement between B and C but A ...
doc_23524646
In my code, id name is very unique and there are many different id name so I do not want to find by id name. Is there any good way to access previous sibling?? <div id="parent"> <div id="1"> <div class="1-1"></div> <div class="1-2"></div> </div> <div class="2"></div> </div> A: When I use previousSibling, it w...
doc_23524647
http://ios.biomsoft.com/2011/09/11/simple-xml-to-nsdictionary-converter/ how can I get app work? - (void)viewDidLoad { [super viewDidLoad]; feeds = [[NSMutableArray alloc] init]; NSURL *url = [NSURL URLWithString:@"yxz"]; //get content of url NSURLRequest* request=[NSURLRequest requestWithURL:url]; NSURLResponse*respon...
doc_23524648
My application working perfectly on Android 2.2 (real device & emulator), and on Android 4.1 in emulator. On device with Android 4 I have troubles. SQLite does not want to execute simple "CREATE TABLE" statement. Screenshot is attached. What can be wrong? Full-size image can be found here: http://img855.imageshack.us/...
doc_23524649
<script> document.getElementById('test').innerHTML = 'Replacement text'; </script> Then I close the Source Code window using its "Save" button. If I then re-open the Source Code window, the code is there. However, if I modify the code by adding an HTML tag in the quoted replacement text as part of the innerHTML assign...
doc_23524650
Now I am trying to send payment details to stripe in case user selects stripe checkout option. At the moment the integration with stripe is working fine, i can send the payment and get the response from stripe however in order to send credit card details to stripe i get redirected to capture where i see the "pay with...
doc_23524651
I want to access this ip in nginx log. I have specified a custom log format, so i can access this value: I have tried the following variables in the log format, and they just return in '-'. $http_client_ip $http_request_body Basically, i want to read the entire request header / body that nginx receives from netscaler...
doc_23524652
@master_settings = load_master_settings(Rails.root) BulletinMailer.bulletin_email(params[:bulletin][:attachment].path, @master.get_alias_email).deliver The master object is set from a Datasources.xml file, and in a configuration loader file it sets it using: doc.elements.each("DEFINITIONS/MAILGUN_THINGS") {|element...
doc_23524653
how can i change the View Data data from j query and assign it to control ? A: u can assign value of viewdata value to ur javascript variable at the top of ur page then u can use this variable in setting ur control values var vdval = '<%=ViewData["key"]%>'; then use vdval to set ur control values
doc_23524654
I have an array of records representing statistics for a game and would like to produce a barchart with a single bar that represents the batting average for the selected date range in the first chart on the page. I received help on creating the first chart which shows the cumulative hit total for the selected date rang...
doc_23524655
[Mon Aug 19 21:38:15 2013] [error] (20014)Internal error: DBD: failed to initialise [Mon Aug 19 21:38:15 2013] [crit] (20014)Internal error: DBD: child init failed! [Mon Aug 19 21:38:15 2013] [error] (20014)Internal error: DBD: Can't connect to mysql I have tried adjusting MySQL connection limits and the DBD Parameter...
doc_23524656
My Java classes: // All my Java entities extend BaseEntity which just contains a few fields that // all my DB tables will also have. @MappedSuperclass @Data @EqualsAndHashCode(callSuper=false) public abstract class BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; p...
doc_23524657
what I mean with grey value is the white or black level from an image let's say 0 for white and 1 for black. for an example for this image the value I want will be like 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 is this possible? if yes how to do it with Op...
doc_23524658
There's a problem in my code and i can't get to it. I have the following procedure: CREATE OR REPLACE PROCEDURE example( input IN varchar2, p1 OUT SYS_REFCURSOR) AS BEGIN OPEN p1 FOR SELECT title FROM book WHERE gen LIKE '_' + input + '%' ORDER BY gen; END; and ...
doc_23524659
I was thinking about using .remove() but I'm not sure if that is the right way and I'm not sure how to implement it in the code. Any help or suggestion are greatly appreciated! Thanks in advance! the code I have .on("click",clicked) function clicked(d,i) { if(d.properties.name === "Mexico") { var...
doc_23524660
I am new to TPL concept and don't know how to implement it to read the folder of hundreds of text files. Can anyone help me by giving a code snippet that shows how to use task to read files more faster. A: This is already pretty fast if you're using a HDD. I'm supposing that your bottleneck is the IO. If it's the CPU...
doc_23524661
The following is code about initializing and reading. void Init() { mFd = open("/dev/ttyS2", O_RDWR | O_NOCTTY); if (mFd > 0) { (void)tcgetattr(mFd, &mTermios_p); speed = B115200; mTermios_p.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); mTer...
doc_23524662
1 1980-12-12 00:00:00 2 1981-11-11 00:00:00 3 1980-12-12 00:00:00 4 1982-11-11 00:00:00 5 1982-11-11 00:00:00 6 1983-12-12 00:00:00 SELECT SUM(DECODE(year(empjoindate),1980,1,0))"1980" , SUM(DECODE(year(empjoindate),1981,1,0))"1981" , SUM(DECODE(year(empjo...
doc_23524663
GridService.getHeaders($scope.grid); Service is below... function getHeaders(grid){ var deferred = $q.defer(); $http.put('v1/headers', grid).success(function (data) { deferred.resolve(data); }).error(function (data, status, headers, config) { deferred.reject(data); }); return de...
doc_23524664
Now I would like to have an API call where I can get all the shops but only with their "cheapest" product item in the json response. But I'm totally stuck in creating this query that returns all my shops but instead of including all items of the inventoryjust includes the inventory item with the lowest price as the onl...
doc_23524665
We use : org.primefaces.component.organigram.OrganigramHelper org.primefaces.context.RequestContext org.primefaces.event.CloseEvent, DashboardReorderEvent, FileUploadEvent, ItemSelectEvent, NodeSelectEvent org.primefaces.event.organigram.OrganigramNodeCollapseEvent, OrganigramNodeDragDropEvent, OrganigramNodeExpandE...
doc_23524666
I basically just have chomp ($name = <\STDIN>); so far. And a bunch of stuff that hasn't worked. Ignore the '\' in the STDIN, this is my first post and I couldn't figure out formatting. Solved: chomp ($name = <STDIN>); $first = substr $name, 0, rindex($name, ' '); $last = substr $name, (rindex($name, ' ')+1); print...
doc_23524667
Object.any_instance.should_receive(:subscribe) But when using the new rspec expectation it does not work: expect(Object.any_instance).to receive(:subscribe) The error is: expected: 1 time with any arguments received: 0 times with any arguments How can I make this work with expect() to receive? A: Just a heads up, e...
doc_23524668
Jenkins Shell Script: npm install npm test /var/jenkins_home/jobs/#####/workspace/node_modules/react-native/jest/hasteImpl.js:23 ); ^ SyntaxError: Unexpected token ) at createScript (vm.js:56:10) at Object.runInThisContext (vm.js:97:10) at Module._compile (module.js:549:28) at Object.Module._extensions...
doc_23524669
What can be the possible reason? <?php function printFeaturedPrograms() { ?> <div id="main_header_container"> <div id="featured"> <img src="images/slide-mentors.jpg" data-caption="#htmlCaption4" alt="Help" /> <img src="images/slide-.jpg" data-caption="#htmlCaption1" alt="Answers" /> <img src="images/slide.jpg...
doc_23524670
This is my first question on stackoverflow :) When I click on an item in my selectable list Id like it to be added to my Tags Input input field. (So I can either select from a predetermined list of selectable tags or input tags not on the list). Im using backbone.js. My html template file has this in it: <ol id="se...
doc_23524671
It is suggested to do like this: NSArray *viewControllerArray = nil; viewController1 = <View Init Code> viewController2 = <View Init Code> viewController3 = <View Init Code> 1stNavController = [[UINavigationController alloc] initWithRootViewController:viewController1]; UIImage *img = [UIImage imageNamed:@"tab_home"];...
doc_23524672
I am using this demo as a guide http://www.evopdf.com/demo/HTML_to_PDF/PDF_Pages_Background/Add_Elements_in_Background.aspx and have found that I need to remove the page margins for the image to cover the whole page otherwise it sits inside the margins. If I remove the margins this means the content that flows over pa...
doc_23524673
I'm able to get the contents of the webpage as a response stream (using the whole httpwebrequest thing), and then for testing/dev purposes, I write the stream content to a multi-line textbox in my ASP.NET webpage. Is it possible for me to loop through the content of the textbox and then say "If textbox1.text.contains (...
doc_23524674
TEST CASE During setup of a brand new server, I used all default settings, except I enabled the general log and I use the new 8.0+ mysql_sha2_password encryption (although I ALTER USER to mysql_native_password for phpmyadmin so that might revert it, I'm honestly not sure) * *I create a new Schema called "Test" *I cr...
doc_23524675
PERIODID PERIODSTART PERIODEND PRICE STARTDOW 1 2012-12-01 2012-12-10 10 6 2 2012-12-11 2012-12-20 20 -1 3 2012-12-21 2012-12-30 30 -1 Meaning that reservation in period 1 must start on saturday, but not for periods 2 and 3. If I have a reservation from 2012-12-10 - 2012-12-15 I w...
doc_23524676
An error occurred when creating the trigger: The provided execution role does not have permissions to call ReceiveMessage on SQS (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: d34b7525-5c69-4434-a015-112e8e74f447; Proxy: null) Tried via adding AWSLambdaVPCAccessExecuti...
doc_23524677
I want to get rid of the new cloned commits, what should I do? As the number of commits in a repository doubled, the grass faded as a whole. Can't I go back on this? I don't know the Git Terminal well, so I'd appreciate it if you could explain it in detail. git filter-branch --env-filter \ 'if [ $GIT_COMMIT = {MY_...
doc_23524678
The code im using is the following: library(leaflet) library(osrm) df = data.frame( com =c("A","B"), lon =c(-99.10200,-99.13542), lat =c(19.45163,19.48500) ) trips <- osrmTrip(df, returnclass="sf", overview = "full", osrm.profile = "car", #options = list(alternatives = 0) ) trip <- trips[[...
doc_23524679
public SparseMatrixNode(int row, int col, int value, SparseMatrixNode down, SparseMatrixNode across) { this.row = row; this.col = col; this.value = value; this.down = down; this.across = across; } My program creates the template sparse matrix like so: public SparseMatrix() { ...
doc_23524680
I searched and if I'm correct,it seems custom implementation of ICorsPolicyService is the way, not sure if this is the only way,but if it's then how can I register it in identity server? I created the class but I m not sure how to go further to make it work with identity server? A: In your ConfigureServices method of ...
doc_23524681
E.g if there is no network connection to persist something to a local database, would it be possible to persist the session in some local storage, or Browser Webstorage or some IndexedDB? And upon the opening of the next session, reload that state again into the store and continue from the session visit? A: Sure, you ...
doc_23524682
void word_transform(ifstream & infile) { infile("content.txt"); //etc } which gave me an error: Type 'ifstream' (aka 'basic_ifstream ') does not provide a call operator. Can you please me what's wrong? A: call operator is a function like operator()( params ) allowing to use the syntax myObject( params ). So...
doc_23524683
a b c | f(X) 0 0 0 | 0 0 0 1 | 1 0 1 0 | 2 0 1 1 | 3 0 2 0 | 4 0 2 1 | 5 1 0 0 | 6 1 0 1 | 7 1 1 0 | 8 1 1 1 | 9 1 2 0 | 10 1 2 1 | 11 This is easy when all dimensions are equal. Assume binary for example: f(a=1,b=0,c=1) = 1*2^2 + 0*2^1 + 1*2^0 = 5 Using this naively with varying dimensions we would get overlapping v...
doc_23524684
P <- matrix(c(0.8,0.2,0.5,0.5),2,2,byrow=TRUE) ev <- eigen(P) rvec <- ev$vectors lvec <- ginv(rvec) pi_eig <-lvec[1,]/sum(lvec[1,]) powers <- 0:20 upowers <- lapply(powers, function(k) P %^% k) A <- for (i in 1:20) {upowers[i]-pi_eig} I want to calculate different A from different powers of P minus the stationary dist...
doc_23524685
private void sendLog() { Toast.makeText(MainPage.this,"Sending Log",Toast.LENGTH_LONG).show(); final SharedPreferences account=getSharedPreferences("admins",MODE_PRIVATE); String interval=account.getString("lti", ""); int timeInterval=Integer.parseInt(interval); final List<String> loglist = new A...
doc_23524686
df <- structure( list(date1 = c("2021-06-28","2021-06-28","2021-06-28","2021-06-28","2021-06-28", "2021-06-28","2021-06-28","2021-06-28","2021-06-28"), date2 = c("2021-04-02","2021-04-03","2021-04-08","2021-04-09","2021-04-10","2021-06-30","2021-07-01","2021-07-02","2021-07-03")),...
doc_23524687
Session["Url"]= linkDetails.Url; the Url value is shown to be http://www.mnn.com/earth-matters/space/photos/10-places-on-earth-that-resemble-alien-planets/etosha-pan-namibia the exception is Object reference is not set an instance of the object A: If you use web service, you have to enable se...
doc_23524688
A: Here's a nice little method of getting a random entry: random_bg = ['bg1.png', 'bg2.png', 'bg3.png'].shuffle.first In Ruby 1.9, it's even easier: random_bg = ['bg1.png', 'bg2.png', 'bg3.png'].sample I'd put this in your ERB template - it's directly related to the html. A: There's no need for jQuery/Javascript to...
doc_23524689
Why can't I just add id="whatever" to the tag? I'm using a UIButton in xCode that when clicked, it injects javascript into a UIWebView. Inside that UIWebView is a H1 element that is on a website that I do not have access to to add <h1 id="whatever">. I hope it makes sense. A: document.getElementsByTagName('h1')[0].s...
doc_23524690
Are there any libraries to use? Is this possible on PHP? or how about javascript? On where I can specify how many rows to be included on each file? Thanks A: Yes it is possible to do that in PHP and with CSV files. You basically iterate over the large file and chunk each X rows, forwarding those rows to another file. ...
doc_23524691
Filesystem State 1024-blocks Used Avail Capacity Mounted on $ZPMON.DELETEMESTARTED 71686344 58788360 12897984 82% /deleteme In this file i want to read the 1st column and 5th column without using grep command i tried this command,but it shows istead of 5th coloumn it shows 6th column o...
doc_23524692
The Posts component makes a request for an array of sorted posts by date (DESC). Each posts has its comments (which come through another request). The problem I am facing. When I add a new item in the beginning of the posts array in order to keep it ordered and display the newest one, the entire component tree updates ...
doc_23524693
vf.showHide = function (trigger, target) { var $trigger = $(trigger), trigParent = $trigger.parent(), trigDataView = $trigger.data('view'), numShown = $trigger.data('showalways'), basketSubtotalElem = $('.subtotal .monthlyCost span.price, .subtotal .oneOffCost span.price, .subtotal l...
doc_23524694
$shop = array( array( question => "Q.1. What term describes hardware and software designed to help people with disabilities?", option1 => "Computer aided development", option2 => "Assistive technology", option3 => "Electronic learning products", ...
doc_23524695
const app=express(); ****** const passport=require('passport'); const LocalStrategy=require('passport-local').Strategy; //requiring user route const userRoutes=require('./routes/users'); //requiring user model const User=require('./models/usermodel'); dotenv.config({path:'./config.env'}); //middleware for...
doc_23524696
count = {} maxList = [] maxCount = 0 for nLabel in nLabels: if nLabel in count: count[nLabel] += 1 else: count[nLabel] = 1 #Check if the count is max if count[nLabel] > maxCount: maxCount = count[nLabel] maxList = [nLabel,] ...
doc_23524697
wordCount foreach(x => println("Word: " + x._1 + ", count: " + x._2)) // wordCount - is Map i.e. I declared the x variable. But I can't use magic _ symbol in this case: wordCount foreach(println("Word: " + _._1 + ", count: " + _._2)) // wordCount - is A: You should check this answer about placeholder syntax. Two u...
doc_23524698
If yes then i have two questions. * *Why they have different processes when default android processes are enough to perform necessary tasks. *Can some one provide me this lists of processes or give me a small idea about where to get these lists of processes as its always good to know about this kind of stuff if you...
doc_23524699
private void button1_Click(object sender, EventArgs e) { GeoCoderStatusCode status = gMapControl1.SetCurrentPositionByKeywords(textBox3.Text); if (status != GeoCoderStatusCode.G_GEO_SUCCESS) { MessageBox.Show("Geocoder can't find: '" + textBox3.Text + "', reason: " + status.T...