> test test test test test test test test test test
I am trying to count list elements values in two dicts. When in both Dicts the keys exists, it works, if i remove a key, it will throw an error. Is there another convenient way of combining dicts? This works: from collections import Counter B = Counter({'a':[3], 'b':[4], 'c':[5]}) C = Counter(...
I have been trying to work out why my css wasn't working when I had mydiv .myclass { font-size: 24px !important; } and I just happened to try mydiv.myclass { font-size: 24px !important; } and the formatting worked. What's the difference between the two?
Issue I'm using json data from jira to render a project's burndown chart. For reasons I won't go into, I can't use the built-in Jira Agile charts. I'm using chartist.js to render the burndown but I'm running into troubles and would appreciate a chartist.js user's input. I've attached an image o...
Is it possible with JavaFX to create a reference to a binary file from the local file system and pass this reference to HTML/Javascript that is embedded in the JavaFX container / rendered by the WebEngine? Use case could be an image gallery that displays local images within HTML content which wa...
Using example from Andrew Ng's class (finding parameters for Linear Regression using normal equation): With Python: X = np.array([[1, 2104, 5, 1, 45], [1, 1416, 3, 2, 40], [1, 1534, 3, 2, 30], [1, 852, 2, 1, 36]]) y = np.array([460, 232, 315, 178]).T θ = ((np.linalg.inv(X.T.dot(X))).dot(X.T)).d...
Here's my code if "value" not in dictionary(): do something else: do something else I get the error 'TypeError: 'dict' object is not callable. I've tried changing the first line to if dictionary["value"]: But get a different error. Where am I going wrong here?
After almost 2 days of reading through the Facebook docs, I still can't figure out why oh why my code for simply publishing a game victory does not work. If I use Facebook Sample's object, it does work (uncommented), but once I use the object, the app crashes and opens the browser (in simulator) ...
I'd like to raise a Python-standard exception when an HTTP response code from querying an API is not 200, but what specific exception should I use? For now I raise an OSError: if response.status_code != 200: raise OSError("Response " + str(response.status_code) + ": " + respo...
<iron-pages> <template is="dom-repeat" items="{{fruit_categories}}" as="category"> <div> <template is="dom-repeat" items="{{all_fruits}}" as="fruit" filter="isThisFruitInTheRightCategory"> <!-- Some more stuff --> <span>...
My problem is that I can connect to database and in my application everything works great and when I update a field, the changes are shown in the application but when I close and reopen the application no changes where saved, my codes are like below. ps: my database is inside my application. va...
UPDATE: ADJUST THE INTEGER BEFORE DELETING THE CELL! Why does the following crash on swipe to delete? My tableview number of rows depends on a NSInteger; so I don't understand what the problem is here. By adjusting this integer, haven't I adjusted the datasource? #import "sendWithQuestionOption...
OK, so basically I have a lot of questions, and I'm hoping you guys, the experts, can possibly help me. 1) How do I connect to a video game's server through another software/website. For instance, FUTHead (a very popular FIFA website) "connects" to the live market of player's prices and when pri...
I am wondering if this is a bad practice and if there is a better solution(since there always is!) My PHP app has a login that stores the user id/user name/etc in a session, then i create a var in my function like so; //Example user_id: AbCe3496cdA51 $sessionSelectCustomer = $_SES...
I need to output data to a CSV file from Java, but in that csv file I hope to create multiple sheets so that data can be organized in a better way. After some googling, it seems this is not possible. A CSV file can only receive one-sheet data. Is this true? If yes, what would be the options? Tha...
I want to create a function, when user scroll down to the middle, the menu will have a class 'sticky', when the div has class 'sticky', I want to append a div. The issue is that it will keep append the div when I scroll. Second issue is that, when I scroll back to the top, the the append sticky s...
I've been doing tons of programming challenges and have lately encountered this problem: how to delete a value from an array and then shrink the array? I know how to tackle the problem by using the Arraylist and its methods but I'd like to know how to do the problem from scratch by using the basi...
So i have the following code string entity2; entity2 = DDLCrew.SelectedItem.Text.ToString(); switch (entity2) { case "Maintenance": LBCrewID.Text = "8"; LBLabor.Text = "M"; break; case "Preventive Maintenance": ...
I am trying to compose an httr::GET query where I must use a bracketed (array) query where the url resembles: #target = "http://example.com?abc[]=123" This strategy does not seem to work: baseurl = "http://example.com" qy = list(abc="123") httr::GET(baseurl,query=qy) R complains about i...
Okay, so I'm coming back to web development as a whole after a pretty long break and am a bit rusty; I'm working on some of my older projects and for one of them I am creating a message system. I'm a bit lost as to how I need to proceed. public function loadMessages() { $UAC_base = new ...
During construction of one of the View models for a Windows Phone 8.1 WinRT application, I have a call to DispatcherHelper.CheckBeginInvokeOnUI I initialize DispatcherHelper during runtime at App.xaml.cs OnLauched event handler, but during design time this initialization is not done so when I ca...
So i am handling a multiple file upload on my client side, where my html looks like the following form(method='post', enctype='multipart/form-data')#createReportForm input(type='file', multiple='multiple', accept='image/png, image/gif, image/jpeg, image/jpg', name='uploadImages', data-max-siz...
I'm trying to implement extension to accommodate drop-in UI of braintree when customer selects Braintree as a payment method. If I add braintree js code into _gateway.html.erb then all the other payment methods stop working. If I select any other method except braintree and click "Save and contin...
I have to read a txt file (using pure C language) that have some characters like "ã, é, í, ç, ê" and I cant. Already tried to use setlocale(LC_ALL, ""); My pc locale is portuguese_brazil.1252 so it was suppose to work. When I use the setlocale and then I do printf("á, ã, ê, ç"); it works, but wh...
Converting from Swing to FX here. We have some CheckBoxes where the Label appears on the left side of the CheckBox. We are accomplishing this by calling setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); The problem is that in some GridPanes, we'll have a Label in column 0 with a Node in col...
I'm trying to change the proxy settings on OSX (10.9 and beyond) programatically. The only solutions I've found so far seem to involve setting the proxy settings individually on each interface. For completeness, they also seem to implicitly involve monitoring interfaces coming and going, so tha...
I am quite new to javascript, I often find the need to walk through JS codes line by line to get better understanding how the code works. But manully setting breakpoints for each line in the 'source' panel of chrome is just too time-consuming, is there a way to do this automatically? In fact, i...
In polymer 0.5, this.templateInstance.model provided a way of accessing properties defined in the scope of an encompassing is="auto-binding" (or any other) template of this element. Now, in polymer 1.0 what is the equivalent way of accessing properties of the encompassing is="dom-bind" (or any o...
In all of my iOS application I use this approach to respect MCV, I want to be sure that my implementation is correct and respects the best practices and the MVC design pattern : Singleton of AFNetworking acting as API for network calls: MyAPI.h : #import "AFHTTPSessionManager.h" #import "AFNe...
My problem is basically this: https://issues.apache.org/jira/browse/CB-5115 https://bugs.dojotoolkit.org/ticket/17505 When I tap on a textbox that is in the bottom of the screen, the soft keyboard pops up but I lose focus on the textbox. If there's anything below it, it works but it's not my c...
I am send serial data from the Arduino via ble to an Android App. What would be the most efficient way to send (from Arduino) and receive (to Android) this data. One idea is to transmit the data from the Arduino using the Serial.print in a CSV format. Serial.print(speedValue); Serial.print("...
I have an app where I am changing my old implementation of ActionBar to ToolBar. In order to add a ToolBar I need to use Theme.AppCompat.Light.NoActionBar as my base theme so that later on I can add ToolBar as a supported action bar in my code. However this style/theme is not available in v7_appC...
Let's say we have a function, x_add: def x_add(x,y): k = x + y return k And I want a variable to hold the arguments for x,y: p = (2,4) Then I want to perform the funciton with this variable as the argument: x_add(p) Resulting in: TypeError: x_add() takes exactly 2 arguments (1 g...
I'm working on combining two excel worksheets. Before I start, I'd like to mention that I also have mysql workbench, so I'm open to working on this issue in either sql or vba (I should learn both). I'm working with .bed files, which are lists of genomic coordinates. In short, the data is indexed ...
Im new to android and I while selecting the compile with option while creating the android project i only get an option for 5.1.1. how do get lower api versions?
How do you center zurb foundation table? I tried putting a text-center class on the table itself and also putting it in div tags and it won't work. This is what I tried <table class="text-center"> <thead> <tr> <th width="300">Profit Share
I'm getting this error Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) My code is <?php include('db_connect.php'); $sql = mysql_query("SELECT * FROM products"); $numberofRows = mys...
I am trying to integrate angular with Laravel 5 and can't get the routes to show content from pages other then the index file. It is not picking up the route under .when() as I can change the templateURL and it has no effect. The files directory is as follows public_html --views app.js App.js...
I want to use a pagination to custom post in a custom pages.I have custom-posts.php page where i write the code <?php function designs_theme_custom_post() { register_post_type( 'logo-portflio', array( 'description' => 'logo-portflio Post Type', 'show_ui' => ...
I'm trying to uninstall a program using C# via Visual Studio and possibly CMD. I made several attempts but could not getting anything to go. Attempt #1: RegistryKey localMachine = Registry.LocalMachine; string productsRoot = @"C:\Program Files(x86)\Microsoft\XML"; Regist...
I'm new to ReactiveCocoa and I'm trying to create a Signal from two async requests. That works fine when I try to catch next events inside my viewModel, but when I try to bind this signal in my view, it crashs. My viewModel has these signals: @property (nonatomic, strong) RACSignal *combineSi...
Say I have 10 dev dependencies and 10 production dependencies. How do I determine what should be the minimum and max node versions a user needs to download/clone my node app and run it without any problem based on my dependencies? How would I automate by going into my nested (1st level, 2nd leve...
under source of curl php working only in vbulletin forum but others sites not working, I want how to make it work on the site clixsense.com login("site.com/login.php", "login=user®ister=0&password=56968681&remember=1&cookie_check=1&redirect=%2F&_xfToken="); echo grab_page("site.com/page"); f...
I'm learning how to create functions, and I don't know what I'm doing wrong here. Could someone explain it to me please? I'm not using strip_tags(), why it's getting me this error? I don't need it to return, I just to need to update database if $xp is bigger than $row['basenumber'] Thank you! ...
I am trying to highlight my datagridview rows that have items pass their return date. I have a column name "Reservation_Return_Date" in my datagridview. The format of the text is 06/10/2015. If the current date is greater than "Reservation_Return_Date", then the row is highlighted. Below i...
On android there are two methods to run shell commands either using java or using jni. I was wondering if it is more efficient to run shell commands on one or the other. Java runtime.exec("su"); Jni system("su"); Though I did hear that Jni doesn't accept multiple commands which might be a...
I've got a very annoying problem. By clicking the "Update" button I always get the same result - only the very last element is being edited. Unfortunately I can't find the solution. Thanks for your help. This is the view part: <form id="edit-action" enctype="multipart/form-data" action="<?php e...
I'm trying to implement in-app billing using Android, but I'm getting a weird error and I can't find anyone online with a similar problem. I've done the following: Uploaded APK with billing permission to developer console as alpha build. Added Google group to test, with my personal gmail accou...
I am trying to do the following and I am wondering if that is possible in MySQL: CREATE PROCEDURE `sp_test`( ulon int(4), usrname varchar(20), usrst varchar(20), usrdt varchar(10) ) BEGIN DECLARE bid int(11); START TRANSACTION; SELECT t_bid INTO bid FROM generalb WHERE dt=usrdt; INS...
I have a UITableView where selecting a row trigger an MPMoviePlayerController with a video. I'm setting the size to 0, so it's invisible. Now I'd like to make the hiding animation nicer, by having it converge on the cell that was selected.
Can someone explain how I can end the program after hitting the 'capacity exceeded' message without using a break or system.exit, but continue to prompt for 'leaving' and 'entering' if the message is not reached? Also, for the 'capacity exceeded' message it also displays the totalPeople. tota...
I need a CMS for make a Manga reader, so I bought PHP Manga: http://codecanyon.net/item/php-manga-manga-reader-website-solution/full_screen_preview/10102963 The problem is that manga images are not uploaded in order. For example, If I select and upload images (or pages) 1, 2, 3... He upload the ...
I'm using the notification API for my project to show browser notifications where each notification has a unique tag (ID), but I can't seem to find a way to close or hide the notification by the tag name, without calling the close function on the object, since it might be closed with other pages ...
Done this a few times before, but something is wrong this time. Trying to create a popup. As you can guess, initially, it's hidden. It does show up on click, but when i try to close it, nothing happens. Also, when i try to change styles to display:none in developer tools, it switches back to disp...
public class StudentNames : INotifyPropertyChanged { string firstname string surname public string FirstName { get { return firstname; } set { if (firstname != value) { firstname = value; ...
I am trying to build a springboot project I built with Spring Tools Suite. I get the following error when I execute $mvn spring-boot:run Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plug...
I'm trying to split long strings into 2 seperate pieces depending on varying word counts (some strings i would like split at 2 words, maybe other ones at 4, etc.) so that I can wrap the second split with a tag. For example: <?php $string = 'A long title is not great for the world to read";<?php
I'm getting a 500 (Internal Server Error) when I try to run $.ajax({ xhr: function() { var xhr = new window.XMLHttpRequest(); return xhr; }, type: 'POST', url: '@Url.Action("MyAction","MyController")', data: fi, contentType: "application/json; charset=utf-8", dataType: "json", // d…
I have four text box of max lenght 4 User can enter ABC5 12T4 45R7 78RT however nd if user copy complete 16 digit i.e ABC512T445R778RT and paste in first text box remaining text should get added in 2nd, 3rd and fourth text box
I want to represent the "nature" of a character (letter, number, symbol, etc.). My first idea was to represent these categories via int values, I mean: final int DATA_TYPE; // 0: Letter; 1: Number; 2: Symbol; ... My question is: Is this a good practice? I think the code is not gonna be too rea...
I did a code like this: public static double myPow(double x, int n){ if(n==0) return 1; double t = myPow(x, n/2); if(n % 2 != 0){ if(n < 0){ return (1 / t * t * x); } else { return t * t * x; } } else { return t * t; } }...
Perhaps I am overlooking something, but I cannot get this to work. Sending mail with php via a form. run some validation on the fields then proceed with the php email. I can't get special characters to show up ( ', ", <, >, &, etc.). If I do $headers .= "Content-type: text/plain; charset=ut...
I can load a file using a .load() on an element that is in the HTML like this: $("#test").load("/relative/link/here.svg); The issue is that if I now want to load the html into a newly created element that I made with var cont = document.getElementById("test"); var newElement = document.create...
I have setup a local Kurento MediaServer with Docker and tested the provided application locally on my home network. But at the work it doesn't work the clients can reach the web apps but the mediaserver IP-address is not disclosed to the outside i think. How i can deploy the provided mediaserver...
I've several objects that can be tagged, so the model is type Content = { ... tags : list(int) ... } How can I avoid loading all the records from MongoDB to check if the content is tagged by all the tags from a given list (AND logic)? or at list one of the tags of the given list (OR l...
Hello good afternoon I have a problem when wanting to run a cas server as oauth server, I followed all the steps of the source page to configure, but, I have problems at redirect because it does not. It logs and validates authentication with cas but the redirect to origin (client) doesn't work, s...
Is it possible to override my authInterceptor on a per service basis? What I'm trying to accomplish: I'm using a JWT for my own api, but occasionally I'm using Google Apis and need to reset my Authorization header to my google auth token rather than my local auth token. Here's what I have so...
Currently trying to check if three values, that I just converted from Strings to doubles, are nil from the UITextFields aValue, bValue, and cValue. I don't get a compile error from these variables until the if statement at the bottom of the code block (shown below) where it causes a compile er...
I am creating an app that creates .pkpass files. The file gets downloaded properly on Android by scanning the link from a QR code and it also works on iPhone if I click on the link from the browser OR scan it with an external QRCode Scanner. But when I try to scan the QR from the Passbook app's i...
I add a pin where a user touches with this code: func addPin(tap: UITapGestureRecognizer) { if (tap.state == UIGestureRecognizerState.Ended) { var coordinate = mapView.convertPoint(tap.locationInView(mapView), toCoordinateFromView: mapView) let address = address...
I have searched Stackoverflow for a specific answer to this question, but I am afraid that the formatting of the file in question makes finding a solution particularly difficult. The file I want to search looks like: Initial: 15.7900000000000 15.7900000000000 15.790000000000...
I am new to programming and I am struggling to find a solution for what I am trying to accomplish. I have two csv files. 'asicrawlconcat.csv' contains current metadata information from a website. The 'asiconcat.csv' contains metadata information that needs to be or has been uploaded to said webs...
I need to add in my configuration the relevant property list give the the proper id i.e. 38 which would be for the EU countries and then use them as restriction in some part of the code. I have a static number and the pseudocode is the following FLAVOR_GLOBAL = 1, FLAVOR_JAPAN = 3, FLAVO...
This Mad-Libs type game is my first AngularJS app. The user is presented with a list of boxes (generated with ng-repeat), one at a time (thanks to ng-show), in which to input their words. I would like to have each box focused when it appears. I downloaded the module focus-if, which seems to work....
I have multiple audio files that i need to be played. and only when all audio has been played completely the next section is supposed to show. the code that i've written fires automatically without playing any audio. how should i do it? here's my code <!DOCTYPE html> <html> <body> <p>Press ...
Ok so I'm trying to generate a N number of divs and add them to the mark up and call the "Draggable" funtion on them from the Jquery lib. I've got the adding of divs to the page done, now I just need to call the function and that's where I'm having trouble. Here is what I have so far: Pag...
I am using Spring 4 MethodValidationPostProcessor, and i have my @ValidId validation: @Target({FIELD, PARAMETER, LOCAL_VARIABLE}) @Retention(RUNTIME) @Constraint(validatedBy = {ValidIdImpl.class}) // Verifies that length is greater than 3. public @interface ValidId { String message() defau...
Is it possible play an audio file at a certain point in the clip? For example, if the file is 8 seconds long, I'd like it to start at second 4.
I asked my friend what would be the easier to validate a "Phone Number Field" only for numbers and he wrote this. He tried explaining it and "Inverse Logic" yet I didn't understand this code. Can someone explain it to me in the baby infants' terms please? function validSet (input, set) { f...
hi i want to send a object with ObjectOutputStream in Java. I hava a class named TicketList. Here is my class: public class TicketList implements Serializable{ private ArrayList<Ticket> ticketlist; //Konstruktor: Erstellt eine Liste mit einerm Benutzername public TicketList(Ar...
I wanted to know how I could execute some custom code in Parse's Cloud Code. Firstly, I want to execute a request to another server from my code in Cloud Code. It is of type GET. The code would be triggered by an actual app (with all the values) making a request to a parse endpoint (haven't found...
We have an embedded map (Mapbox) that is set to width:100% on a page. Upon print-view, the map scales to the width of the page just fine, but the map marker is not centered. The problem is that since the map is not being reloaded, and only resized, print-view is simply 'cropping' the map to fit t...
I need some help, I'm trying to close a Window.ShowModalDialog, on the event's button I'm using ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Close", "window.close()", true); but for some reason it is not working. I use that code to close other ModalDialogs and works fine. If ...
I have the following factory: angularModule .factory('ArticleCategoryService', function ($http, $q) { // Service logic // ... var categories = []; var _getCategories = $http.get('/api/articles/category').success(function (_categories) { categories = _categories; });...
I have scrapped a bunch of newspaper articles from the New York Times, LA Times etc. and now I want to look through these text files to find certain keywords in articles and to create metrics about the frequency they appear, and potentially frequencies of other words that occur in the same articl...
I want to know how to create a program that converts a input english letter into a unicode decimal? For example, I enter the letter E, it will output 69. sth like that. thanks your help
I coded a python script to run a server for my iPhone messaging app. This app/server uses (currently) port 80 and ip localhost to run the server as I am running it on my computer so far. Now I need a host to run the script and allow me to access it and use ip something like 153.64.22.55:76. I mig...
I'm getting this error: fatal error: unexpectedly found nil while unwrapping an Optional value(lldb) When I am trying to write Value to serial port of Bluno: if mycharacteristics.UUID == "DFB1"{ print("Start") var number:UInt8 = 0x02 peripheral.writeValue(NSData(b...
I have created a UILabel with a bunch of text which contains a website Url is there a way in Interface Builder to make the url link clickable to launch the site? Thanks!
I have an application that creates a tidhttp component in run time and make some requests, html this response I put in a TWebBrowser also created at run time, so to be able to manipulate the html, picking up some tables and data, the problem every time I create a TWebBrowser component in run time...
So i'm using fscanf to read some integers from a file until its end, it works correctly but the way i did it makes some warnings appear. FILE *fp = NULL; fp = fopen(argv[1],"r"); int num; while(fscanf(fp,"%d",&num) != EOF) // This is the line 46 printf("%d ",num); thes...
I have the following setup: #!/bin/bash # call.sh voip_binary $1 Now when I a certain event happens (when I hang up), then the voip_binary emits a certain string: ... [DISCONNCTD] ... However, the script does not stop, but continues running. Now as soon as DISCONNCTD is discovered in the outp...
How to write in glabale list with rdd? Li = [] Fn(list) Li.append(1) rdd.mapValues(lambda x:fn(x)) When i try to print Li the result is: []
I'm trying to make a program that will allow me to more easily organize data from some lab equipment. This program recursively moves through folders, locates a file named "Report.TXT", grabs a few numbers from it, and correctly organizes them in an excel file. There's a lot of irrelevant inform...
The function I'm spying on been called and as argument an object been passed to it. I need to assert that function been called with certain properties of the object. If my SUT has : fn({ foo: 'foo', bar: 'bar', zap: function() { ... } dap: true }) and in my test I can t...
This is the function raising the error. def indexing(stem, stopwords): result = sort() if os.path.exists('mem_F_F') == False: fileName = '' if stem == False and stopwords == False: fileName = 'mem_F_F' elif stem == False and stopwords == True: fileName = 'mem_F...
I searched several existing questions, but none had a simple answer to this particular point. I've been digging in both the mysql2 source and the mysql connector source code, but can't really find the particular code that throws the error, so... STEPS: In a simple Rails app, specify database....
I am trying to make DRF work with oAuth2 (django-oauth-toolkit). I was focusing on http://httplambda.com/a-rest-api-with-django-and-oauthw-authentication/ First I followed that instruction, but later, after getting authentication errors, I setup this demo: https://github.com/felix-d/Django-Oaut...
I have just tried to implement wow.js to my site but it wont work. I have linked everything but i don't know why it isn't working. I even added the wow.js and linked it to the html but there still seems to be nothing that is working. I also added the animate.css and still there is no effect. HTML
I keep looking for examples on how to add a radio button to an Excel worksheet programmatically but cannot get a straight answer. I've tried using Microsoft.Office.Interop.Excel and Microsoft.Office.Tools.Excel but neither have worked. The system I am working on already has Microsoft.Office.Inter...
I am trying to implement some animation onLoad without Javascript. JS is easy, CSS is ... not. I have a div which should be on display: none; and should be display: block; after 3 secondes. Lots of resources told me animate does not work with display, but should with visibility (which I use ofte...
I want to translate seconds to a localized human readable form. Like timespan(1200, 'seconds').format('hh:mm:ss'); The theoretical math behind this is really simple. Is there any library which can do this - with localization?
I have a CSS3 modal dialog with a gridview that will be populated upon doing a search. However, when I go and actually do the search (and therefore cause a postback), the modal dialog closes. If I manually open it again, the gridview is populated as I wanted. My question is how to keep the modal...
« first day (593 days earlier) ← previous day next day → last day (481 days later) »