Questions Tagged with #Aot

In Microsoft Dynamics AX, application objects are defined in the Application Object Tree (AOT) and are instantiated at runtime. The AOT also contains application resources, references, and documentation. This section describes the AOT and its contents, how to use the AOT to define application objects, and how to import and export definitions of application objects.

error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class

First time using firestore and I'm getting this error. It seems to be a problem with Ivy, from my research. I don't have a lot of experience modifying tsconfig.app.json, which is the direction I've be..

error: This is probably not a problem with npm. There is likely additional logging output above

In my project, I'm using Angular6 for the frontend. Now what I'm trying to do is deploy my project which is in remote server into the actual server. I'm using npm run build -prod command to build the ..

Can not find module “@angular-devkit/build-angular”

Using npm, I followed the getting started directions on the Angular CLI quick start page. Angular CLI Quickstart Running ng serve --open after creating and going into my new project "frontend" gave..

Could not find module "@angular-devkit/build-angular"

After updating to Angular 6.0.1, I get the following error on ng serve: Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName". Error: Could not find module "@angul..

No provider for HttpClient

After upgrading from angular 4.4 to 5.0 and after updating all HttpModule and Http to HttpClientModule I started to get this error. I also added HttpModule again to be sure it's not due to some depe..

How to decrease prod bundle size?

I have a simple app, initialized by angular-cli. It display some pages relative to 3 routes. I have 3 components. On one of this page I use lodash and Angular 2 HTTP modules to get some data (using R..

Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

I have a WinJS project that is previously built on Windows 8.1 using VS 2013. Recently I upgraded this project to Universal Windows 10 by creating a blank Javascript Universal windows 10 project and..

Error LNK2019: Unresolved External Symbol in Visual Studio

I've downloaded this C++ code from the SBIG website in order to control (take pictures and save them) the camera (model ST-401ME) which I purchased from them. I have a Matlab program which needs to ca..

Include an SVG (hosted on GitHub) in MarkDown

I know with that an image can be placed in a MD with the MD syntax of either ![Alt text](/path/to/img.jpg) or ![Alt text](/path/to/img.jpg "Optional title"), but I am having difficulty placi..

Annotation @Transactional. How to rollback?

I used this annotation successfully for a Dao class. And rollback works for tests. But now I need to rollback real code, not just tests. There are special annotations for use in tests. But which ann..

Hibernate: failed to lazily initialize a collection of role, no session or session was closed

My code: @Test public void testAddRoleAndAddUser() { Role r = roleDao.findByProperty("name", "admin"); if(r == null) { r = new Role(); r.setName("admin"); r.setDe..

How to Load RSA Private Key From File

I am working on a test harness for a SAML 1.1 Assertion Consumer Service. The test must generate a signed SAMLResponse and submit it to the ACS encoded in Base64. The ACS must be able to verify the ..

Eclipse - java.lang.ClassNotFoundException

When trying to start my JUnit-Test out of Eclipse, I get a "ClassNotFoundException". When running "mvn test" from console - everything works fine. Also, there are no problems reported in Eclipse. My ..

Cause of No suitable driver found for

I'm trying to unit test (JUnit) a DAO i've created. I'm using Spring as my framework, my DAO (JdbcPackageDAO) extends SimpleJdbcDaoSupport. The testing class (JdbcPackageDAOTest) extends AbstractTra..

SQL Server converting varbinary to string

I want to do conversion in T-SQL from a varbinary type to string type Here is an example : First I got this varbinary 0x21232F297A57A5A743894A0E4A801FC3 And then I want to convert it to 21232f2..

App store link for "rate/review this app"

I want to put a "rate/review this app" feature into my app. Is there a way to link directly to the screen in the app store where they review the app? So the customer doesn't have to click through th..

Print range of numbers on same line

Using python I want to print a range of numbers on the same line. how can I do this using python, I can do it using C by not adding \n, but how can I do it using python. for x in xrange(1,10): pr..

How can I modify the size of column in a MySQL table?

I have created a table and accidentally put varchar length as 300 instead of 65353. How can I fix that? An example would be appreciated...

Best way to incorporate Volley (or other library) into Android Studio project

I've seen different advice on the best way to do this This question covers creating a jar. Elsewhere, I've seen advice to simply copy the volley source into your own project. This section on libraries..

How to check if $? is not equal to zero in unix shell scripting?

I have a script which uses test command to check if $? (return code of last executed command) is not equal to zero. The code is as follows: - $? is the exit status of the last command executed. if (..

Git push results in "Authentication Failed"

I have been using Github for a little while and I have been fine with git add, git commit, and git push so far with no problems. Suddenly I am having an error that says: fatal: Authentication Fail..

Which ChromeDriver version is compatible with which Chrome Browser version?

Actually I'm a bit confused. Although I read several resources about this. For having a test of Selenium 3 using ChromeBrowser we need an extra app called ChromeDriver. I found this text from GitHub..

Are strongly-typed functions as parameters possible in TypeScript?

In TypeScript, I can declare a parameter of a function as a type Function. Is there a "type-safe" way of doing this that I am missing? For example, consider this: class Foo { save(callback: Funct..

Hide the browse button on a input type=file

Is there a way to hide the browse button and only leave the text box that works in all browsers? I have tried setting the margins but they show up different in each browser..

Submit a form using jQuery

I want to submit a form using jQuery. Can someone provide the code, a demo or an example link?..

AngularJS Directive Restrict A vs E

I'm working in a small team, building in AngularJS and trying to maintain some basic standards & best practices; especially given we're relatively new with Angular. My question is with regards to..

How do I parse JSON into an int?

I have Parsed some JSON data and its working fine as long as I store it in String variables. My problem is that I need the ID in an int varibable and not in String. i have tried to make a cast int id..

How do I get the currently-logged username from a Windows service in .NET?

I have a Windows service which need the currently logged username. I tried System.Environment.UserName, Windows identity and Windows form authentication, but all are returning "System" as the user as ..

Serialize form data to JSON

I want to do some pre-server-validation of a form in a Backbone.js model. To do this I need to get the user input from a form into usable data. I found three methods to do this: var input = $("#inp..

Adding class to element using Angular JS

I know how to add a class on click of a button in 'jQuery' $('#button1').click(function(){ $('#div1').addClass('alpha'); }); I want to achieve same thing by angular js. I have a controller - myCon..

How to convert / cast long to String?

I just created sample BB app, which can allow to choose the date. DateField curDateFld = new DateField("Choose Date: ", System.currentTimeMillis(), DateField.DATE | DateField.FIELD_LEFT); After c..

How to get text box value in JavaScript

I am trying to use JavaScript to get the value from an HTML text box but value is not coming after white space For example: <input type="text" name="txtJob" value="software engineer"> I onl..

How to see local history changes in Visual Studio Code?

I'm looking for a way to see my local history changes. Kind of the equivalent way in WebStorm: ..

Delete the first three rows of a dataframe in pandas

I need to delete the first three rows of a dataframe in pandas. I know df.ix[:-1] would remove the last row, but I can't figure out how to remove first n rows...

How to update the value of a key in a dictionary in Python?

I have a dictionary which represents a book shop. The keys represent the book title and values represent the number of copies of the book present. When books are sold from the shop,the number of copie..

Header div stays at top, vertical scrolling div below with scrollbar only attached to that div

I have 2 main divs, the header and a scrolling list contained in a div. I want the header to always remain at the top of the page, and the scrolling list below. The scrollbar should be attached to the..

How to format font style and color in echo

I have a small snippet of code that I want to style from echo. foreach($months as $key => $month){ if(strpos($filename,$month)!==false){ echo '<style = "font-color: #ff0000"> Movie..

Trying to SSH into an Amazon Ec2 instance - permission error

This is probably a stupidly simple question to some :) I've created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to SSH in. When I tried to ssh with:..

Data-frame Object has no Attribute

I know that this kind of question was asked before and I've checked all the answers and I have tried several times to find a solution but in vain. In fact I call a Dataframe using Pandas. I've upload..

Trying to add adb to PATH variable OSX

I am trying to develop for android and I want to add the adb to my PATH so that I can launch it really easily. I have added directories before by for some reason adb does not want to be found. This is..

C++ float array initialization

Possible Duplicate: C and C++ : Partial initialization of automatic structure While reading Code Complete, I came across an C++ array initialization example: float studentGrades[ MAX_STU..

What is the way of declaring an array in JavaScript?

I'm just learning JavaScript and it seems like there are a number of ways to declare arrays. var myArray = new Array() var myArray = new Array(3) var myArray = ["apples", "bananas", "oranges"] var m..

Regex replace (in Python) - a simpler way?

Any time I want to replace a piece of text that is part of a larger piece of text, I always have to do something like: "(?P<start>some_pattern)(?P<replace>foo)(?P<end>end)" And th..

Using JSON POST Request

I'm attempting to use JSON to initiate a POST request to an API. I've found some example code, and before I get too far I wanted to get that working, but I'm stuck... <html> <head> <s..

Removing body margin in CSS

I'm new to web development, and met a problem when removing margin of body. There's space between the very top of the browser and "logo" text. And my code is here on jsbin. Is body { margin: 0;} w..

ORA-06550: line 1, column 7 (PL/SQL: Statement ignored) Error

I am getting following error for the stored procedure and not able to understand the issue (must be from db side) While googling, I found similar issues but couldn't get the solution. Can any one help..

How to setup virtual environment for Python in VS Code?

In my project folder I created venv folder. python -m venv venv When I in VS Code run command select python interpreter my venv folder is not shown. I went one level up like suggested here but VS C..

'pip' is not recognized as an internal or external command

I'm running into a weird error when trying to install Django on my computer. This is the sequence that I typed into my command line: C:\Python34> python get-pip.py Requirement already up-to-date: p..

Host binding and Host listening

How to use the host listener and host binding in angular 2? I tried like the below for host listener, but it's always showing a Declaration expected error. app.component.ts: import {Component, EventE..

How to reset all checkboxes using jQuery or pure JS?

How can I reset all checkboxes in a document using jQuery or pure JS?..

Keyboard shortcut to comment lines in Sublime Text 2

In Sublime Text 2, how do I enclose a selection in a comment? Is there a keyboard shortcut for this action?..

HTML form submit to PHP script

I am making an HTML form. I want the results to appear in the PHP script. <form action="chk_kw.php" method="post"> <br /> <select> name="website_string" <option valu..

Proxy with express.js

To avoid same-domain AJAX issues, I want my node.js web server to forward all requests from URL /api/BLABLA to another server, for example other_domain.com:3000/BLABLA, and return to user the same thi..

"Primary Filegroup is Full" in SQL Server 2008 Standard for no apparent reason

Our database is currently at 64 Gb and one of our apps started to fail with the following error: System.Data.SqlClient.SqlException: Could not allocate space for object 'cnv.LoggedUnpreparedSpos'...

How to find MySQL process list and to kill those processes?

The MySQL database hangs, due to some queries. How can I find the processes and kill them?..

jQuery scroll to ID from different page

I was trying to use jQuery's page scroll inside some pages and could successfully make a smooth page scroll. The only problem I have now is when attempting to do that from different page. What I mean ..

How can I save multiple documents concurrently in Mongoose/Node.js?

At the moment I use save to add a single document. Suppose I have an array of documents that I wish to store as single objects. Is there a way of adding them all with a single function call and then..

Send inline image in email

Having an issue sending an image via email as an embedded image in the body. The image file shows as an attachment which is ok but the inline image portion just shows as a red x. Here is what I have ..

How do I convert csv file to rdd

I'm new to spark. I want to perform some operations on particular data in a CSV record. I'm trying to read a CSV file and convert it to RDD. My further operations are based on the heading provided in..

JAVA - using FOR, WHILE and DO WHILE loops to sum 1 through 100

As the title states, I have trouble understanding loops and have come up with a way to do a simple 1 through 100 sum, but like I said, the loops are causing me some confusion. I think I have the FOR L..

How can I make an svg scale with its parent container?

I want to have an inline svg element's contents scale when size is non-native. Of course I could have it as a separate file and scale it like that. index.html: <img src="foo.svg" style="width: 100..

Peak memory usage of a linux/unix process

Is there a tool that will run a command-line and report the peak RAM usage total? I'm imagining something analogous to /usr/bin/time..

Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server

This should be dead simple, but I cannot get it to work for the life of me. I'm just trying to connect remotely to my MySQL server. Connecting as: mysql -u root -h localhost -p works fine, b..

How to set Default Controller in asp.net MVC 4 & MVC 5

How do I set Default Controller for my ASP.NET MVC 4 project without making it HomeController? How should I setup a default Area when the application starts?..

Import .bak file to a database in SQL server

I have a file with .bak extension. How can I import this date to a database in SQL Server?..

Python Pandas replicate rows in dataframe

If the data look like: Store,Dept,Date,Weekly_Sales,IsHoliday 1,1,2010-02-05,24924.5,FALSE 1,1,2010-02-12,46039.49,TRUE 1,1,2010-02-19,41595.55,FALSE 1,1,2010-02-26,19403.54,FALSE 1,1,2010-03-05,2182..

Get nth character of a string in Swift programming language

How can I get the nth character of a string? I tried bracket([]) accessor with no luck. var string = "Hello, world!" var firstChar = string[0] // Throws error ERROR: 'subscript' is unavailable..

How to get a vCard (.vcf file) into Android contacts from website

I'm trying to add a vCard from a web link to the user's contact list on Android 2.2. When I direct the user to .vcf file, all I get is text output in the mobile browser. I have confirmed that the fi..

How to compare if two structs, slices or maps are equal?

I want to check if two structs, slices and maps are equal. But I'm running into problems with the following code. See my comments at the relevant lines. package main import ( "fmt" "reflect..

How do I sort an observable collection?

I have a following class : [DataContract] public class Pair<TKey, TValue> : INotifyPropertyChanged, IDisposable { public Pair(TKey key, TValue value) { Key = key; Value ..

Check if int is between two numbers

Why can't do you this if you try to find out whether an int is between to numbers: if(10 < x < 20) Instead of it, you'll have to do if(10<x && x<20) which seems like a bit of..

XMLHttpRequest cannot load an URL with jQuery

I'm trying to get some json data from a "remote" website. I run my web service on the 99000 port then, I launch my website on the 99001 port (http://localhost:99001/index.html). I get the following m..

How to replace innerHTML of a div using jQuery?

How could I achieve the following: document.all.regTitle.innerHTML = 'Hello World'; Using jQuery where regTitle is my div id?..

Scrolling an iframe with JavaScript?

I dynamically load an iframe with JavaScript. After it's loaded, how can I make it scroll down a specific number of pixels (ie. after the page in the iframe has loaded, how can I make the iframe scrol..

How to convert DateTime? to DateTime

I want to convert a nullable DateTime (DateTime?) to a DateTime, but I am getting an error: Cannot implicitly convert type 'System.DateTime?' to 'System.DateTime'. An explicit conversion exists..

How to resize Twitter Bootstrap modal dynamically based on the content

I have database content which has different types of data, such as Youtube videos, Vimeo videos, text, Imgur pictures, etc. All of them have different heights and widths. All I have found while search..

How to get value of selected radio button?

I want to get the selected value from a group of radio buttons. Here's my HTML: <div id="rates"> <input type="radio" id="r1" name="rate" value="..

How to bind Dataset to DataGridView in windows application

I have created Windows Application. In this, I have multiple tables in dataset, now I want to bind that to a single DataGridView. Can anybody help me?..

How to deploy ASP.NET webservice to IIS 7?

How can I deploy an ASP.NET web service to IIS 7? I have deployed my webservice to IIS-5 installed on windows server 2008. However, I am not well versed with configuration options in IIS-7. For IIS-..

How can I check if the current date/time is past a set date/time?

I'm trying to write a script that will check if the current date/time is past the 05/15/2010 at 4PM How can I use PHP's date() function to perform this check? ..

Types in MySQL: BigInt(20) vs Int(20)

I was wondering what the difference between BigInt, MediumInt, and Int are... it would seem obvious that they would allow for larger numbers; however, I can make an Int(20) or a BigInt(20) and that wo..

How can I tell which button was clicked in a PHP form submit?

I have several buttons on my page, but I'm not sure how to tell which one was clicked. Here's the markup for my two buttons: <input type="submit" id="btnSubmit" value="Save Changes" /> <inpu..

How do you subtract Dates in Java?

My heart is bleeding internally after having to go so deep to subtract two dates to calculate the span in number of days: GregorianCalendar c1 = new GregorianCalendar(); GregorianCalendar c2 ..

How do I change file permissions in Ubuntu

In Ubuntu I want to change the file permissions of a whole folder and all its sub folders to read/write by anybody I have tried sudo chmod 666 /var/www and sudo chmod 755 /var/www without success up..

Importing CommonCrypto in a Swift framework

How do you import CommonCrypto in a Swift framework for iOS? I understand how to use CommonCrypto in a Swift app: You add #import <CommonCrypto/CommonCrypto.h> to the bridging header. However,..

Single selection in RecyclerView

I know there are no default selection methods in recyclerview class, But I have tried in following way, public void onBindViewHolder(ViewHolder holder, final int position) { holder.mTextView.setT..

error C2220: warning treated as error - no 'object' file generated

I have below class class Cdata12Mnt { public: char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4]; char ExIOBname[ID1_MAX_INF-ID1_EXIOB_U1TOP][BOADNAM_MAX + 4]; char cflpath[256]; ..

A Windows equivalent of the Unix tail command

I'm looking for the equivalent of the Unix 'tail' command that will allow me to watch the output of a log file while it is being written to...

How do I flush the cin buffer?

How do I clear the cin buffer in C++?..

How do I change Bootstrap 3 column order on mobile layout?

I'm making a responsive layout with a top fixed navbar. Underneath I have two columns, one for a sidebar (3), and one for content (9). Which on desktop looks like this navbar [3][9] When I resize ..

Is it safe to store a JWT in localStorage with ReactJS?

I'm currently building a single page application using ReactJS. I read that one of the reasons for not using localStorage is because of XSS vulnerabilities. Since React escapes all user input, would i..

How to remove "disabled" attribute using jQuery?

I have to disable inputs at first and then on click of a link to enable them. This is what I have tried so far, but it doesn't work. HTML: <input type="text" disabled="disabled" class="inputDisa..

How can I map "insert='false' update='false'" on a composite-id key-property which is also used in a one-to-many FK?

I am working on a legacy code base with an existing DB schema. The existing code uses SQL and PL/SQL to execute queries on the DB. We have been tasked with making a small part of the project database-..

How to create a JavaScript callback for knowing when an image is loaded?

I want to know when an image has finished loading. Is there a way to do it with a callback? If not, is there a way to do it at all?..

What is {this.props.children} and when you should use it?

Being a beginner to React world, I want to understand in depth what happens when I use {this.props.children} and what are the situations to use the same. What is the relevance of it in below code snip..

Git: How to update/checkout a single file from remote origin master?

The scenario: I make some changes in a single file locally and run git add, git commit and git push The file is pushed to the remote origin master repository I have another local repository that is ..

How to set text size in a button in html

Hello I want to have a button on my website and I want to resize the text on my button. How do I do this? My code is below: <input type="submit" value="HOME" onclick="goHome()" style="width: 100%..

How to pass IEnumerable list to controller in MVC including checkbox state?

I have an mvc application in which I am using a model like this: public class BlockedIPViewModel { public string IP { get; set; } public int ID { get; set; } public bool Checked { get;..

Server.Mappath in C# classlibrary

How can i use the server.mappath method in a C# class library class ,which acts as my BusinessLayer for My ASP.NET WEbsite..

How to get item's position in a list?

I am iterating over a list and I want to print out the index of the item if it meets a certain condition. How would I do this? Example: testlist = [1,2,3,5,3,1,2,1,6] for item in testlist: if ..

How to deal with page breaks when printing a large HTML table

I have a project which requires printing an HTML table with many rows. My problem is the way the table is printed over multiple page. It will sometimes cut a row in half, making it unreadable because..

Firebase (FCM) how to get token

It's my first time using FCM. I download a sample from firebase/quickstart-android and I install the FCM Quickstart. But I can't get any token from the log even hit the LOG TOKEN button in the app. Th..

How to get selected option using Selenium WebDriver with Java

I want to get the selected label or value of a drop down using Selenium WebDriver and then print it on the console. I am able to select any value from the drop down, but I am not able to retrieve the..

PHP: trying to create a new line with "\n"

i'm writing this: echo "foo"; echo "\n"; echo "bar"; and "bar" is not written in the line below. What am i doing wrong? Javi..

Java Date vs Calendar

Could someone please advise the current "best practice" around Date and Calendar types. When writing new code, is it best to always favour Calendar over Date, or are there circumstances where Date is..

What exactly do "u" and "r" string flags do, and what are raw string literals?

While asking this question, I realized I didn't know much about raw strings. For somebody claiming to be a Django trainer, this sucks. I know what an encoding is, and I know what u'' alone does since..

Conversion of Char to Binary in C

I am trying to convert a character to its binary representation (so character --> ascii hex --> binary). I know to do that I need to shift and AND. However, my code is not working for some reason. H..

Driver executable must be set by the webdriver.ie.driver system property

I am using Selenium for automating the tests. My application exclusively uses IE, it will not work on other Browsers. Code: import org.openqa.selenium.ie.InternetExplorerDriver; import org.openqa.se..

Getting Google+ profile picture url with user_id

I know that lots of social network APIs provide a way to construct a url to the profile picture of a user, using their user_id or username. For Facebook it looks like this: http://graph.facebook.com/..

Stash only one file out of multiple files that have changed with Git?

How can I stash only one of multiple changed files on my branch?..

How do I break out of a loop in Scala?

How do I break out a loop? var largest=0 for(i<-999 to 1 by -1) { for (j<-i to 1 by -1) { val product=i*j if (largest>product) // I want to break out here ..

Regex how to match an optional character

I have a regex that I thought was working correctly until now. I need to match on an optional character. It may be there or it may not. Here are two strings. The top string is matched while the lower..

Change color and appearance of drop down arrow

I want to change the default appearance of the arrow of a dropdown list so that looks the same across browsers. Is there a way to override the default look and feel of the drop down arrow using CSS or..

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException

I am a beginner to programming. I'm a few weeks into my first programming class, so please bear with me. I am not a person to ask for help, so I have searched for an answer extensively with no luck. T..

Can we write our own iterator in Java?

If I have a list containing [alice, bob, abigail, charlie] and I want to write an iterator such that it iterates over elements that begin with 'a', can I write my own ? How can I do that ?..

Build project into a JAR automatically in Eclipse

I have an Eclipse project where I want to keep my Java project built into a JAR automatically. I know I have an option to export the project into a JAR; if I do a right click; but what I am really loo..

Import functions from another js file. Javascript

I have a question about including a file in javascript. I have a very simple example: --> index.html --> models --> course.js --> student.js course.js: function Course() ..

How to call any method asynchronously in c#

Could someone please show me a small snippet of code which demonstrates how to call a method asynchronously in c#?..

SQL Case Sensitive String Compare

How do you compare strings so that the comparison is true only if the cases of each of the strings are equal as well. For example: Select * from a_table where attribute = 'k' ...will return a row ..

VLook-Up Match first 3 characters of one column with another column

I'm trying to match a list of words from Column A against another list of words in column B. I only need the first three characters of the words in column A to match the first three characters of the..

filename and line number of Python script

How can I get the file name and line number in a Python script? Exactly the file information we get from an exception traceback. In this case without raising an exception...

How to read an external local JSON file in JavaScript?

I have saved a JSON file in my local system and created a JavaScript file in order to read the JSON file and print data out. Here is the JSON file: {"resource":"A","literals&q..

Make an existing Git branch track a remote branch?

I know how to make a new branch that tracks remote branches, but how do I make an existing branch track a remote branch? I know I can just edit the .git/config file, but it seems there should be an e..

break statement in "if else" - java

I keep getting an error, if without else. I tried else if as well for (;;){ System.out.println("---> Your choice: "); choice = input.nextInt(); if (choice==1) ..

How to convert a std::string to const char* or char*?

How can I convert an std::string to a char* or a const char*?..

HTTP response header content disposition for attachments

Background Write an XML document to a browser's response stream and cause the browser to display a "Save As" dialog. Problem Consider the following download() method: HttpServletResponse respons..

How to get WordPress post featured image URL

I am using this function to get the featured images: <a href="#" rel="prettyPhoto"> <?php the_post_thumbnail('thumbnail'); ?> </a> Now I want to get the full featured image on..

Code signing is required for product type 'Application' in SDK 'iOS 10.0' - StickerPackExtension requires a development team error

I am facing the below issue and am unable to build the application. XXX has conflicting provisioning settings. XXX is automatically provisioned, but provisioning profile WildCard has been manual..

JSON.stringify doesn't work with normal Javascript array

I must be missing something here, but the following code (Fiddle) returns an empty string: var test = new Array(); test['a'] = 'test'; test['b'] = 'test b'; var json = JSON.stringify(test); alert(jso..

How do I use a third-party DLL file in Visual Studio C++?

I understand that I need to use LoadLibrary(). But what other steps do I need to take in order to use a third-party DLL file? I simply jumped into C++ and this is the only part that I do not get (as ..

Roblox Admin Command Script

I'm currently trying to make a new admin command script; all I have so far is the kill command... everything I've tried (so far) works unless I use the ":* me" parameter ("*"being any command and ":" ..

Join two data frames, select all columns from one and some columns from the other

Let's say I have a spark data frame df1, with several columns (among which the column id) and data frame df2 with two columns, id and other. Is there a way to replicate the following command sqlContex..

Error 5 : Access Denied when starting windows service

I'm getting this error when I try to start a windows service I've created in C#: My Code so far: private ServiceHost host = null; public RightAccessHost() { InitializeComponent(); } protecte..

How can I rollback an UPDATE query in SQL server 2005?

How can I rollback an UPDATE query in SQL server 2005? I need to do this in SQL, not through code...

Css Move element from left to right animated

I have an element that needs to be move from left to right and right to left when I change the left, right variables. Here is an jsfiddle example that I'm working on it. It moves left to right and ri..

JSF(Primefaces) ajax update of several elements by ID's

One more question concerning JSF.Particularly, Primefaces. Have following problem with ajax update of elements by id's at same time. If elements on page goes one by one ,that ajax update performs ok: ..

How to center-justify the last line of text in CSS?

How can I center-justify text? Currently, justify does not center the last line...

Is it a good practice to use an empty URL for a HTML form's action attribute? (action="")

I am wondering if anyone can give a "best practices" response to using blank HTML form actions to post back to the current page. There is a post asking what a blank HTML form action does here and som..

Determine command line working directory when running node bin script

I am creating a node command line interface. It is installed globally and uses a bin file to execute. I plan to have a command window open at the root directory of the files I am working on and then ..

How to disable HTML links

I have a link button inside a <td> which I have to disable. This works on IE but not working in Firefox and Chrome. Structure is - Link inside a <td>. I cannot add any container in the <..

How do I fix certificate errors when running wget on an HTTPS URL in Cygwin?

For example, running wget https://www.dropbox.com results in the following errors: ERROR: The certificate of `www.dropbox.com' is not trusted. ERROR: The certificate of `www.dropbox.com' hasn't got a..

href="tel:" and mobile numbers

If I use tel: I should write the international phone code, like that. <a href="tel:+6494461709">61709</a> So far, so good, but I can't find information on how to write a cell phone numb..

How to rotate a div using jQuery

Is it possible to rotate a div using jQuery? I can rotate an image but can't rotate a div; is there any solution for this?..

Check if string is in a pandas dataframe

I would like to see if a particular string exists in a particular column within my dataframe. I'm getting the error ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool()..

fileReader.readAsBinaryString to upload files

Trying to use fileReader.readAsBinaryString to upload a PNG file to the server via AJAX, stripped down code (fileObject is the object containing info on my file); var fileReader = new FileReader(); ..

Create Pandas DataFrame from a string

In order to test some functionality I would like to create a DataFrame from a string. Let's say my test data looks like: TESTDATA="""col1;col2;col3 1;4.4;99 2;4.5;200 3;4.7;65 4;3.2;140 """ What is..

Javascript "Uncaught TypeError: object is not a function" associativity question

Code is as follows: <body> <a href="javascript:;" id="test">hello</a> </body> <script type="text/javascript"> document.getElementById("test").addEventListener("..

Best way to compare 2 XML documents in Java

I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end. I've got a good set of input/output messa..

Python: For each list element apply a function across the list

Given [1,2,3,4,5], how can I do something like 1/1, 1/2, 1/3,1/4,1/5, ...., 3/1,3/2,3/3,3/4,3/5,.... 5/1,5/2,5/3,5/4,5/5 I would like to store all the results, find the minimum, and return the two..

What is a CSRF token? What is its importance and how does it work?

I am writing an application (Django, it so happens) and I just want an idea of what actually a "CSRF token" is and how it protects the data. Is the post data not safe if you do not use CSRF ..

How to duplicate a git repository? (without forking)

I have two repositories, and I need to copy whole of one onto the other empty one which has different access levels from the first one. The copy and the mother repository should not be linked together..

Mac SQLite editor

I am aware of CocoaMySQL but I have not seen a Mac GUI for SQLite, is there one? My Google search didn't turn up any Mac related GUI's which is why I'm asking here rather than Google...

Debugging Stored Procedure in SQL Server 2008

Is there any way to debug a stored procedure on SQL Server 2008? I have access to use SQL Server Management Studio 2008 and Visual Studio 2008 (not sure whether either provides this functionality). ..

How do I encode/decode HTML entities in Ruby?

I am trying to decode some HTML entities, such as '&amp;lt;' becoming '<'. I have an old gem (html_helpers) but it seems to have been abandoned twice. Any recommendations? I will need to use ..

How can I get the current PowerShell executing file?

Note: PowerShell 1.0 I'd like to get the current executing PowerShell file name. That is, if I start my session like this: powershell.exe .\myfile.ps1 I'd like to get the string ".\myfile.ps1" (o..

web.xml is missing and <failOnMissingWebXml> is set to true

Consider: When I create a simple Maven project in Eclipse I am getting this error: web.xml is missing and <failOnMissingWebXml> is set to true How can I fix this problem?..

Python: Array v. List

Possible Duplicate: Python List vs. Array - when to use? I'm working on a few projects in Python, and I have a few questions: What's the difference between Arrays and Lists? If it's not o..

Convert object string to JSON

How can I convert a string that describes an object into a JSON string using JavaScript (or jQuery)? e.g: Convert this (NOT a valid JSON string): var str = "{ hello: 'world', places: ['Africa', 'A..

Connection to SQL Server Works Sometimes

An ADO.Net application is only sometimes able to connect to another server on the local network. It seems random whether a given connection attempt succeeds or fails. The connection is using a conne..

Convert utf8-characters to iso-88591 and back in PHP

Some of my script are using different encoding, and when I try to combine them, this has becom an issue. But I can't change the encoding they use, instead I want to change the encodig of the result f..

How to launch jQuery Fancybox on page load?

I would like to launch a Fancybox (e.g. Fancybox's version of a modal or light box) on page load. I could bind it to a hidden anchor tag and fire the click event of that anchor tag via JavaScript, but..

How to click or tap on a TextView text

I know this is so easy (doh...) but I am looking for a way to run a method on tapping or clicking a TextView line of text in an Android App. I keep thinking about button listeners and anonymous metho..

Multipart File upload Spring Boot

Im using Spring Boot and want to use a Controller to receive a multipart file upload. When sending the file I keep getting the error 415 unsupported content type response and the controller is never r..

element with the max height from a set of elements

I have a set of div elements. In jQuery, I would like to be able to find out the div with the maximum height and also the height of that div. For instance: <div> <div class="panel"> L..

Why won't eclipse switch the compiler to Java 8?

I checked out a Java project from SVN in eclipse and realized that it requires Java 8 because it uses lambdas etc. I installed the eclipse addon for Java 8 and restarted eclipse and and have the proje..

How can moment.js be imported with typescript?

I'm trying to learn Typescript. While I don't think it's relevant, I'm using VSCode for this demo. I have a package.json that has these pieces in it: { "devDependencies": { "gulp": "^3.9.1", ..

Jar mismatch! Fix your dependencies

Steps to reproduce: create a android project "MyApp" import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library which use android support library. Add the libraries t..

Necessary to add link tag for favicon.ico?

Are there any modern browsers that won't detect the favicon.ico automatically? Is there any reason to add the link tag for favicon.ico? <link rel="shortcut icon" href="/favicon.ico"> My guess..

Using switch statement with a range of value in each case?

In Java, is it possible to write a switch statement where each case contains more than one value? For example (though clearly the following code won't work): switch (num) { case 1 .. 5: S..

How to make a background 20% transparent on Android

How do I make the background of a Textview about 20% transparent (not fully transparent), where there is a color in the background (i.e. white)?..

How to make external HTTP requests with Node.js

The question is fairly simple. I want to use a Node.js server as a proxy to log, authenticate, and forward HTTP queries to a backend HTTP server (PUT, GET, and DELETE requests). What library should I..

How to add parameters to HttpURLConnection using POST using NameValuePair

I am trying to do POST with HttpURLConnection(I need to use it this way, can't use HttpPost) and I'd like to add parameters to that connection such as post.setEntity(new UrlEncodedFormEntity(nvp)); ..

How do I calculate tables size in Oracle

Being used to (and potentially spoiled by) MSSQL, I'm wondering how I can get at tables size in Oracle 10g. I have googled it so I'm now aware that I may not have as easy an option as sp_spaceused. St..

How to remove trailing whitespace in code, using another script?

Something like: import fileinput for lines in fileinput.FileInput("test.txt", inplace=1): lines = lines.strip() if lines == '': continue print lines But nothing is being printed on std..

Selecting a row of pandas series/dataframe by integer index

I am curious as to why df[2] is not supported, while df.ix[2] and df[2:3] both work. In [26]: df.ix[2] Out[26]: A 1.027680 B 1.514210 C -1.466963 D -0.162339 Name: 2000-01-03 00:00:00 In..

How to determine day of week by passing specific date?

For Example I have the date: "23/2/2010" (23th Feb 2010). I want to pass it to a function which would return the day of week. How can I do this? In this example, the function should return String "Tu..

How to grep a text file which contains some binary data?

grep returns Binary file test.log matches For example echo "line1 re \x00\r\nline2\r\nline3 re\r\n" > test.log # in zsh echo -e "line1 re \x00\r\nline2\r\nline3 re\r\n" > test.log # in..

android listview get selected item

I am new to android, I have a code in which I have placed buttons in list view. My list is as.. Number | Name | ID (visibility = gone) | Level | button1 | button2 Function is different in button 1 ..

Bootstrap with jQuery Validation Plugin

I am trying to add validation to my form with jQuery Validation Plugin, but I'm having a problem where the plugin puts the error messages when I'm using input groups. $('form').validate({ rules..

Live video streaming using Java?

Are there any good libraries for streaming live video using Java? Ideally both ends of the pipe should be written in Java but I am mostly concerned about the video player. What software would you reco..

Selenium WebDriver: I want to overwrite value in field instead of appending to it with sendKeys using Java

In WebDriver, if I use sendKeys it will append my string to the value that already exists in the field. I can't clear it by using clear() method because the second I do that, the webpage will throw a..

Adding a Time to a DateTime in C#

I have a calendar and a textbox that contains a time of day. I want to create a datetime that is the combination of the two. I know I can do it by looking at the hours and mintues and then adding thes..

How can I view the Git history in Visual Studio Code?

I can execute various Git commands from Visual Studio Code, however I couldn't find a way to visualize the history...

How to split a large text file into smaller files with equal number of lines?

I've got a large (by number of lines) plain text file that I'd like to split into smaller files, also by number of lines. So if my file has around 2M lines, I'd like to split it up into 10 files that..

How to empty a list in C#?

I want to empty a list. How to do that?..

How to work on UAC when installing XAMPP

I am installing Xampp to my computer but when i tried to install it a dialog box is showing up. how do i fix this one.. thank you so much for the help.! the dialog Box: Important! Because an activate..

How to show the last queries executed on MySQL?

Is there any query/way to show the last queries executed on ALL servers?..

How to play .wav files with java

I am trying to play a *.wav file with Java. I want it to do the following: When a button is pressed, play a short beep sound. I have googled it, but most of the code wasn't working. Can someone give ..

Changing image size in Markdown

I just got started with Markdown. I love it, but there is one thing bugging me: How can I change the size of an image using Markdown? The documentation only gives the following suggestion for an imag..

How to access JSON decoded array in PHP

I returned an array of JSON data type from javascript to PHP, I used json_decode($data, true) to convert it to an associative array, but when I try to use it using the associative index, I get the err..

In C#, how to check whether a string contains an integer?

I just want to know, whether a String variable contains a parsable positive integer value. I do NOT want to parse the value right now. Currently I am doing: int parsedId; if ( (String.IsNullOrE..

SQL Bulk Insert with FIRSTROW parameter skips the following line

I can't seem to figure out how this is happening. Here's an example of the file that I'm attempting to bulk insert into SQL server 2005: ***A NICE HEADER HERE*** 0000001234|SSNV|00013893-03JUN09 00..

ant warning: "'includeantruntime' was not set"

I receive the following warning: [javac] build.xml:9: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds What does this mean?..

How to retrieve GET parameters from JavaScript

Consider: http://example.com/page.html?returnurl=%2Fadmin For js within page.html, how can it retrieve GET parameters? For the above simple example, func('returnurl') should be /admin. But it should ..

How to install a specific version of a package with pip?

Possible Duplicate: Installing specific package versions with Pip I am a bit new to pip install and virtualenv in general. I have setup an virtualenv on my server as well as on my local de..

How to ignore whitespace in a regular expression subject string?

Is there a simple way to ignore the white space in a target string when searching for matches using a regular expression pattern? For example, if my search is for "cats", I would want "c ats" or "ca ..

Calculating a directory's size using Python?

Before I re-invent this particular wheel, has anybody got a nice routine for calculating the size of a directory using Python? It would be very nice if the routine would format the size nicely in Mb/G..

How to prevent vim from creating (and leaving) temporary files?

Why does vim create <filename>~ files? Is there a way to disable that? If it's for backup (or something), I use git for that. Also, these .<filename.with.path.hints>.swp files too. How..

How to $watch multiple variable change in angular

How to $scope.$watch multiple variables in Angular, and trigger callback when one of them has changed. $scope.name = ... $scope.age = ... $scope.$watch('???',function(){ //called when name or age..

Android: combining text & image on a Button or ImageButton

I'm trying to have an image (as the background) on a button and add dynamically, depending on what's happening during run-time, some text above/over the image. If I use ImageButton I don't even have ..

saving a file (from stream) to disk using c#

Possible Duplicate: How do I save a stream to a file? I have got a stream object which may be an image or file (msword, pdf), I have decided to handle both types very differently, as I may ..

How to compare two JSON have the same properties without order?

I have tried to compare those two JSON objects: <input type="hidden" id="remoteJSON" name="remoteJSON" value='{"allowExternalMembers": "false", "whoCanJoin": "CAN_REQUEST_TO_JOIN"}' /><br /&..

Mongod complains that there is no /data/db folder

I am using my new mac for the first time today. I am following the get started guide on the mongodb.org up until the step where one creates the /data/db directory. btw, I used the homebrew route. So..

"Adaptive Server is unavailable or does not exist" error connecting to SQL Server from PHP

I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here. However, when I try to connect in to a different DB using the same setup, I get: Conn..

Change directory in PowerShell

My PowerShell prompt's currently pointed to my C drive (PS C:\>). How do I change directory to a folder on my Q (PS Q:\>) drive? The folder name on my Q drive is "My Test Folder"...

Getting the class name from a static method in Java

How can one get the name of the class from a static method in that class. For example public class MyClass { public static String getClassName() { String name = ????; // what goes here so..

Change connection string & reload app.config at run time

When I change the connection string using this code, it does not reload app.config at runtime. I expected it to reload similarly to how we reload app.config. config.ConnectionStrings.ConnectionString..

New xampp security concept: Access Forbidden Error 403 - Windows 7 - phpMyAdmin

I have downloaded and installed XAMPP 1.8.1 for Windows on Windows 7 Ultimate. I have set up XAMPP to run together with IIS as per these instructions All good so far, my PHP sites run locally and eve..

How do you create nested dict in Python?

I have 2 CSV files: 'Data' and 'Mapping': 'Mapping' file has 4 columns: Device_Name, GDN, Device_Type, and Device_OS. All four columns are populated. 'Data' file has these same columns, with Device_..

Installing mysql-python on Centos

I'm trying to get the MySQL-python lib installed on centos 5.5. I ran sudo yum install MySQL-python but then when I tried: import MySQLdb I get this error: Traceback (most recent call last): ..

java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory

I am working on YouTube broadcast sample examples. I have created a sample Java Project & added required jars. But, when I try to run the project it throws exception. Exception : Throwable: com/..

How to increment a pointer address and pointer's value?

Let us assume, int *p; int a = 100; p = &a; What will the following code will do actually and how? p++; ++p; ++*p; ++(*p); ++*(p); *p++; (*p)++; *(p)++; *++p; *(++p); I know, this is kin..

Casting string to enum

I'm reading file content and take string at exact location like this string fileContentMessage = File.ReadAllText(filename).Substring(411, 3); Output will always be either Ok or Err On the other ..

get dictionary key by value

How do I get a Dictionary key by value in C#? Dictionary<string, string> types = new Dictionary<string, string>() { {"1", "one"}, {"2", "two"}, {"3", "..