I have been using with success, grand central dispatch in my apps, but I was wondering what is the real advantage of using something like this:
dispatch_async(dispatch_get_main_queue(), ^{ ... do stu..
I have a few (grouped style) tables in my iphone app (only on part of the screen and added with Interface Builder though, not subclassed from UITableViewController) that 80% of the time are small and ..
If the &view-all parameter does NOT exist in the URL I need to add it to the end of the URL along with a value. If it DOES exist then I need to be able to just change the value without creating a ..
I'm new to script writing and can't get this one to work. I could if I moved the files to a path without a space in it, but I'd like it to work with the space if it could.
I want to extract a bunc..
I need to test for "[any number]" in a string in javascript. how would i match it?
Oh, "[" and "]" also need to be matched.
so string like "[1]" or "[12345]" is a match.
Non match: "[23432" or "1]..
If you want to indent several lines in Python IDLE you just mark the lines and hit Tab. But what if you want to remove the indent from several lines? Shift+Tab does not work for that in IDLE...
When trying to run Android Studio on my computer, I get the following error:
The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a va..
I'm using a WebView for displaying embedded Youtube video and that works on Galaxcy S2 (OS 2.3.5) and doesn't on Nexus S (OS 2.3.4), all I get is white screen without any video display.
Here is the c..
I'm trying to add custom time to datetime in SQL Server 2008 R2.
Following is what I've tried.
SELECT DATEADD(hh, 03, DATEADD(mi, 30, DATEADD(ss, 00, DATEDIFF(dd, 0,GETDATE())))) as Customtime
Us..
I have a DataFrame df:
A B
a 2 2
b 3 1
c 1 3
I want to create a new column based on the following criteria:
if row A == B: 0
if rowA > B: 1
if row A < B: -1
so giv..
Edit: Here's a JSfiddle
Edit2: The error is on this line: <input type="button" value="totalbandwidthresult" onclick="javascript:totalbandwidth();">
Trying to have a button perform a calculat..
I'm rewriting a project to use Node.js. I'd like to keep using MySQL as the DB (even though I don't mind rewriting the schema).
I'm looking for a simple-to-use, reasonable-performance ORM, which suppo..
I have a component, how can I select one of its elements?
I'm trying to get an input that is within this component's template.
There could be multiple components so the querySelector must only parse t..
I have a map named valueMap as follows:
typedef std::map<std::string, std::string>MAP;
MAP valueMap;
...
// Entering data.
Then I am passing this map to a function by reference:
void functio..
So, in my strings.xml I have a very long text which I want to format somehow.
How can I put a tab before the first sentence of the text? Also, what is the code for new line? Thanks..
In Java, I am trying to return all regex matches to an array but it seems that you can only check whether the pattern matches something or not (boolean).
How can I use a regex match to form an array ..
I want to create on DataFrame with a specified schema in Scala. I have tried to use JSON read (I mean reading empty file) but I don't think that's the best practice...
I am retrieving data from a database, where the field contains a String with HTML data. I want to replace all of the double quotes such that it can be used for parseJSON of jQuery.
Using Java, I am t..
I created an basic bar chart using chartjs and it works fine. Now I want to update the values on a time based interval. My problem is that after I created the chart, I do not know how to update its va..
I have a label, costLabel.
What I want to be able to do is change the value of this label depending on the selected value of a dropdownlist.
This is my HTML:
<table>
<tr>
<td ..
I'm having some information in Google Spreadsheets as a single sheet.
Is there any way by which I can read this information from .NET by providing the google credentials and spreadsheet address. Is it..
I am trying to change some for-each loops to lambda forEach()-methods to discover the possibilities of lambda expressions. The following seems to be possible:
ArrayList<Player> playersOfTeam = ..
Is there any way to scroll a ScrollView programmatically to a certain position?
I have created dynamic TableLayout which is placed in a ScrollView. So I want that on a specific action (like clicking ..
Bit of an odd one on query performance... I need to run a query which does a total count of documents, and can also return a result set that can be limited and offset.
So, I have 57 documents in tota..
I read some docs about md5, it said that its 128 bits, but why is it 32 characters? I can't compute the characters.
1 byte is 8 bits
if 1 character is 1 byte
then 128 bits is 128/8 = 16 bytes right?..
I know this has been asked a thousand time but I can't find a way to make the text and image to be centered vertically.
I'm using Twitter Bootstrap 3 with dynamic content so therefor, I do not know t..
According to http://www.faqs.org/docs/diveintopython/fileinfo_private.html:
Like most languages, Python has the
concept of private elements:
Private
functions, which can't be called from
outside the..
Let's say that a function A is required only by function B, should A be defined inside B?
Simple example. Two methods, one called from another:
def method_a(arg):
some_data = method_b(arg)
def me..
I basically want a python equivalent of this in C:
int a[x];
but in python I declare an array like:
a = []
and the problem is I want to assign random slots with values like:
a[4] = 1
but I ca..
I have a Java 7 application using JVM ARGS: -Xms1024m -Xmx2048m, and it runs pretty well.
After I upgrade to Java 8, it runs in error state with Exception:
Exception in thread "main" java.lang.OutOf..
I put an Image control on a Window and I would like to display an image that is stored in a project resource file named "Resources.resx". The name of the image in the resource file is 'Search'.
Coul..
I've written a factory to produce java.sql.Connection objects:
public class MySQLDatabaseConnectionFactory implements DatabaseConnectionFactory {
@Override public Connection getConnection() {
..
How would I round down to the nearest integer in MySQL?
Example: 12345.7344 rounds to 12345
mysql's round() function rounds up.
I don't know how long the values nor the decimal places will be, cou..
So I was writing this simple program to calculate the day of any date using the Gaussian algorithm found here.
#include <iostream>
using namespace std;
//Using the Gaussian algorithm
int dayof..
I'm trying to test a simple PHP page using the Chrome extension Postman. When I send URL parameters, the script works fine (eg the variables are available in the $_REQUEST parameter). When I send them..
I have an ip camera which provides a live RTSP video stream. I can use VLC media player to view the feed by providing it with the URL:
rtsp://cameraipaddress
But I need to display the feed on a web..
I was going through the tensorflow API docs here. In the tensorflow documentation, they used a keyword called logits. What is it? In a lot of methods in the API docs it is written like
tf.nn.softmax(..
I need to create a batch file which starts multiple console applications in a Windows .cmd file. This can be done using the start command.
However, the command has a path in it. I also need to pass..
I have a <div> element and I want to put a border on it. I know I can write style="border: 1px solid black", but this adds 2px to either side of the div, which is not what I want.
I would ra..
I want to format date as mm/dd/yyyy. I tried the following and none of it works for me.
Can anyone help me with this?
reference: ui-date
<input ui-date ui-date-format="mm/dd/yyyy" ng-model="value..
Can someone help me to understand what Java CountDownLatch is and when to use it?
I don't have a very clear idea of how this program works. As I understand all three threads start at once and each T..
How do I remove an App ID from the developer program portal area? I mistakenly added a couple of app id's under the wrong login and would like to remove them, but I am not seeing a way to do so...
I would like to disable scrolling on the HTML body completely. I have tried the following options:
overflow: hidden; (not working, did not disable scrolling, it just hid the scrollbar)
position: fix..
I have setup a local git on my machine. When I initialized git, I added pre-compiled libs and binaries. However, now during my development I don't want to check in those files intermittently. I dont w..
How can I get the ID of an element that called a JS function?
body.jpg is an image of a dog as the user points his/her mouse around the screen at different parts of the body an enlarged image is sho..
I had this issue and couldn´t find any answer. The issue was that I was trying to use Azure cdmlets to connect to O365 via c# code, but I couldn´t get the connect-msolservice.
""The term is not..
Based on extra vars parameter I Need to write variable value in ansible playbook
ansible-playbook playbook.yml -e "param1=value1 param2=value2 param3=value3"
If only param1 passed
myvariable: 'par..
I want to plot multiple data sets on the same scatter plot:
cases = scatter(x[:4], y[:4], s=10, c='b', marker="s")
controls = scatter(x[4:], y[4:], s=10, c='r', marker="o")
show()
The above only s..
I am configuring an MVC 3 project to work on a local install of IIS and came across the following 500 error:
Handler "PageHandlerFactory-Integrated" has a bad module
"ManagedPipelineHandler" in ..
When should a trailing slash be used in a URL? For example - should my URL look like /about-us/ or like /about-us?
I am fully aware of the SEO-related issues - duplicate content and the canonical thi..
Since the upgrade to iOS 6, we are seeing Safari's web view take the liberty of caching $.ajax calls. This is in the context of a PhoneGap application so it is using the Safari WebView. Our $.ajax cal..
Basically after clicking the submit button, I want a pop up box to pop up saying successful or fail, then clicking OK to confirm the message. At the moment i am getting a pop up box "undefined" follow..
I'm starting with git and GitHub and there's a project I'm watching on GitHub. I unintentionally clicked to fork it. Now it appears as a new project to me.
I have some doubts about it:
I know if co..
I have an array of _ids and I want to get all docs accordingly, what's the best way to do it ?
Something like ...
// doesn't work ... of course ...
model.find({
'_id' : [
'4ed3ede8844f0..
I have a Windows application which will run in Windows XP and newer (i.e. Vista/7). According to the Vista UI Guidelines, the standard sizes are 16x16, 32x32, 48x48, 256x256 (XP standard sizes do not ..
I am using Eclipse Luna and working on a maven project. When I add the entry for ojdbc jar in pom.xml , it is giving error in the xml. I can't find any reason for the issue as groupId, artifactId an..
I know that we can use several commands to access and read memory: for example, print, p, x...
But how can I change the contents of memory at any specific location (while debugging in GDB)? ..
I am trying to execute command line arguments via Java. For example:
// Execute command
String command = "cmd /c start cmd.exe";
Process child = Runtime.getRuntime().exec(command);
// Get output str..
In Android, I defined an activity ExampleActivity.
When my application was launched, an instance of this A-Activity was created, say it is A.
When user clicked a button in A, another instance of B-A..
I have created an application and with an event I manage to add notification in android notification bar. Now I need sample how to remove that notification from notification bar on an event ?? ..
There are some methods in WebSettings related to zoom:
WebSettings.setSupportZoom
WebSettings.setBuiltInZoomControls
I noticed they work differently on some devices.
For example, on my Galaxy S pi..
I would like to list all indexes present on an ElasticSearch server. I tried this:
curl -XGET localhost:9200/
but it just gives me this:
{
"ok" : true,
"status" : 200,
"name" : "El Aguila",
..
I am trying to send a simple dictionary to a json file from python, but I keep getting the "TypeError: 1425 is not JSON serializable" message.
import json
alerts = {'upper':[1425],'lower':[576],'leve..
I have a table with 2 rows and variable columns. I tried width = 100% for the column. So the first content in the view will fit. But suppose if i am changing the contents dynamically then it is not dy..
Can I set a route with optional params (same template and controller, but some params should be ignored if they don't exist?
So instead of writing the following two rules, have only one?
module.conf..
I have installed Android Studio for the millionth time but when i go to C:\Program Files\Android\Android Studio , i can't find any folder named "SDK" , can't find it any where on the computer either.
..
I'm using psql's \dt to list all tables in a database and I need to save the results.
What is the syntax to export the results of a psql command to a file?..
When I run the ant file in verbose mode, I got an error like the one below. Does anyone have any ideas what is going wrong? I am new to this
antlib:org.apache.tools.ant] Could not load definitions fr..
I have a fragment that inflates an xml layout. My requirement is to update the text size on all my views inside my fragment when my Activity is resumed. I tried
fragment.getView().invalidate();
..
I have been using the twitter bootstrap framework for quite a while now and they recently updated to version 3!
I'm having trouble getting the sticky footer to stick to the bottom, I have used the st..
I have below string -
var a = "1,2,3,4";
when I do -
var b = a.split(',');
I get b as ["1", "2", "3", "4"]
can I do something to get b as [1, 2, 3, 4] ?..
I have a script which is meant to be used like this:
usage: installer.py dir [-h] [-v]
dir is a positional argument which is defined like this:
parser.add_argument('dir', default=os.getcwd())
I wa..
I have two controllers, both called AccountController. One of them, lets call it Controller A, is in an Area called Admin and the other, lets call it Controller B, is not in any Area (I guess that me..
I make a shape.xml file under res -> drawable folder.
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="recta..
I'm new to aws, can anyone tell me what are redshifts' equivalents to mysql commands?
show tables -- redshift command
describe table_name -- redshift command
..
I have a table called tblAccounts whose contents will come from an excel spreadsheet.
I am using MS SQL Server 2008 (x64) on a Windows 8.1 (x64)
I tried using the SQL Server Import/Export Wizard but..
I'm new to the programming scene. Been working with C++ for about 5 months now, and have decided I want to start getting into Java. I'm using Eclipse as my IDE, and obviously Java for the language. ..
I'm checking out some PHP 5.3.0 features and ran across some code on the site that looks quite funny:
public function getTotal($tax)
{
$total = 0.00;
$callback =
/* This line here: *..
I am a long time Subversion user that is going to try Git. I have read some about it and understand the distributed nature - I can see a lot of the benefits.
However, I do like the idea of a centr..
I am trying to link 2 separate containers:
nginx:latest
php:fpm
The problem is that php scripts do not work. Perhaps the php-fpm configuration is incorrect.
Here is the source code, which is in my..
How to explain callbacks in plain English? How are they different from calling one function from another function taking some context from the calling function? How can their power be explained to a n..
I'm having trouble getting my browser to display the css for the app I am creating. I have looked at the same question asked by other users but have not found any of the answers to help in my situatio..
I am using Perl running in user space (not installed via root) and installing modules via the command-line cpan. I would like to know if there is a simple way to remove a module without having to do a..
I am successfully using this code to send HTTP requests with some parameters via GET method
void sendRequest(String request)
{
// i.e.: request = "http://example.com/index.php?param1=a¶m..
If I put only an image in a button and set the imageEdgeInsets more close to the top, the image stays centered and all works as expected:
[button setImage:image forState:UIControlStateNormal];
[butto..
I am using the javac compiler to compile java files in my project. The files are distributed over several packages like this: com.vistas.util, com.vistas.converter, com.vistas.LineHelper, com.current...
Is there a Redis command for fetching all keys in the database? I have seen some python-redis libraries fetching them. But was wondering if it is possible from redis-client...
I try 30 combination of answer and forum topic but did not find the right answer.
I do all but how I can enable the curl int wamp server becouse I need that?
is there any solution?
I try to uncomme..
This gives a good explanation of squashing multiple commits:
http://git-scm.com/book/en/Git-Branching-Rebasing
but it does not work for commits that have already been pushed. How do I squash the most ..
I would like to pass some variables in the constructor of my ListActivity
I start activity via this code:
startActivity(new Intent (this, viewContacts.class));
I would like to use similar code, ..
I want to post parameters to a URL using the POST method but I cannot use a form. Even if I do use a form, it would have to be auto-posted with out user interaction. Is this possible? How can I do thi..
How can I change the selected date of jquery Date picker dynamically on the fly?
I have say created a inline date picker.
Then after some time, I want to reflect a different date there without recreat..
I've created a PreferenceActivity that allows the user to choose the theme he wants to apply to the entire application.
When the user selects a theme, this code is executed:
if (...) {
getApplic..
I am having trouble coming up with the right combination of semicolons and/or braces. I'd like to do this, but as a one-liner from the command line:
while [ 1 ]
do
foo
sleep 2
done
..
If a user inputs an address, I want to convert to the equivalent LatLng.
I've read the documentation, and I think I can use the Geocoder class to do this, but can't figure out how to implement it.
T..
I have a pull down menu of companies that is populated by a list on another sheet. Three columns, Company, Job #, and Part Number.
When a job is created I need a folder for said company and a sub-fo..
The data I'm playing with comes from the internet source listed below
nba <- read.csv("http://datasets.flowingdata.com/ppg2008.csv", sep=",")
What I want to do, is create a 2D points graph compa..
{"document":
{"people":[
{"name":["Harry Potter"],"age":["18"],"gender":["Male"]},
{"name":["hermione granger"],"age":["18"],"gender":["Female"]},
]}
}
From this JSON example, I would li..
With GitHub command I have:
ssh -T [email protected]
Hi (MyName)! You've successfully authenticated, but GitHub does not provide shell access.
My connection with GitHub is ok (no problem), but with Je..
I was looking for a FFT implementation in C. However, I am not looking for a huge library (like FFTW) but for a easy to use single C-file implementation. Unfortunately I haven't been able to find anyt..
I use the following CSS code for formatting when screen width is less than 480px, and it works well.
@media screen and (min-width: 480px) {
body {
background-color: lightgreen;
}
}
I ..
I'm looking for the fastest way of inserting into Entity Framework.
I'm asking this because of the scenario where you have an active TransactionScope and the insertion is huge (4000+). It can potentia..
I finished installing Ubuntu 10 for netbooks, and XAMPP. The XAMPP website tutorial made it very easy to install, then left me high and dry. Everything works, but I have no idea where to put my handwr..
I've a huge data in excel file.
For eg: say i've a word like paul son,i've to make it as paulson.
input:paul son
output:paulson.
In some cells ,i've data like mic-li,when this type of words come,it..
I have a String and I want to extract the (only) sequence of digits in the string.
Example:
helloThisIsA1234Sample.
I want the 1234
It's a given that the sequence of digits will occur only once wit..
I am using dig installed on my machine to search for SPF records for a particular domain. Is there a way to search a particular DNS server for the SPF records?
For example, will the following work?
..
Is it possible to detect when all images are loaded via a jQuery event?
Ideally, there should be a
$(document).idle(function()
{
}
or
$(document).contentLoaded(function()
{
}
But I can't find ..
I have only found how to wait for user input. However, I only want to pause so that my while true doesn't crash my computer.
I tried pause(1), but it says -bash: syntax error near unexpected token '..
I'm trying to learn python and I now I am trying to get the hang of classes and how to manipulate them with instances.
I can't seem to understand this practice problem:
Create and return a student o..
How can I copy more than a single file into remote nodes by Ansible in a task?
I've tried to duplicate the copy module line in my task to define files but it only copies the first file...
My .gitignore file seems to be being ignored by Git - could the .gitignore file be corrupt? Which file format, locale or culture does Git expect?
My .gitignore:
# This is a comment
debug.log
nbproje..
I am trying to copy a table from one database to another using oracle sql developer. I have the username, password and SIDs.
copy from uname1/password1@SID1 to uname2/pwd2@SID2 insert table1 (*) usin..
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
import time
# Create a new inst..
Is there a keyboard shortcut for pasting the content of the clipboard into a command prompt window on Windows XP (instead of using the right mouse button)?
The typical Shift+Insert does not seem to w..
I've been searching for a good trick to make a Hide/Show content or a list with only CSS and no javascript.
I've managed to make this action:
<!DOCTYPE html>
<head>
<style>
..
I can install an artifact by install:install-file,
but how can I download an artifact?
For example:
mvn download:download-file -DgroupId=.. -DartifactId=.. -Dversion=LATEST
..
Let's say I have a table called messages with the columns:
id | from_id | to_id | subject | message | timestamp
I want to get the latest message from each user only, like you would see in your Face..
Why would anyone use String.Format in C# and VB .NET as opposed to the concatenation operators (& in VB, and + in C#)?
What is the main difference? Why are everyone so interested in using String...
I'm trying to retain the first 2 child elements on the same row while the third element is in its own below at full width, all while using flex.
I'm particularly interested in using the flex-grow and..
I have a requirements.txt file that I'm using with Travis-CI. It seems silly to duplicate the requirements in both requirements.txt and setup.py, so I was hoping to pass a file handle to the install_..
I'm wondering how to deal internationalization in JavaScript. I googled but I'm not getting convincing answers for:
Does JavaScript have native support for internationalization?
What is i18n in Jav..
I am writing a simple program that uses functions found in different .cpp files. All of my prototypes are contained in a header file. I pass some of the functions into other functions and am not sure ..
I'm new to Android development and the development tools around it. I have checked out a project from svn using TortoiseSVN client (can't manage to do it from within Android Studio), then get this err..
I have tried following code, but it only positions dialogs left upper corner position to center, and that makes element to be aligned to right. How can I center dialog to real center which counts elem..
This is a beginner's question.
What's the difference between ^ and **?
For example:
2 ^ 10
[1] 1024
2 ** 10
[1] 1024
Is there a function such as power(x,y)?
..
I'm trying to update a field in the database to the sum of its joined values:
UPDATE P
SET extrasPrice = SUM(E.price)
FROM dbo.BookingPitchExtras AS E
INNER JOIN dbo.BookingPitches AS P ON E.pitchID ..
I'm trying to make a GIF fit my whole screen, but so far its just a small square that is on my screen while the rest is white. However, I want it to take up all the space.
Any ideas?..
I want to get the name of the currently running batch file without the file extension.
Thanks to this link, I have the file name with the extension... but what is the best way to do a substring in ..
I need to make a request through a HTTPS protocol. I wrote the following code:
import java.net.HttpURLConnection;
import java.net.URL;
import org.junit.Test;
public class XMLHandlerTest {
priva..
What is the difference between the following codes?
code1:
var=2**2*3
code2:
var2=2*2*3
I see no difference.
This raises the following question.
Why is the code1 used if we can use code2?..
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..
I am trying to import the data from Excel file into SQL Server database. I am unable to do so because I am getting following errors in the log file. Please help. The log erros are as as follows:-
[OL..
I want to print the result of grouping with Pandas.
I have a dataframe:
import pandas as pd
df = pd.DataFrame({'A': ['one', 'one', 'two', 'three', 'three', 'one'], 'B': range(6)})
print(df)
..
I'm trying to pass a URI-Object to my Intent in order to use that URI
in another activity...
How do I pass a URI ?
private Uri imageUri;
....
Intent intent = new Intent(this, GoogleActivity.class);
..
In the MongoDB console how can I remove a record by id? Here's my collection :
[
{
"_id" : { "$oid" : "4d512b45cc9374271b02ec4f" },
"name" : "Gazza"
},
{
"_id" : { "$oid" : "4d5..
I'm using Nginx as a proxy to filter requests to my application. With the help of the "http_geoip_module" I'm creating a country code http-header, and I want to pass it as a request header using "head..
I have a gridview inside a div.. I want to scroll to top of the div from the bottom of the div using jquery.. Any suggestion..
<div id="GridDiv">
// gridview inside..
</div>
My gridview..
<a target="_blank" data-rel="external" href="http://www.kidzout.com">www.kidzout.com</a>
hey experts i am using phonegap 2.9.0 and i am using the above code to open the link in the brows..
My question is simple,
How to set my buttons layout_gravity programmatically?
I found this on internet, but it simply throws me a Nullpointer exception:
Button MyButton = new Button(this);
Li..
I have an array of distances called dists. I want to select dists which are between two values. I wrote the following line of code to do that:
dists[(np.where(dists >= r)) and (np.where(dists <..
I need to store 3 pet names in string format, parse them into array and later read one by one
Example
pets = '{{"name":"jack"},{"name":"john"},{name:"joe"}}';
var arr = JSON.parse(pets);
alert(arr..
$("*").click(function(){
$(this); // how can I get selector from $(this) ?
});
Is there an easy way to get selector from $(this)? There is a way to select an element by its selector, but what ab..
I have my application that is displaying images with different ratio, resized inside (centerInside) imageView. What I need is to create bitmap from the ImageView including the background (black in thi..
I have the following DataFrame:
In [1]:
import pandas as pd
df = pd.DataFrame({'a': [1,2,3], 'b': [2,3,4], 'c':['dd','ee','ff'], 'd':[5,9,1]})
df
Out [1]:
a b c d
0 1 2 dd 5
1 2 3 ee ..
I am receiving the following error when trying to run my React app:
./src/components/App/App.js
Attempted import error: 'combineReducers'
is not exported from '../../store/reducers/'.
Here'..
I have just upgraded Tomcat from version 7.0.52 to 8.0.14.
I am getting this for lots of static image files:
org.apache.catalina.webresources.Cache.getResource Unable to add the
resource at [/b..
Please find my code below. I need to get the file path of the pdf document, selected by the user from SDcard. The issue is that the URI.getPath() returns:
/file:///mnt/sdcard/my%20Report.pdf/my Repor..
I have gone across the JavaScript questions on this topic, this question is specifically about Angular2 with TypeScript.
What I am trying to do is to concatenate the json objects to an array.
My cod..
I am new to rest api's and calling them via .NET
I have an api: https://sub.domain.com/api/operations?param=value¶m2=value
The notes for the api say that to authorize I need to use the basic..
Just a simple question, for the jQuery event. Are the .load(), .ready() and .unload() run in order when the DOM is loaded? The answer seems yes when I see the jQuery Documentation.
<script type="t..
I am trying to implement the "fade out" effect in pure CSS. Here is the fiddle. I did look into a couple of solutions online, however, after reading the documentation online, I am trying to figure out..
I need to sort a list and then return a list with the index of the sorted items in the list. For example, if the list I want to sort is [2,3,1,4,5], I need [2,0,1,3,4] to be returned.
This question..
I've written a Task Scheduling program for learning purposes. Currently I'm saving the scheduled tasks just as plain text and then parsing it using Regex. This looks messy (code wise) and is not very ..
How do you return 1 value per row of the max of several columns:
TableName
[Number, Date1, Date2, Date3, Cost]
I need to return something like this:
[Number, Most_Recent_Date, Cost]
Query?..
When I compile with gulp, I got an error like below. How can I fix it?
module.js:339
throw err;
^
Error: Cannot find module 'gulp-sass'
at Function.Module._resolveFilename (module.js:337:15)
..
this wiki page gave a general idea of how to convert a single char to ascii http://en.wikibooks.org/wiki/Ruby_Programming/ASCII
But say if I have a string and I wanted to get each character's ascii f..
Suppose you maintain a library that exposes a function getData. Your users call it to get actual data:
var output = getData();
Under the hood data is saved in a file so you implemented getData using N..
I have a form with a file input. How do I get the file and post it to a php script using jQuery? Can I just use .val() to get the value and then post this? For example say the file input has an id of ..
Just wondering if that's possible or not- when I copy the video URL into YouTube-dl it spits out
[https @ 0x7fc351416080] inflate return value: -3, incorrect header check
Last message repeated 15 time..
I'm trying to POST a JsonObject using HttpClient from Web API. I'm not quite sure how to go about this and can't find much in the way of sample code.
Here's what I have so far:
var myObject = (dyna..
Used treeview.SelectedNode to select a child node. How to invoke treeview.AfterSelect event when a node is selected programmatically?
this.treeView1.SelectedNode = this.treeView1.Nodes[0].Nodes[0].No..
I'm building a website with Bootstrap's Popover and I can't figure out how to make the popover appear on hover instead of click.
All I want to do is have a popover appear when someone hovers over a l..
So I've been toying around with HTTP for fun in telnet now (i.e. just typing in telnet google.com 80 and putting in random GETs and POSTs with different headers and the like) but I've come across some..
I'm writing an Angular 2 service in TypeScript that will make use of localstorage. I want to inject a reference to the browser window object into my service since I don't want to reference any global ..
I have entity called Customer and it has three properties:
public class Customer {
public virtual Guid CompanyId;
public virtual long Id;
public virtual string Name;
}
I have also entit..
CodeIgniter is giving me a Disallowed Key Characters error. I've narrowed it down to the name attribute of a form field: name='prod[50-4121.5]' but I'm not sure what to do about it...
I am making a countdown timer for an event page, i used moment js for this.
Here is fiddle for this.
I am calculating date difference between event date and current date (timestamp), then using "..
I just installed Ubuntu 16.04 and installed web server on it. Everything works well, but I cannot access database.
Even if I create new user and grant all privileges, I can't create database
In PHP I'..
For example if the parenthesis/brackets is matching in the following:
({})
(()){}()
()
and so on but if the parenthesis/brackets is not matching it should return false, eg:
{}
({}(
){})
(()
and ..