6510 is a microprocessor designed by MOS Technology, Inc. It is a modified version of the 6502 microprocessor with 8-bit IO port addition. 6510 was made famous by being used on the Commodore 64.
I am wondering why the result of log base 10 (1.5) in python = 0.405465108108 while the real answer = 0.176091259.
This is the code that I wrote:
import math
print math.log(1.5)
Can someone tell h..
I'm trying to make a post request with a body in swift using Alamofire.
my json body looks like :
{
"IdQuiz" : 102,
"IdUser" : "iosclient",
"User" : "iosclient",
"List":[
{
..
I'm trying to make an HTTP post request with a JSON body :
How to be able to add an NSdictionnary to the HTTP request body.
Here is my code, it doesn't seem to work properly.
var entry1 = Response(..
This is the example of my dataset.
>>> user1 = pd.read_csv('dataset/1.csv')
>>> print(user1)
0 0.69464 3.1735 7.5048
0 0.030639 0.14982 3.48680 9.2755
1 0.06976..
Using the following code:
#include<stdio.h>
#include<time.h>
int main()
{
clock_t start, stop;
int i;
start = clock();
for(i=0; i<2000;i++)
{
printf("%d", (..
private void startGameTimeElapseThread(){
new Thread(new Runnable() {
Date d = new Date();
public void run() {
while (gameOn){
Log.d(TAG,""+d.getTime()+..
I got an integer: 1695609641
when I use method:
String hex = Integer.toHexString(1695609641);
system.out.println(hex);
gives:
6510f329
but I want a byte array:
byte[] bytearray = new byte[] ..
I am attempting to create a small application to collect data received from an external sensor attached to COM10. I have successfully created a small C# console object and application that opens the ..
What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments?
If int main() then return 1 or return 0?
Th..
I have a simple ng-reapt that displays a list of values.. On some of the outputs, i have a couple of ng-if to show/hide DIVs.
HTML:
<div ng-repeat="details in myDataSet">
<p>{{ deta..
I wish to generate an application signature for my app which will later be integrated with Facebook. In one of Facebook's tutorials, I found this command:
keytool -exportcert -alias androiddebugkey -..
This is the first time I've dealt with Oracle, and I'm having a hard time understanding why I'm receiving this error.
I'm using Oracle's ODT.NET w/ C# with the following code in a query's where claus..
I have View in which there are two text boxes, and the user can select text color from another view on the same screen (through dialog box).
So when the user changes color via dialog box, I am changi..
I am uploading the file by using file upload option. And i am directly send this file from View to Controller in POST method like,
[HttpPost]
public ActionResult Page2(FormCollection objColle..
Context:
I'm trying to set up Google Analytics for my app. (having 4 custom buildTypes and more than a few productFlavors)
It works fine when I select the Build Variant which has the applicationId s..
Trying to follow the instructions for building a docker image from the docker website.
https://docs.docker.com/examples/running_redis_service/
this is the error I get will following the instructions..
I know this is a simple question for someone out there, but I have never really used function module at all because I did not understand what they were.
So I have a whole bunch of things I can use th..
I am trying to use momentjs to check if a given date is today or in the future.
This is what I have so far:
<script type="text/javascript" src="http://momentjs.com/downloads/moment.min.js"><..
I'm trying to find a good way to print leading 0, such as 01001 for a ZIP Code. While the number would be stored as 1001, what is a good way to do it?
I thought of using either case statements or if t..
How can I check if a value is null or empty with XSL?
For example, if categoryName is empty? I'm using a when choosing construct.
For example:
<xsl:choose>
<xsl:when test="categoryName..
I have a Windows 7 system on which I have installed the latest Java compiler. I also have the latest Cygwin. I want to use the Java compiler from Cygwin's shell. I edited the PATH variable in Cygwin a..
I have situation, where I want to read configuration file only one time, when class is instantiated.
Suppose I have a method named readConfig(), that reads configuration and puts it into a Map object..
I want a text color to be red in color on certain condition.
Here is how i want to get it done.
string minusvalue = TextBox1.Text.ToString();
if (Convert.ToDouble(minusvalue) < 0)
{
// set colo..
On one server, when I run:
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-05-30 16:54:29 |
+---------------------+
1 row in set (0.00 sec)
On..
I want open window.open as modal popup.
var features = 'resizable= yes; status= no; scroll= no; help= no; center= yes;
width=460;height=140;menubar=no;directories=no;location=no;modal=yes';
wi..
I have a simple text input field where i have to set default value from one object and save its final value in other. The following code is not working.
<div th:object="${form}">
<input ..
I have a php generated list whose list items are selectable using jquery selectable widget. The list for all intents and purposes is:
<ul id="#select-image">
<li class="ui-widget-content..
I have one String variable, str with possible values, val1, val2 and val3.
I want to compare (with equal case) str to all of these values using an if statement, for example:
if("val1".equalsIgnoreCa..
I'm trying to make a stock market simulator (perhaps eventually growing into a predicting AI), but I'm having trouble finding data to use. I'm looking for a (hopefully free) source of historical stock..
I'm using Bootstrap 3 and trying to setup the following accordion/collapse structure:
Onload: Each accordion panel in a group is fully collapsed and functions as documented/expected.
Button click: E..
I am working on a page that requires javascript and sessions. I already have code to warn the user if javascript is disabled. Now, I want to handle the case where cookies are disabled, as the session ..
I have the following code in a Selenium 2 Web Driver test which works when I am debugging but most of the time fails when I run it in the build. I know it must be something to do with the way the page..
When I've worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the source code. So I do the ame..
I've got this macro code in Microsoft Office Word 2003 which reads the lines of a text file. The lines each represent a string value that I need to use later in the code.
However, the first two lines..
When I try to install a new instance of SQL Server 2008 Express on a development machine with SQL 2005 Express already up and running, the install validation fails because the "SQL 2005 Express tools"..
The numpy docs recommend using array instead of matrix for working with matrices. However, unlike octave (which I was using till recently), * doesn't perform matrix multiplication, you need to use the..
I want to set Opacity of div's background without affecting contained element in IE 8. have a any solution and don't answer to set 1 X 1 .png image and set opacity of that image because I am using dyn..
I have a URL that looks like:
url.com/picture.php?id=51
How would I go about converting that URL to:
picture.php/Some-text-goes-here/51
I think WordPress does the same.
How do I go about making..
I can't get my head around how formatting a datetime variable inside a string works in PowerShell.
$startTime = Get-Date
Write-Host "The script was started $startTime"
...Do stuff...
$endTime = Get..
I have the following plot:
fig,ax = plt.subplots(5,2,sharex=True,sharey=True,figsize=fig_size)
and now I would like to give this plot common x-axis labels and y-axis labels. With "common", I mean t..
I have some questions regarding the the singleton pattern as documented here:
http://msdn.microsoft.com/en-us/library/ff650316.aspx
The following code is an extract from the article:
using System;
..
I have an image called arrowWhite. I want to colour this image to black.
func attachDropDownArrow() -> NSMutableAttributedString {
let image:UIImage = UIImage(named: "arrowWhite.png")!
let..
I am looking for a Unix command to print the files with its size. I used this but it didn't work.
find . -size +10000k -print.
I want to print the size of the file along with the filename/directory..
I am using rake to build my project and I have a build.bat file similar to this:
@echo off
cls
rake
When I double click on build.bat the dos window pops up and shows all the progress but closes its..
I'm new to git and would appreciate help with adding submodules.
I've received two projects sharing some common code. The shared code was just copied into the two projects. I created a separate git re..
I'm trying to draw a smooth curve in R. I have the following simple toy data:
> x
[1] 1 2 3 4 5 6 7 8 9 10
> y
[1] 2 4 6 8 7 12 14 16 18 20
Now when I plot it with a standard ..
I have been given a specification that requires the ISO 8601 date format, does any one know the conversion codes or a way of getting these 2 examples:
ISO 8601 Extended Date 2000-01-14T13:42Z
ISO 86..
I need to open the bitmap image in the window form using open file dialog (I will load it from drive). The image should fit in the picture box.
Here is the code I tried:
private void button1_Click(..
I'm working on a simple JSP/Servlet/Tomcat webapp for my class. The professor asked us to use a folder structure that is slightly different than the default dynamic web project structure. Rather than ..
I'm working on a simple tool that transfers files to a hard-coded location with the password also hard-coded. I'm a python novice, but thanks to ftplib, it was easy:
import ftplib
info= ('someuser'..
For my Java application, I am creating an instance of a user information object and populating it with a service that I don't control the source for.
The code looks like this:
// username given as ..
When I run a webapp from Visual Studio 2008 SP1 using the internal web server (not IIS) I receive the above mentioned error.
The full error (source file Default.aspx.cs):
Compiler Error Message: ..
I have a dataframe df imported from an Excel document like this:
cluster load_date budget actual fixed_price
A 1/1/2014 1000 4000 Y
A 2/1/2014 12000 10000 Y
A 3/1/2014 360..
I'm using python (Django Framework) to read a CSV file. I pull just 2 lines out of this CSV as you can see. What I have been trying to do is store in a variable the total number of rows the CSV also.
..
I'm having a lot of pain understanding how jQuery Mobile handles pages refresh after an ajax update.
I'm having a two pages - unique file site: a search engine.
First page is a search field. Submit..
When I use any command with sudo the environment variables are not there. For example after setting HTTP_PROXY the command wget works fine without sudo. However if I type sudo wget it says it can't by..
How can i send an email with an attachment (either local file or a file in the intranet) using outlook 2010?
<a href="mailto:a@gmail.com?subject=my report&body=see attachment&attachment=c:..
Is there an easy way to test the credentials of a user against an LDAP instance? I know how to write a Java program that would take the 'User DN' and password, and check it against the LDAP instance...
How do I know what version of Java is being run in Eclipse?
Is there a way to write code to find out?
Is "JRE System Library [JavaSE-1.6]" in "Package Explorer" the right version?..
I am new to system administration. After installing nginx via puppet on Ubuntu I get the following output:
[alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permiss..
My HTML code is just dividing the pages into two columns, 65%,35% respectively.
<div style="float : left; width :65%; height:auto;background-color:#FDD017;">
<div id="response">
<..
I'd like to see the number of visitors on a specific page (for which I have URL).
I don't find in Analytics where to enter a URL in order to look for statistics for this specific page...
In C++ if I want an array of pointers so that I may have them point to different objects at a latter stage what does the syntax look like.
EDIT
I need to clarify what I am trying to do I guess. I ha..
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 { }..
I want to use a different font for my website, which is not a regular webfont. I have created EOT files already. Now how can I integrate those fonts with twitter bootstrap ? Can anyone help ?
Thanks..
Good Overviews
Generally speaking, you're making a decision between fast read times (for example, nested set) or fast write times (adjacency list). Usually, you end up with a combination of the optio..
I am looking for the best approach to delete records from a table. For instance, I have a user whose user ID is across many tables. I want to delete this user and every record that has his ID in all t..
Here's my code:
include 'conn.php';
$conn = new Connection();
$query = 'SELECT EmailVerified, Blocked FROM users WHERE Email = ? AND SLA = ? AND `Password` = ?';
$stmt = $conn->mysqli->prepare..
I am using spring data and my DAO looks like
public interface StudentDAO extends JpaRepository<StudentEntity, Integer> {
public findAllOrderByIdAsc(); // I want to use some thing like thi..
I created a container with -d so it's not interactive.
docker run -d shykes/pybuilder bin/bash
I see that the container has exited:
CONTAINER ID IMAGE COMMAND ..
I'm showing a confirmation alert box through JavaScript:
function checked() {
if (hdnval.toLowerCase() != textbox1.toLowerCase()) {
var save = window.confirm('valid')
if (save == true)
{
..
I'm a backend developer and I'm just playing around with Angular4. So I did this installation tutorial: https://www.youtube.com/watch?v=cdlbFEsAGXo.
Given this, how can I add bootstrap to the app so ..
I'm using the Laravel Eloquent query builder and I have a query where I want a WHERE clause on multiple conditions. It works, but it's not elegant.
Example:
$results = User::where('this', '=', 1)
..
I am trying to align the form to the center and keep it responsive. I have tried several ways but no success. I am trying to center all the text and the form. I am using Bootstrap v4. I am not sure if..
It seems to me that having a "function that always returns 5" is breaking or diluting the meaning of "calling a function". There must be a reason, or a need for this capability or it wouldn't be in C..
While using the requests module, is there any way to print the raw HTTP request?
I don't want just the headers, I want the request line, headers, and content printout. Is it possible to see what ult..
Here is my component in Angular 4:
@Component( {
selector: 'input-extra-field',
template: `
<div class="form-group" [formGroup]="formGroup" >
<switch [att..
I have an array of Promises that I'm resolving with Promise.all(arrayOfPromises);
I go on to continue the promise chain. Looks something like this
existingPromiseChain = existingPromiseChain.then(fu..
I do not understand the following example, lets say I have these functions:
# python likes
def save(filename, data, **kwargs):
fo = openX(filename, "w", **kwargs) # <- #1
fo.write(data)
..
I need to check when function was changed last time. I know how to check creation date (it is in function properties window in SQL Server Management Studio).
I found that in SQL Server 2000 it wasn't ..
Can you help me with SQL statements to find duplicates on multiple fields?
For example, in pseudo code:
select count(field1,field2,field3)
from table
where the combination of field1, field2, field..
I want to set the LayoutParams for an ImageView but cant seem to find out the proper way to do it.
I can only find documentation in the API for the various ViewGroups, but not an ImageView. Yet the I..
I've searched and I can only find questions about the other way around: writing stdin to a file :)
Is there a quick and easy way to dump the contents of a file to stdout?..
I have panel which I colored blue if this panel is being selected (clicked on it). Additionally, I add a small sign (.png image) to that panel, which indicates that the selected panel has been already..
Can someone format the code below so that I can set srcript variables with c# code using razor?
The below does not work, i've got it that way to make is easy for someone to help.
@{int proID = 123; ..
I want to insert a new line (like \r\n, <br />) in a Text component in React Native.
If I have:
<text>
<br />
Hi~<br />
this is a test message.<br />
</text>
Then ..
I have a 1:1 relationship between two tables. I want to find all the rows in table A that don't have a corresponding row in table B. I use this query:
SELECT id
FROM tableA
WHERE id NOT IN (SELE..
Let me prefix this by saying that I know what foreach is, does and how to use it. This question concerns how it works under the bonnet, and I don't want any answers along the lines of "this is how you..
When trying to launch and run a flex/java project in eclipse I kept getting a "Out of Memory Exception" and "Java Heap Space" using Eclipse, Tomcat and a JRE.
While researching trying to adjust the m..
Assume I have two dataframes of this format (call them df1 and df2):
+------------------------+------------------------+--------+
| user_id | business_id | rating |
+-------..
I have an SVN working directory. I made some changes in that directory, and it shows in svn status. But is there any way for me to remove all my changes in there and just get everything from the trunk..
I have a dataframe that looks like this:
Company Name Organisation Name Amount
10118 Vifor Pharma UK Ltd Welsh Assoc for Gastro & Endo 2700.00
10119 Vifor Pharma UK..
Getting this error:
sudo: unable to resolve host coderw@ll
-- Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandle..
There is a --user option for pip which can install a Python package per user:
pip install --user [python-package-name]
I used this option to install a package on a server for which I do not have ro..
I am getting this error at runtime.
java.lang.RuntimeException: Unable to start activity ComponentInfo
java.lang.NullPointerException: Attempt to invoke virtual method
'boolean java.lang.Strin..
I have this a and I don't know that I need to insert into the "onmouseover" so that the cursor will change to finger pointer like a regular link:
<a class="menu_links" onclick="displayData(11,1,0,..
When comparing arrays in Java, are there any differences between the following 2 statements?
Object[] array1, array2;
array1.equals(array2);
Arrays.equals(array1, array2);
And if so, what are they?..
I need to create two date objects. If the current date and time is March 9th 2012 11:30 AM then
date object d1 should be 9th March 2012 12:00 AM
date object d2 should contain the current dat..
If I have 2 DataTables (dtOne and dtTwo) and I want to merge them and put them in another DataTable (dtAll). How can I do this in C#? I tried the Merge statement on the datatable, but this returns v..
I couldn't find any one simple straightforward resource spelling out the meaning of and fix for the following BASH shell error, so I'm posting what I found after researching it.
The error:
-bash: [:..
I'm coming from the Java world and reading Bruce Eckels' Python 3 Patterns, Recipes and Idioms.
While reading about classes, it goes on to say that in Python there is no need to declare instance var..
Default jackon behaviour seems to use both properties (getters and setters) and fields to serialize and deserialize to json.
I would like to use the fields as the canonical source of serialization co..
Why by default were these changed when adding a new "edit" view? What are advantages when using EditorFor() vs. TextboxFor()?
I found this
By default, the Create and Edit scaffolds now use the ..
I have to write a program that reads numbers in separate lines each. Is it possible to read only one line of the file and then read an int from the buffer, and so on until the end of file? It is reall..
I want to represent model data as different images using Angular but having some trouble finding the "right" way to do it. The Angular API docs on expressions say that conditional expressions are not..
I'm using SpringMVC for a web app as well as to inject my sessionFactory for Hibernate.
When I run my application, I get the following error...
Apr 29, 2012 3:18:05 PM org.apache.catalina.core.AprLi..
Used git clone [url] to clone an open source project but it cloned to the
C:\Documents and Setings\$USER\project
What I wanted to do is clone the project to C:\project. I don't want to have duplica..
With postgresql 9.3 I can SELECT specific fields of a JSON data type, but how do you modify them using UPDATE? I can't find any examples of this in the postgresql documentation, or anywhere online. I ..
I have a modal window that I use to present a form to users. They enter the information and then press a button the has an ng-click. The server processes the request and sends back a response. When..
I am a beginner in Java programing and I want to print a pyramid ,but due to mistake in coding I am not getting favorable output.
class p1 {
public static void main(String agrs[]) {
Syste..
I have an application where on the home page I have buttons for navigation through the application.
On that page I have a button "EXIT" which when clicked should take the user to the home screen on t..
So I think it may have to do with textmate, but we work in a small team and are having some issues with full-file conflicts of nearly identical files in git because each line of one branch has a ^M ap..
I am looking to do some error checking for my command line arguments
public static void main(String[] args)
{
if(args[0] == null)
{
System.out.println("Proper Usage is: java program f..
I am trying to write an object to an Xml string and take that string and save it to a DB. But first I need to get the string...
private static readonly Encoding LocalEncoding = Encoding.UTF8;
..
I have the following two lists:
first = [1,2,3,4,5]
second = [6,7,8,9,10]
Now I want to add the items from both of these lists into a new list.
output should be
third = [7,9,11,13,15]
..
I want to know that how can I set a width to match parent layout width
new Container(
width: 200.0,
padding: const EdgeInsets.only(top: 16.0),
child: new RaisedButton(
child: new Text(
..
I just need a plain list of conflicted files.
Is there anything simpler than:
git ls-files -u | cut -f 2 | sort -u
or:
git ls-files -u | awk '{print $4}' | sort | uniq
I guess I could set up ..
Is there a cross-platform way of getting the path to the temp directory in Python 2.6?
For example, under Linux that would be /tmp, while under XP C:\Documents and settings\[user]\Application setti..
Angular 6 has new CLI command ng add <package>.
How can I remove the package using Angular CLI?
UPDATE
documentation
ng add will use your package manager to download new dependencies and ..
I am trying to throw command output to file plus console also. This is because i want to keep record of output in file. I am doing following and it appending to file but not printing ls output on term..
This is a homework question that I am stuck with.
Consider unsigned integer representation. How many bits will be
required to store a decimal number containing:
i) 3 digits ii) 4 digits iii) 6..
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..
How do we set a custom port for test server?
Normally when we do
php artisan serve
the folder gets served as :
localhost:8000
How do could we access one folder as:
localhost:8080
I want to ..
I am using this code from Google Map API's and it is not working
<!DOCTYPE html>
<html>
<head>
<title>Place Autocomplete</title>
<meta name="viewport" content="ini..
I have a class with a unique_ptr member.
class Foo {
private:
std::unique_ptr<Bar> bar;
...
};
The Bar is a third party class that has a create() function and a destroy() function.
I..
Is there a way to pass more data into a callback function in jQuery?
I have two functions and I want the callback to the $.post, for example, to pass in both the resulting data of the AJAX call, as w..
Can anyone tell me why the following won't work? It complains of a syntax error near the join key word between the two selects.
SELECT *
FROM ( select * from orders_products inner JOIN orders ON ord..
my simple textarea doesn't show a horizontal bar when text overflows. It wraps text for a new line. So how do I remove wordwrap and display horizontal bar when text overflows?..
I have Windows 8.1 64-bit OS running on 64-bit architecture. I am installing a fresh copy of Oracle 12C, means I haven't installed any version before on my system.
During the installation, I encounte..
I just Git init'ed a repos with a wrong user, and want to undo it. Is there any command for this? Do I actually have to go in and edit the .git directory?..
I have some old images of old Linux filesystems in flat file format. they can be used by Bochs, but I need to run them with Virtual Box. Virtual Box cannot use images in this format, so I need to conv..
I have a function below that I want to only trigger when a checkbox in the same tr is checked. Please tell me what I am doing wrong, the usual methods are not working. Thanks
JS
$(".add_menu_item_ta..
In Python, how do I get a function name as a string, without calling the function?
def my_function():
pass
print get_function_name_as_string(my_function) # my_function is not in quotes
should ..
This is a pretty simple question, at least it seems like it should be, about sudo permissions in Linux.
There are a lot of times when I just want to append something to /etc/hosts or a similar file b..
I have a stored procedure that takes no parameters, and it returns two fields. The stored procedure sums up all transactions that are applied to a tenant, and it returns the balance and the id of the ..
I want to add a (variable) tag to values with regex, the pattern works fine with PHP but I have troubles implementing it into JavaScript.
The pattern is (value is the variable):
/(?!(?:[^<]+>|..
Once I've seen this before when I type a URL http://test.com/test/, instead of give me a html page, it gives me a 'file browser' like interface to browse all the files in the given location.
I think ..
What if I wanted to parse this:
java MyProgram -r opt1 -S opt2 arg1 arg2 arg3 arg4 --test -A opt3
And the result I want in my program is:
regular Java args[] of size=4
org.apache.commons.cli.Opti..
Using Postgres 9.0, I need a way to test if a value exists in a given array. So far I came up with something like this:
select '{1,2,3}'::int[] @> (ARRAY[]::int[] || value_variable::int)
But I k..
My program does some network activity in a background thread. Before starting, it pops up a progress dialog. The dialog is dismissed on the handler. This all works fine, except when screen orientation..
I have this line in my program :
InputStream Resource_InputStream=this.getClass().getClassLoader().getResourceAsStream("Resource_Name");
But how can I get FileInputStream from it [Resource_InputStr..
How do I resolve a git merge conflict in favor of pulled changes?
Basically I need to remove all conflicting changes from a working tree without having to go through all of the conflicts with a git ..
I need to login to mysql using root user and create a database. However, when I login to PhpMyAdmin as root user, it tells me that it has "no privileges", therefore cannot create a database.
I did no..
I am looking for a jQuery function that will clear all the fields of a form after having submitted the form.
I do not have any HTML code to show, I need something generic.
Can you help?
Thanks!..
What would be the most efficient way to compare two double or two float values?
Simply doing this is not correct:
bool CompareDoubles1 (double A, double B)
{
return A == B;
}
But something like..
I am fairly new to MVC but not sure exactly which Redirect... replaces the standard redirect used in WebForms is the standard Response.Redirect()
For instance, I need to redirect to other pages in a c..
I have this button image:
I was wondering whether it would be possible to make a simple <a href="">some words</a> and style that link to appear as that button?
If it is possible, how do..
What it the difference between running two commands:
foo = FooModel()
and
bar = BarModel.objects.create()
Does the second one immediately create a BarModel in the database, while for FooModel, t..
is there a way to achieve this effect in a cross-browser compatible way without having to prepare separated images?
Basically the frame on which text lays has a white overlay of 50% opacity.. I would..
Since this post has gotten a lot of attention over the years, I've listed the top solutions per platform at the bottom of this post.
Original post:
I want my node.js server to run in the backgroun..
How can i select the fragment after the '#' symbol in my URL using PHP?
The result that i want is "photo45".
This is an example URL:
http://example.com/site/gallery/1#photo45..
Possible Duplicate:
Automatic counter in Ruby for each?
I want to find out the current index while i am in the each loop. how do i do so?
X=[1,2,3]
X.each do |p|
puts "current index..."
..
My site has both very short and longer pages. Since I center it in the viewport with margin: 0 auto, it jumps around a few pixels when switching from a page that has a scrollbar to one that hasn't and..
I want my application user to be able to share/recommend my app to other users. I use the ACTION_SEND intent. I add plain text saying something along the lines of: install this cool application. But I..
I've looked through several posts on StackOverflow, but haven't been able to find an answer to this rather simple question.
I have an HTML construct like this:
<table>
<tr>
<td ..
I am uploading a file to S3 using Java - this is what I got so far:
AmazonS3 s3 = new AmazonS3Client(new BasicAWSCredentials("XX","YY"));
List<Bucket> buckets = s3.listBuckets();
s3.putObject..
So I recently discovered this awesome tool, and it says
Docker is an open-source project to easily create lightweight,
portable, self-sufficient containers from any application. The same
cont..
I want to write an SQL statement like below:
select * from tbl where col like ('ABC%','XYZ%','PQR%');
I know it can be done using OR. But I want to know is there any better solution...
Following links explain x86-32 system call conventions for both UNIX (BSD flavor) & Linux:
http://www.int80h.org/bsdasm/#system-calls
http://www.freebsd.org/doc/en/books/developers-handbook/x86-..
I am trying to fill a form in a php application from a C# client (Outlook addin). I used Fiddler to see the original request from within the php application and the form is transmitted as a multipart/..
What is the difference between the following declarations?
char * const a;
const char * a;
In order to understand the difference I wrote this small program:
#include <stdio.h>
#include <s..
In the fiddle below, I've a transition on visibility and opacity separately. The latter works but the former doesn't. Moreover, in case of visibility, the transition time is interpreted as delay on ho..
I want a java program that reads a user specified filename from the current directory (the same directory where the .class file is run).
In other words, if the user specifies the file name to be "myF..
I have numbers like 1100, 1002, 1022 etc. I would like to have the individual digits, for example for the first number 1100 I want to have 1, 1, 0, 0.
How can I get it in Java?..
An interviewer recently asked me this question: given three boolean variables, a, b, and c, return true if at least two out of the three are true.
My solution follows:
boolean atLeastTwo(boolean a, ..
When I'm adding a div to body, it's returning the body as the object and then whenever I use that - it's obviously using body. Bad.
Code:-
var holdyDiv = $('body').append('div');
$(holdyDiv).attr('i..
This maybe really easy but there were no answers for it over the net. I want to echo a XML line via batch into a file but it misunderstands the XML closing tag for redirection ">". The line is as foll..
I am trying to download a PDF file from a website and save it to disk. My attempts either fail with encoding errors or result in blank PDFs.
In [1]: import requests
In [2]: url = 'http://www.hrecos...
We are getting "java.lang.OutOfMemoryError : unable to create new native Thread" on 8GB RAM VM after 32k threads (ps -eLF| grep -c java)
However, "top" and "free -m" shows 50% free memory available. ..
I know you can convert a String to an number with read:
Prelude> read "3" :: Int
3
Prelude> read "3" :: Double
3.0
But how do you grab the String representation of an Int value?..
I have scoured stackoverflow and other forums including the google maps v3 api docs for an answer but I cannot find how to change the event that fires the marker info window from click to mouseover in..
Similar to a question posted here, am looking
for a solution in Java.
That is, how to find the index of nth occurrence of a character/string from a string?
Example: "/folder1/folder2/folder3/".
In ..
AngularJS Developer Guide - Forms tell there are many styles and directives regarding forms and fields. For each one, a CSS class:
ng-valid
ng-invalid
ng-pristine
ng-dirty
ng-touched
ng-untouched
W..
Let's say I receive an object literal with 15+ objects and I need to display them in a nice layout (not all in a row), what is the most efficient method for controlling when the line should break/page..
New Java programmers often encounter these messages when they attempt to run a Java program.
Error: Main method not found in class MyClass, please define the main method as:
public static void m..
What I understood by the documentation is that:
kubectl create = Creates a new k8s resource in the cluster
kubectl replace = Updates a resource in the live cluster
kubectl apply = If I want to do cr..
Possible Duplicate:
JavaScript equivalent to printf/string.format
How can I create a Zerofilled value using JavaScript?
I have a number in a variable:
var number = 5;
I need that numbe..
Is there a way I can make a query in MySQL that will give me the difference between two timestamps in seconds, or would I need to do that in PHP? And if so, how would I go about doing that?..
How can i trigger a click event for li elements specifying their index from the angularjs directive?
I have tried using $first for triggering click for the first element, but its not working.
Thanks ..
Working on a class assignment in C#, I came across a program crash without any error (except what's written in VS2010's debug window). Here is the typical code causing the crash :
public partial clas..