If I pass a value to a function doesn't it make a copy of the value so that if I change it within the function it doesn't change the original unless I instead pass its address? This is probably a stupid question, but I can't figure out why this function is changing the value of the list. void ar...
I have a VM running Ubuntu 14 and I downloaded Version: Luna Service Release 2 (4.4.2). I am running eclipse as root from my /opt/eclipse folder. After adding the install url http://e-p-i-c.sf.net/updates then during the installation of components the following error pops up. What is this er...
I want configure the use of proxy server in my tests. I want to bypass the proxy settings while I run my scripts locally. Currently since the proxy server is not reachable form the local host I am not able to run my scripts locally. Is there a way I can direct my scripts when to use the proxy set...
I've recently been tasked with upgrading a web page that makes use of several JS APIs so that the page will be compatible with current browsers. I've never updated API versions in anything before, so I'm wondering what is required to do it. Do I just change all the references to js.docoolstuff.co...
I built an app using Meteor and am deploying with Heroku. I checked my deployment log and noticed Error: MONGO_URL must be set in environment shows up quite often. I don't know what this means.. can someone help me? 2015-07-08T22:19:12.369347+00:00 heroku[web.1]: Starting process with command `n...
How can I call two functions from a single call in PHP? function 1() { // do stuff } function 2() { // do other stuff } Then I want to call those 2 functions from a single call (calling_functions_1_and_2($string)); How do I go about doing this?
I have a chats table that basically has three columns - user_to_id, user_from_id, and chat_msg. I want to list out all of the active chats for a certain user. I tried: chats = Chat.where(user_to_id: params[:user_id]).select(:user_from_id).distinct The issue with this is I only get chats in whi...
Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\Jamey\\AppData\\Local\\Temp\\pip-build-4xxi4hts\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\Jamey\AppData\L...
I am trying to read data in Python one way I do it is like this states = """ Alabama Alberta Alaska Arizona Arkansas Bob Tom Ted William """ states_list = [w.strip().lower() for w in states.splitlines() if w] Now ...
I am very new to Ruby and am trying to make a plugin for Redmine that has a list of 'tasks' that will need to be reorderable, similar to the stuff-to-do plugin. I noticed that stuff-to-do, also uses the sortable method from jquery-ui but the complexity of his code is making it hard for me to extr...
I am trying to extract coefficients from the glmnet procedure and I have two alternatives: fit=glmnet(x,y) coef1 = coef(fit) coef2 = as.matrix(fit$beta) The first alternative gives me the intercept, but not the second one. I'm a beginner in R, so I am probably missing something obvious. Thanks.
In javascript is there any way to have mod() modify a? what i want to do: function whatever(){ var a=0; mod(a); var amodded=a; } function mod(obj){ obj++ a=obj; } At the end of whatever() i want 'amodded' to be =1. Is there any way to do that without declaring 'a' outside of any and ...
I am wondering how to define a range in order for it to be define from C5 until the last value of the column. C5 is a constant but the end of the list isn't. Sub Merge() Worksheets("Sub").Range("C5").End(xlToLeft).Select.copy Worksheets("Master Worksheet").Range("A1:A23").PasteSpecial Paste:=x...
I m currently trying to change the style of my Panel like in the picture but i cant manipulate the css of every single item in the Panel. For an example, i tried to move the last textfield a little down from others and wanted to give a different width with style attribute, but somehow it doesn't ...
We are facing an issue where we see TCP backlogs gets exceeded than default value (100) on our MQ server running on Linux (Redhat) platform during high number of connection requests on MQ server. The ListenerBacklog is configured as 100 in qm.ini which is the default listener backlog value (maxim...
I'm working on a small PHP program which stores/retrieves information from a MySQL DB and have hit a roadblock in displaying images. I can get a single image to display and I can see all images returned in an array but don't know where to go from there. Some background info: My DB schema is pret...
I'm new to stackoverflow so my apologies if I misuse any of the guidelines. I am in the middle of making a ASP.Net website and I have run into a very specific problem where I am using ProcessRequest to try and retrieve multiple files. C# ASP.Net Code The variable files is not retreiving request...
I want to add a new column calculating the cumulative sum within one group. For example: df = pd.DataFrame({'group' : [2,2,3,3,5,5,7,7], 'number' :[3,4,5,6,0,1,2,3]}) result should be: group number cumsum 0 2 3 3 1 2 4 7 2 3 5 5 3 3 ...
I am trying to write following code, where I want $varPRE1 to be $var1 and $varPRE2 to be $var2 after preprocessor is evaluated, but it is not working. Is there a work around? #define PRE1 1 #define PRE2 2 my $var1 = 10; my $var2 = 20; print $varPRE1; print $varPRE2;
I am trying to trigger different views to appear when a notification is opened. Referring to the top answer of this post: Open Specific View when Opening App from Notification What happens if the user closes the app? When you post the notification inside didReceiveRemoteNotification, your view ...
I am trying to install the hep-mc library listed here: https://github.com/cschwan/hep-mc for use on compute using the instructions listed in the documentation here: https://github.com/cschwan/hep-mc#installation . To compile one of the example files, I typed this into the terminal: g++ -L/usr/l...
Let's say we have a string: String x = "a | b | c & d ^ e | f"; What I want is like this: a | b | c & d ^ e | f How can I achieve this by using x.split(regex)? namely what is the regex?
I get the idea of a control flow graph; it involves nodes that are basic blocks (sequences of operations that always occur), connected by edges that represent jumps. But how do you represent a subroutine call? If I have two functions like this: int tweedledee(void) { int x = 16; return...
I have a strange error that gets returned in my Spring MVC application. When I attempt to save a user via a @RestController method, the browser seems to interpret the action as a request to download an application. Some info about this issue: It is only returned when my application is deployed ...
I have two big numbers a and b of length around 10000, such that a <= b. Now, I have to find c = a / b, upto 10 places of decimal, how do I do it without loosing precision?
I have two QListWidgets. I want to be able to move items from widget 1 onto widget 2 and vice versa by dragging and dropping. It must work with MultiSelection mode. It must be a MoveAction NOT a copy action. A simple way to achieve this is to use: self.listWidget_2.setDragDropMode(QtWidgets.QAbs...
I'm having trouble identifying a javascript error that is happening in production only. The error is: Uncaught TypeError: (intermediate value)(...) is not a function With a link to line 22182 in file: https://d2wvl99qs6f2ce.cloudfront.net/js/358ee32eac3992e61f9fa13a0c55203d.js Clicking on th...
I'm using "XMLWriter" to get MySQL database output to XML file but the problem now I can't do that because the size of database is very large, it is bad if you are use to application because the app will take a long time to load the data only "XML file" then need time to load the picture if there...
I'm building a feature that has three circles inside of container that are next each other. Initially when I began building this feature I thought that I could just drop my circles into a flex container and they would all be good when I added media quires and resized the page. Much to my despis...
I have a url as follows: {anydomain}/my-app/test/b5/ I want to test that all the characters after my-app/ are as follows: test - allow everything for b5 - I am looking for a regex that only allows one number I have the following in place, but it fails: Pattern.compile("/(\\w()|-)+/(/^(?![0-9...
I really need help. Don't know how to fix this. I wanna load some constants from properties file. I think, that Catch with FileNotFoundException can be thrown only on the properties.load(). But IDE says that VK_MIN_ID = VK_MIN_ID_DEFAULT; VK_MAX_ID = VK_MAX_ID_DEFAULT; MAX_USERS_TO_PARSE_AT_ONCE...
I'm writing a script in MatLab and I need to execute a program (written in C) as one of the lines (it generates an output file). My current code is: !collect2.exe infile.csv <-- I want to be able to change this to a variable but I can't My question is, is there a way for me to either: A. ...
I am using a ListView in Xamarin Android to display a list of restaurants, and when one is clicked on I would like to navigate to a new activity. The activity for each is named using this convention: [restaurantName]Activity. I'm trying to use intents: protected override void OnListItemClic...
I'm trying to get a test suite up and running for a legacy app. Things were going fine until I ran into an object that inherits from a parent prototype. The test looks like this: var assert = require("assert"); var expect = require('chai').expect; var example = require('../js/views/ExampleView'...
I get the following error when trying to sum the values from a dictionary. I expect to get the sum (i.e. 15), but an error is thrown instead. Is this a bug? IPython QtConsole 3.1.0 Python 2.7.10 |Continuum Analytics, Inc.| (default, May 28 2015, 17:04:42) d = {'1': 1, '2': 2 , '3': 3, '4': 4...
I've been searching for a few weeks now, and I've just about given up. I have an XSLT script to output an XML file based on an XSD definition. My problem lies with this bit of code: <xsl:template match="/xs:schema/xs:element" name="element"> <xsl:param name="minOccurs" select="./@minOccurs"/>...
I'm trying to use MessagePack to serialize my objects, but whenever I try to run the serialization I'm getting an Unhandled Exception error. Here's my code: CSCDP_TCPClient.cs using System.Text; using System.Threading.Tasks; using System.Net.Sockets; using System.Diagnostics; using System.IO; ...
from a Wix installer package I am starting one of the installed programs at the end of the setup, according to http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html: <Property Id="WixShellExecTarget" Value="[#myapplication.exe]" /> <CustomAction ...
In Python, if I use this code: import random random.seed(123) print(random.random()) The first random number will always be 0.052363598850944326, since I'm giving it the same seed every time I run the program. JavaScript doesn't have a built-in way to use seeds. I've tried out a JavaScript sc...
I can load an image into a canvas element and resize it, but when I try to save it in a zip using JSZip the image is not resized. var loader = $(".load"), canvas = $(".holder"), ctx = canvas[0].getContext("2d"); function displayPreview(file) { var reader = new FileReader(); ...
I have an application with multiple views and the main navigation bar has a background defined in AppDelegate.m . I want one of these views to have different background. I've tried to embed the whole view in a navigation controller but with no luck. Also I've tried to change the background from ...
please help with syntax: __weak typeof (self) weakSelf = self; [self.audioFile getWaveformDataWithCompletionBlock:^(float **waveformData, int length) { [weakSelf.audioPlot updateBuffer:waveformData[0] withBufferSize:l...
I want to email crash info to myself from my android app using ACRA. Here is my code to try to make this happen. It has no errors. package com.boolbalabs.petlinx; import org.acra.ACRA; import org.acra.ReportingInteractionMode; import org.acra.annotation.ReportsCrashes; import andro...
I'm creating an item order list for a restaurrant. The goal is to set onClickListener to each button(+/-) in each row in the list so it can count how many items are ordered. Can anyone please help me with this code? i have managed to set a listener but it does not count the items properly when cl...
How to show all the list (how to use the messagebox to show the numbers under each other ) List<int> numbers =new List<int>(); numbers.Add(2); numbers.Add(4); numbers.Add(6); numbers.Add(8);
Introduction. (skip to the question please ;) There was a time when a program can do the things in a way I like her to do them. Some time passed, I have found that I can't do some of them any more. I hope there is a way still, though.. Maybe there are options in compiler, maybe in loader, maybe...
I am building a chat interface similar to iMessages. When the viewController loads I make a request to my datasource for a list of messages to initially display. I then setup a timer which makes a call to the datasource every 5 seconds to see if there are new messages. One I receive the list of ...
I am not able to determine the Openstack release running on my machine. I tried to match the output of nova package version with release naming site. But my nova version does not have a match. stack@Selm:~$ nova-manage --version 12.0.0 This package is not listed on following release site: h...
We are utilizing Azure ServiceBus queues to process high volumes of client requests. However, the OnMessage call seems to be a blocking call, however the blocking on this call is incredibly inconsistent. What I am attempting to accomplish is watch a queue on a permanent basis from a web service...
I've been doing some research for a best-practice for loading a directive template and assigning it to the document.body with only using one directive / template. I have a textbox, used for searching, and when the textbox is focussed an popup should appear. I know, this sounds familliar but I wa...
I am missing something here. When the row with the class one is clicked, I want to find only the closest row with the class two and then toggle (show/hide) it. $(".one").on('click', function() { $(this).find('.two').toggle(); }); <script src="https://ajax.googleapis.com/ajax/libs/jq...
I am trying to sort the list of list in python. I have written the following code: def sort(intervals): if intervals == [] : return return [] intervals.sort(key = lambda x:x.start) return intervals a = [[1,3],[8,10],[15,18],[2,6]] print(sort(a)) I am getting the following error:...
I have tried parsing with regex but not all XML files are being parsed!! Tag names are not predefined which means, solution should identify the start and end of XML tag it self Sample data goes like this: Random text Random text
I created a custom entity in Drupal 7 using Entity API. The custom entity represents a golf course. I used this tutorial: http://www.sitepoint.com/series/build-your-own-custom-entities-in-drupal/ Then I tried to add a custom theme, to do so I followed this: https://www.drupal.org/node/1238606 ...
Given the XAML below, is it possible to make an adjustment so that when either of the Expander items are expanded, the TextBlock content stretches vertically to fill the remaining space? (Note that this XAML is purposely simplified, the solution must satisfy this simple example and any data bound...
Hi I am wondering why I am getting this error saying it cannot find the symbol bindHour when I have it declared at the bottom of the page? Any help will be greatly appreciated, thank you very much in advance!! package com.dredaydesigns.stormy.adapters; import android.support.v7.widget.R...
When i VPN in remotely from home, i get a VPN network address: 10.200.150.15 I'm able to ping and reach 10.200.40.x, 10.200.30.x, and a few other networks / VLANs. however, I'm trying to access the ASA FW who address is 10.200.5.1. I can't ping it, can't ssh. can't ASDM. Is it because I'm m...
I have a form with an input box and hidden submit field: <form action=""> <input type="text"> <input type="submit" style="display:none;"> </form> I would like to make it so that when you click enter, the input box simply loses focus. How can I accomplish this?
I have a stored procedure which has several checks in them however the following section gives me problems with the execute immediate for example when I try to compile the procedure with the below statements it complains that table or view does not exist. ... ... ... EXECUTE IMMEDIATE 'CREATE ...
Im brand new to Ruby/ruby on rails. I added the code to my mydbs_controller.rb as instructed on the Rails tutorial def create @mydbs = Mydb.new(params[:mydb]) @mydb.save redirect_to @mydb end I run my database and come up with this error The controller-level respond_to' feature has been ext...
I'm writing my first app in which I need to update the number in a text view every second until a button is pressed. Using a handler seems to be impossible because the number is created and stored outside of the handler, but it can't be declared final because it needs to change. Thread.sleepalso ...
The typical way to include the connect assets file is != css("main") That is with .jade though. I am using handlebars and I have no clue how I can add the file? I am using node-sass as well.
I need to be able to debug the following console application to know if the messages are correctly deserialized or not. However, when I press F5 on visual studio, I can debug this line: string mensaje = message.GetBody(); but the following line seems is not executed, and the console APP closes...
I've been trying to parse this JSON data, but for some reason have not been able to. The code and JSON that I have are below. I want it to show each page in pages and print it to the console. The code works, it just doesn't actually process anything after the if let pages = JSON[] (or so it seems...
I'm currently using libpcap to sniff traffic in promiscuous mode int main() { // some stuff printf("Opening device: %s\n", devname.c_str()); handle = pcap_open_live(devname.c_str(), 65536 , 1 , 0 , errbuf); if (handle == NULL) { fprintf(stderr, "Couldn't open devi...
I'm trying to understand why the following is an error: class Foobar { public: static void do_something(); }; static void Foobar::do_something() {} // Error! int main() { Foobar::do_something(); } This errors with "error: cannot declare member function 'static void Foobar::do_something(...
Trying to do a translation of my MySQL DB to PHP. Here's the code: $sql = "SELECT Name, Price FROM utf WHERE Name LIKE 'K%'"; $result = $conn->query($sql); if ($result->num_rows > 0) { echo "<div class=\"CSSTableGenerator style=\"width:600px;height:150px;\"><table><tr><th>Name</th><th>Price<...
How would I do this? I understand I could write a complex function that parses through the array, but I'm wondering if anyone knows a sleeker method to do this? I have an array of dictionaries, each of which contains one key-value pair, the value being a string. I wish to sort the big array bas...
I have a table that contains data such as: Store,Product a, 1 a, 2 b, 3 b, 2 c, 3 c, 1 d, 1 d, 2 d, 3 I am trying to write a query that gives me the Replacement Store, so since store d sells all the product that st...
I have the following DataFrame df: S 2011-01-26 1 2011-01-27 0 2011-01-28 0 2011-01-29 0 2011-01-30 0 2011-01-31 0 2011-02-01 0 2011-02-02 0 2011-02-03 0 2011-02-04 0 2011-02-05 0 2011-02-06 0 2011-02-07 0 2011-0...
So I am in the process of making this rhythm game with canvas, all that it does up to this point is render the receivers (the point the blocks are going to collide with so the user can press the corresponding buttons and get points) and it renders the dancer animation. For some reason though afte...
I got caught in a long if chain, and now I want to go to the far left to begin a new one, but I don't want to the program to randomly end at the end of the if command. time.sleep(4) #Chain ending while checkpoint1 == 'yes': #CHECKPOINT 1 I'm a beginner... And this i...
so im trying to find a way of changing which view is displayed on top, without changing the view hierarchy in swift. I'm making a program that moves a graphic around the screen that you can interact with by dragging. It contains two circles, one smaller than the other. Lets call smaller circle S...
Everything is working, all I want is to decrypt the db column containing the credit card number from the database with the following example: $decp = $crypt->decrypt($encp); the row in question is: 'Number' => $row['cardNumber'], the entire code is: // get the cards $jsonresult = $conn->...
In QT you can emit signals and use slots to act upon them. Otherwise I have write lots of threads to wait for signals through global variables to act on. QT's signals and slots seem to be much more efficient. How to emit and receive signals in Objective-c like QT with signals and slots? thx
When accessing my django site, it is attempting to load a PNG image as a string. What is causing this error? The exact error and traceback is as follows: UnicodeDecodeError at /home/ 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte Request Method: GET Request URL: http:/...
So I have lot of data currently in excel spreadsheets. I need to graph this through python. I know how to read data from an excel file using xlrd and I know how to graph in python using matplotlib. Basically my data looks has columns of x coordinates, y coordinates, and positive and negative y er...
I am working on a Volt app that needs to compare times. Using a model that looks like this: class Punchcard < Volt::Model field :punchtime end I can save instances of the model with a Time object for punchtime and see that they are persisted into MongoDB as ISODate() objects. All well so far...
In CTCI, there they give a formula for the minimum depth for a binary tree and I am confused by it. Here is the code: public static int minDepth(TreeNode root) { if (root == null) { return 0; } return 1 + Math.min(minDepth(root.left), minDepth(root.right));...
When shelled into my Cassandra instance via cqlsh, I am able to create a CF using CREATE COLUMNFAMILY IF NOT EXISTS sandbox.foo ( created TIMESTAMP, updated TIMESTAMP, PRIMARY KEY (created) ) ; but when I run CREATE COLUMNFAMILY IF NOT EXISTS sandbox.6f4922f45568161a8 (...
It's been all the morning having this situation and I'm going crazy with it. I have 2 files, a.html and b.html, I created a Jekyll tag with the name render_menu_options, the parent_name parameter returns name of a subdirectory of the actual menu, the parent_name value is passed in the route_filt...
I am interested in how the Cassandra production DBA's processes change when using Cassandra and performing many releases over a year. During the releases, columns in tables would change frequently and so would the number of Cassandra tables, as new features and queries are supported. In the rel...
I have two highcharts charts, one with only two columns that I'd like displayed on mobile devices, and one with several that I feel is OK for tablets and desktops. Problem is, highcharts doesn't seem to see it that way. Using hidden-xs and visible-xs respectively to display @chart and @chart_mob...
I have 2 for loops creating an object: function newImage(){ image = {}; var temp = {} for(i=0;i!=250;i++){ temp[i] = {}; } image = temp; for(i=0;i!=250;i++){ image[i] = temp; } } This should create an object with 250 values, each being an object that...
I am trying to generate and scaled image for thumbnails, scaling image has no problem and when use image_save($_image) // Works Fine (using the same folder an replacing) this code has not problem, the problem starts when I tryied to save images en other destination folder using destination par...
I'm using NetSDK SDK for recognizing my IP Camera (Maxron MIC-BR100) locally. this SDK was the only free SDK I found working properly with my IP Camera. This is the play button code: private void btnStartRealPlay_Click(object sender, EventArgs e) { if (pLoginID != 0) { ...
In the following program I need to pass an argument to a function using the &-operator although I expect it to be a pointer and the function is expecting a pointer. Why do I need to do this? The program implements a simple stack using linked lists and incomplete types in C. Here are the three ne...
« first day (616 days earlier) ← previous day next day → last day (458 days later) »