Questions Tagged with #Axd

select rows in sql with latest date for each ID repeated multiple times

I have a table where each ID is repeated 3 times. there is a date in front of each id in each row. I want to select entire row for each ID where date is latest. There are total 370 columns in this ta..

All com.android.support libraries must use the exact same version specification

After updating to android studio 2.3 I got this error message. I know it's just a hint as the app run normally but it's really strange. All com.android.support libraries must use the exact same ve..

Why does C++ code for testing the Collatz conjecture run faster than hand-written assembly?

I wrote these two solutions for Project Euler Q14, in assembly and in C++. They implement identical brute force approach for testing the Collatz conjecture. The assembly solution was assembled with: n..

Bootstrap datetimepicker is not a function

I am trying to use the datetimepicker from http://eonasdan.github.io/bootstrap-datetimepicker/ and I am getting the error "Uncaught TypeError: $(...).datetimepicker is not a function" Here are my inc..

Validate date in dd/mm/yyyy format using JQuery Validate

I am taking input of date of birth and date of death. Validation required date of death should be more than date of birth Date format to be dd/mm/yyyy Dates to be less than or equal to today. Val..

Getting the first and last day of a month, using a given DateTime object

I want to get the first day and last day of the month where a given date lies in. The date comes from a value in a UI field. If I'm using a time picker I could say var maxDay = dtpAttendance.MaxDate..

Speed up rsync with Simultaneous/Concurrent File Transfers?

We need to transfer 15TB of data from one server to another as fast as we can. We're currently using rsync but we're only getting speeds of around 150Mb/s, when our network is capable of 900+Mb/s (tes..

IIs Error: Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication”

I am trying to deploy my web project and I keep getting this error: Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Language=“C#” %> I looked ..

Is it possible to apply CSS to half of a character?

What I am looking for: A way to style one HALF of a character. (In this case, half the letter being transparent) What I have currently searched for and tried (With no luck): Methods for styling ha..

Get all dates between two dates in SQL Server

How to get all the dates between two dates? I have a variable @MAXDATE which is storing the maximum date from the table. Now I want to get the all dates between @Maxdate and GETDATE() and want to stor..

How to correctly use Html.ActionLink with ASP.NET MVC 4 Areas

I recently discovered Areas in ASP.NET MVC 4, which I have successfully implemented, but I'm running into troubles with the @Html.ActionLink helper in my Razor views. The URL this helper generates alw..

Disable future dates after today in Jquery Ui Datepicker

I want to disable all the future dates after today in Jquery Ui Datepicker Here is the Demo : Code : $( "#start_date" ).datepicker( { maxDate: '0', beforeShow : ..

Deciding between HttpClient and WebClient

Our web app is running in .Net Framework 4.0. The UI calls controller methods through ajax calls. We need to consume REST service from our vendor. I am evaluating the best way to call REST servic..

Select2 doesn't work when embedded in a bootstrap modal

When I use a select2 (input) in bootstrap modal, I can't type anything into it. It's like disabled? Outside the modal select2 works fine. Working example: http://jsfiddle.net/byJy8/1/ code: <!-..

The view or its master was not found or no view engine supports the searched locations

Error like:The view 'LoginRegister' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/MyAccount/LoginRegister.aspx ~/Views/..

Laravel Fluent Query Builder Join with subquery

Okay after hours of research and still using DB::select I have to ask this question. Because I am about to trough my computer away ;). I want to get the last input of a user (base on the timestamp). ..

counting number of directories in a specific directory

How to count the number of folders in a specific directory. I am using the following command, but it always provides an extra one. find /directory/ -maxdepth 1 -type d -print| wc -l For example, i..

WCF error - There was no endpoint listening at

I am developing a WCF service, running IIS6 on Window server 2003. I have built a test client to talk to the WCF service and I am getting the error below. I have been looking at this error for days an..

ASP.NET: HTTP Error 500.19 – Internal Server Error 0x8007000d

I am replicating web application deployment and found several issues related to HTTP Error 500.19. My machine is running Windows 7 while the working development is using Windows 8. We're developing ou..

How can I set Image source with base64

I want to set the Image source to a base64 source but it does not work: JSfiddle.net/NT9KB <img id="img" src="" /> the JavaScript document.getElementById("img").src = "data:image/png;base64..

Changing minDate and maxDate on the fly using jQuery DatePicker

I'm having a particular issue with the jQuery Datepicker. I can easily add a date range, but I want the selectable range to change depending on the event the user has picked. So if they pick event #1..

Creating a BLOB from a Base64 string in JavaScript

I have Base64-encoded binary data in a string: const contentType = 'image/png'; const b64Data = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAA..

How can I bold the fonts of a specific row or cell in an Excel worksheet with C#?

I am exporting data from a List<> to excel. I want to make some specific rows and cells bold. I need to make some cell merged also. Below is the code I am using. try { Excel..

Create HTML table using Javascript

My question will ultimately be related to this site: http://dbtest.net16.net/ethanol-01.html EDIT: View unencrypted page source code here >>> http://dbtest.net16.net/ethanol-22.html This is an HTML..

Get JSON object from URL

I have a URL that returns a JSON object like this: { "expires_in":5180976, "access_token":"AQXzQgKTpTSjs-qiBh30aMgm3_Kb53oIf-VA733BpAogVE5jpz3jujU65WJ1XXSvVm1xr2LslGLL..

Content Type application/soap+xml; charset=utf-8 was not supported by service

I am getting the error below while trying to add WCF service to WCFTestClient. I went through a number of solutions on the web but I couldn't get it to work. Can someone help me with the issues? I ..

How to set minDate to current date in jQuery UI Datepicker?

This is my code and it is not working correctly. I want to set minDate to the current date. How can I do it? $("input.DateFrom").datepicker({ changeMonth: true, changeYear: true, dateFo..

TypeError: $.browser is undefined

I am using msdropdown image combo box to create dropdown select options. when i run this code locally on my PC, everything works great. But when i run it on go daddy servers, the msdropdown becomes d..

how to increase MaxReceivedMessageSize when calling a WCF from C#

Possible Duplicate: The maximum message size quota for incoming messages (65536) has been exceeded I am using WCF for file uploading and downloading. uploading is successful but when i down..

jQuery UI: Datepicker set year range dropdown to 100 years

Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added. How can we set the initial range to be 100 years so that ..

Oracle: not a valid month

I have a table with the following fields: Reports (table name) Rep_Date (date) Rep_Time (date) The Rep_Time field has values like '01/01/1753 07:30:00' i.e. the time part is relevant. I have writte..

Select a Column in SQL not in Group By

I have been trying to find some info on how to select a non-aggregate column that is not contained in the Group By statement in SQL, but nothing I've found so far seems to answer my question. I have a..

How to restrict the selectable date ranges in Bootstrap Datepicker?

I need to use datepicker which provides me the option of restricting the selectable dates. We had been using jQuery UI which is used to support it using minDate, maxDate options. $("#id_date").datep..

'int' object has no attribute '__getitem__'

import math import os class collection: col = [[0 for col in range(5)] for row in range(6)] dist = [[0 for col in range(6)] for row in range(6)] filename = "" result = "" def __..

WCF service maxReceivedMessageSize basicHttpBinding issue

I can't seem to get my WCF service to accept large amounts of data being sent up to it. I configured the maxReceivedMessageSize for the client and could receive large data down just fine, that's no..

How to convert image into byte array and byte array to base64 String in android?

Can someone tell me the code to convert image into byte array and that byte array into base64 string. i write the below code not getting proper result . String filepath = "/sdcard/Image/ic_launcher..

setting min date in jquery datepicker

Hi i want to set min date in my jquery datepicker to (1999-10-25) so i tried the below code its not working. $(function () { $('#datepicker').datepicker({ dateFormat: 'yy-mm-dd', ..

See whether an item appears more than once in a database column

I want to check if a piece of data appears more than once in a particular column in my table using SQL. Here is my SQL code of what I have so far: select * from AXDelNotesNoTracking where count(sales..

ASP.Net MVC – Resource Cannot be found error

I am completely new to ASP.Net MVC. I just created an MVC3 project in Visual Studio 2010. The view engine is razor. When I just ran the application it gave the proper result in the browser. The URL i..

jQuery Date Picker - disable past dates

I am trying to have a date Range select using the UI date picker. in the from/to field people should not be able to view or select dates previous to the present day. This is my code: $(function() {..

How to check if number is divisible by a certain number?

I am using AndEngine to add sprites to the screen and come across using the movemodifier method. I have two integers MaxDuration and MinDuration; What i want to do is when the user gets to a score ..

How to copy in bash all directory and files recursive?

I have script: find ./SourceFolder/ -maxdepth 4 -exec cp -R '{}' ./DestFolder/ \; SourceDir contains also sub-folders. Problem that in DestFolder not only all tree, but in up level all another lev..

How to save a base64 image to user's disk using JavaScript?

I have converted the source content from the <img> html tag to a base64String using JavaScript. The image was displayed clearly. Now I want to save that image to user's disk using javascript. &..

jQuery DatePicker with today as maxDate

I would like to set today's date as a maxdate for jQuery datepicker in order to prevent users from picking date greater than today's date..

how to solve Error cannot add duplicate collection entry of type add with unique key attribute 'value' in iis 7

I created a asp.net website and published it in iis 7. I deleted the default website option in the iis 7 and created the new website in the iis 7. When i click the default document I got the error lik..

Download file through an ajax call php

I have a button and onclick it will call an ajax function. Here is my ajax function function csv(){ ajaxRequest = ajax();//ajax() is function that has all the XML HTTP Requests postdata =..

What is an .axd file?

What kind of purpose do .axd files serve? I know that it is used in the ASP.Net AJAX Toolkit and its controls. I'd like to know more about it. I tried Googling for it, but could not find getting ba..

This could be due to the service endpoint binding not using the HTTP protocol

I have a WCF Service running fine on my local machine. I put it on the servers, and I am receiving the following error: An error occurred while receiving the HTTP response to http://xx.xx.x.xx..

IE9 JavaScript error: SCRIPT5007: Unable to get value of the property 'ui': object is null or undefined

My website works well on Chrome, Firefox, and Internet Explorer 8. But on Internet Explorer 9, very weird errors are triggered when just hovering over components. SCRIPT5007: Unable to get value o..

Routing HTTP Error 404.0 0x80070002

I have created routing rules in my ASP.NET application and on my Dev machine at IIS7 everything works fine. When I deploy solution to prod server which has also IIS7 I get error 404 (page not found) w..

How to create a collapsing tree table in html/css/js?

I have some data to display that is both tabular and hierarchical. I'd like to let the user be able to expand and collapse the nodes. Sort of like this, except functional: http://www.maxdesign.com.a..

The maximum message size quota for incoming messages (65536) has been exceeded

I get this exception while creating scope for few tables all those tables are huge in design <bindings> <wsHttpBinding> <binding name="wsHttpBinding_ISyncServices" closeTim..

WCF Service Client: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding

I've got a WCF Service running on my local IIS server. I've added it as a service reference to a C# Website Project and it adds fine and generates the proxy classes automatically. However, when I try..

WCF change endpoint address at runtime

I have my first WCF example working. I have the host on a website which have many bindings. Because of this, I have added this to my web.config. <serviceHostingEnvironment multipleSiteBindingsEnab..

How to limit depth for recursive file list?

Is there a way to limit the depth of a recursive file listing in linux? The command I'm using at the moment is: ls -laR > dirlist.txt But I've got about 200 directories and each of them have 10..

Adding machineKey to web.config on web-farm sites

We (our IT partner really) recently changed some DNS for a web farmed site we have, so that the two production server have round-robin DNS switching between them. Prior to this switch we didn't really..

Python base64 data decode

I have the following piece of base64 encoded data, and I want to use python base64 module to extract information from it. It seems that module does not work. Can anyone tell me how? Q5YACgAAAABDlgA..

How do I catch an Ajax query post error?

I would like to catch the error and show the appropriate message if the Ajax request fails. My code is like the following, but I could not manage to catch the failing Ajax request. function getAjaxD..

SQLite table constraint - unique on multiple columns

I can find syntax "charts" on this on the SQLite website, but no examples and my code is crashing. I have other tables with unique constraints on a single column, but I want to add a constraint to the..

The HTTP request is unauthorized with client authentication scheme 'Ntlm' The authentication header received from the server was 'NTLM'

I know there's a lot of questions on SO similar to this, but I couldn't find one for this particular issue. A couple of points, first: I have no control over our Sharepoint server. I cannot tweak any..

getDate with Jquery Datepicker

i am trying to get date from my implementation of jquery date picker, add it to a string and display the resulting image in my div. Something however is just not working. Can anyone check out the code..

Multi-statement Table Valued Function vs Inline Table Valued Function

A few examples to show, just incase: Inline Table Valued CREATE FUNCTION MyNS.GetUnshippedOrders() RETURNS TABLE AS RETURN SELECT a.SaleId, a.CustomerID, b.Qty FROM Sales.Sales a INNER JOIN Sal..

Deserializing JSON data to C# using JSON.NET

I'm relatively new to working with C# and JSON data and am seeking guidance. I'm using C# 3.0, with .NET3.5SP1, and JSON.NET 3.5r6. I have a defined C# class that I need to populate from a JSON stru..

ASP.NET IIS Web.config [Internal Server Error]

I changed PC / Windows (XP -> 7) so IIS (6 -> 7,5) and trying to move my website But I can't run my site from this server . . . error : Error description: Error HTTP 500.19 - Internal Se..

Web Application Problems (web.config errors) HTTP 500.19 with IIS7.5 and ASP.NET v2

This is driving the whole team crazy. There must be some simple mis-configured part of IIS or our Web Server, but every time we try to run out ASP.NET Web Application on IIS 7.5 we get the following e..

jQuery datepicker to prevent past date

How do I disable past dates on jQuery datepicker? I looked for options but don't seem to find anything that indicates the ability to disable past dates. UPDATE: Thanks yall for the quick response. I..

WCF Service , how to increase the timeout?

Might seem like a silly question, but everything in WCF seems a lot more complicated than in asmx, how can I increase the timeout of an svc service? Here is what I have so far: <bindings> ..

WCF gives an unsecured or incorrectly secured fault error

I am trying to consume a remote svc web service. I created the proxy class using svcutil.exe, and after that I've added that class to my console application, but it yields an error: An unsecured e..

WCFTestClient The HTTP request is unauthorized with client authentication scheme 'Anonymous'

I've created one WCF service and deployed it on Server. When I browse this service it gives me positive response with ?wsdl URL. Now I'm trying to test the service through WCF Test client. It shows pr..

Large WCF web service request failing with (400) HTTP Bad Request

I've encountered this apparently common problem and have been unable to resolve it. If I call my WCF web service with a relatively small number of items in an array parameter (I've tested up to 50), ..

Logging best practices

I'd like to get stories on how people are handling tracing and logging in real applications. Here are some questions that might help to explain your answer. Frameworks What frameworks do you use? ..

find -mtime files older than 1 hour

I have this command that I run every 24 hours currently. find /var/www/html/audio -daystart -maxdepth 1 -mtime +1 -type f -name "*.mp3" -exec rm -f {} \; I would like to run it every 1 hour and del..

https with WCF error: "Could not find base address that matches scheme https"

I go to https://mywebsite/MyApp/Myservice.svc and get the following error: (The link works if I use http:// ) "The service '/MyApp/MyService.svc' cannot be activated due to an exception during compi..

What is the purpose for using OPTION(MAXDOP 1) in SQL Server?

I have never clearly understood the usage of MAXDOP. I do know that it makes the query faster and that it is the last item that I can use for Query Optimization. However, my question is, when and wher..

Sys is undefined

I have an ASP.Net/AJAX control kit project that i am working on. 80% of the time there is no problem. The page runs as it should. If you refresh the page it will sometimes show a javascript error "..

Read a file line by line with VB.NET

The following code is used to read a file line by line. It's just a very early version, so all I want to do is display the string in the immediate window. It's working fine, except that characters su..

What is the difference between gravity and layout_gravity in Android?

I know we can set the following values to the android:gravity and android:layout_gravity properties: center center_vertical center_horizontal, etc. But I am confused regarding both of these. Wha..

How can I get enum possible values in a MySQL database?

I want to populate my dropdowns with enum possible values from a DB automatically. Is this possible in MySQL?..

How do I add an existing directory tree to a project in Visual Studio?

The issue is simple really. Instead of creating folders in Visual Studio, I create a directory structure for my project on the file system. How do I include all the folders and files in a project, kee..

Could not establish trust relationship for SSL/TLS secure channel -- SOAP

I have a simple web service call, generated by a .NET (C#) 2.0 windows app, via the web service proxy generated by Visual Studio, for a web service also written in C# (2.0). This has worked for severa..

Java: set timeout on a certain block of code?

Is it possible to force Java to throw an Exception after some block of code runs longer than acceptable?..

How do I escape ampersands in XML so they are rendered as entities in HTML?

I have some XML text that I wish to render in an HTML page. This text contains an ampersand, which I want to render in its entity representation: &amp;. How do I escape this ampersand in the sour..

Select multiple columns from a table, but group by one

The table name is "OrderDetails" and columns are given below: OrderDetailID || ProductID || ProductName || OrderQuantity I'm trying to select multiple columns and Group By ProductID while having SU..

How to call a web service from jQuery

I want to call a webservice from jQuery. How can I do that?..

How to return a dictionary | Python

I have a .txt file with the following lines in it: 23;Pablo;SanJose 45;Rose;Makati I have this program: file = open("C:/Users/renato/Desktop/HTML Files/myfile2.txt") def query(id): for line i..

How can I get href links from HTML using Python?

import urllib2 website = "WEBSITE" openwebsite = urllib2.urlopen(website) html = getwebsite.read() print html So far so good. But I want only href links from the plain text HTML. How can I solve..

How to call a function after a div is ready?

I have the following in my javascript file: var divId = "divIDer"; jQuery(divId).ready(function() { createGrid(); //Adds a grid to the html }); The html looks something like: <div id="divID..

How do Python's any and all functions work?

I'm trying to understand how the any() and all() Python built-in functions work. I'm trying to compare the tuples so that if any value is different then it will return True and if they are all the s..

Pandas DataFrame to List of Lists

It's easy to turn a list of lists into a pandas dataframe: import pandas as pd df = pd.DataFrame([[1,2,3],[3,4,5]]) But how do I turn df back into a list of lists? lol = df.what_to_do_now? print l..

Open Source Alternatives to Reflector?

Just to ask if anyone knows of an open source alternative to RedGate's Reflector? I'm interested in checking out how a tool similar to Reflector actually works. Note, if you know of a free but not..

How to debug in Django, the good way?

So, I started learning to code in Python and later Django. The first times it was hard looking at tracebacks and actually figure out what I did wrong and where the syntax error was. Some time has pass..

How to convert between bytes and strings in Python 3?

This is a Python 101 type question, but it had me baffled for a while when I tried to use a package that seemed to convert my string input into bytes. As you will see below I found the answer for my..

How can I solve the error 'TS2532: Object is possibly 'undefined'?

I'm trying to rebuild a web app example that uses Firebase Cloud Functions and Firestore. When deploying a function I get the following error: src/index.ts:45:18 - error TS2532: Object is possibly '..

SQL query to check if a name begins and ends with a vowel

I want to query the list of CITY names from the table STATION(id, city, longitude, latitude) which have vowels as both their first and last characters. The result cannot contain duplicates. For this ..

Redefining the Index in a Pandas DataFrame object

I am trying to re-index a pandas DataFrame object, like so, From: a b c 0 1 2 3 1 10 11 12 2 20 21 22 To : b c 1 2 3 ..

How to create a static library with g++?

Can someone please tell me how to create a static library from a .cpp and a .hpp file? Do I need to create the .o and the .a? I would also like to know how can I compile a static library in and use it..

How to randomize two ArrayLists in the same fashion?

I have two arraylist filelist and imgList which related to each other, e.g. "H1.txt" related to "e1.jpg". How to automatically randomized the list of imgList according to the randomization of fileList..

How to change the background-color of jumbrotron?

I want to know how to change the background-color of 'jumbotron' class, it has a default background-color #eee in bootstrap.css. I tried to override by erasing this and giving the attribute none,non..

Are email addresses case sensitive?

I've read that by standard first part of e-mail is case sensitive, however I've tried to send e-mail to [email protected], [email protected] and [email protected] - it has arrived in each case. How do m..

DISABLE the Horizontal Scroll

Ok for some reason my webpage scrolls from left to right and shows a lot of ugly space. I have searched for results but they just made the scrollbar HIDDEN That's now what I want, I want to physic..

SSIS Text was truncated with status value 4

I am developing a SSIS package, trying to update an existing SQL table from a CSV flat file. All of the columns are successfully updating except for one column. If I ignore this column on truncate, ..

Filter rows which contain a certain string

I have to filter a data frame using as criterion those row in which is contained the string RTB. I'm using dplyr. d.del <- df %>% group_by(TrackingPixel) %>% summarise(MonthDelivery = as...

What are the differences between git remote prune, git prune, git fetch --prune, etc

My situation is this... someone working on the same repo has deleted a branch from his local & remote repo... Most people who have asked about this kind of problem on Stack Overflow, or other sit..

Force to open "Save As..." popup open at text link click for PDF in HTML

I have some big size PDF catalogs at my website, and I need to link these as download. When I googled, I found such a thing noted below. It should open the "Save As..." popup at link click... <he..

MySQL Workbench: "Can't connect to MySQL server on 127.0.0.1' (10061)" error

I apologise.. I know this question has been asked many times before, but I've tried lots of suggestions, and simply can't find a solution. The problem: I have a MySQL database running on a hosted se..

Commenting out code blocks in Atom

I have been moving from Webstorm and RubyMine to Atom and I really miss a feature from the Jetbrains editors where you select a code block and press CMD + - and it adds language specific comment chara..

Pass Additional ViewData to a Strongly-Typed Partial View

I have a strongly-typed Partial View that takes a ProductImage and when it is rendered I would also like to provide it with some additional ViewData which I create dynamically in the containing page. ..

RegEx to make sure that the string contains at least one lower case char, upper case char, digit and symbol

What is the regex to make sure that a given string contains at least one character from each of the following categories. Lowercase character Uppercase character Digit Symbol I know the patterns..

LINQ - Left Join, Group By, and Count

Let's say I have this SQL: SELECT p.ParentId, COUNT(c.ChildId) FROM ParentTable p LEFT OUTER JOIN ChildTable c ON p.ParentId = c.ChildParentId GROUP BY p.ParentId How can I translate this into LI..

Have a reloadData for a UITableView animate when changing

I have a UITableView that has two modes. When we switch between the modes I have a different number of sections and cells per section. Ideally, it would do some cool animation when the table grows o..

How to remove all white space from the beginning or end of a string?

How can I remove all white space from the beginning and end of a string? Like so: "hello" returns "hello" "hello " returns "hello" " hello " returns "hello" " hello world " returns "hello worl..

How to delete a file or folder?

How do I delete a file or folder in Python?..

How to read a text file from server using JavaScript?

On the server, there is a text file. Using JavaScript on the client, I want to be able to read this file and process it. The format of the file on the server cannot be changed. How can I get the cont..

What is the minimum length of a valid international phone number?

I need to validate user input of an international phone number. According to E.164, the maximum length is 15 digits, but I was unable to find any information about the minimum. I consider digits only,..

PHP to search within txt file and echo the whole line

Using php, I'm trying to create a script which will search within a text file and grab that entire line and echo it. I have a text file (.txt) titled "numorder.txt" and within that text file, there a..

Regular expression matching a multiline block of text

I'm having a bit of trouble getting a Python regex to work when matching against text that spans multiple lines. The example text is ('\n' is a newline) some Varying TEXT\n \n DSJFKDAFJKDAFJDSAKFJADS..

How to monitor network calls made from iOS Simulator

I am trying to monitor calls from an app to my server just like Firebug does. I could not find a way to see that in iOS Simulator or in xCode. Is there a way to do that without sniffing all the traff..

Count number of 1's in binary representation

Efficient way to count number of 1s in the binary representation of a number in O(1) if you have enough memory to play with. This is an interview question I found on an online forum, but it had no ans..

Impact of Xcode build options "Enable bitcode" Yes/No

Yesterday I recognized a ton of warnings regarding the parse.com library: URGENT: all bitcode will be dropped because '[path]/Parse.framework/Parse(PFAnalytics.o)' was built without bitcode. You ..

Increase number of axis ticks

I'm generating plots for some data, but the number of ticks is too small, I need more precision on the reading. Is there some way to increase the number of axis ticks in ggplot2? I know I can tell g..

What is a superfast way to read large files line-by-line in VBA?

I believe I have come up with a very efficient way to read very, very large files line-by-line. Please tell me if you know of a better/faster way or see room for improvement. I am trying to get bette..

A variable modified inside a while loop is not remembered

In the following program, if I set the variable $foo to the value 1 inside the first if statement, it works in the sense that its value is remembered after the if statement. However, when I set the sa..

Cloning a private Github repo

I have a private repository on Github for a project I'm working on. Until now I had only worked on my home desktop, but I just bought a laptop, and am trying to set it up so that I can work on the pr..

How to set password for Redis?

I'm working with redis on my local machine so I dont really need to set up a password to connect to the server with my php client (I'm using predis as a client). However, I'm moving my app to a live ..

Using Javascript: How to create a 'Go Back' link that takes the user to a link if there's no history for the tab or window?

EDIT-2: None of the answers seem to work. Not even the one I previously marked as the answer of this question. Any help is appreciated. Thanks. First, I have googled for a how-to on creating a 'Go Ba..

Javascript: Unicode string to hex

I'm trying to convert a unicode string to a hexadecimal representation in javascript. This is what I have: function convertFromHex(hex) { var hex = hex.toString();//force conversion var str..

How to write a test which expects an Error to be thrown in Jasmine?

I'm trying to write a test for the Jasmine Test Framework which expects an error. At the moment I'm using a Jasmine Node.js integration from GitHub. In my Node module I have the following code: thro..

How to check if two arrays are equal with JavaScript?

var a = [1, 2, 3]; var b = [3, 2, 1]; var c = new Array(1, 2, 3); alert(a == b + "|" + b == c); demo How can I check these array for equality and get a method which returns true if they are equal?..

How do check if a parameter is empty or null in Sql Server stored procedure in IF statement?

I read this: How do I check if a Sql server string is null or empty but it not helped me in this situation. The piece of code from my stored procedure: IF (@item1 IS NOT NULL) OR (LEN(@item1) > 0..

T-SQL datetime rounded to nearest minute and nearest hours with using functions

In SQL server 2008, I would like to get datetime column rounded to nearest hour and nearest minute preferably with existing functions in 2008. For this column value 2007-09-22 15:07:38.850, the outpu..

What is the best way to search the Long datatype within an Oracle database?

I am working with an Oracle database that stores HTML as a Long datatype. I would like to query the database to search for a specific string within the HTML data stored in the Long. I tried, "sele..

Parse time of format hh:mm:ss

How can I parse a time of format hh:mm:ss , inputted as a string to obtain only the integer values (ignoring the colons) in java?..

How to differentiate single click event and double click event?

I have a single button in li with id "my_id". I attached two jQuery events with this element 1. $("#my_id").click(function() { alert('single click'); }); 2. $("#my_id").dblclick(function() ..

COALESCE with Hive SQL

Since there is no IFNULL, ISNULL, or NVL function supported on Hive, I'm having trouble converting NULL to 0. I tried COALESCE(*column name*, 0) but received the below error message: Argument typ..

Styling input radio with css

I have this slideshow with [input type="radio"]: http://jsfiddle.net/Jtec5/23/ Codes: CSS: #slideselector { position: absolue; top:0; left:0; border: 2px solid black; padding-top:..

What is object slicing?

Someone mentioned it in the IRC as the slicing problem...

Python locale error: unsupported locale setting

Why do I get the following error when doing this in python: >>> import locale >>> print str( locale.getlocale() ) (None, None) >>> locale.setlocale(locale.LC_ALL, 'de_DE') ..

Angular 6: saving data to local storage

I have a data table which display data from external API, I want the number of items /element on the table page should be saved in local storage Here is what I have tried so far: ngOnInit() { t..

Boolean operators ( &&, -a, ||, -o ) in Bash

Can someone please explain the difference between the &&, ||, -a, and -o Unix operators? What are the restrictions on the usage of both types? Is it simply that the && and || operato..

Counting how many times a certain char appears in a string before any other char appears

I have many strings. Each string is prepended with at least 1 $. What is the best way to loop through the chars of each string to count how many $'s there are per string. eg: "$hello" - 1 "$$hello" ..

How to load a tsv file into a Pandas DataFrame?

I'm new to python and pandas. I'm trying to get a tsv file loaded into a pandas DataFrame. This is what I'm trying and the error I'm getting: >>> df1 = DataFrame(csv.reader(open('c:/~/tr..

Understanding MongoDB BSON Document size limit

From MongoDB The Definitive Guide: Documents larger than 4MB (when converted to BSON) cannot be saved to the database. This is a somewhat arbitrary limit (and may be raised in the future); it ..

Firebase FCM notifications click_action payload

I am trying to open a particular activity when the user clicks the notification when the app is in the background. From the Docs, I have got that click_action has to be added in the payload and an int..

How do I convert a factor into date format?

I imported a CSV file with dates from a SQL query, but the dates are really date-time values and R doesn't seem to recognize them as dates: > mydate [1] 1/15/2006 0:00:00 2373 Levels: 1/1/2006 0:00..

GET and POST methods with the same Action name in the same Controller

Why is this incorrect? { public class HomeController : Controller { [HttpGet] public ActionResult Index() { Some Code--Some Code---Some Code r..

How to change DataTable columns order

How to change Datatable columns order in c#. Example: am created sql table type order is Qty,Unit,Id but in program DataTable order is Id,Qty,Unit. In code Behind am directly pass DataTable to sql t..

How can I remove a substring from a given String?

Is there an easy way to remove substring from a given String in Java? Example: "Hello World!", removing "o" ? "Hell Wrld!"..

Get next element in foreach loop

I have a foreach loop and I want to see if there is a next element in the loop so I can compare the current element with the next. How can I do this? I've read about the current and next functions but..

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

I'm using CUDA (VC++, Visual studio 2008sp1) to debug a FEM program. The program can only run on a Win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on t..

Difference between spring @Controller and @RestController annotation

Difference between spring @Controller and @RestController annotation. Can @Controller annotation be used for both Web MVC and REST applications? If yes, how can we differentiate if it is Web MVC or R..

Spring default behavior for lazy-init

I am beginner to spring, ESP Inversion of control. I was puzzled understanding the difference between the following <bean id="demo" class="Demo" lazy-init="false"/> <bean id="demo" class=..

How do I accomplish an if/else in mustache.js?

It seems rather odd that I can't figure how to do this in mustache. Is it supported? This is my sad attempt at trying: {{#author}} {{#avatar}} <img src="{{avatar}}"/> {..

How to identify numpy types in python?

How can one reliably determine if an object has a numpy type? I realize that this question goes against the philosophy of duck typing, but idea is to make sure a function (which uses scipy and numpy)..

Changing background colour of tr element on mouseover

I want to have my table rows highlighted on mouse over, but I have yet to find a way to do it that isn't using Javascript. Is this not possible in CSS? I've tried this: tr:hover { background: #0..

Font from origin has been blocked from loading by Cross-Origin Resource Sharing policy

I'm receiving the following error on a couple of Chrome browsers but not all. Not sure entirely what the issue is at this point. Font from origin 'https://ABCDEFG.cloudfront.net' has been blocked ..

Is there a difference between x++ and ++x in java?

Is there a difference between ++x and x++ in java?..

getting JRE system library unbound error in build path

getting a JRE system library unbound error in build path, tried all suggestions from the below links, however did not work. I have jdk 1.6.0_29, I have also tried to install other versions but no help..

Java: How to convert List to Map

Recently I have conversation with a colleague about what would be the optimal way to convert List to Map in Java and if there any specific benefits of doing so. I want to know optimal conversion appr..

Use of Custom Data Types in VBA

I am trying to create a custom data type in VBA for Excel. Let's call this data type "truck". Each truck has the following attributes: NumberOfAxles (this is an integer) AxleWeights (this is an array..

How do you create a toggle button?

I want to create a toggle button in html using css. I want it so that when you click on it , it stays pushed in and than when you click it on it again it pops out. If theres no way of doing it just..

read subprocess stdout line by line

My python script uses subprocess to call a linux utility that is very noisy. I want to store all of the output to a log file and show some of it to the user. I thought the following would work, but ..

How do I filter date range in DataTables?

I have a large dataTable which contains ride information. Every row has a start datetime and an end datetime of the following format(yyyy-mm-dd HH:mm:ss). How can I use a datepicker for setting a filt..

Change background position with jQuery

I'd like to change the background position of a CSS-class while hovering a li-element. HTML: <div id="carousel"> <ul id="submenu"> <li>Apple</li> <li&..

Negative weights using Dijkstra's Algorithm

I am trying to understand why Dijkstra's algorithm will not work with negative weights. Reading an example on Shortest Paths, I am trying to figure out the following scenario: 2 A-------B \ ..

Current timestamp as filename in Java

I want to name new files created by my Java application with the current timestamp. I need help with this. How do I name the new files created with the current timestamp? Which classes should I inclu..

How to POST JSON Data With PHP cURL?

Here is my code, $url = 'url_to_post'; $data = array( "first_name" => "First name", "last_name" => "last name", "email"=>"[email protected]", "addresses" => array ( ..

The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

When I attempt to connect to a MySQL server from PHP, I see the following error: Deprecated: The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /path..

Error type 3 Error: Activity class {} does not exist

I have an IntelliJ Android project, that I successfully imported to Android Studio 0.4.0. It works perfectly if I don't change anything in manifest. However, when I want to change the launcher activit..

Stratified Train/Test-split in scikit-learn

I need to split my data into a training set (75%) and test set (25%). I currently do that with the code below: X, Xt, userInfo, userInfo_train = sklearn.cross_validation.train_test_split(X, userInfo)..

firefox proxy settings via command line

How do I change Firefox Proxy settings via command line on windows xp/2k? Thanks..

How to auto generate migrations with Sequelize CLI from Sequelize models?

I have a set of Sequelize models. I want to use migrations, not DB Sync. Sequelize CLI seems to be able to do this, according to this article: "When you use the CLI for the model generation, you will..

Android file chooser

I want to make a file uploader. And I hence I need a file chooser but I don't want to write this by myself. I find OI file manager and I think it suits me. But how can I force user to install OI file ..

Writing to a new file if it doesn't exist, and appending to a file if it does

I have a program which writes a user's highscore to a text file. The file is named by the user when they choose a playername. If the file with that specific username already exists, then the program..

How to host google web fonts on my own server?

I need to use some google fonts on an intranet application. The clients may or may not have internet connection. Reading the license terms, it appears that its legally allowed...

is it possible to update UIButton title/text programmatically?

I have a UIButton, that when pressed, brings up a new view where the user can change some settings. When the view is dismissed, I'd like to update the title/text of the UIButton to reflect the new st..

QComboBox - set selected item based on the item's data

What would be the best way of selecting an item in a QT combo box out of a predefined list of enum based unique values. In the past I have become accustomed to .NET's style of selection where the ite..

How to apply two CSS classes to a single element

Can i apply 2 classes to a single div or span or any html element? For example: <a class="c1" class="c2">aa</a> I tried and in my case c2 does not get applied. How can i apply both clas..

Is there StartsWith or Contains in t sql with variables?

I am trying to detect if the server is running Express Edition. I have the following t sql. DECLARE @edition varchar(50); set @edition = cast((select SERVERPROPERTY ('edition')) as varchar) print ..

Ruby 'require' error: cannot load such file

I've one file, main.rb with the following content: require "tokenizer.rb" The tokenizer.rb file is in the same directory and its content is: class Tokenizer def self.tokenize(string) r..

Position Relative vs Absolute?

What is the difference between position: relative and position: absolute in CSS? And when should you use them?..

Get element inside element by class and ID - JavaScript

Alright, I've dabbled in JavaScript before, but the most useful thing I've written is a CSS style-switcher. So I'm somewhat new to this. Let's say I have HTML code like this: <div id="foo"..

SQL/mysql - Select distinct/UNIQUE but return all columns?

SELECT DISTINCT field1, field2, field3, ...... FROM table I am trying to accomplish the following sql statement but I want it to return all columns is this possible? Something like: SELECT DISTIN..

How to use switch statement inside a React component?

I have a React component, and inside the render method of the component I have something like this: render() { return ( <div> <div> // removed for ..

Functional programming vs Object Oriented programming

I've been mainly exposed to OO programming so far and am looking forward to learning a functional language. My questions are: When do you choose functional programming over object-oriented? What a..

How to Cast Objects in PHP

Ive some classes that share some attributes, and i would like to do something like: $dog = (Dog) $cat; is it possible or is there any generic work around? Its not a superclass, or a interface or r..

How to get rid of "Unnamed: 0" column in a pandas DataFrame?

I have a situation wherein sometimes when I read a csv from df I get an unwanted index-like column named unnamed:0. file.csv ,A,B,C 0,1,2,3 1,4,5,6 2,7,8,9 The CSV is read with this: pd.read_c..

How can change width of dropdown list?

I have a listbox and I want to decrease its width. Here is my code: <select name="wgtmsr" id="wgtmsr" style="width: 50px;"> <option value="kg">Kg</option> <option value="gm"..

install cx_oracle for python

Am on Debian 5, I've been trying to install cx_oracle module for python without any success. First, I installed oracle-xe-client and its dependency (followed tutorial in the following link here). Th..

Creating the checkbox dynamically using JavaScript?

I am trying to create a checkbox dynamically using following HTML/JavaScript. Any ideas why it doesn't work? <div id="cb"></div> <script type="text/javascript"> var cbh = docume..

SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance

I am trying to build an ASP.NET MVC 5 Web Application which has a MyDatabase.mdf file in the App_Data folder. I have SQL Server 2014 Express installed with a LocalDb instance. I can edit the database ..

How to index an element of a list object in R

I'm doing the following in order to import some txt tables and keep them as list: # set working directory - the folder where all selection tables are stored hypo_selections<-list.files() # change ..

Programmatically center TextView text

I beg some leniency here, I'm just starting with the Android SDK tutorials and I'm attempting something out of interest that's not in the tutorial itself, but I would hope would be easy. I am trying ..

Enable remote MySQL connection: ERROR 1045 (28000): Access denied for user

MySQL 5.1.31 running on Windows XP. From the local MySQL server (192.168.233.142) I can connect as root as follows: >mysql --host=192.168.233.142 --user=root --password=redacted From a remote m..

What is difference between CrudRepository and JpaRepository interfaces in Spring Data JPA?

What is the difference between CrudRepository and JpaRepository interfaces in Spring Data JPA? When I see the examples on the web, I see them there used kind of interchangeably. What is the differe..

How do I store the select column in a variable?

How do I store the select column in a variable? I tried this, but it throws me an error "Incorrect syntax": declare @EmpId int SELECT dbo.Employee.Id as @EmpId FROM dbo.Employee ..

Increment value in mysql update query

I have made this code for giving out +1 point, but it doesn't work properly. mysql_query(" UPDATE member_profile SET points= ' ".$points." ' + 1 WHERE user_id = '".$userid."' "); the ..

How to send a message to a particular client with socket.io

I'm starting with socket.io + node.js, I know how to send a message locally and to broadcast socket.broadcast.emit() function:- all the connected clients receive the same message. Now, I would like t..

How do I set an un-selectable default description in a select (drop-down) menu in HTML?

I have a drop down where the user selects a language: <select> <option>English</option> <option>Spanish</option> </select> I want the default option tha..

Use dynamic variable names in `dplyr`

I want to use dplyr::mutate() to create multiple new columns in a data frame. The column names and their contents should be dynamically generated. Example data from iris: library(dplyr) iris <- as_..

Setting Windows PowerShell environment variables

I have found out that setting the PATH environment variable affects only the old command prompt. PowerShell seems to have different environment settings. How do I change the environment variables for ..

how to download file using AngularJS and calling MVC API?

I am using AngularJS, and I have a MVC 4 API that returns a HttpResponseMessage with an attachment. var result = new MemoryStream(pdfStream, 0, pdfStream.Length) { Position = 0 }; var response =..

How to safely call an async method in C# without await

I have an async method which returns no data: public async Task MyAsyncMethod() { // do some stuff async, don't return any data } I'm calling this from another method which returns some data: pub..

Sonar properties files

I have a project that has the following package structure src/main/proj -com.company.package -appName -morepackages -appVersion2 -morepackages sonar-runn..

Interview question: Check if one string is a rotation of other string

A friend of mine was asked the following question today at interview for the position of software developer: Given two string s1 and s2 how will you check if s1 is a rotated version of s2 ? Example:..

How to rollback a specific migration?

I have the following migration file db\migrate\20100905201547_create_blocks.rb How can I specifically rollback that migration file? ..

How can I convert a VBScript to an executable (EXE) file?

I'd looked around for information to convert a VBScript (*.vbs) to an executable and realised that most of the tools available are actually wrapping the script in the executable. Tried a few tools and..

How to create nonexistent subdirectories recursively using Bash?

I am creating a quick backup script that will dump some databases into a nice/neat directory structure and I realized that I need to test to make sure that the directories exist before I create them. ..

Why does javascript replace only first instance when using replace?

I have this var date = $('#Date').val(); this get the value in the textbox what would look like this 12/31/2009 Now I do this on it var id = 'c_' + date.replace("/", ''); and the result is ..

Node/Express file upload

I'm using node v0.10.26 and express v4.2.0 and I'm pretty new to node. I've been beating my head against my desk for the past three or so hours trying to get a file upload form working with node. At..

How to replace sql field value

I really don't know exactly what to do, I'm a bit new to SQL... should I use substring or replace in my case I have in my DB filed called email, now I wanted to edited all email ending with email.com..

What is FCM token in Firebase?

In the new Firebase, under Notification, they have mentioned that developer can send notification to a particular device. For that, in console it asks for an FCM token. What is it exactly and how can ..

Circle-Rectangle collision detection (intersection)

How can I tell whether a circle and a rectangle intersect in 2D Euclidean space? (i.e. classic 2D geometry)..

Specified cast is not valid?

I have a table created in ASP.net and I want to populate the table with information from the database once the page has been loaded. I'm getting an error that the specified cast is not valid. What am ..

How to split the filename from a full path in batch?

How do I split the filename out of a full path in batch scripting?..

JavaScript - Get minutes between two dates

If I have two dates, how can I use JavaScript to get the difference between the two dates in minutes?..

"Comparison method violates its general contract!"

Can someone explain me in simple terms, why does this code throw an exception, "Comparison method violates its general contract!", and how do I fix it? private int compareParents(Foo s1, Foo s2) { ..

Random color generator

Given this function, I want to replace the color with a random color generator. document.overlay = GPolyline.fromEncoded({ color: "#0000FF", weight: 10, points: encoded_points, zoomFa..

How to get the height of a body element

Here the total height of all <div>'s are 900 pixels, but the jQuery function returns the height of the body as 577 pixels. (If I remove the body CSS, it's working). Is there a solution for this..

Table Naming Dilemma: Singular vs. Plural Names

Academia has it that table names should be the singular of the entity that they store attributes of. I dislike any T-SQL that requires square brackets around names, but I have renamed a Users table..

Python list sort in descending order

How can I sort this list in descending order? timestamps = [ "2010-04-20 10:07:30", "2010-04-20 10:07:38", "2010-04-20 10:07:52", "2010-04-20 10:08:2..

Android sqlite how to check if a record exists

I would like to check whether a record exists or not. Here is what I've tried: MainActivity.class public void onTextChanged(CharSequence s, int start, int before, int count) { System...

How can I make Bootstrap 4 columns all the same height?

Disclaimer. This question was asked many times before. But since time has passed and now we are close to Bootstrap 4 release with full flexbox support, it is time for new answers for the same question..

Adding click event for a button created dynamically using jQuery

How to add a button click event on a button that was added dynamically using jQuery? The jQuery code that adds the dynamic buttons inside a div container: $('#pg_menu_content').empty(); $div = $('&l..

How to open child forms positioned within MDI parent in VB.NET?

How do we arrange child forms in a parent MDI window? I'm able to call and display a child form from a menu on the parent, but the child pops up outside the parent - I want it to actually be inside th..

:not(:empty) CSS selector is not working?

I'm having a heck of a time with this particular CSS selector which does not want to work when I add :not(:empty) to it. It seems to work fine with any combination of the other selectors: input:not(:..

ajax jquery simple get request

I am making this simple get request using jquery ajax: $.ajax({ url: "https://app.asana.com/-/api/0.1/workspaces/", type: 'GET', success: function(res) { console.log(res); ..

SQL Query to search schema of all tables

I am working on a SQL Server 2008 Db that has many tables in it (around 200). Many of these tables contain a field by the name "CreatedDate". I am trying to identify all the table schema with this par..

iterating through json object javascript

I'm having a really hard time trying to find a way to iterate through this JSON object in the way that I'd like. I'm using only Javascript here. First, here's the object { "dialog": { "dialog_tr..

Docker-compose: node_modules not present in a volume after npm install succeeds

I have an app with the following services: web/ - holds and runs a python 3 flask web server on port 5000. Uses sqlite3. worker/ - has an index.js file which is a worker for a queue. the web server ..

Getting URL parameter in java and extract a specific text from that URL

I have a URL and I need to get the value of v from this URL. Here is my URL: http://www.youtube.com/watch?v=_RCIP6OrQrE How can I do that?..

How to properly export an ES6 class in Node 4?

I defined a class in a module: "use strict"; var AspectTypeModule = function() {}; module.exports = AspectTypeModule; var AspectType = class AspectType { // ... }; module.export.AspectType..

Changing datagridview cell color dynamically

I have a dataGridView object that is populated with data. I want to click a button and have it change the color of the background of the cell. This is what I currently have foreach(DataGridViewRow ro..

Nested lists python

Can anyone tell me how can I call for indexes in a nested list? Generally I just write: for i in range (list) but what if I have a list with nested lists as below: Nlist = [[2,2,2],[3,3,3],[4,4,..

Property getters and setters

With this simple class I am getting the compiler warning Attempting to modify/access x within its own setter/getter and when I use it like this: var p: point = Point() p.x = 12 I get an EXC_..

Merging multiple PDFs using iTextSharp in c#.net

Well i'm trying to merge multiple PDFs in to one. I gives no errors while compiling. I tried to merge the docs first but that went wrong because I'm working with tables. This is the asp.net code-beh..

Linux command to print directory structure in the form of a tree

Is there any linux command that I can call from a Bash script that will print the directory structure in the form of a tree, e.g., folder1 a.txt b.txt folder2 folder3 ..

document.getElementById("test").style.display="hidden" not working

I want to hide my form when I click on the submit button. My code is as follows: <script type="text/javascript"> function hide() { document.getElementById("test").style.display = "h..

Better way to check variable for null or empty string?

Since PHP is a dynamic language what's the best way of checking to see if a provided field is empty? I want to ensure that: null is considered an empty string a white space only string is conside..

How To Run PHP From Windows Command Line in WAMPServer

I'm new to php and wanted to run php from command line. I have installed WAMP and set the "System Variables" to my php folder ( which is C:\wamp\bin\php\php5.4.3). When i go to Run -> CMD -> Type php..

Read JSON data in a shell script

In shell I have a requirement wherein I have to read the JSON response which is in the following format: { "Messages": [ { "Body": "172.16.1.42|/home/480/1234/5-12-2013/1234.toSort", "ReceiptHandle"..

include external .js file in node.js app

I have an app.js node application. As this file is starting to grow, I would like to move some part of the code in some other files that I would "require" or "include" in the app.js file. I'm trying ..

SMTP error 554

I'm using MDaemon as out mail server and the last days I get an error "554 Message does not conform to standards" for emails sent from one of the machines. Any idea what may be causing it? Other machi..

Saving excel worksheet to CSV files with filename+worksheet name using VB

I am very new with VB coding, I am trying to save multiple excel file worksheets to csv, I don't know to do this for multiple sheets, but I found a way to do for single file. I have found code on this..

Is it possible to style a select box?

I've got an HTML select box that I need to style. I'd prefer to use just CSS but if I have to I'll use jQuery to fill in the gaps. Can anyone recommend a good tutorial or plugin? I know, Google, but..

Python PDF library

What Python PDF libraries are there? I need to make some PDF with many grids, and I'm looking for a library that allows to manage pages (multi-page). The library should calculate when the page is end..

In JPA 2, using a CriteriaQuery, how to count results

I am rather new to JPA 2 and it's CriteriaBuilder / CriteriaQuery API: CriteriaQuery javadoc CriteriaQuery in the Java EE 6 tutorial I would like to count the results of a CriteriaQuery without act..

How to create dispatch queue in Swift 3

In Swift 2, I was able to create queue with the following code: let concurrentQueue = dispatch_queue_create("com.swift3.imageQueue", DISPATCH_QUEUE_CONCURRENT) But this doesn't compile in Swift 3. ..

How do I get the computer name in .NET

How do I get the computer name in .NET c#..

What is a difference between unsigned int and signed int in C?

Consider these definitions: int x=5; int y=-5; unsigned int z=5; How are they stored in memory? Can anybody explain the bit representation of these in memory? Can int x=5 and int y=-5 have same bi..

How to select count with Laravel's fluent query builder?

Here is my query using fluent query builder. $query = DB::table('category_issue') ->select('issues.*') ->where('category_id', '=', 1) ->join('issues', 'category_i..

How can I dynamically add items to a Java array?

In PHP, you can dynamically add elements to arrays by the following: $x = new Array(); $x[] = 1; $x[] = 2; After this, $x would be an array like this: {1,2}. Is there a way to do something similar..

Error:Execution failed for task ':app:processDebugResources'. > java.io.IOException: Could not delete folder "" in android studio

I am trying to develop a Android application using Android Studio, so I created an Android app and I want to publish it. Whenever I click on “build project“ to obtain the apk file, I get this erro..

Native query with named parameter fails with "Not all named parameters have been set"

I want to execute a simple native query, but it does not work: @Autowired private EntityManager em; Query q = em.createNativeQuery("SELECT count(*) FROM mytable where username = :username"); em.setP..

Allow access permission to write in Program Files of Windows 7

My application throws 'Access denied' errors when writing temporary files in the installation directory where the executable resides. However it works perfectly well in Windows XP. How to provide acce..

Cannot import scipy.misc.imread

I've seen this problem before with other people, but haven't found a fix. All I'm trying to do is: from scipy.misc import imread and I get /home1/users/joe.borg/<ipython-input-2-f9d3d927b58f&g..

window.onload vs document.onload

Which is more widely supported: window.onload or document.onload?..

How to replace (null) values with 0 output in PIVOT

I tried to convert the (null) values with 0 (zeros) output in PIVOT function but have no sucess. Below is the table and the syntax i've tried" SELECT CLASS, [AZ], [CA], [TX] FROM #TEMP PIVOT (SUM(D..

Django: save() vs update() to update the database?

I'm writing a Django app, and I need a function to update a field in the database. Is there any reason to do one of these methods rather than the other? def save_db_field(name,field,value): obj ..

Pretty git branch graphs

I've seen some books and articles have some really pretty looking graphs of git branches and commits. How can I make high-quality printable images of git history?..

package android.support.v4.app does not exist ; in Android studio 0.8

I've recently updated the android studio IDE to 0.8 to work with the new android L SDK. To start I imported a finished android project that receives no errors in the older version of android studio. I..

jQuery AJAX form data serialize using PHP

I am stuck in my code, I need to send data from the form to the check.php page and then process it. This is my code: The AJAX part: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11...

Sending data through POST request from a node.js server to a node.js server

I'm trying to send data through a POST request from a node.js server to another node.js server. What I do in the "client" node.js is the following: var options = { host: 'my.url', port: 80, ..

Laravel 5 error SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

I have installed Laravel 5 successfully and changed MySQL credentials in database.php file in config directory to ' mysql' => [ 'driver' => 'mysql', 'host' =..

jQuery load first 3 elements, click "load more" to display next 5 elements

I have an unordered list: <ul id="myList"></ul> <div id="loadMore">Load more</div> I wish to populate this list with list items from another HTML file: <li>One</li..

Dynamically adding properties to an ExpandoObject

I would like to dynamically add properties to a ExpandoObject at runtime. So for example to add a string property call NewProp I would like to write something like var x = new ExpandoObject(); x.AddP..

How to check if a string starts with a specified string?

I'm trying to check if a string starts with http. How can I do this check? $string1 = 'google.com'; $string2 = 'http://www.google.com'; ..

Using onBlur with JSX and React

I am trying to create a password confirmation feature that renders an error only after a user leaves the confirmation field. I'm working with Facebook's React JS. This is my input component: <inpu..

@ViewChild in *ngIf

Question What is the most elegant way to get @ViewChild after corresponding element in template was shown? Below is an example. Also Plunker available. Component.template.html: <div id="layout..

Parsing query strings on Android

Java EE has ServletRequest.getParameterValues(). On non-EE platforms, URL.getQuery() simply returns a string. What's the normal way to properly parse the query string in a URL when not on Java EE? It..

Typescript Date Type?

How do I express dates in TypeScript? Dates aren't a TypeScript type, so do I use any or object? Seems like there would be a "right" way to do: let myDate: any = new Date(); I couldn't find much on..

In Ruby on Rails, what's the difference between DateTime, Timestamp, Time and Date?

In my experience, getting dates/times right when programming is always fraught with danger and difficulity. Ruby and Rails have always eluded me on this one, if only due to the overwhelming number o..

Example of a strong and weak entity types

I've tried to look on Google about a decent explanation of weak and strong entity type, but I haven't fully understood them. Could someone give me an example of a strong and weak entity type?..

How to move the cursor word by word in the OS X Terminal

I know the combination Ctrl+A to jump to the beginning of the current command, and Ctrl+E to jump to the end. But is there any way to jump word by word, like Alt+←/→ in Cocoa applications ..

PHP date yesterday

Possible Duplicate: Get timestamp of today and yesterday in php I was wondering if there was a simple way of getting yesterday's date through this format: date("F j, Y"); ..

Docker and securing passwords

I've been experimenting with Docker recently on building some services to play around with and one thing that keeps nagging me has been putting passwords in a Dockerfile. I'm a developer so storing pa..