Which is the correct behaviour for the following program? // example.cpp #include <iostream> #include <memory> struct Foo { void Bar() const { std::cout << "Foo::Bar()" << std::endl; } }; std::shared_ptr<Foo> MakeFoo() { return std::make_shared<Foo>(); } int main() { auto p { Mak...
I'm a newbie to programming and trying to create a e-ATM in console app using c#.I'm using inheritance .But every time I debug i see that the derived class values are null whereas the base class fields or properties are filled with values.My question is why the derived class is not showing the li...
I have a URL like that and I want to use JSON data coming inside URL "CUNMXSAKU" : { "roomCodes" : "DEAL, JRST, JPOV, JSSW, PJRS, PJOV, PJSW, RMOV, RMOF, PRES" }, My URL ...._results.html?language=en&hotelInfo={CUNMXSAKU:{roomCodes:DEAL,JRST,JPOV,JSSW,PJRS,PJOV,PJSW,R...
I am new to rails. I have a class in my lib directory and I am trying to create a object of that class in my controller action. This is throwing me an error when I am loading my view, Error Message ::"wrong argument type Class (expected Module)". However if I embed my class in a module(same class...
Does flock() block (wait) the execution until the lock is available ? <?php $fp = fopen('text.txt', 'a'); flock($fp, LOCK_EX); // ... flock($fp, LOCK_UN); ?>
Given a numpy array like the one below, can you convert it to a multi-channel cv mat, collapsing the data into a single column? arr = [[x1, y1], [x2, y2], [x3, y3]] arr = np.array(arr, dtype='f4') mat = cv.fromarray(arr) Done this way, the resulting mat has 3 rows and 2 sing...
I need to check if a model property is of some type in order to do some processing only to those properties. So far I have this: Business.afterRemote('find', function (ctx, businesses, next) { var lang = ctx.req.headers.language || 'es'; // This always prints false, even when the prope...
I have the follow TextView tag in my Activity layout <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:elevation="25dp" android:text="TEST TEST TEST" android:padding="15dp" android:layout_margin="120dp" ...
I tried this xmlUrl <- "http://www.w3schools.com/xml/simple.xml" doc <- xmlTreeParse(xmlUrl, useInternalNodes = T) This code returns the following error Operation timed outfailed to load external entity "http://www.w3schools.com/xml/simple.xml" Error: 1: Operation timed out2: failed to load e...
I have a project I'm working on in which I parse a .vbp file which contains a list of paths to assemblies and their GUID's (along with other things). The goal in parsing the file is to use the full path of each assembly to load them, and then use Reflection to get information about each assembly ...
im trying to use this sqlite to query THE ONLY ONE idlei there but if i have idlei = 1 idlei = 180 and search for "1" it will return me the 180, but i want the 1 c = sdb.query("marcacao", new String[]{"idlei", "paragrafo", "marcacao"}, "idlei" + " LIKE ?", ...
I have a git repo locally. I want to use some files from other remote repos but I don't want to manually copy the files on to my repo locally or check it into my own repo. Is there any way I can just clone those files but they'll still be managed by the other repos and I can call git pull to pull...
I have a dll to which I have no source code. This has a method that accepts httppostedfile as an input. I wanted to pass a local file stream to this method. Is it possible somehow to convert the local file stream or bytes to httppostedfile format? An explicit castings does not work.
I have over 600 files and I need to extract single column from each of the files and write them in a output file. My current code does this work and it takes column from all files and write the columns one after another in output file. However, I need two thing in my output file: In the output ...
I have a database app that stores data in array formulas through a UDF. I would like to have a macro that goes through the sheet/wbook and breaks all the external links by replacing the udf array formula with the current value in the given cell. The challenge is that cells within a given array ...
I am making a simon says game with corona sdk, using Lua as my main language, and I have wrote several functions. When I run my code, it successfully goes through the first loop, but after it's my turn to click the box, and after I click the CORRECT box, the program just stops and gives me a game...
How to push messages into Google Cloud Messaging? I've viewed this: http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/>Android Hive Info I've tweaked the script a little bit to send messages to everyone in one go. I just want to push ...
Have a hard time trying to echo the $status arrays value into the cell where the $row['status'] is. Right now it prints the DB values of 0-3. if it is a "0" print uploaded..... while ($row = mysqli_fetch_assoc($result)) { $status = array('uploaded', 'processing', 'error', 'closed'); ?> <tr a...
Both dbCount and dbPercentage come from the database. The rest of the objects in the table are from a static file. i want to populate each row with the right dbCount and dbPercentage. The code i have below populate every row with the same dbCount and dbPercentage. Please Help! $.each...
Is this code suitable for multiple arrow key press. It is working now. Going right and left. However, I want this paddle to stop if i press both left and right arrow key. How can i do that ? import java.awt.*; import javax.swing.*; import java.awt.event.*; public class GamePanel extends JPa...
I start with a super simple XAML as the following with only four AppBarButton in the BottomAppBar. <Page.BottomAppBar> <CommandBar> <AppBarButton Icon="List"/> <AppBarButton Icon="Shop"/> <AppBarButton Icon="Delete"/> <AppBarButton Icon="Folder"/> </C...
I would like to remove the .php extensions from my website's URLs. I have thus created a .htaccess file (created in ASCII text) and moved it to the root folder of my server. It contains the following code: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php ...
So I have what I believe is a pretty unique problem. I need to calculate rankings for a very large table of items (200,000ish). Their 'rank' is based off of several weighted attributes which are added together. 7 attributes on a 1-4 scale (based on their quartile 1 bottom quartile 4 top) each ini...
I am trying to set up a virtualhost on my apple mac on localhost. The server is provided by XAMPP . but just Apache Web Server and proFTPD statuses are running and mySQL Database is stopped . i tried to change configuration mySQL Database and change port but does not give me running status . thi...
I need a single command that will concatenate 3 strings together, separating by hyphens, only if they have content. Eg. var stringOne = ["", "second", "last"]; var stringTwo = ["", second", ""]; var stringThree = ["", "", ""]; The results of this command should be: --> "second - ...
The rounded corners of the following screenshot is one image that is a solid color #f1f1f2. It resides in its own table above another table using the same color as the background color: #f1f1f2. However, in Gmail on the iPhone and iPad (so iOS), the image appears to be a different color, #f7f3f7...
I am trying to return a node object alongside a calculated field using this query. In theory, this should return a hash that I can access each person and count and pipe into a velocity template. MATCH (starter:Person {userId: {0}})<-[r:WORKS_FOR]-(n:Person) OPTIONAL MATCH (n)<-[q:WORKS_FOR]-(p:P...
I have a sql table on a server and I have imported it into Excel sheet, when I send this file to some one else who also have access to that server they are able to see the data but unable to refresh the data. It gives file not available error. Please let me know how can I enable those users also ...
I have a list of dictionaries. I want to first sort that list, then only iterate over a subset of those items. This is what I tried: {% for response in responses|sort(true, attribute='response_date')[:5] %} <p>response</p> {% endif %} But Jinja doesn't like this syntax, and raises the err...
I have this array : array(2) { ["ok"]=> bool(true) ["result"]=> array(3) { ["id"]=> int(115133849) ["first_name"]=> string(5) "drugs" ["username"]=> string(7) "darubot" } } I wanna echo only '115133849'. How i can? I try loop but don't work.
Yesterday I asked a question about least square optimization in R and it turned out that lm function is the thing that I was looking for. On the other hand, now I have an other least square optimization question and I am wondering if lm could also solve this problem, or if not, how it can be han...
i'm still relatively new to NodeJS, but I'm interesting in making > 100k simultaneous connections to the API of several stock exchanges. In the node docs it mentions that the number of simultaneous outgoing calls/connections is infinity - is that accurate?
I'm trying to migrate from using a UIWebview to a WKWebview, and I need to invoke various Javascript functions that live in the webview. In the UIWebview I have no trouble doing this, but the WKWebview throws an WKErrorDomain Error 4 for any and all calls. I thought it might be a race condition...
I have followed a tutorial from here http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/ but I have come to a problem with the JSON response. It is returning null. I think it is due to the character encoding as some of the content that is being returned as null includes ° ...
So I want to be able to share methods across different node.js processes created using the cluster module. If I run the code below I can share the method server.handleRequest across the child processes, however If I uncomment //server.test(); in the second file and try to use the method test in ...
First of all. I know that in this forum is exist similar topic, but I write this because my case is more difrent (I think so). I running this program on remote machine with MIPS arch. With what we have to do ? Liberay Qt was compiled to MIPS arch Version Liberary Qt 4.8.7 is Embedded - mips P...
In Azure, when I can create a SharePoint Server VM from the gallery where it is on the same subnet as my AD VM and my SQL VM. I would like to create a SharePoint Foundations VM instead, is there anyway I can create a VM on the same subnet as my SQL VM and AD VM where I can install SharePoint Foun...
I have a small problem: I developed an "ExampleQuest" class for my game which extends the abstract class Quest. I did this to create individual quest classes. Now my ExampleQuest class should count the death of my entities so I implemented my EntityListener. Now I have to register it in my Playst...
I was running a program (valgrind, actually) on my Ubuntu machine, and had redirected both stdout and stderr to different files. I was surprised to see a short message appear on the screen -- how is that possible? How could I do that myself in a C++ program?
I practicing in swift's playground and I couldn't figure out why swift is too specific about where programmer should provide spaces or not. I asked this question on many sites and chatrooms but didn't got any answer. var j: Int = 34 // Right var j:Int=23 //Wrong Also, In class self.variable-...
Problem : Jenkins slave is practical because it boots automatically and you don't see it. Unfortunately, it is not launched by the administrator. I'd need a way to have it launch by first user to connect to computer (which is always administrator) Is it possible?
ok so im trying to use a js script down the form inside the php but it seems that the script doesn't runs. Tried to run the script separately and it works like a charm $list .= "<div id='single_product' > <a href='details.php?pro_id=$pro_id'><img src='admin_area/product_images/$pro_image' width...
I'm trying to style a checkbox input. I know is impossible because of the browsers. So I've given visibility hidden to input[type=checkbox], and I've styled the label with a FontAwesome icon, that is displayed ok when the input is checked. My problem is that if I put the input in the same positio...
Im in a bit of struggle with this. Im trying to create a gradient containing 5 different colors with sharp edges. No blending. So far i have manage do 2. Bur how to do 5? anyone that can help on this? thanks! css: background-image: linear-gradient( -45deg, rgba(white, 0.4) 25%, tr...
I'm building an application using NetBeans and Scene Builder. I've got a TabPane, however, I wish to disable the 3rd tab in the pane when the btnAnonymousClientClick is clicked, how would I go about doing so? My Code: public class FXMLDocumentController implements Initializable { @FXML ...
I'm new to Objective-C and I've pieced together a starting point from other online sources. I want to programmatically make a tab bar controller with multiple tabs. This is the code I currently have in AppDelegate.m method of didFinishLaunchingWithOptions: -(BOOL)application:(UIApplication *)ap...
I am new to EF Code first. I've project in which i've created Initializer class which is derived from CreateDatabaseIfNotExists, DropCreateDatabaseIfModelChanges, DropCreateDatabaseAlways Or Custom DB Initializer. I've used "DropCreateDatabaseIfModelChanges" for development purpose, It's recrea...
I have written php code for sending html mail format.I used inline "geogrotesque-regular".But font-family is not working in my mail.In my Gmail either sans-serif or Arial is showing only.Any suggestion ? Thanks
<img id="lighthouse_Logo" src="{{ STATIC_URL }}img/icons/lighthouse_Logo.png" /> Css img#lighthouse_Logo{ height: auto; width: auto; max-width:500px;} how can I chnage it please suggest me
Hey i am just a learner in CURL, and i am learning through this new Envato API. I don't know what mistake i'm making, I can get the code but cannot call using the POST method in https://build.envato.com/api#oauth Help is appreciated. Thanks in Advance $ch = curl_init(); $url = 'https://api.env...
I'm using this code to set equal heights on my columns: $(document).ready(function(){ $('section').each(function(){ var highestBox = 0; $('.slide', this).each(function(){ if($(this).height() > highestBox) highestBox = $(this).height(); ...
If I were to make a videogame with LWJGL and Windows natives, could this be exported and run correctly on a Mac? If not, how can it be made to? I have gone through many websites, hoping to find an answer, but I can't tell if my problem is too specific or the question just has too many words. Than...
I have compiled and run the following program in C: #include <stdio.h> #include <stdint.h> #include <inttypes.h> int main(int argc, char* argv[]){ uint8_t data[8] = {0, 1, 2, 3, 4, 5, 6, 7}; uint32_t* pointer32 = &data[0]; uint64_t* pointer64 = &data[0]; printf("%" PRIu64 "\n", *pointe...
I want to animate all views (based on tag) with an alpha change, but I am getting a "cannot assign alpha to view" error. What would be a good way to do this? All the views have an alpha of 0 upon being added as a subview of myCustomView func transitionEffects() { UIView.animateWithDuration(...
Suppose I have a partial view "_Navbar.cshtml" in my Views/Shared folder that's referenced in a layout page... so it gets embedded on every page. Now, suppose I have a view with the same name existing in my Views/ControllerX/Partial folder, which is a navigation bar specific to that view. In th...
I have an app that is laid out like this, the mainactivity hosts 2 tabs with accompanied fragments, the first fragment has a recycler view that works, I'm trying to add the parallax effect as the person scrolls up or down, wasn't sure if I should add it to the fragment's xml or the mainactivity's...
How do I remove or hide the third row in this example? Html: <div>Lot of interesting text in this multi-line box but how do I remove or hide the last line</div> Css: div { border: 1px solid black; height:65px; width:150px; overflow:hidden; } https://jsfiddle.net/7mudnnco/
I've searched all over the internet for this but i can't find a sensible answer to my question. I just want to load an image stored in a parse database (not user based) Thanks in advance but i'm really new to this.
The given problem give me an array of only two number which define the start and end of a range of number..eg[2,6] mean 2,3,4,5,6. My job is write javascript code to find the smallest common multiple for 2,3,4,5,6. My code work for small range only , not something like [1,13](which is 1,2,3,4,5,6...
To clear things up before you mention the most obvious choice, I am already calling ShowDialog and not the Show method!!! I would like to block the close (invoked from a different thread) off an WPF window if a OpenFileDialog is open. Here is the code I have (reduced to show my problem): publi...
I need to print out the all username of my members in my site as list, but i dont know how, i tried to user mysqli_fetch_array function to fetch names from username column but i've been failing. So please assist me on how i can do this in a most effecient way this is my code $sql = "SELECT user...
i have a page where the the visitor can upload a file, but thats not required, so in my script i put a condition if the file input (i named it 'upload') is not set or empty don't upload anything, and the file name will be equal to 'file' already existed in db; else upload it. the problem is the c...
When in css, is it better to use % to position an element instead of pixels? for example: div { position: absolute; top: 40%; } instead of top: 500px;
I am trying to use the parameter-source to provide a parameter to my query in the inbound-channel-adapter but it doesn't seem to work. I have looked through the Parser code and I don't think it is processing the parameter-source. <int-jpa:inbound-channel-adapter delete-after-poll="true" d...
I cannot open the servers page in the admin console. I can easily browse between other pages like clusters, Machinces, Virtual Hosts but my Servers page is loading forever and is not opening. Did anybody faced the same issue ?
From the docs: The first letter in Ajax stands for "asynchronous," meaning that the operation occurs in parallel and the order of completion is not guaranteed. I interpret this to mean that your then/done/always/fail callbacks are not guaranteed to fire in the order the requests went out. T...
Im having an error trying to switch more than one SKScenes. The first SKScene switches by using a label and and it works ok but the second one does not work. let shootlabel = childNodeWithName("shooterlabel2") if (shootlabel != nil){ let transitions = SKTransition.flipVerticalWit...
I want to encapsulate common scenarios when using EF6. Here's an example: public class StringRequest : DbRequestProperty { public string Name { get; set; } public bool? ExactMatch { get; set; } protected override bool IsValid() { return !string.IsNullOrWhi...
What are the best practices for handling multiple host requests with same context path :eg: "my-services" for different environment(Test, Dev, Prod) from a Tomcat 7 server I want my webapplication with different flavors of war, say test.war, dev.war to be deployed on the same tomcat instance. Ple...
I am trying to create an ArrayAdapter for a Multidimensional (2D) Arrayist: final ArrayAdapter<ArrayAdapter<ArrayList<String>>> adapterNames = new ArrayAdapter<ArrayAdapter<ArrayList<String>>>(this,android.R.layout.simple_list_item_1, android.R.id.text1, arrayNamesOne); This is the log...
I have 2 worksheets, Data & tracker. The Data worksheet is updated at 2 different time periods daily. There are 10 rows with different names and 6 columns with the output after updating. In the tracker worksheet, i have to manually update the columns for each name once i update the Data workshee...
Order table has order date and shipment date. I need to retrieve number of days between order date and shipment date. for example: order date = 31/08/96 shipment date= 10/09/96 for oracle 11g.
There is the built in method unicodedata.name which given a unicode character will return a human readable name, eg: unicodedata.name(chr(0x2704)) == "WHITE SCISSORS" Is there anything out there that will provide the inverse? I'm looking for something like: unicodedata.name("WHITE SCISSORS") =...
I am using latest version of Android studio 1.3 preview beta release. But it is working very slow on my system (RAM 4GB). When i try to edit a java or xml file in editor it takes 3-4 second to write a word. I have followed this blog to Increase Android Studio's Memory Heap size. I have updated th...
The following returns all active items. activeItems: Ember.computed('items.@each.status', { get() { return this.get('items').filter((item) => { return item.get('active') === 'active'; }); } }) // Template {{#each activeItems as |activeItems|}} {{activeItem....
this is my first post here. I had this runtime error message : "terminate called after throwing an instance of 'std::length_error' what(): vector::_M_default_append" when executing this c++ code ! this is the first time i have this type of error. Thanks for your help #include <iostream> #incl...
data= 'Site,County,UWW Site ID,Volunteer ID,Watershed,Nearest town,Latitude,Longitude,Sample Date,Sample Time,Hours Sampling and Traveling,Miles Traveled,Number of participants,Decontamination,Quality Control,Water Condition,Water Surface,Water Clarity,Water Color Normality,Water Color,Water Odor,Algae Cover,Dead Fish,Present Weather,Past 24Hr Weather,Inches of rainfa…
I'm a complete beginner to javascript and am trying to learn Parse. Directly from Parse.com javascript guide: https://www.parse.com/docs/js/guide#objects var GameScore = Parse.Object.extend("GameScore"); var query = new Parse.Query(GameScore); query.get("xWMyZ4YEGZ", { success: function(gameSc...
I've got a noob question. Anyone knows how I can install pystring on mac? I need its library and header. I tried installing it via brew but does not seem to be available there. Any thoughts?
I came across this polyfill of querySelectorAll for IE7: https://gist.github.com/connrs/2724353 I had thought that I am Okayish in JavaScript, but I have never seen anything like the quoted part in line 9 of the polyfill: {x:expression(document.__qsaels.push(this))} Apparently, it is a JavaS...
I have a dataobject that contains longs latitude and longitude. I am passing these from a method in a fragment, that calls the parent activity method to show a googlemap. The problem is, the longitude and latitude keep resulting as (0,0). I have checked that the object is setting and getting the...
I have a directory I add to sys.path to import custom modules. What is the correct/best way to use import, from import and sys.path together? What I mean is if it acceptable to use sys.path.append in between the "imports". For example: #!C:/Python27 import sys sys.path.append('C:\\Users\\user\\...
I have a poorly created table I want to update. It is set up as ID Name Value Because a given Name can have more than one value right now the Value field is varchar and populated with comma delimited values: 12,15,92 I would like to create an update or create table query that will make th...
Suppose I have 2 fragments A and B. A has 2 integer variables named data_1=2 and data_2=3. I do a transaction from Fragment A -> Fragment B. Note that Fragment B needs only data_1 but it doesn't need data_2, so, I send only the variable data_1 through Bundle. So, when I do another transaction fro...
So I'm new to PHP and I'm having trouble getting some of my forms to function. I think it may be the way my site is set up that's causing me problems. I have index.php which is set up as such: <div class="pageContent"> <div id="main" style="width:1000px; margin:0 auto;"> <!-- Create the tab...
I am trying to write a code which if the following conditions are met it will say marry me otherwise it would say get lost. Conditions which need to be met: 22 to 27 year old male, non-smoking, under 72 inches tall, under 160 pounds, good-looking, able to relocate.” This is the code I have so...
Im new to ng-click and i was wondering if i could use it in a JavaScript variable. IN THE JS.JS FILE angular.module('modalTest',['ui.bootstrap','dialogs']) .controller('dialogServiceTest',function($scope,$rootScope,$timeout,$dialogs){ $scope.launch = function(which){ var dlg = null; switch(w...
Hi this is my first post so please bare with me. I have a Mettler Toledo XS32000L scale and I am simply trying to read the weight via an Ethernet connection and a VB.net (2010) application. I have found plenty of information/code for a serial(COM) connection but nothing for an Ethernet connecti...
I am trying to apply a discount to an item using PHP, but as it stands, no discount shows up on the paypal screen when buying. For testing I am trying to apply a €2.00 discount to the overall cart but I cannot seem to get it to show up, I am using <input type="hidden" name="discount_amount" valu...
I am trying to use AngularJS to make a model that responds to a click from the user. I have all the information for the model in the controller (other elements will be added to the scope later), and the directive handles showing the element in the view and performing actions on it, such as minimi...
Here's the situation: I wrote a component facility-search which searches through some fixture data. I put multiple instances of {{facility-search}} on same template (Tab Pages). This component has some input boxes where we can write search keywords. I want to observe change in value of input box...
I have this error: Severity Code Description Project File Line Error CS0246 The type or namespace name 'T' could not be found (are you missing a using directive or an assembly reference?) on the method signature for this method: public static void SendMessage(string queuName, T ...
When doing UIView.animateWithDuration, I would like to define a custom curve for the ease, as opposed to the default: .CurveEaseInOut, .CurveEaseIn, .CurveEaseOut, .CurveLinear. This is an example ease that I want applied to UIView.animateWithDuration: let ease = CAMediaTimingFunction(controlPo...
I've been looking around for a while now for an answer to this. Here's my code: function appendShopItem(shopItem, subTotal) { // Create the list item: var item = document.createElement( 'li' ); // Set its contents: item.appendChild( document.createTextNode( shopItem.na...
I have experienced the following problem while writing a test. Please find a picture bellow. If I create validateGameExistance function in the unit test project then it works fine. How could it be solved?
I got stuck with these problems : I have a button . I want to make it (programatically) as small as I want ( e.g. width = 1, height = 1). I tried with setWidth(1) and setHeight(1) but it doesn't work . I searched and I found something about small buttons. So i created my button like: Button b...
I'm trying to set up Basemap to use a Cylindrical Equal Area projection and to place the origin at a specific lat/lon (this is to match some input x/y data), but it seems that setting the lat_0 and lon_0 parameters does nothing. from mpl_toolkits.basemap import Basemap # Oklahoma bounds # ('o'...
I'm using http-kit in Clojure and when accessing an https:// page I get unable to find valid certification path to requested target: :cause unable to find valid certification path to requested target :via [{:type javax.net.ssl.SSLHandshakeException :message General SSLEngine problem :at ...
I searched and couldnt find any Information what Values are beeing set when using the Tune and Preset Parameter in the libx264 Codec. Most of the Documentations are very general. Here i found it for x265 but not x264 https://x265.readthedocs.org/en/default/presets.html
I have been working for a few days trying to get the UART1 port to work on a bbb. I flashed the prebuilt kernel from the elinux wiki (http://www.elinux.org/BeagleBoardUbuntu#BeagleBone.2FBeagleBone_Black), and the UART1 appears in the /dev folder (as /dev/ttyO1, with a capital "o" not a zero), b...
I want to create a simple puzzle game for Android that should looks like 2048 game. Now i'm using a gridView with 4 rows and 4 coloumns as layout, and each of view is a TextView. Empty cell differs from tile simply because different style. Thus, in order to update tile position I have to chang...
I am new to Magento. I have to edit a Tooltip of product details button. Please tell me easiest solution. check this Screen shot
I working on an ASP.NET MVC web site. I'm trying to add custom validations to some fields. The validations are firing as they should. However, I've also added custom error messages that I want displayed. These custom messages are not being displayed. What am I missing? <input class="text...
So I'm a bit of a noob in Ruby and my mission is to manually convert a string into title-case. I have finally been able to create a method that I believe will meet the requirements for my assignments (it's not very flexible, but it will do), however I have hit one final snag. I cannot seem to joi...
I am using a handler to update my UI after my thread returns - the following is the method that gets run from the thread (in a fragment) public void signedIn(final boolean success, final String error) { Handler mainHandler = new Handler(getActivity().getMainLooper()); mainHandler.post(ne...
I'm developing an application in HTML5 that I'll turn in Android App (using the WebView) via Ludei Framework. I have also a PHP page, hosted on my website, that is part of this app. I created a link from the sidebar menu of my app that shows this page. When I try to write something in the text f...
I'm very new to XML and I have a project that I'm working on. What I need to do is import an existing XML file and map it against a schema. The files can be found here: https://www.fca.org.uk/firms/systems-reporting/gabriel/system-information/data-reference-guides/psd/psd007 However when I tr...
A. I wondering how to change src after page load using Javascript <img src="http://example.com/image.png" /> to <img src="http://domain.com/different.jpg" /> B. My second question to follow is - will the the new src of the image (domain.com/different.jpg) will be displayed? it will execute a ...
I have an objective C program that has popover with a list of dates and two buttons "Done" and "Cancel". When the user hits a date and then the done button, the popover is supposed to disappear and a MFMailViewController window populated with data from that date is supposed to appear. When I ...
When my page is loading I am performing an AJAX GET request to hit a Web API controller to fill a Jquery data table. However, the one cell has a button which performs an ng-click action but it never fires. Why? Function Call $("#gridname").show($scope.initView); AJAX Function $scope.initView...
I have a page that contain some UserControls. Theses UC have some contents that are visible or not depending on where you click. This page was using Sessions to retain data from database, like this: private ViewPersonCollection collection { get { if (Session["Vie...
I have an array of objects as follows: var GOM = [{name:"Kuroko",ability:"misdirection"}, {name:"Kise",ability:"perfect copy"}, {name: "Akashi", ability: "emperor's eye"}]; Is it possible to split it into 2 arrays using some predefined function in lodash or native javascr...
This is my first gradle file apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "it.hairlookapp.hairlook" ...
I am trying to build a page with a header, which includes a navigation bar at the bottom. However, the navigation bar has the background colour of the main content, not of the header. I searched the site for similar problems, and tried overflow: hidden, or adding overflow: auto to .main, as sugg...
I am reading about Universal hashing on integers. The prerequisite and mandatory precondition seems to be that we choose a prime number P greater than the set of all possible keys. I am not clear on this point. If our set of keys are integers then this means that the prime number needs to be of t...
I've been trying to send a string from one form named mainForm to my other form unlockForm. The references I've found are sending values from things like textboxes. I simply want to send a string.
I don't really know if this is the place to ask for help, but I go to try and download DSSDK_Jun10.exe and it has 0.2(sometimes 0.3) out of 572 mb downloaded and it won't continue downloading. I really need help on this.
I run a cross-platform achievement tracker, where the user can gather and show their achievements from xbox, psn, steam etc. Now I want to add support for achievements attached to a users google account (google+ achievements). Can I do that through the API somehow? Been searching but can't find...
Created test using PROC DOCUMENT as below: ods listing ; ods document name=test(write); proc report data=sashelp.prdsal3 contents=' Country wise Product and Actual SALE'; columns country product actual ; define country / display; define product / display ; run; ods proctitle=on; title 'This...
i need to store pointers to instanced template functions and when function cannot be instanced i would like to store pointer to empty function instead. I looked into SFINAE but i dont think it applies here. struct StaticEntity { double position; }; struct DynamicEntity { double position...
I'm using the Material Design Lite CSS/JS "template" Google just released to sprinkle some Material Design into my Angular app and I've noticed the button-ripple effect is pretty inconsistent. Sometimes on my main app view it never loads up the button ripples despite working in other views, and ...
I have an application that can connect to several servers. The actual number of servers is not known until runtime,and may change from day to day. It takes several actual parameters to fully define a server. I'm trying to configure the application using .NET support for application configurati...
Ive no idea if my title made sense but here is the code © import java.util.InputMismatchException; import java.util.Scanner; public class Gussing { public static void theGame(Scanner input){ int randomNum= (int)(Math.random()*101);//randomizes a number between 0-100 inclusive of both...
I'm still quite new to coding in general, and while this simple program is only meant to be a test to learn how constructors work, I'd still like to know why I'm getting this error. using System; public class methodTest { int a; int b; int c; public...
I'm trying to check whether a Multipolygon intersects with which Polygon in a list, using JTS library. However, the method stucks in an infinite loop and end with an out of heap space error. The method works fine for pairs that apparently don't intersect. The infinite loop starts when the first ...
This is my first topic here! So, I'm trying run an ajax function before the Firefox's window close, my code works when I close the tab, but window not. How can I do this? Detail: Only Firefox don't run the function when window is closed and if possible without use JQuery. window.onload = functi...
I am trying to elaborate SIP messages coming to an Asterisk server and edit them on the fly using Java. AMI is supposed to work fine with that. Although I can't send any SIP messages though the socket, cause every-time I tried to edit chan_sip.c the server breaks down. So I haven't find a way t...
I got my flex boxes to work in Safari firefox and chrome, but then I added some @media style sheets and now, in safari, the flex box is functioning, but aligning everything to the left. It should float evenly in the center. The styles stylesLarge, stylesMedium and stylesSmall are basically the s...
Is there a way I can add a MouseListener to an Image? I took a look at this StackOverflow question, but it didn't really answer how to do this for a java.awt.Image, as there is no Graphics2D Image class. Or at least one I've found.
Anyone know where the following files located: trainFileList = /u/nlp/data/ner/column_data/muc6.ptb.train, /u/nlp/data/ner/column_data/muc7.ptb.train I am following the FAQ link http://nlp.stanford.edu/software/crf-faq.shtml#a If all I need to do is provide a file with two columns consisting o...
I'm working in C and I'm modifying existing code. I have a char array which is stored in a file as follows: "\x01\x02\x03" "\x04\x05\x06" "\x07\x08\x09" In the original source code this char array is included as follows: const static char chs[] = #include "file.h" ; I'm modifying this code...
I am simply trying to update an element in an array, and the information, for whatever reason, doesn't seem to be getting through. Here is the javascript that sends the data: var xmlhttp = new XMLHttpRequest(); if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari ...
Heyhey! I am having issues with my MySQL server on my Raspberry pi. It works flawlessly to connect remotely from both my PC and from others in my house, but when I send the application to my friend, they get: "Access denied for user "Admin2"----." Things I've tried: • Quoting out the bind-add...
I have a column in a sas dataset that is of datetime 25.6 format; lets call this column datetime. I want to convert it to Date9 format in a where clause and check against a certain date or date variable. I currently have the following code: proc sql; Select rowid, name, dob, country from db.tes...
I have a function called Last(). This is how the function is suppose to work: the Last() function returns the last form and scrolls to the end of the scrollbar. However, when I click the Last button it only goes to the next form but it does scroll to the bottom as intended. Here is my button: <...
Thanks for your help. So I have a problem with my script. I am trying to convert my script from batch to powershell, mostly just to try to learn it so I am completely new to powershell but I know other languages so I am decent at programming. My script creates a kivaCommands.txt file that is then...
I am using django 1.8.2 and python 2.7 I am a novice in django. I am using django registration redux to authenticate the users. I want to manually define a clean method on the password field to ensure the password is atleast 6 character long, and contains at least one numeric n one special chara...
I'm trying to use date_query to order events by event start date, and only display events from last week to the future. $args = array( 'post_type' => 'event', 'post_status' => 'publish', 'meta_key' => '_start_ts', 'orderby' => 'meta_value', ...
I think I might have a config issue. I am getting an error when looping over an array of objects. Here is the error. The array of objects are being loaded into the view and they look correct. Its just the "repeat.for" that blows up. Unhandled promise rejection Error: Incorrect syntax for "for"....
is right to do this in cakephp 3? $validator ->add('FieldName', [ 'RuleName' => [ 'rule' => 'isUnique', 'required' => true, 'allowEmpty' => null, 'on' => null, 'last' => false, 'message' => null ] ]); or should I do it in the following w...
If documents are indexed on tags and 100,000 users are interested in documents with specific tags, will percolator evaluate all 100,000 queries or just those that are querying on tags that are present in a given document?
I'm trying to deploy an Azure Data Factory service using Azure Resource Manager Templates. So far I was able to create the Data Factory itself but I couldn't add any Linked Service, Pipeline or Dataset to it using this approach. Since there is no example of the Data Factory template available, I ...
I am a bit new to JQuery and I have a script that will get the values from a text input on an onchange event and will send the data to an external PHP file so we can get some data from the DB in fetch it into a DIV with id "txtHint3". The whole script works perfectly fine but the problem I have ...
I have started Android development and till now I had no problem but I tried to insert RecyclerView to my layout and everything is fine there is no error but my RecyclerView itself is not displaying. The code seems right to me. Here's my code: MainActivity.java : public class MainActivity ext...
At the very top of my document I created a varible called $selectedID using $_GET to get the id of the selected user(ill later switch it to an encrypted string) so the url looks a little like this profile.php?id=4. I then have a function which loops though a database for all the blog post with th...
I've found this question and one thing in the original code bugs me: >>> x="Alpha_beta_Gamma" >>> words = [y for y in x.split('_')] What's the point of doing this: [y for y in x.split('_')]? split already returns a list and items aren't manipulated in this list comprehension. Am I missing some...
I currently have a traditional html email form sending a post request with a file the user can upload. I want to be able to flash a success message once the email is sent, and in order to do that I need to either use ajax or make the post request using express - and not rely on the traditional ht...
I am building a share point site wherein I am trying to get multiple calenders in a single view. I have been able to overlay/merge calenders but I am unable to make the select/unselect of a calender from a set of merged calenders seamless. Explaining using the feature from google calender - basi...
I got into an admittedly unconstructive discussion about using R vs. SAS for data analysis; having never actually used SAS (and the other side never having used R), this was bound to founder into pure opinion. One objective point that I looked into, but couldn't find anything useful for, was a p...
If one, say, wanted to create a list of stars to ask questions about (and then used Unix commands to generate a list of questions for each of the stars). I wouldn't do such a thing for most stars, but I would for unique/exceptional stars that could be selected with some sort of filter.
I was just asked to update a php script written by another programmer that utilizes the recently deprecated FB API v1.0 (apologies in advance for ignorance, I haven't used the FB API before). I am running into some issues...for reference, the script seems to be based off of this project available...
Some Background: I am trying to setup reverse proxy for my internal business users for site validation when the external route is down. I am able to setup multiple routes with corresponding virtualhosts entries in httpd.conf for port 80 : anonymous user. Am afraid am stuck at SSL route and unabl...
Given the following: class Base { public: void foo() {} void goo() { this->foo(); } }; class Derived : public Base { private: void foo(); }; someplace else: Base * b= new Derived; and yet another place: b->foo(); // Any way to prevent this at compile time? b->goo(); // or this? ...
Here below is the code to send an email with play-mailer: import play.api.libs.mailer._ ... val email = Email( "My Subject", "Me <j3d@domain.com>", Seq("john@domain.com", "joe@domain.com", "jack@domain.com"), bodyText = Some("Some text..."), bodyHtml = Some("<p>Some text...</p>") ) Ma...
Here is the current configuration public class WebAppConfig implements WebApplicationInitializer { private static final String CHARACTER_ENCODING_FILTER_ENCODING = "UTF-8"; private static final String CHARACTER_ENCODING_FILTER_NAME = "characterEncoding"; private static final String C...
What is the best option to choose to center the chosen image and shrink it but still maintaining the aspect ratio ?
I'm not particularly sure if this is a valid question, but I was wondering where exactly my data base is stored in Slick For example, if I follow the example at http://slick.typesafe.com/doc/3.0.0/gettingstarted.html They create tables : // Definition of the SUPPLIERS table class Suppliers(tag...
I want to add some C++ source files to my Android Studio project that are not in the project tree. I'm new to Gradle, and tried to research this as much as possible. From what I read, the following build.gradle file should work, but it doesn't. The bit about jni.sourceDirs came from this post: ht...
I'm trying to include red heart symbols (♥) in my app (color:#800000 in my CSS). They appear properly in a Chrome browser on a desktop but when I pass the code through Phonegap and run it on my (Android) phone, they come out black. If I put standard text inside the span along with the hearts, the...
I'm having trouble debugging why the processing of my file upload is not working. I've created a HTML5 file uploader on my page which calls my upload.php. upload.php // File should be saved in same folder as upload.php $uploaddir = '/'; $uploadfile = $uploaddir . basename($_FILES['fileToUploa...
I was looking for a way to clean up some of the database entries I might not need after 24hours or something like that, I was looking into meteor code: https://github.com/meteor/meteor/blob/832e6fe44f3635cae060415d6150c0105f2bf0f6/packages/oauth/pending_credentials.js I found this part: // Per...
I have a Windows 2012 server which has two game servers running on it with different ports. I am trying to make a status monitor that will be able to see if the two game servers are currently online. I am very new in this area and was trying to see if there was a way I could send a response from ...
How can I access my Docker artifacts installed via Kitematic on MacOSX using Remote API (http) Currently I see that it is availble via tcp... Can someone educate me on the steps in enabling that ? My docker env. details DOCKER_HOST=tcp://182.159.98.120:2375 DOCKER_CERT_PATH=/Users/IamUser/.d...
I have a file containing command line arguments that I would like to pass to another script. But this file contain element such as "params 1" param2 param3. Let's call the file test.tmp and the script file script.sh. If I do: script.sh -p `cat test.tmp` -other_params 1 2 3 The script receive ...
So I'm working on an OpenGL project in C++ and I'm running into a weird issue where after creating the GLFWwindow and drawing to it, the area that I'm drawing in only encompasses the bottom left quarter of the screen. For example if the screen dimensions are 640x480, and I drew a 40x40 square at ...
What is the Java programming convention for add functions? In the TreeSet class the function is void, while it returns a BigInteger in the BigInteger class. When should I use void in my classes?
I want to use some BSD libraries in my bachelor thesis project and stumbled upon the 3rd clause where it says: Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written p...
I want to show a view for the users if the notes column record doesn't have any entry previously. i.e ideally for the first time users. If the user deletes the note after creating it, i.e even with 0 entry after first time creation i want to show the second view in the page. For this i can't do...
I want to get the last word of this URL: http://localhost:8888/articles/tags/Europa How could I make this in Laravel ? with this {{URL::current()}} I'm getting full URL. I have tried {{URL::current().split('/').last}} but then I get error: Function split() is deprecated
What is the difference between using float* f; and float f[4]; Or are they treated the exact same way? Will using one over the other potentially cause you to run into memory allocation issues? If not, are there ANY situations where they are treated differently? Don't know if this is relev...
I am modifying a download link to display two icons above it (using pseudo-elements and an icon font). These icons need to be layered. To do that, I've given the link a position: relative and the second icon (which I'm positioning over top of the first) gets a position: absolute. Then I just adj...
I have a dataframe df that looks as follows and I'm trying to convert all cases where there is a NaN in the closing_price column into 100. maturity_dt pay_freq_cd coupon closing_price FACE_VALUE 0 2017-06-30 00:00:00.0 2 0.625 99.96875 100 1 2...
I am trying to implement simple regex string matching with wildcards in Java. So the idea is, you have a needle(the string to search for) and a haystack(the string being searched), you have to search for the needle in the haystack and give the starting index of the needle. The wildcard comes in i...
Someone was helping me with another question and gave me a code example that worked great. I tried tweaking it a bit to write to a file instead of the console and I'm getting the following error: System.FormatException: String was not recognized as a valid DateTime The code is as follows: us...
I am working on some game logic and I need a way to update a level when time runs out. Basically, there is a research table with columns as such: research_time_id research_started research_end active level I need the level to be set to level+1 when research_ended is sooner then N...
Vacation is coming up and I wonder if someone could recommend a pdf book to start with, for learning angular, node and mysql? Together. I know about MEAN but would prefer Mysql. Thanks:)
I want to remove a whole row from below JSON. [{"TeethIndex":"0","CDTCode":"cdt 100","CDTDescription":"Sample"},{"TeethIndex":"1","CDTCode":"CDT 200","CDTDescription":"NEW CDT CONFIGURATION"},{"TeethIndex":"2","CDTCode":"Clinical 123","CDTDescription":"Clinical 123"}] How do i remove?
I want to respond to a change made client-side, in the jQuery code of my Sharepoint page, on the server-side. "Everybody" says I have to use ajax or Web Services and such for this, but I'm trying to find a "scarier" (easier, less obtrusive) way to do it. My plan was this: Assign a ValueChanged...
Creating tables in MySQL confuses me. Sometimes I'm able to get it just fine, other times it seems to yell at me for things I've done before successfully. I'm attempting to create this table with 3 columns. When I try to save the column, it tells me to please enter a valid length. I've used these...
For tests run on firefox and chrome, I often use a command similar to the following to select a particular option from a select2 drop-down menu: element(by.cssContainingText('.select2-result-label', 'A')).click(); In firefox, you can see that it selects the item from the list. In IE, I can see...
I'm trying to understand how to manipulate a bunch of files in a row. I have a code that looks like the following. for(i=0; i<4; i++) { char filename[32]; snprintf(filename, sizeof(char) * 32, "file%i.csv", i); data = fopen(filename, "r+"); while(!feof(data)) { fscanf(data, ......
I am trying to classify(2) using Random Forest. Dataset contains 1 numeric, and 51 binary attributes. Numeric data is essential(Blood Pressure) for the classification. However, 40% instances do not have numeric data. I tried using MI, MICE, and other variants(Hmisc, impute). But I did not find th...
I am using bootstrap framwork and trying to change few properties with navbar, like background color, When I uses css from a local copy like, ./bootstrap.css override works fine or when I pasting whole css or just navbar css to liveweave CSS column override working. But when I am using maxcdn...
I want to style only the content area of a div (in my case different columns in bootstrap) to visualize its content boundary like the inner box in the dev-tools is colored by the web browser. I've tried many things but either the css recommendations are not yet implemented like width: content-box...
I have a field in database (Time) with this value 09:00:00. I created the Entity and with Time Field /** * @var \DateTime * * @ORM\Column(name="m_01_ch", type="time") */ private $m_01_ch; In my controller I retrieve the element and when I do: $val = $myentity->getM01Ch(); My value is ...
I'm getting an error I can't find how to fix here's the code using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace MITM_Omar ...
I have a UITableView with custom cells. It scrolls every time if I swipe fast, but when I swipe more slowly, sometimes it won't scroll. Setup: UITableview controller with a standard table view. I load some images in the cells asynchronously. The cells subclassed, but the only methods I override ...
I am using Python 2.7.9 with matplotlib to display live data taken from a microcontroller in a FigureCanvasTKAgg. The figure itself must always display the last 100 points and resize the Y axis to display and 'snug fit' all points. X axis is updated as well to show the correct time stamp of each ...
I need to parse an XML file (1~10 MB); I am using XDocument for the purpose. At the moment I am using Linq to query the XML document, but I need to improve the performance of my application and I thought to replace the Linq query with old style loops, but I did not have any boost. Following is...
I've been working independently on designing a website for a local company and I've been stuck on how to make my layout/design to work responsively. As of right now, my content looks similar to this: However, as the browser screen decreases, or if the browser is already on a smaller resolutio...
I am trying to create a small script that creates a folder on our file server, creates the share, sets the ACLs on the share, then maps the share to their U: drive via Home Folder in Active Directory. The server is running 2012 R2, the Active Directory Powershell Module is installed. This is wh...
Here's the code about which I will seek assistance: For i = 1 To numPlayers replacementDone = 0 Do Until replacementDone <> 0 replaceCards = InputBox("blah...blah") If replaceCards <> 0 Then replace100 = Application.Round((replaceCards / 100), 0) I...
My question is short, but I think is interesting: I've a queue from Amazon SQS service, and I'm pooling the queue every second. When there's a message I process the message and after processing, go back to pooling the queue. Is there a better way for this?, some sort of trigger? or which appro...
An attempt to add a vanilla SATA drive to a server with a RAID 0 configuration seems not to be working well. The disk does not show up in /dev, df -h or by any other means, so I know it is not detecting the hardware at all. The BIOS software seems to have no luck in activating the SATA drive eith...
I've been trying to fix this for a while now but I just don't seem to be able to. This is my css ul.tabs { position: relative; list-style-type: none; margin-left: 30px; } ul.tabs li { position: relative; display: inline-block; z-index: -1; color: #06E; -webkit-border-radius: 5px 5px 0 0; border...
So I have a index.php file which uses ajax for loading contents from another .php file within the same directory. But for some reason when you click a link from the menu and it is loaded in the ajax, the php script from the news panel isn't executing, or it isn't visible. Demo Link: http://www.m...
I have a phalconPhp issue. can anybody help? i have indexController with 2 actions indexAction and LoginAction I also have in my views index folder with index volt and login volt i also have templates folder with base volt in it and some css styles. when i use extends templates basevolt in index ...
For my website, users can provide a list of tracks. So far it works, However I wish to feature a textarea to textbox function So people copy paste from a textfile into a textarea, where the convert button reads that text and places the proper artist/track in a inputbox So if a user puts in: Ar...
I created a SQL fiddle here that actually reproduces this issue. Why is my PATH column full of null values? Do cycles in hierarchical data cause problems with the SYS_CONNECT_BY_PATH function? I'm trying to use SYS_CONNECT_BY_PATH as demonstrated in the oracle docs here: http://docs.oracle.com/...
I'm working on a music playing app and in previous iOS versions the media player would show the play/pause as well as the skip and prev buttons. Now, with the 8.4 update, all that is shown is the play/pause. I'm updating the MPNowPlayingInfoCenter in the usual way: NSDictionary* nowPlayingInfo...
I have a situation where I have an authority data source that has a service sending the data to another data source across the network every time the original data source is updated. Similar to an offsite backup I guess. I'm looking for a way to ensure that the secondary data source is consistent...
I've got Eclipse building a Maven project that I just imported. I have Build Automatically checked and Eclipse is constantly building. It builds and waits a few seconds and builds again without me making any changes. I noticed that this only happens when the server is running so I'll include some...
I have an iPhone app where I provide a sketch pad for the user to save a signature. An UIImageView gets added to the main view and that holds the strokes. For some reason you can only draw short lines on the pad like the following image. I have another application for the iPad that uses the ...
I am reading through node-forge documentation and I keep seeing a reference to a 'tag' variable. What is the tag and what is it meant for?
So with my website I have a header. At the top of the header I have my logo and slogan, and beneath that I have my nav bar. When the user scrolls down I want the top part of the header (logo and slogan) to disappear whereas the nav bar should stay fixed. I know this would need some position:fixe...
I'm officially stumped. After including a simple jQuery slideUp script in the bottom of my page (to show/hide certain divs onclick), two links in my navbar (which is just 2 ul's) are no longer "clickable"-- this ONLY happens when the browser size is shrunk to a certain width (still at a reasonabl...
What is the time and space complexity for this: def isPalindrome[A](x: Seq[A]): Boolean = x match { case h +: middle :+ t => h == t && isPalindrome(middle) case _ => true } Does it depend on the implementation of Seq? Since IndexedSeq should have O(1) tail vs O(n) for LinearSeqs? Is the sp...
I was just wondering if adding a single quote mark to an embedded query string parameter in a hard coded SQL query could cause a SQL injection error? As you can see after the @docNum parameter I am using both the percent and single quote characters. Somewhere in my code something is causing the e...
I'm trying to us an ActiveX API function with the pattern function(ref string returnvalue) in C#. Because strings are immutable, I'm trying to use a StringBuilder: StringBuilder returnValue = new StringBuilder(128); api.func(returnValue); This causes a compile-time error about type mismatch. ...
The following, when executed in a terminal: In [71]: ((float('0.014853') - float(2)) / float(0.014853)) * 100 returns in the expect value: Out[71]: -13365.293206759578 Yet when include this in a script, the value gets computed as -99.26. This pattern seems to only occur the first numb...
I'm trying to run the following javascript html5 image viewer using jquery instead of native javascript. However I'm not sure why it's not working. Here's the native Javascript: var upload = document.getElementsByTagName('input')[0], holder = document.getElementById('holder'), state = d...
Earlier i had installed "Support Pack 14 (v.13.0.14.1720)" to be able to use the Crystal Reports in my VS2010 using vb.net for windows application .For now unfortunately i'm notable to open my project anymore and received this error : "one or more projects in the solution were not loaded correctl...
I'm new to SQL and I'm attempting to do a bulk insert into a view, however, when I execute the script the message says (0 row(s) affected). This is what I'm executing: BULK INSERT vwDocGeneration From '\servername\Data\Doc\Test.csv' With ( Fieldterminator = '|', Rowterminator = '\r\n' ) I've...
So I understand the logic behind how to calculate the sum of digits. I was just wondering whether this recursive function is correct. Assume that the user already entered the number which he or she wants the digit sum for and is stored in $v0. Sum2: li $s0, 0 move $a1, $v0 li $s1, 0 li $s2,...
Firstly I know there are similar questions but they are not exact same problem and didn't solve my problem. I found solutions for Eclipse but there is no for Studio. When I add an external library as jar, it throws a Classnotfound exception running code. In the other hand it works fine on desktop...
I have an html.erb file where I'm creating a new row as I iterate over a collection. I need to be able to dynamically create an id per row, and then be able to specify that id in my .js file so that I can show/hide some of its contents when clicked. #foo.html.erb file <table> <thead> <tr>...
The variables I share via broadcast are null in the cluster. My application is quite complex, but I have written this small example that works flawlessly when I run it locally, but it fails in the cluster: package com.gonzalopezzi.bigdata.bicing import org.apache.spark.broadcast.Broadcast im...
I cannot figure out how to delete the dynamically allocated subclasses through the basepointer. The allocation is in the App-class and how do I delete the allocated objects from withing the main-method? #include <iostream> using namespace std; class Base { public: virtual void print() = 0;...
So I'm trying to span a list across 4 horizontal columns. I set each div to 25% but still not luck. Here's what I got going <div class="listed"> <div class="section-one" style="display: inline-block;width: 25%;"> <h3>All Rooms</h3> ...
I have a small bit of code that is really giving me a headache. All it needs to do is get a location (in this case an array representing a longitude and latitude). planner.js: var plan = function (lawnmower, yard) { var currentPos = lawnmower.position; alert(currentLong); lawnmower: var lon...
How can data be masked based on an attribute on a property? Example property: [MaskData] public string DataToMask { get; set; } I am using a ValueResolver currently to do it, but it has nothing to do with the attribute on the property right now. I would like to transition it over to an extens...
I finally figured out how to make a dependent drop down. FINALLY. My problem is when I change the first drop down, the second one still has the options from the first option. Drop down 1: Fruit Vegetables Fruits Drop Down info: Apples Bananas Vegetables Drop Down info: Carrots Cucumbers If...
I am trying to login into Sears.com using Selenium webdriver.clicked on Sign in link-->login form opens. But unable to locate the text box element inside the login form. The login form is inside an iframe (frame Name =easyXDM_default5914_provider).This iframe is inside div (id=modaliframe) dri...
I am using camel route builder to move one activemq jms message from one queue to another by setting some custom header, by using xpath to read the node value from xml. nothing has been set. Please suggest if you know the answer. from("activemq:com.queue1") .setHeader("orderNumber").xpath("/...
I am attempting to cross-compile a software library for Win32 using minGW on Ubuntu Trusty. The library requires Clang / LLVM. I can set the build target to mingw32 in CMake successfully. However calls to clang / LLVM fail for one of two reasons: If I use my Linux target clang / LLVM, it looks ...
I am getting device leak reports (and a non-zero ref count dialog) from the D3D11 debug runtime. I have two global classes that contain smart pointers to the layout buffer, vertex shader, and pixel shaders. If I place a breakpoint on the destructor of those classes, I can see the leak reports h...
There is a ForumThread class: class ForumThread extends DbTable { public function insert ($threadId, $comment) { SQL INSERT INTO parent::tablename VALUES $threadId, $comment // email sending how? // putting this on a "notice-wall", how? } } some other functi...
I have a fairly complicated chart I'm trying to design in Highcharts, it is dual-x-axis stacked column chart. Curious if anyone has had luck with these sorts of charts in Highcharts. Thanks for any help. http://s284.photobucket.com/user/dsheets1/media/CostCurve/CostCurve_zpsp0gfytgf.png.html ...
I am currently allowing a selectlist to have an initial value of "". The user can choose whether to fill in this option or leave it on the default value. This selectList works on an ID, where the ID is passed to my controller. However, as an int is not being selected, the ModelState results ...
Why does my google chrome chash every time and it gets Aw Snap error. I tried even changing from windows versions and it didn't work... (I formated my HDD and installed windows xp, it didn't work, then i tried windows 7 ultimate and it didn't work now i have windows 7 home basic) And sometimes ...
I have ELK installed on a VM in my laptop.Elasticsearch is up and running. ./bin/logstash -f logstash-filter.conf gives me the below error Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME. I tried setting up JAVA_HOME and $ PATH, still the issue is p...
I'm running a meteor app that connects to a SQL and Mongo database. When I start the app I get this error after successfully connecting to MSSQL. I don't know if the error is related to Kadira or not but here's what happens: Every once in awhile the app will successfully run, only to exit and re...
The STUN RFC-5389 describes a MESSAGE-INTEGRITY attribute. Chrome and Firefox appear to implement and require this, using the Short-Term Credential method. I believe this because I see demos work without a Realm passed in the SDP. The MESSAGE-INTEGRITY payload is a 20-byte HMACsha-1 Hash using ...
If I have a data frame df (indexed by integer) BBG.KABN.S BBG.TKA.S BBG.CON.S BBG.ISAT.S index 0 -0.004881 0.008011 0.007047 -0.000307 1 -0.004881 0.008011 0.007047 -0.000307 2 -0.005821 -0.016792 -0.016111 0.001028 3 0.0...
In swift, how do I add an icon to the navigation bar on the side instead of the middle? I want to do what Slack does with their search icon by having it appear just next to the right menu icon, see picture here: https://static-s.aa-cdn.net/img/ios/618783545/1b2dca063c580767bf28c885e22c61bc I DO ...
I use this code to export Datatable to excel file (.xlsx) Dim attachment As String = "attachment; filename=Excel.xlsx" Response.ClearContent() Response.AddHeader("content-disposition", attachment) Response.ContentType = "application/vnd.ms-excel" Dim tab As String = "" For Ea...
I am trying to print our the md5 hashes for the files within a directory recursively using Python, but I'm having problems with the variable in my open command producing false hashes. Here's my code: import os import hashlib blocksize = 65536 md5_hash = hashlib.md5() for root, dirs, files in o...
I have two questions about void pointers; we have: void * foo=malloc(99) void **bar=(void**)malloc(99); int i=1; bar++; *bar = foo; 1.Is the above equivalent to the following? bar[i++] = foo; If yes it's unexpected because bar++; moves the double pointer forward and not single pointer, wh...
Is it possible to handle partial PUT requests in PHP? I would like to create a service where clients might upload large files via PUT requests. If they lose their internet connection, I'd like these clients to be able to resume the upload.
Here is a function called by my controller: public ActionResult ExecuteRule(string rawSql, List<PdsMatchRuleParam> parameters) { var da = new DataAccess(); var ruleSql = ruleRawSql.Replace(@"{KEY}", "@pkey"); var dbParameters = new List<DataAccess.DbParameter>(); ...
I have a Bootstrap 3 navbar with left nav items and right nav items. When collapsed I want to have all the items on the left, having the navbar-toggle aka 'hamburger menu' on the left as well. like the following: <nav class="navbar navbar-default custom-navbar" role="navigation"> <div class="...
I am automating a report that currently has 3 dates set parameters, the user enters. Note our dates are in yyyymmdd format. We want that the first set will be from the current date: ToText(CurrentDate, 'yyyyMMdd') till end of year. I can hard code 20151231 but would prefer not to. How would you ...
I am dealing with a humongous data set that is about 800k rows by 150 columns. Before I run the data through some tests, I want to clean the data set to check for and duplicates (entire rows). I thought the unique function is supposed to compare rows to other rows and remove if the an entire row ...
i am trying to set cursor adapter with two different layouts, first one must be unique, others - the same, but getItemViewType(cursor.getPosition()); always return 0... here is my adapter: public class MyAdapter extends CursorAdapter public static class ViewHolder { public ViewHolder (View r...
I have a method that inserts a record into a Postgres DB and returns the identity field generated for said record. The problem is, if I include the Redshift driver in my POM file, that driver is getting used instead of the Postgres driver - and the Redshift driver doesn't allow returning the ide...
I have been trying to import a java class into a jsp page using the typical syntax: <%@ page import="packageName.HelloWorldTest" %> and <%@ page import="packageName.* %> Whenever I try I receive this error: PWC6199: Generated servlet error: cannot find symbol symbol: class ...
I have tried TinyMCE but even if you edit the HTML code behind some text, when you then go back to the editor and hit "enter" for a new line or start typing, it changes all the code. Is there an HTML5-based rich text editor that can output consistent HTML code to represent the text?
I have set of data that is not necessary to store in database. @javax.persistence.Entity @Table(name = "users") public class UserEntity extends Entity { private static final long serialVersionUID = -7807480090652491368L; @Transient private Set<Long> productsIds = new LinkedHashSet<...
Java has both the File class and the Path interface file operations. I've seen instances of the newer one, Path, act in many cases as a replacement for the traditional File class. Obviously, it is trivial to move between the two with Path.getFile() and File.getPath(). Are there situations where ...
My JMeter test begins by creating a session with an HTTP request, and the session ID, which is needed for most of the subsequent calls, is extracted from the response using the JSON Path Extractor plugin. The id is stored in a destination variable called id_JSON. Several calls after this use ${i...
arrayOne(1) = A arrayTwo(1) = B arrayOne(2) = C arrayTwo(2) = D arrayOne(3) = E arrayTwo(3) = F I need to loop through two arrays to call a sub. Note the sub is always called in pair, e.g.: Sub(arrayOne(1), arrayTwo(1)) Sub(arrayOne(2), arrayTwo(2)) Is it possible to initialize a fo...
Can someone go into detail what this means and how it is possible? Would one just rewrite it at the top of the code instead?
I'm not even sure this is possible with MVC Razor, but I would like to pass my Dictionary that includes another Dictionary to my view and display the child Dictionary keys and values. public Dictionary<int, dynamic> Getdata(DateInfo dataInfo) { //Create a parent dictionary Dictionary<int, dynamic>
lets say we have : class Range{ public long start; public long end; } I have this Entity : @Entity @Table(name="entry") public class entry{ @Id long id; @OneToMany Set<Individual> individuals; } And This Entity @Entity @Table(name="individual") public class Individual{ @Id long id; long co...
I'm new to Google Cloud Compute and I'm no developer or coder. But I've been following the information step by step guide. http://www.filiwiese.com/running-screaming-frog-on-google-cloud/ Unfortunately as of today "gcutil" has deprecated and I'm at a loss how to follow the instructions. I tried...
I'm having trouble finding documentation on how to format table view definitions. Here's what I have: What I see on document in collection: { some_number: 1111111111 } View definition: { "Number": "some_number" } What I see in table view: Number 1.111111111E9 While they're technically...
It is often said that hash is the most performant algorithm for dictionaries, but my impression is that it seems to be efficient for large dictionaries, like million of keys/value pairs. What algorithm is known to be fast for very small dictionaries, like 1-10 entries (but maybe millions of dict...
I have a custom progress bar drawable.it's works in my two mobiles device and good render this image: but not working and render in Huawei x1 4.2.2 . this is render from that: my progress bar drawable : <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Define ...
I am using the TabLayout from Android Design support library. How can I use MODE_SCROLLABLE along with GRAVITY_FILL so that it looks the same across all devices and orientations? Currently if I use MODE_SCROLLABLE, it looks good on 7" tablet, but on 10" tablet, the tabs are aligned to the left. ...
I got this error: "TypeError: d.$$minErr is not a function". It seems to be a problem with angular-route. My code: index.htm: <!DOCTYPE html> <html ng-app="myApp" lang="en"> <head> <script src="js/angular.min.js"></script> <script src="js/angular-route.min.js"></script>
First time posting here so if I'm doing something wrong let me know...new to the whole programming thing. So in my class we are doing the zip to bar code converter program. I have the program running fine and now I am just trying to cut down on the redundant or repetitive coding. For instance wi...
I have an ipython notebook running in my browser, and I have a NameError for 'x', in which it's defined just above, but simply doing "print x" creates said NameError. I noticed that the line number is number belowed the cell above, despite being situated below it. How do I reorder cells so that t...
I created my first Animation class which calls Animation_SS. To make this class i take code from: https://github.com/libgdx/libgdx/wiki/2D-Animation. I transformed code from this site to my class. I dont know why but after run program it's immediately closed. I use libGDX lib. Here is console Ex...
I'm Looking to update an old frontpage website into a wiki-like format. It has quite a bit of content so I'd like something that makes it easy to transfer things from an old site. It must be hosted on a local linux server, and allow users to input information that will be fact checked by an admin...
I've set up geoserver and a POSTGIS DB on openshift. I can confirm that I have data in the DB because I can connect to it with QGIS and add layers....Now I am trying to create a simple map with one layer but can not find any tutorials on this... The below code works with a local instance of data...
I am writing a database to manage a sport league table which needs a separate tabe to hold details of occasional points variations that fall outside the normal logic of the league table calculation. The two tables I have are CREATE TABLE IF NOT EXISTS `fixtures` ( `id` int(6) unsigned NOT...
If I type the formula 1/4*pi()*($A$1)^2 as a string in a cell and assuming I have a value in $A$1, I use the following VBA function in a third cell to evaluate the formula: Public Function E(byval TextFormula as String) as Variant E = Evaluate(TextFormula) End Function Is there a way to us...
I have been working on a new Tumblr theme for a while now, because my present theme isn't as original (or accessible) as I would like. I used a popular "Hollywhood" theme template. I created a background in Photoshop, and input an "#entries" box into the code. So far, the theme looks good to me: ...
I'm trying to integrate part of the Adobe Creative SDK (the part that used to be Aviary) with a project (an Android app), so I can include some image editing. This is really my first time programming in Java, or doing app development, so I'm not too sure what is happening. I've copied some code...
Hey so i am trying to save the current time into shared preferences but for some reason the current time is of by a ridiculous amount. I have checked the date settings on the device itself and the date there is correct and i cannot find a problem like this anywhere so i am hoping someone here ma...
I am attempting the problem HORRIBLE from spoj and here's the link: http://www.spoj.com/problems/HORRIBLE/ I am trying to teach myself lazy propagation with segment tree. Following is the code I have written, I have tried to make it as concise and clear as possible, please let me know if somethin...
I have the following piece of code: def run(self): filename = QtGui.QFileDialog.getSaveFileName(self, "Save file", "", ".inp") if filename == "": pass elif filename != "": nfile = open(filename, 'w') self.pixmap1 = QtGui.QPixmap('yellow...
I have a set of images that I want stacked one over the other. I am working with bootstrap, and I kept a parent div at the center of a jumbotron. This div encloses an image, and absolutely divs which further contain images. However, when I apply width:100% to the child divs, they end up being lon...
In the following, returnTo is added to the session object by my passport methods. How do I declare its interface in typescript? import express = require('express'); import expressSession = require('express-session'); // how to declare presence of returnTo, which is not in underlying type? exp...
I have three 3 divs <div id= "product_1"></div> <div id= "product_2"></div> <div id= "product_3"></div> <div id= "product_4"></div> <div id= "product_5"></div> I am changing the ids dynamically var hotelCode = CUNMXHIDD,CUNMXMAYA,CUNMXDSAN var splittedHotelCode = hotelCode.toString().split('...
I was happy I had found a way to remove an fullcalendar event by dragging and dropping it on a div, but unfortunately, since v2.1, fullcalendar does not send the jquery ui element to the eventDragStop function : jQuery FullCalendar event deletion by dragging How can I replicate this behaviour w...
How do I use the sum in Cognos report studio for the Final Policy Premium? Table 1 is the result (highlighted in Blue) that I currently get even if I set the Data Item (Final Policy Premium) into Total. My goal is to see the results as shown in Table 2. Note: I removed the other columns as I th...
While building a website for a client, where I wanted to implement a push menu navigation, I noticed that the margin-left property does not properly work anymore when applied to the whole page (e.g. html, body, page-wrappers,...). Instead of pushing the whole content to the right (beyond the page...
Is it possible to define different locations in your NPM package for browser and for server (NodeJS)? My code is largely isomorphic, but it is uglified and concatenated for browsers.
This is probably a pretty simple issue, but when I play a ram preview I want it to stop at the end of the work area but the playhead jumps back to the beginning of the timeline so I can't even see the animation complete. I don't think this is a RAM issue because it's a very very small animation. ...
My telegram bot is too slow recently. My server response time is fast, I use webhook for get telegram messages. Does telegram bot API have rate limit? what can I do?
I am using automapper. The code looks something like this: var processedRecords = await queriedRecords.Project(x => Mapper.Map<BsonDocument, RecordViewModel>(x)).ToListAsync(); My problem is that I cannot put System.Diagnostics.Debug.WriteLine() inside the map...
I turn on wifi. Android/iPhone remembers att-wifi, boingo-hotspot, goesh, and a number of other SSIDs to which I have connected. So it automatically connects whenever it sees one such, and I am stuck in my app because I did not log in through captive portal. Is it possible for us to detect if th...
I've gotten lost in an edge case of sorts. I'm working on a conversion of some old plaintext documentation to reST/Sphinx format, with the intent of outputting to a few formats (including HTML and text) from there. Some of the documented functions are for dealing with bitstrings, and a common cas...
Sometimes when I press : from normal mode, it starts with : ' < , ' >. Why does this happen and what is it good for?
I have adapted the following webpage to my needs and added a bit of code so it now has select2 dropdown menus instead of regular select menus (which I like a LOT better). However I have not been able to figure out how to adapt the code so I can use it only on specific columns instead of on every ...
I want to change this url http://localhost/RedHat/movbase-backbone/php/sql/movie.php Into this http://localhost/RedHat/movbase-backbone/movie I tried creating a rule in my .htaccess file but whenever I go to /movie I get a 404 error. Here is my rule RewriteEngine On #RewriteBase / Rewrit...
I am trying to create a child process, redirect its stdin and stdout to the parent process, and interact with the child process. That is, the parent process should be able to receive input from the child, process it, and provide output to the child, and the cycle repeats (like user interaction wi...
Im building a report, i make the GROUP BY in the SSRS (not in the DataSET), means that the group created in the SSRS, now, how can i pass the values of the group to the Drill Down? p.s - PseudoCOde: the DataSet (build in sql server 2008): Alter.... Select ...Concat(x) MyX ,DocumentI...
I'd like to do something like this: public async Task<int> DoWork(int parameter) { try { await OperationThatMayCompleteSynchronously(parameter); } catch(Exception) e { if(completedSynchronously) doSyncThing(); else doAsyncThing(); } } ...
I'm relatively new to database driven sites. In order to backup a database I use phpmyadmin's export function from the server and download the output to my computer. That works but it requires me to do this on a regular basis. As I build more db driven sites, the process is going to become cumber...
These are the settings that worked for me on: Windows 8.1 (x64) PhpStorm 8.0 NodeJs v0.10.35 Symfony 2.7 (recently updated) I want to share it with everyone else, due to a full day of searching without success a just example out there. # Assetic Configuration assetic: debug: "%k...
I need to match a set of URLs and they all must contain a specific query param (type=VCL) So far I have /http:\/\/myhost:8080\/organization\/(\d*)\/mediaResource?.*$/ Which matches urls formed like http://myhost:8080/organizaton/5/mediaResource?anyParam(s) but I need to only get matches if th...
I'm using Satellizer to handle authentication on my app, by default Satellizer intercepts all request and adds the Authorization header. I do all the request to my API using Restangular but I don't want to send the Authorization header in all the request I make, for example the login and signup e...
I looked around at enigmail.net and read in the enigmail wiki(http://enigmail.wiki/Signature_and_Encryption) this: OpenPGP uses hybrid encryption: First it generates a random session key, and encrypts the message with the session key using a symmetric algorithm; then, for each intended recip...
I'm trying to get date picker to work, however i'm suspecting that no kind of javascript whatsoever works. The following is my form: <%= form_for(@item) do |f| %> <%= f.text_field :available_from, class: "available_from" %> <%= f.submit "Begin", class: "btn btn-primary btn-block btn-lg" %>
I am trying to create a data analysis program using vb.net. The data is in an excel file.The X Values are in A col from A2, Y Values are in B col from B2. I am able to generate a chart from these data. My question are: How do I format the chart: 1. Add Title ...
I have the following class definitions: [ProtoInclude(2, typeof(Foo))] public interface IFoo { double Bar { get; } } [ProtoContract] public class Foo : IFoo { [ProtoMember(1)] private double _bar { get { return Bar / 10; } set { Bar = 10 * value; } } d...
I'm trying to add a button to the edge of the screen like this: I tried using the code below but since the rotation is around the center there is space on the right side of the button about half the length of the button. android:rotation="270" android:layout_gravity="center_vertical|right"
I am trying to create a program that would display mandatory fields for a particular issue type for a project. So far I am able to display values for projects and issues using the JRJC. However I am not able to figure out how to display a default screen. Anybody face the same issue ? Thanks
Yii2-Smarty: Cannot Access Object Methods I set up Yii2 with smarty extension. Now I am trying to simply convert the layouts/main.php file to a smarty template. For that I need access to the current yii\web\View object which is given from the extension as $this-smarty-variable. I've validated...
I know there are tons of questions about Fragments and I read many, but it seems I haven't grasped it yet. My app has 9 Fragments. On one of them, say Fragment X, I am playing media and from there it shows up another Fragment on screen, say Y. To perform that, I thought the best was using replac...
Our CodeIgniter 3 source code has an Auth class located in applications/libraries with the following function: public function login($attempt) { $CI = & get_instance(); $CI->load->model("users"); // Store password entry $password = $attempt["password"]; // Get user from dat...
I am trying to write a code which says whether you are cheapskate, patron, etc depending on the amount you donate. This is the code: public class Donor { public static void main(String [] args) { System.out.println(" % java Donor"); System.out.print("Enter the amount of a contribution:...
the problem is this (It must be mentioned that I am using the ionic framework) : I watched a video about a new directive helping people with paginating. https://www.youtube.com/watch?v=tASrOwMSfcg I installed the directive following the instructions. https://github.com/michaelbromley/angularUti...
I have the following code which I wish to use for inserting a record into an entity of an ODATA service. The post request throws a XMLHttpRequest cannot load Invalid HTTP status code 501. Apparently GET request works fine. Can anyone suggest a way to find out the problem ? Does my WCF Service ...
Ok , I am aware of this error and know why I get it. I have been searching for hours now and have not found anything useful. I read an article that was saying that by using two DataAdapters working on the same DataSet will fix this. One that reads and one that writes. This is my connection. ...
So I feel incredibly frustrated. I am doing www.railstutorial.org and they require a very specific version of rails (4.2.2). I have installed it as they wanted. Put in their Gemfile specs on their "hello_app" app they provided. When I run "rails server" I get an error message saying that "byebug"...
I am looking for an interactive tool to practice Java Online. For ex : Code Academy. Does anyone has any references? Thanks!
I have a question concerning styling elements on retina display devices that I was hoping someone could help me with. Please excuse my ignorance but I've been attempting to understand this for a couple of hours now to no avail. Let's say that I have an image with a 44px width on a normal device ...
Ive got a table which consists of two fields called follower_id and followed_id. I need to create a query which creates an array of from each row and puts that in an overall array so that the end structure looks like: "edges": [ ["1", "2"], ["1", "3"], ["3", "4"], ["3", "5"] ] ...
I'm new in cakephp and I want to make a Pagination inside every element to go to the next element, this is what i want to happen. Inside web.com/multimedia/view/1 Press "Next" and go to web.com/multimedia/view/2 My Paginator in view.ctp: <div class="paginator"> <ul class="pagination"> ...
I'm playing around with the QNX Momentics IDE, and I created a super simple "Hello World" program. It builds fine, but when I try to run it I get 'Launching HelloWorld' has encountered a problem The details simply say 'Error starting process', 'Launching failed', and 'Cannot run program'. ...
I have been following this tutorial building Tumblelog with Flask and MongoEngine. Here is the Github page. I tried to run the app on localhost but I get the following errors: p:/desktop/flask-tumblelog-master/tumblelog $ python manage.py runserver Traceback (most recent call last): File "mana...
Suppose I want to have a list of item as below arr["john"] = 40 arr["mark"] = 12 arr["clark"] = 53 arr["sam"] = 23 Now I want to sort them depending on the values as below arr["clark"] = 53 arr["john"] = 40 arr["sam"] = 23 arr["mark"] = 12 How can I do this?
From the standard SSL client example. Say I call this function. boost::asio::async_connect(socket_.lowest_layer(), endpoint_iterator, boost::bind(&SSLClient::handle_connect, this, boost::asio::placeholders::error)); ...
I am using JSP to create my web page. I need to use java classes to access the data that I need to pull from another website's JSON (this CANNOT change). Say I have the code: <div class="fruit apple"></div> <div class="fruit banana"></div> //"fruit peach", "fruit orange", and so on... style.a{...
I am using Python 3.4 to write a script that pull data from Yahoo Finance's ChartAPI page by using urllib to pull the data and store it in a text file and numpy to unpack it. However, when ever I try to access the last element in a list by using [-1] I end up with the second to last element inste...
I'm using a custom UICollectionViewCell which I call ExampleCell, within a UICollectionView, and the images I am trying to set for the cells are not showing up, and the app crashes. I found a similar question here, and I followed the comments to the best of my knowledge, but it didn't help. When...
Currently I am setting up an admin login page with PHP and this is how I have it set up. If the user navigates to website.com/admin, it returns a 404 error. The only way to get access to the admin login is to go to website.com/admin?key=. If the key in the URL doesn't match the key in the databa...
How do I stdin ESC the "esc" button on a keyboard? I have discovered that "0x1B" or "^[" is the outputted result of ESC but how can I input ESC?
I'm having some trouble figuring out the best way create an easy way to test some of my DB centric application code. Maybe I am skewed from more OO languages, but what I am trying to do is start the application, seed the database, pass seeded data to the test, then clean up the database. I was tr...
I'm trying to make a HTTP call using the Requests HTTP library for Python. I have this code: import requests import json body = json.dumps({"on": "false"}) url = "http://192.168.100.100/api/0000/lights/4/state" r = requests.put(url=url, data=body) However, the API responds with "error": { ...
Works: <div onclick="UpdateAttributes();">Update</div> <script> function UpdateAttributes() { alert(1); } <script> Doesnt work: (UpdateAttributes is not defined) <div onclick="UpdateAttributes();">Update</div> <script> $(function(){ function UpdateAttributes() { ...
Is there any way to generate documentation for a R shiny application? It becomes very hard to maintain a shiny application without documentation. It seems that all the eco-system of tests/documentation is created for an R package structure. Maybe we can emulate/extend this behavior for a shin...
I have two elements - a parent and a child. Both have on click event handlers. If I click on the child element then both event handlers run - parent's first then child's (at least on chrome). I don't know how the browser determines which order to run the events in, but is there a way to specifica...
def is_multiple(m, n): """ >>> is_multiple(12, 3) True >>> is_multiple(12, 4) True >>> is_multiple(12, 5) False >>> is_multiple(12, 6) True >>> is_multiple(12, 7) False """ c = m / n d = int(m / n) if (c-d)== 0: ...
I'm new in developing an android game, but i have a lot of questions, so i hope you could help me :) Q1: Dpi, Dp: I read almost all the questions in the topic, but i haven't got an answer yet. Some say i don't have to bother with densities, resolution or screen sizes, some say the complete oppos...
INFO I have a grid of div's. Each div opens a modal. Each modal has a simple thumbnail gallery (click thumbnail, main image is replaced). PROBLEM Zoom is only working with the original main image. It doesn't realize there is a new main image after clicking a thumbnail so it continues to zoom the...
I have strings of this kind hello 45 blabla 12 100 code 45 13 093bb I am searching a regular expression that I can use with Python to match the second number that follows the keyword code. In this example the "13" should be returned. Here is the solution I found s = "hello 45 blabla 12 100 ...
Conclusively speaking I have class A that contains a instances of B. And in class A, I pass a function of A as selector to A method of B. And B use this selector to register notification. However, when the notification comes in, it could not run the selector and show "unrecognized selector sent ...
When I run this code: List<Map<String, Object>> beforeDelete = query("select count(*) from wp_announcement where announcement_id =" + announcementId, null); System.out.println("This is the count : " + beforeDelete.get(0)); I get this result: This is the count : {C1=1} How can I get just 1,...
While using Dropbox, the sync status is shown by mark on the file/folder itself (e.g. not synced is shown by red AND sync complete is shown green). I have also seen that GIT also provides such feature showing different marks for different status of files/folders. e.g. Committed, Untracked, Synced...
In my application (developed using spring jars - struts module), button click invokes an operation (which basically copies certain set of data with version numbered n to version numbered n+1) this operation takes quite longtime in the database. Is implementing a multi-thread from service layer (...
I'm having a hard time adding a default text to a drop down list. I want to have a default "Select a department..." text to my drop down list. Where the text has no value at all and will never be add to the database when selected. It is just a display, like an instruction to a user. void GetU...
In an app I am working with, we are adding an MPMovePlayerController to a UITableViewCell and then auto playing it. The problem is, calling prepareToPlay and/or play causes the app to freeze, CPU maxes out, RAM continuously increases, and the app will of course crash after a little while. If I co...
I just started to learn Swing, and I encountered a NullPointerException when I try to use the constraints in adding widgets to my content. Error Trace: NullPointerException at chapter.pkg6.ImprovedForceCalculator.<init>(ImprovedForceCalculator.java:56) at chapter.pkg6.ImprovedForceCalculator.ma...
I started reading a book on Java a few days ago to program an app for my android phone but what tools do I need installed on my pc to code software and test out my game? And how when I have my software developed do I publish it to google play for purchase?
I a having a div element which get populated on a button click, it looks something like this. http://localhost:8080/sample?q1=asd&q2=ads I want to hide particular query parameter (say q1 here). How do I do that ? I want a solution in eithre js/jquery/html.
Here is my code: <?php if(isset($submit)){ require 'db/connect.php'; $sql = "SELECT ID from users WHERE username='$username' AND password='$password'"; $entered_user = mysql_query($sql); $num_rows = mysql_num_rows($entered_user); $errors = array(); if( $num_rows != 1 ) { $errors[] = '-Account ...
I am using angular-jquery-timepicker directive to fill a selectbox with hours in AM/PM format. The selectbox are filled correctly. But when i select some time, the ngModel value has an invalid Date. To add a new couple of timepickers, i push the next object into a collection: var setting = { ...
My site has a 2 column layout that was working fine until I added 2 boxes that spanned 100% of the right column. (The About Me and Contact US boxes) When I did that, the content in the left column was pushed to the bottom. I kind of understand (I think) why it's happening. I think my math is o...
I have a html/js setup such that '#time' element appears dynamically and so I need to wait until it exists. I tried the plugin from this stackoverflow thread but I get an error such as Uncaught TypeError: waitUntilExists is not a function Does the function definition $.fn.waitUntilExists need t...
I got a panel data. symbol is my company names. date and hour represent the time. I want to create upto 65 lagged return variable. I can achieve this target using the following code. However, I have to copy and paste 65 times which is very messy. Can anyone tell me how can I improve the code plea...
I've attempted to debug this on my own, but I can't figure it out! I'm getting segmentation faults sometimes when running my code, when there's not a seg fault it runs just fine and works. Any guidance would be appreciated, thanks! Here's what I have so far: #include <iostream> #include <vector>...
I've got a question more for my own learning experience than anything as I've already found a solution, or two to be more specific. The issue was that I have a web service I connect to with an application, but the web service can be deployed different ways, IE, IIS Virtual Directories, or Separa...
I like to create unit tests for my unmanaged extension I wrote for a small Neo4j project. GraphDatabaseService db = new TestGraphDatabaseFactory() .newImpermanentDatabaseBuilder() .setConfig(GraphDatabaseSettings.pagecache_memory, "512M") .setConfi...
I'm not very good at jQuery or Javascript in general, but I've managed to cobble together something. Please bear with me, and forgive my ignorance. jsfiddle.net/g30j3ckd/1/ Basically I've set up some jQuery that will allow users to click anywhere in a table row, to select the check box in the ...
I want to open a link in a new tab. I am using watir, watir-webdriver and chrome. I need to press ctrl + T. How do I do it ? This does NOT help - browser.element.send_keys [:control, 'T'] Exception - C:/blah/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/keyboard.rb:48:in assert_mo...
This is probably a VERY ridiculous question, I have little experience in Java. I want to enable my class to access and get information from an excel workbook using apache POI. I am using: XSSFWorkbook mybook = new XSSFWorkbook("Filepath"); But this throws "unhandled exception type ioexceptio...
In my html page, I have a php iframe that gets its variables from the form using post method. This works fine. My problem is this: I would like the php iframe to auto-refresh (which it does), but , understandably, I get undefined index errors from php the first time the iframe auto-refreshes. ...
« first day (616 days earlier) ← previous day next day → last day (458 days later) »