bot_bot

0

votes
0

answer
2

views

Cannot expose internet-facing NLB forwarding traffic to private instance to internet

I have configured a cloud with following configuration VPC with a public and private subnet in two availability zones. Public subnet has an internet gateway and private subnet has a NAT gateway configured An internet-facing Network Load Balancer allowing TCP traffic configured in both availability z...
bot
1

votes
1

answer
63

views

How to read error on setRequestHeader?

I'm using xhr.setRequestHeader to set up an authentication with beforeSend in jQuery. The code is like this: beforeSend: function (xhr) { xhr.setRequestHeader('Authorization', 'Basic ' + btoa(app.username + ':' + app.password)); } Nothing fancy here, but let's say the password provided is incorrect,...
Pierre Le Bot
1

votes
1

answer
71

views

Concatenate in C# Repository

I'm trying to concatenate the value of scoreField but I'm getting null value. Here's my code: public List GetPlainBrgMetricForSortBy(long programID) { return _context.metrics .Where(m => m.programLOBID == programID) .Select(m => new PlainBrgMetric { label = m.label, scoreField = 's' + m.metrictNumb...
Bot Sundi
1

votes
1

answer
60

views

Is it possible to set the background color of an image (HTML email) when displayed in Outlook?

I have a service that emails customers to update them about certain events. The service builds the emails and sends them to clients after these events occur. The templates render perfectly well on Thunderbird, Gmail and other email clients; but they don't work on outlook. Here's a portion of the ma...
bot_bot
1

votes
1

answer
27

views

<textarea> element is empty after calling jQuery().wrapInner

I have a textarea and I am trying to wrap the contents with a div. the HTML Hello World! the jQuery jQuery(document).ready(function( $ ){ $('#wprsspostprepend').wrapInner(''); }); When I run this code it leaves the textarea blank even if there was content, I am at a loss as to what is wrong.
Top-Bot
1

votes
1

answer
54

views

Unable to get value of form with javascript

I am trying to get the value of a form from my javascript, but the value continues to return undefined as if the input does not exist. Here is the html %@ Language='VBScript' CodePage=65001 %> ... console.log(document.form1.plan.value); var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1662021...
Top-Bot
1

votes
2

answer
1.5k

views

Fragment is not scrolling inside viewpager

I am using ViewPager to show 4 different fragments. The component tree of my activity: |_FrameLayout |_ LinearLayout (Vertical) Toolbar ViewPager TabLayout RelativeLayout And this is the component tree of my first fragment: ScrollView |_LinearLayout(Vertical) LinearLayout(Horizontal)...
noob-Sci-Bot
1

votes
1

answer
263

views

Is it possible to validate a downloaded file in Jmeter?

I have a REST service that I'm currently testing in J-Meter. I have a number of endpoints that I'm currently testing, they do the following: Allow the upload of files to the service Return a list of available files Allow the download of files from the list I have tests in J-Meter that test all...
bot_bot
1

votes
2

answer
336

views

Not able to get responses from luis.ai to bot framework, getting error instead

I started working on bot framework in node.js and used luis.ai for my nlp. Referring the documentation on azure for their botframework for node.js, I did the code changes in app.js. However I am getting the following error when running the code in online editor. [info] Restarting server... [info] Cl...
dk_bot
1

votes
1

answer
25

views

SQL - I need to use the where keyword but it throws errors

I've been practicing SQL online and I'm stuck on this problem. I need to use the WHERE keyword but it doesn't include the null value if I use it. When I don't use it, it throws an error for incorrect number of rows. Here's my code: SELECT categories.name, SUM(order_items.price) AS revenue FROM categ...
I am not a bot
0

votes
0

answer
5

views

Ajax request: undefined

Hello there i wanted to request an api with ajax. The api has plain json (what i thought) now i set up an ajax request in javascript but i get an undefined error for the variables.I think i know the problem but I dont know an answer yet. document.getElementById('button').addEventListener('click', lo...
bot_diyar
1

votes
1

answer
655

views

tinymce editor getContent null in Wordpress

I am trying to use the getContent feature of the Tinymce editor in WordPress admin area but to no avail. Here is a working pen of what I want to do https://codepen.io/anon/pen/oWxjyM?editors=1111 HTML

To give is good

JS jQuery(document).ready(function() { $('#wprsspostprepend').addClass('prep...
Top-Bot
1

votes
1

answer
40

views

Is there an advantage to having individual endpoints over a single endpoint with a path variable?

If for example, I have multiple types of electronic devices requesting large files is there any advantage (apart from readability and neatness) of having individual endpoints (or controllers) per device type, like this: @RequestMapping(value = '/device/tablet', method = GET) public List getTabletF...
bot_bot
1

votes
1

answer
38

views

When using MongoDB aggregation - How to filter out results with no aggregated children?

Trying to wrap my head around aggregation features and having trouble figuring out how can I filter out results with no aggregated children? lets say I have things: { _id: abc1, thingColor: 'green' } { _id: abc2, thingColor: 'red' } { _id: abc3, thingColor: 'amazing' } and I have birds: { _id: 1,...
Blue Bot
1

votes
1

answer
1.4k

views

fetchRequestFromTemplateWithName variables

I'm using Xcode 4.2.1 and trying to use a variable. I understand in xcode 4 you need to set the variable with $variable. I have in Xcode for my fetch request the variable as $currDate and my code as NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@'YYYYM...
Bot
1

votes
2

answer
1.5k

views

How to display count of records in view in asp.net MVC3?

Hi guyz I have this scenario.. I have a looped table of different class(Class Name) in my view... My problem is I want to count the number of students that are present and absent.. where am I suppose to have the counting? Is it in the view? cotroller? or model? and how am I going do that? I'm quit...
bot
1

votes
1

answer
1.4k

views

Add empty section to NSFetchedResultsController

I am making a view just like the iPhone Calendar ListView. I am using core data and getting appointments and grouping them by date. However just like in the iPhone listview I need to add a blank section for today even if there are no appointments. I cannot figure out how to do this for a section wit...
Bot
1

votes
1

answer
987

views

Hide / show checkboxes in jquerymobile controlgroup

I have a controlgroup checkbox for jQueryMobile. I want to hide certain checkboxes depending on a previous selection of a . However if it happens to be the last or first element of the control group, the checkbox border then looks weird. How would I get around this, and after the hide, have it show...
Bot
1

votes
1

answer
574

views

Namespace not found only when trying to build the app (Unity)

I'm currently developing an app for android. In my code, I use the namespace UnityEngine.XR.WSA.WebCam. When I'm launching the app on the editor, I have no errors, but when I try to build this to send it to my phone, I get the following one : The type or namespace name 'WebCam' does not exist in th...
Straw Bot
1

votes
1

answer
1.4k

views

Why is this canvas animation running choppy?

I think I'm reloading the image too many times or there's an error in my loops, but this is my first canvas project, so I'm not sure how to handle calls and methods. Anybody mind giving me a hand or explaining a bit? BTW; I need for of these with different patterns on the site, hence the vectors. I'...
serv-bot 22
1

votes
2

answer
5.9k

views

How to remove the Activity title from Action Bar Sherlock without losing it from the 'RecentApps' chooser?

I am having problems trying to remove the Activity title text from my Action Bar Sherlock. I have spent(wasted) a lot of time trying to find a solution and just cannot make this work. I have a Splash Activity on which I go full screen. But just before the Splash Activity appears, a screen appears (f...
Bot
2

votes
1

answer
52

views

How can I sort a list of Java objects based on parameters that a user selects from a drop down menu?

I understand how to build and use Comparator for lists of objects based on multiple attributes of those objects. However, I'm not sure how to do that efficiently by giving the user the choice of which parameters to sort by. This is a GWT UI. For example, I have two drop-down menus with 11 parameter...
bot_bot
1

votes
1

answer
1.5k

views

Using booktabs with Rmarkdown

Booktabs and xtable fail with Rmarkdown using RStudio. The Tufte template works fine, but using a standard .Rmd file fails with the error message: ! Undefined control sequence. l.133 \toprule pandoc.exe: Error producing PDF from TeX source Error: pandoc document conversion failed with error 43 A r...
r.bot
1

votes
2

answer
3.5k

views

Converting integer Month to its name

Hi guys I'm currently doing a Blog Archive for my blog. I was able to call the list of blog by Year and Month but my problem is that my Month is displayed in integer. This image will show it I created a ArchiveRepository public IQueryable AchiveList() { var ac = from Post in db.Posts group Post by...
bot
1

votes
1

answer
5k

views

Dynamically adding prepopulated nested forms using cocoon and rails3-jquery-autocomplete

Thanks for your time. I am working on rails 3.2 and I am using gems simple_form, cocoon, and rails3-jquery-autocomplete. I have following models Machine, Part, PartUsage, MachineCosting and PartCosting Machine and Part models with many-to-many association. class Machine < ActiveRecord::Base attr_acc...
Bot
2

votes
1

answer
223

views

Can't generate JWT client with Google's node.js client library

I'm trying to generate an access token via a JWT client using Google's node.js client library as mentioned here. Here's the code snippet I'm following: var google = require('googleapis'); // Load the service account key JSON file. var serviceAccount = require('path/to/serviceAccountKey.json'); // S...
not_a_bot
6

votes
1

answer
1.7k

views

Visual Composer attach media file needed

Do I need to create new param type since there is no 'attach_file'-type in https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524332#vc_map()-Availabletypevalues How come this kind of element is missing? What I need is 'Attach file'-button to backend.
T. Bot
1

votes
2

answer
943

views

How to add one more child to a has_many association and run call backs in rails

I have two models Invoice and Shipment. Invoice has_many shipments and a shipment belongs_to a Invoice. Here is what i am trying to do. Create a new shipment. new_shipment = Shipment.create! (params) Check if a invoice already exists for the contract of this shipment. invoice = Invoice.find_by_ref_...
Bot
1

votes
2

answer
2.9k

views

Nested GET parameters for a HTTP API

I was trying to use python-requests to use a certain API. I have tried: import requests data = ? r = requests.get('http://localhost:8777/v2/meters/instance', params=data) The query that I would like to build is as below: http://localhost:8777/v2/meters/instance?q.field=project_id&q.value=s56464dsf63...
Django Bot
1

votes
2

answer
35

views

Repeating output of an array

$timein_out = $this->time_model->get_timein_out($this->input->get('i')); $total_diff= array(); $hours = array(); $mins =array(); foreach($timein_out as $timetest) { $total_diff[] = strtotime($timetest['Time_out']) - strtotime($timetest['Time_in']); for($key=0;$key
bot
2

votes
1

answer
990

views

Which ppi is correct in iOS4 images (normal and high res)

I want to add high res images in my iOS4 app. I already read this http://developer.apple.com/iphone/library/documentation/iphone/conceptual/iphoneosprogrammingguide/SupportingResolutionIndependence/SupportingResolutionIndependence.html#//apple_ref/doc/uid/TP40007072-CH10-SW2 and a lot of other pages...
Walter Bot
2

votes
2

answer
1.1k

views

Objective-C: Convert minutes to time

I'm having an issue converting minutes since midnight to a correct time. It works fine until i reach noon. At which point the time becomes 0:45AM and anything after noon is blank. Am I missing something in my format? NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setD...
Bot
3

votes
2

answer
1.9k

views

Getting `write too long` error when trying to create tar.gz file from file and directories

So I'm trying to crate a tar.gz file file from multiple directories and files. Something with the same usage as: tar -cvzf sometarfile.tar.gz somedir/ someotherdir/ somefile.json somefile.xml Assuming the directories have other directories inside of them. I have this as an input: paths := []string{...
Blue Bot
3

votes
3

answer
2.3k

views

How to highlight the first row of RecyclerView by default and then remove highlight as and when other rows are selected?

I am trying to load a list in RecyclerView and show the first row of the list as selected. I have achieved it using the following code: @Override public void onBindViewHolder(NavigationDrawerAdapter.ViewHolder holder, final int position) { if (!mNavClassrooms.get(position).equals('')) { holder.mText...
Bot
21

votes
10

answer
9.1k

views

Why would you declare an Interface and then instantiate an object with it in Java?

A friend and I are studying Java. We were looking at interfaces today and we got into a bit of an discussion about how interfaces are used. The example code my friend showed me contained this: IVehicle modeOfTransport1 = new Car(); IVehicle modeOfTransport2 = new Bike(); Where IVehicle is an interf...
bot_bot
5

votes
2

answer
10.5k

views

iOS: Make a circle with background color like the iPhone calendar list

I'm trying to add a circle to the left on my table cells however can't figure out the best way to do it. I tried adding CGContextRef context= UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor); CGContextSetAlpha(context, 0.5); CGContextFillEllipseInRec...
Bot
5

votes
3

answer
5k

views

Error : View android.widget.ListView is not a sliding drawer

I am using NavigationDrawer in my Android app, I have made my own custom layouts XML file and their adapters also but When I run my program then my application crash with below logs , I could not trace the reason why it so, Any suggestion ? activity_main.xml MainActivity.java public class MainActivi...
Bot
1

votes
1

answer
1k

views

window.open not working in IE

Apparently, this call to window.open is not valid under Internet Explorer. The Javascript code on my site is not running, I would assume it is due to that error. The line it tells me the error is on, is the call to window.open, apparently an argument is not valid there. $('.objeto').click( functio...
serv-bot 22
4

votes
1

answer
37

views

Upload generic binary files to GDrive using API

I would like to upload generic binary files (to be specific .root files, output of ROOT by CERN) to Google Drive using Python 3.6 and Google Drive API v3. If I try my usual code: FILES = ((filename, None) for filename in filelist) for filename, mimeType in FILES: metadata = {'name': filename} if mim...
Bot Unleashed
4

votes
1

answer
53

views

Should I have a lock on a file when I want to delete it?

I have a bunch of files on a local file system. My server will serve those files. In some cases the server will receive an instruction to delete a file. At the moment I'm using FileChannel.lock() to acquire a lock on the file, this is mostly to make sure that some other process isn't editing the fi...
bot_bot

View additional