I'm looking for a profiler in order to find the bottleneck in my C++ code. I'd like to find a free, non-intrusive, and good profiling tool. I'm a game developer, and I use PIX for Xbox 360 and fo..
I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server.
I launch it with:
webpack-dev-server..
I tried to use it with typescript bindings:
npm install moment --save
typings install moment --ambient -- save
test.ts:
import {moment} from 'moment/moment';
And without:
npm install moment --s..
Is it possible to format a date with jQuery UI Datepicker as to show hours, minutes and seconds?
This is my current mockup:
_x000D_
_x000D_
$(function() {_x000D_
$('#datepicker').datepicker({ da..
I would like to write a regular expression that starts with the string "wp" and ends with the string "php" to locate a file in a directory. How do I do it?
Example file: wp-comments-post.php..
How could I make it so that a table inside a container with its own width does not follow the width of the container and instead, retain the table's width when it's not inside the container. I have a ..
I've seen many people use the following code:
Type t = typeof(obj1);
if (t == typeof(int))
// Some code here
But I know you could also do this:
if (obj1.GetType() == typeof(int))
// Some c..
Could someone give me some guidance on when I should use WITH (NOLOCK) as opposed to SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
What are the pros/cons of each? Are there any unintended consequ..
Let's say I want that every time the user click any link an alert pops up that says "hohoho".
Do I need to add onclick="alert('hohoho')" to every link or can I set this with CSS so that it works with..
OK, I'm aware that triple-quotes strings can serve as multiline comments. For example,
"""Hello, I am a
multiline comment"""
and
'''Hello, I am a
multiline comment'''
But technically sp..
This may have been asked in a similar context but I was unable to find an answer after about 20 minutes of searching, so I will ask.
I have written a Python script (lets say: scriptA.py) and a script..
What's the most efficient way to create this simple array dynamically.
var arr = [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
Let's say we can get the number 10 from a variable
var mynumb..
I am working on an SMS app and need to be able to convert the sender's phone number from +11234567890 to 123-456-7890 so it can be compared to records in a MySQL database.
The numbers are stored in ..
Is there any way to achieve function overloading in C? I am looking at simple functions to be overloaded like
foo (int a)
foo (char b)
foo (float c , int d)
I think there is no straight forwa..
In my Unix shell script, when I execute a curl command, the result will be displayed as below which I am redirecting to file:
{"type":"Show","id":"123","title":"name","description":"Funny","channelTi..
Which header file should I invoke with #include to be able to use PATH_MAX as an int for sizing a string?
I want to be able to declare:
char *current_path[PATH_MAX];
But when I do so my compiler (..
I'm writing an init script which is supposed to execute a single command as a user different than root. This is how I'm doing it currently:
sudo -u username command
This generally works as expected ..
All I am trying to do is to get the current class name, and java appends a useless non-sense $1 to the end of my class name. How can I get rid of it and only return the actual class name?
String clas..
I am using a instance of UIWebView to process some text and color it correctly, it gives the result as HTML but rather than displaying it in the UIWebView I want to display it using Core Text with a N..
It seems strange to me that np.corrcoef returns a matrix.
correlation1 = corrcoef(Strategy1Returns,Strategy2Returns)
[[ 1. -0.99598935]
[-0.99598935 1. ]]
Does anyone know why th..
How do you specify in java how to make a square root and absolute value?
Here is what I have:
if(variable < 0){
variable = variable + variable2;
}
But is there an easier way to get the abso..
I am trying to use robocopy but am unable to make it work because of spaces in the directory names.
I am trying to copy 3 directories: My Documents, My Music and My Pictures to 'C:\test-backup' but wa..
Okay, I implemented this SO question to my code: Return True or False Randomly
But, I have strange behavior: I need to run ten instances simultaneously, where every instance returns true or false jus..
I need an offline installer with most of the utilities commonly needed. Somehow the default installer confuses me with all its package selection. I installed Cygwin but I can't find the diff utility a..
I am not sure if I can make myself clear but will try.
I have a tuple in python which I go through as follows (see code below). While going through it, I maintain a counter (let's call it 'n') and 'p..
First off, I will freely concede to being little more than a clumsy liberal arts guy who is completely self taught in this scripting thing. That said, I am attempting to get values from a the USGS Wat..
I am trying to execute the following query:
INSERT INTO table_listnames (name, address, tele)
VALUES ('Rupert', 'Somewhere', '022')
WHERE NOT EXISTS (
SELECT name FROM table_listnames WHERE name=..
I've been trying to convert a value of seconds (in a BigDecimal variable) to a string in an editText like "1 hour 22 minutes 33 seconds" or something of the kind.
I've tried this:
String sequenceCa..
I'd like to change text size for some page part, e.g. for verbatim block:
\begin{verbatim}
<how to set font size here to 10 px ? />
\end{verbatim}
Regards..
First, I'm not interested in doing this professionally. I am a web developer, a coworker of mine recently left for Spotify and said he will be working mostly in JavaScript for the Spotify Desktop app...
I have a div with a width of 250px. When the innertext is wider than that i want it to break down. The div is float: left and now has an overflow. I want the scrollbar to go away by using word-wrappin..
This is not necessarily an issue, I am just curious as to how it works. I have a method:
public static bool UserIsAuthenticated()
{
bool isAuthed = false;
try
{
if (HttpContext.Cu..
I have a table with a column that stores the date and time. I need to write a query to get only the date from that column,
SELECT CAST(CONVERT(VARCHAR, LoginTime, 101) AS datetime) FROM AuditTrail
..
I am having trouble trying to set the PDD(patient death date) to null on PHPMYADMIN until such death date comes; also on the client end then I can check for NULL data to use it.
Could anyone suggest ..
From the isset() docs:
isset() will return FALSE if testing a variable that has been set to NULL.
Basically, isset() doesn't check for whether the variable is set at all, but whether it's set to an..
I have a collection of boxes with the properties weight, volume and owner.
I want to use LINQ to get a summarized list (by owner) of the box information
e.g.
**Owner, Boxes, Total Weight, Total Vol..
I am trying to run some ES6 code in my project but I am getting an unexpected token export error.
export class MyClass {
constructor() {
console.log("es6");
}
}
..
It appears that there is no concept of AUTO_INCREMENT in Oracle, up until and including version 11g.
How can I create a column that behaves like auto increment in Oracle 11g?..
I am getting following error while I am trying to delete 355447 records in single delete query.
The transaction log for database is full. To find out why space in the log cannot be reused, see the lo..
Is there a better way other than looping to find data in JSON? It's for edit and delete.
for(var k in objJsonResp) {
if (objJsonResp[k].txtId == id) {
if (action == 'delete') {
objJsonRes..
I'm a new Python programmer who is making the leap from 2.6.4 to 3.1.1. Everything has gone fine until I tried to use the 'else if' statement. The interpreter gives me a syntax error after the 'if' in..
How do I properly set the default character encoding used by the JVM (1.5.x) programmatically?
I have read that -Dfile.encoding=whatever used to be the way to go for older JVMs. I don't have that lux..
I got the above error in my app. Here is the original code
public string GetCustomerNumber(Guid id)
{
string accountNumber =
(string)DBSqlHelperFactory.ExecuteScalar(connectionStringS..
To be honest, I've tried to turn a dirty trick on IIS and just when I thought that I was going to get away with it, I realized my workaround doesn't work. Here's what I've tried to do:
1) I have ASP...
I know a few ways how to check this.
regex,int.parse,tryparse,looping.
can anyone tell me what is the fastest way to check?
the need is to only CHECK no need to actually parse.
this is not the same..
How go get an input text value in JavaScript?
<script language="javascript" type="text/javascript">
lol = document.getElementById('lolz').value;
function kk(){
alert(lol);
}
<..
I used this Hive query to export a table into a CSV file.
INSERT OVERWRITE DIRECTORY '/user/data/output/test' select column1, column2 from table1;
The file generated '000000_0' does not have comma ..
I built an app with ReactNative both for iOS and android with a ListView. When populating the listview with a valid datasource, the following warning is printed at the bottom of the screen:
Warnin..
I have services that are derived from the same interface.
public interface IService { }
public class ServiceA : IService { }
public class ServiceB : IService { }
public class ServiceC : IService { }..
Possible Duplicate:
Java: How to convert List to Map
I have arrayList
ArrayList<Product> productList = new ArrayList<Product>();
productList = getProducts(); //Fetch the re..
How would I get a UNIX timestamp (number of seconds since 1970 GMT) from a Date object in a Rails app?
I know Time#to_i returns a timestamp, but doing Date#to_time and then getting the timestamp resu..
Say I have an Array[Int] like
val array = Array( 1, 2, 3 )
Now I would like to append an element to the array, say the value 4, as in the following example:
val array2 = array + 4 // will not..
Is there any difference (performance, best-practice, etc...) between putting a condition in the JOIN clause vs. the WHERE clause?
For example...
-- Condition in JOIN
SELECT *
FROM dbo.Customers AS C..
I have declared the following model using the EF Core fluent API:
modelBuilder.Entity<Foo>()
.HasKey(p => new { p.Name, p.Id });
Both fields are marked as the primary key when I create..
I am having problem to format digits in my select column.I used FORMAT but it doesn't work.
Here is my column:
sum(cast(datediff(second, IEC.CREATE_DATE, IEC.STATUS_DATE) as float) / 60) TotalSentMin..
Possible Duplicate:
Saving image from PHP URL
I have an image as a url link from the 3rd party web thumb site (IE http://images.websnapr.com/?size=size&key=Y64Q44QLt12u&url=http://g..
I am writing some Java Webdriver code to automate my application. How can I correctly check whether the page has been loaded or not? The application has some Ajax calls, too.
I have declared an impli..
I am getting an array arr passed to my Django template. I want to access individual elements of the array in the array (e.g. arr[0], arr[1]) etc. instead of looping through the whole array.
Is there ..
How can I view the change history of an individual file in Git, complete details with what has changed?
I have got as far as:
git log -- [filename]
which shows me the commit history of the file, ..
I want to access my current working directory using java.
My code :
String current = new java.io.File( "." ).getCanonicalPath();
System.out.println("Current dir:"+current);
String currentD..
I am playing around with typescript and am trying to create a script that will update a p-element as text is inputted in a input box.
The html looks as following:
<html>
<head>
&..
I'm trying to do one of those standard spring mvc hello world applications but with the twist that I'd like to map the controller to the root. (for example: http://numberformat.wordpress.com/2009/09/0..
In the example section of the @OneToMany JPA annotation reference:
Example 1-59 @OneToMany - Customer Class With Generics
@Entity
public class Customer implements Serializable {
...
@OneToMa..
I want to serialize objects to strings, and back.
We use protobuf-net to turn an object into a Stream and back, successfully.
However, Stream to string and back... not so successful. After going thr..
I have a .bak file, and I want to use this file to recreate the database in a fresh install of SQL Server 2008 Management Studio.
Can someone point me in the right direction on how this can be done?
..
Based on this answer
Regular Expressions: Is there an AND operator?
I tried the following on http://regexpal.com/ but was unable to get it to work. What am missing? Does javascript not support it?
..
When I try to install php 5.3 stable from source on Ubuntu (downloading compressed installation file from http://www.php.net/downloads.php) and I run ./configure I get this error:
configure: error: x..
I have terminal access to a VPS running centos 5.9 and default python 2.4.3 installed. I also installed python 2.7.3 via these commands: (I used make altinstall instead of make install)
wget http://w..
Possible Duplicate:
Convert std::string to const char* or char*
Probably a & or something similar missing (I am noob at cpp).
I have
string R = "somthing";
char* S;
How would I co..
I'm having a problem with bootstrap 3 navigation, i have some content on the left, center and right. it seems there is no option for centering the navigation.
http://jsfiddle.net/29tQt/embedded/resul..
I am making a website where I want to use range slider(I know it only supports webkit browsers).
I have integrated it fully and works fine. But I would like to use a textbox to show the current slide..
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.
&..
I'm using this code to let the user enter in names while the program stores them in an array until they enter an empty string (they must press enter after each name):
people = []
info = 'a' # must fi..
When a user presses the back button on an intent, the application should quit. How can I ensure the application quits when the back button is pressed?..
is it possible to display a html5-video as part of the canvas?
basically the same way as you draw an Image in the canvas.
context.drawVideo(vid, 0, 0);
thanks!..
I need to build a web page for mobile devices. There's only one thing I still haven't figured out: how can I trigger a phone call through the click of text?
Is there a special URL I could enter like ..
I'm working on a web project that involves a dynamically generated map of the US coloring different states based on a set of data.
This SVG file gives me a good blank map of the US and is very easy..
I have a data frame that I construct as such:
> yyz <- data.frame(a = c("1","2","n/a"), b = c(1,2,"n/a"))
> apply(yyz, 2, class)
a b
"character" "character"
I am attempti..
I don't know what I've done incorrectly, but I can't include JSTL. I have jstl-1.2.jar, but unfortunately I get exception:
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/js..
I've installed Anaconda and created two extra environments: py3k (which holds Python 3.3) and py34 (which holds Python 3.4). Besides those, I have a default environment named 'root' which the Anaconda..
Just quick one, but want to make sure I'm catching cross platform variations.
I like to convert new lines entered into a text area into a [comma], so that the output can be represented on a single li..
ASP.NET MVC can generate HTML elements using HTML Helpers, for example @Html.ActionLink(), @Html.BeginForm() and so on.
I know I can specify form attributes by creating an anonymous object and pass t..
UPDATE
Here are the constraints as a result of the query
SELECT * FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = 'history'
CONSTRAINT_NAME COLUMN_NAME ORDINAL_POSITION
PK_history ..
Recently posted a question regarding the HttpClient over Https (found here). I've made some headway, but I've run into new issues. As with my last problem, I can't seem to find an example anywhere th..
In postgresql, how do I replace all instances of a string within a database column?
Say I want to replace all instances of cat with dog, for example.
What's the best way to do this?..
Background
I have the most basic "newbie" AngularJS question, forgive my ignorance: how do I refresh the model via code? I'm sure it's answered multiple times somewhere, but I simply couldn't
find i..
Starting web services in Netbeans just Hello World Program , but this Application Manager makes hectic on this to start ,
Facing this alert message in NetBeans also Tomcat Application Manager Messa..
In Python, how to check if a string only contains certain characters?
I need to check a string containing only a..z, 0..9, and . (period) and no other character.
I could iterate over each character ..
I am new to regex and I am trying to come up with something that will match a text like below:
ABC: (z) jan 02 1999 \n
Notes:
text will always begin with "ABC:"
there may be zero, one or more spac..
I have a list of dictionaries, looking some thing like this:
list = [{'id': 123, 'data': 'qwerty', 'indices': [1,10]}, {'id': 345, 'data': 'mnbvc', 'indices': [2,11]}]
and so on. There may be more ..
I'm attempting to install the PHP Zip extension.
My server does not have external internet access, so I downloaded it myself from PECL: http://pecl.php.net/package/zip. I chose 1.10.2, the latest ..
I have seen, read and thought of different ways of using workspaces (per project, per application (multi-asseted or not), per program language, per target (web-development, plugins,..), and so on) and..
This would mean that the class was initialized, but the variables were not set.
A sample Class:
public class User {
String id = null;
String name = null;
public String getId() {
..
Say I have an ID row (int) in a database set as the primary key. If I query off the ID often do I also need to index it? Or does it being a primary key mean it's already indexed?
Reason I ask is beca..
In pre-historic times (Python 1.4) we did:
fp = open('filename.txt')
while 1:
line = fp.readline()
if not line:
break
print line
after Python 2.1, we did:
for line in open('fil..
Is there a way we can persist javascript variables across various pages? Suppose in Page A I am setting window.someVar = 5. Then I move to Page B, via clicking a hyperlink in A, and do something like ..
I am trying to create an JSON object out of a PHP array. The array looks like this:
$post_data = array('item_type_id' => $item_type,
'string_key' => $string_key,
'string_value' => $s..
I am not able to get my head on how the partial works in functools.
I have the following code from here:
>>> sum = lambda x, y : x + y
>>> sum(1, 2)
3
>>> incr = lambda y :..
I have an old dll that uses the Microsoft Visual C++ 2003 (7.1) run time package. Unfortunately I don't have that DLL around anymore. Short of reinstalling VS2003, is there another way to get the ru..
Here are two pages, test.php and testserver.php.
test.php
<script src="scripts/jq.js" type="text/javascript"></script>
<script>
$(function() {
$.ajax({url:"testserver.p..
When upgrading my project to the latest version of Google Play Services (v4.0, released on Halloween 2013), you are now supposed to add a new tag into the AndroidManifest.xml file.
<meta-data
..
For reading files in Scala, there is
Source.fromFile("file.txt").mkString
Is there an equivalent and concise way to write a string to file?
Most languages support something like that. My favorite..
A server software my client communicates with regularly sends transaction messages on port 4000. I need to print those messages to the console line by line. (Eventually I will have to write those valu..
What is the best way to unit test a method that doesn't return anything? Specifically in c#.
What I am really trying to test is a method that takes a log file and parses it for specific strings. The ..
If the debugging window is open, the debugger starts hitting lines by itself even though there are no set breakpoints.
I have tried using the "Deactivate breakpoints" button and it doesn't m..
I got the following entry in my database:
images/test.jpg
I want to trim the entry so I get: test
So basically, I want everything after / and before .
How can I solve it?..
I just need to ask something as follow.
Suppose I am having a dictionary.
NSMutableDictionary *xyz=[[NSMutableDictionary alloc] init];
[xyz setValue:@"sagar" forKey:@"s"];
[xyz setValue:@"amit" forKe..
how to have a button with text and icon for the flutter?
I wanted to have a button which looks like icon with a text that is able to put at the bottom of the screen
For example, the icon is like at ..
Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse' for storing true/false information in MySQL?
Especially in the context of writing and reading from/to a PHP sc..
I happened to get that already defined in .obj error. This is structure of my project:
main.cpp
#include "main.h";
main.h
#include <iostream>
#include <string>
#include <sstr..
I'm trying to detect the position of the browser's scrollbar with JavaScript to decide where in the page the current view is. My guess is that I have to detect where the thumb on the track is, and the..
How could I use jQuery to check if text-fields are empty when submitting without loading login.php?
<form action="login.php" method="post">
<label>Login Name:</label>
<in..
What is blob and what is text? What are the differences?
When do I need to use blob and when do I need text as data type?
Because for blob and text, there are mediumblob == mediumtext, smallblob == ..
When I run my project, I get numerous outputs of this error:
Sep 9, 2009 8:22:23 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Jersey threw exception
..
I want to convert a hex string (ex: 0xAD4) to hex number, then to add 0x200 to that number and again want to print that number in form of 0x as a string.
i tried for the first step:
str(int(str(item..
When I installed Windows XP on a VirtualBox machine, I made the hard drive only 10 GB since and assumed it would expand in size (as do hard drives in VMWare as far as I can remember, isn't this true?)..
Is there any way to execute same code for different elements on the page?
$('.class1').click(function() {
some_function();
});
$('.class2').click(function() {
some_function();
});
instead to..
Is there a real easy to use tool (no monster tool) that I can plug into Eclipse, and press a "generate header" button and then the authors name appears in every file in that project?..
I am trying to animate a change in backgroundColor using jQuery on mouseover.
I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroun..
Oracle has SQL commands that one can issue so that a transaction does not get logged. Is there something similar for SQL Server 2008?
My scenario: We need Tx logs on servers (Dev, QA, Prod), but mayb..
I need to save the phone's timezone in the format [+/-]hh:mm
I am using TimeZone class to deal with this, but the only format I can get is the following:
PST -05:00
GMT +02:00
I would rather not s..
I have a string that looks like so:
6Â 918Â 417Â 712
The clear cut way to trim this string (as I understand Python) is simply to say the string is in a variable called s, we get:
s.replace('..
I am writing a sample application using angularjs. i got an error mentioned below on chrome browser.
Error is
Error: [ng:areq] http://errors.angularjs.org/1.3.0-beta.17/ng/areq?p0=ContactControl..
I'm looking to be able to run a single query on a remote server in a scripted task.
For example, intuitively, I would imagine it would go something like:
mysql -uroot -p -hslavedb.mydomain.com mydb_..
I want to create a vertical line that cover whole page like this
here is my code
#menu
{
border-left: 1px solid black;
height: 100%;
}
result show like this
..
I've recently started learning ExtJS, and have trouble understanding how to handle Events. I have no experience of any previous versions of ExtJS.
From reading various manuals, guides and documentat..
I want to set the selected index in a JComboBox by the value not the index. How to do that? Example
public class ComboItem {
private String value;
private String label;
public ComboItem..
I am new to using Laravel, and Homestead, and would appreciate any help or a point in the right direction. I have successfully been able to get to the "You have arrived" screen when I run "php artisa..
How do I create a link of this type:
<a href="#" onclick="document.getElementById('search').value=this.value">
using method link_to in Rails?
I couldn't figure it out from Rails docs...
I am getting following error in my Node-Express App
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function
without..
I'm making my first app in Laravel and am trying to get my head around the session flash messages. As far as I'm aware in my controller action I can set a flash message either by going
Redirect::to('..
I am using bootstrap datepicker and my code is like following, Demo of the code on jsfiddle
<div class="input-append date" id="datepicker" data-date="02-2012"
data-date-format="mm-yyyy">
..
Suppose I want to define a structure representing length of the vector and its values as:
struct Vector{
double* x;
int n;
};
Now, suppose I want to define a vector y and allocate memory fo..
I have an object that looks like this:
var obj = {
"objectiveDetailId": 285,
"objectiveId": 29,
"number": 1,
"text": "x",
"subTopics": [{
"subTopicId": 1,
"number"..
I am trying to center a <ul> inside a <div>. I tried the following
text-align: center;
and
left: 50%;
This is not working.
CSS:
.container {
clear: both;
width: 800px;
..
I have been trying to figure out how to go about doing this but I am not quite sure how.
Here is an example of what I am trying to do:
class test {
public newTest(){
function bigTest(..
How can I display a newline in JLabel?
For example, if I wanted:
Hello World!
blahblahblah
This is what I have right now:
JLabel l = new JLabel("Hello World!\nblahblahblah", SwingConstants..
Afternoon,
So I have been at this one issue for hours and can't really get past this last hump. Below is the code for this program that I am writing:
using System;
using System.Collecti..
everyone.I have a list of lists and I want to write them in a csv file with columns and rows.I have tried the writerows but it isn't what I want.An example of my list is the following:
[[1, 2], [2, 3..
Is it possible to have multiple radio button groups in a single form? Usually selecting one button deselects the previous, I just need to have one of a group deselected.
<form>
<fieldset..
What I understand from reading the documentation is that Python has a separate namespace for functions, and if I want to use a global variable in that function, I need to use global.
I'm using Python..
I need to zip an entire directory using Node.js. I'm currently using node-zip and each time the process runs it generates an invalid ZIP file (as you can see from this Github issue).
Is there another..
I'm really very new to this Tomcat stuff. I downloaded Tomcat 7.0 windows installer and installed it using the default configuration. After installing, I typed localhost:8080 in my browser to see if T..
I've already read this thread but when I implement it into my code it only works for a few iterations.
I'm using python to iterate through a directory (lets call it move directory) to copy mainly pd..
I am creating a header that once scrolled to a certain amount of pixels it fixes and stays in place.
Can I do this using just css and html or do i need jquery too?
I have created a demo so you can..
I have been trying to figure out how to rotate videos with FFmpeg. I am working with iPhone videos taken in portrait mode. I know how to determine the current degrees of rotation using MediaInfo (exce..
I have read some of the previous questions on this topic but I really need to be 100% sure!
Is it possible to read from a .txt file on my local system and present it in my HTML-BODY?
I have tried se..
I am on a server that has afresh install on RHEL 5. I was able to install Apache and PHP just fine., but I am having serious trouble with my MySQL installation. I tried the following:
yum install ..
How can multiple scales can be implemented in Matplotlib? I am not talking about the primary and secondary axis plotted against the same x-axis, but something like many trends which have different sca..
I am using jQuery to make a POST to a PHP file with the HTML content of a div. The HTML content contain tables, inputs, smaller divs and I would like to grab the content of the main DIV and send it to..
I'm using Postman to test an existing REST API. This API calls async functions on the server which return a response over a websocket using StompJS.
Is it possible to connect to the websocket using P..
Is there a way to embed/mashup the OpenStreetMap in your page (like the way Google Maps API works)?
I need to show a map inside my page with some markers and allow dragging/zooming around, maybe rout..
I have the following CTE that will give me the DocTotal for the entire invoice.
;WITH CTE_DocTotal
AS
(
SELECT SUM(Sale + VAT) AS DocTotal
FROM PEDI_InvoiceDetail
GROUP BY InvoiceNumber
..
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..
I want to create a two dimensional array in Javascript where I'm going to store coordinates (x,y). I don't know yet how many pairs of coordinates I will have because they will be dynamically generated..
If I need call this functions one after other,
$('#art1').animate({'width':'1000px'},1000);
$('#art2').animate({'width':'1000px'},1000);
$('#art3').animate({'width':'1000px'},1000); ..
I have a data set represented by a Java 8 stream:
Stream<T> stream = ...;
I can see how to filter it to get a random subset - for example
Random r = new Random();
PrimitiveIterator.OfInt coi..
I am sorry that I can't reproduce the error with a simpler example, and my code is too complicated to post. If I run the program in IPython shell instead of the regular Python, things work out well.
..
I'm trying to organize my state by using nested property like this:
this.state = {
someProperty: {
flag:true
}
}
But updating state like this,
this.setState({ someProperty.flag: false ..
In C, Printing to stdout is easy, with printf from stdio.h.
However, how can print to stderr? We can use fprintf to achieve it apparently, but its syntax seems strange. Maybe we can use printf to pri..
I want to insert a file in MYSQL database residing on a remote webserver using a webservice.
My question is: What type of table column (e.g. varchar, etc.) will store a file? And will the insert stat..
I know there are a number of topics on this question, but none of the methods worked for me so I'm posting about my specific situation
I have a dataframe that looks like this:
data = pd.DataFrame([[..
I am new to docker. I just tried to use docker in my local machine(Ubuntu 16.04) with Jenkins.
I configured a new job with below pipeline script.
node {
stage('Build') {
docker.image('mav..
I want to customize the look of the Facebook login button which we get along with the Facebook sdk for android (facebook-android-sdk-3.0.1). I want a simple android button which has title "Login via F..
I've recently run into a rather nasty bug, wherein the code was loading a <select> dynamically via JavaScript. This dynamically loaded <select> had a pre-selected value. In IE6, we alrea..
Is there a simple way to get Excel to automatically execute a macro whenever a cell is changed?
The cell in question would be in Worksheet("BigBoard").Range("D2")
What I thought would be a simple Go..
I am trying to add some form elements dynamically via Ajax with jQuery.
I want to make sure that I don't create the same element twice, so I only want to add it if it hasn't already been added to the ..
I want to deny direct access to all .php files except one: index.php
The only access to the other .php files should be through php include.
If possible I want all files in the same folder.
UPDATE:
..
I have a list of Person objects. I want to convert to a Dictionary where the key is the first and last name (concatenated) and the value is the Person object.
The issue is that I have some duplicated..
To append to an existing string this is what I am doing.
s = 'hello'
s.gsub!(/$/, ' world');
Is there a better way to append to an existing string.
Before someone suggests following answer lemme s..
When I run XAMPP Control Panel v3.2.1 I get this error:
07:37:24 [Apache] Problem detected!
07:37:24 [Apache] Port 443 in use by ""C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.ex..
I'm looking for the easiest way to sort an array that consists of numbers and text, and a combination of these.
E.g.
'123asd'
'19asd'
'12345asd'
'asd123'
'asd12'
turns into
'19asd'
'123asd'
'12345asd..
I get following error when I was running an app within Android Studio 2.
Gradle tasks [:app:assembleDebug]
Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug'.
> Task wi..
I'm writing an app and I need to change the view if the user is looking at the app while talking on the phone.
I've implemented the following method:
- (void)viewWillAppear:(BOOL)animated {
[sup..
When i ssh to a machine, sometime i get this error warning and it prompts to say "yes" or "no". This cause some trouble when running from scripts that automatically ssh to other machines.
Warning Mes..