I would like to know how to declare a variable in jQuery
The code I am currently using is
$.name = 'anirudha';
alert($.name);
That code works fine, but if I write it as
$.name = document.myForm.t..
I have the following code:
String[] where;
where.append(ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1");
where.append(ContactsContract.Contacts.IN_VISIBLE_GROUP + "=1");
Those two appends are no..
I have to insert about 2 million rows from a text file.
And with inserting I have to create some master tables.
What is the best and fast way to insert such a large set of data into SQL Server?..
I am trying to compile a hello world program in Qt Using Qt Creator.
I am getting 'cl' is not recognized as an internal or external command.
I am using Windows 7 and Both Vs 2008 and 2010 installed ..
I have a dictionary with 20 000 plus entries with at the moment simply the unique word and the number of times the word was used in the source text (Dante's Divine Comedy in Italian).
I would like to..
I am setting up a local server using flask. All I want to do currently is display an image using the img tag in the index.html page. But I keep getting error
GET http://localhost:5000/
ayrton_senna_..
How do I return response from the controller back to the Jquery Javascript?
Javascript
$('.signinform').submit(function() {
$(this).ajaxSubmit({
type : "POST",
url: 'index.php/use..
I currently have an index.php file which allows me to output the list of files inside the same directory, the output shows the names then I used filemtime() function to show the date when the file was..
I'm using Eloquent ORM laravel 5.1, i want to return an array of ids greater than 0, My model called test.
I have tried :
$test=test::select('id')->where('id' ,'>' ,0)->get()->toarray();..
I'm brand-new to the Oracle world so this could be a softball. In working with an SSRS report, I'm passing in a string of states to a view. The twist is that the users could also pick a selection fr..
We are setting up a new SharePoint for which we don't have a valid SSL certificate yet. I would like to call the Lists web service on it to retrieve some meta data about the setup. However, when I try..
I am searching for a file in all the folders.
Copyforbuild.bat is available in many places, and I would like to search recursively.
$File = "V:\Myfolder\**\*.CopyForbuild.bat"
How can I do it in P..
In this fiddle http://jsfiddle.net/mjmitche/6nar4/3/, if you drag, for example, the little blue box into the yellow box, then the big black box will turn pink. All of the 4 boxes along the left can be..
I’m creating Android apps and need to save date/time of the creation record. The SQLite docs say, however, "SQLite does not have a storage class set aside for storing dates and/or times" and it's "c..
I am trying to use Gson to deserialize a json string returned from my webservice
The structure would be returned as TypeDTO[].
where TypeDTO is like
int id;
String name;
ArrayList<ItemDTO> i..
I'm trying to get the GPS coordinates to display when I click a button in my activity layout. The following is the method that gets called when I click the button:
public void getLocation(View view) ..
I've created database, for example 'mydb'.
CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'myuser'@'%' IDENTIFIED BY PASSWORD '*HASH';
GRANT ALL ON mydb.* TO 'myuser'@'%';
GRA..
My component vue is like this :
<template>
<select class="form-control" v-model="selected" :required @change="changeLocation">
<option :selected>Choose Province</opti..
I am wondering what the difference is between typeid and typeof in C++. Here's what I know:
typeid is mentioned in the documentation for type_info which is defined in the C++ header file typeinfo.
..
I've noticed that Visual Studio 2008 is placing square brackets around column names in sql. Do the brackets offer any advantage? When I hand code T-SQL I've never bothered with them.
Example:
Visual..
I have the following for loop:
for i in links:
data = urllib2.urlopen(str(i)).read()
data = json.loads(data)
data = pd.DataFrame(data.items())
data = data.transpose()
data.co..
I have this section defined in my _Layout.cshtml
@RenderSection("Scripts", false)
I can easily use it from a view:
@section Scripts {
@*Stuff comes here*@
}
What I'm struggling with is how..
I am designing a simple web-based application. I am new to this web-based domain.I needed your advice regarding the design patterns like how responsibility should be distributed among Servlets, criter..
How to get spinner selected item's text?
I have to get the text on the item selected in my spinner when i click on the save button.
i need the text not the Index...
How to check Queue's length in python?
I dont see they provide Queue.lenght in python....
http://docs.python.org/tutorial/datastructures.html
from collections import deque
queue = deque(["Eric", "J..
I'm working on a web site project with a Java component and am currently testing for cross-browser compatibility. Most is fine but the Java part won't load on 64-bit browsers. Looks like I need a 64-b..
If I use len(np.array([[2,3,1,0], [2,3,1,0], [3,2,1,1]])), I get back 3.
Why is there no argument for len() about which axis I want the length of in multidimensional arrays? This is alarming. Is t..
I tried to search and put together a code to fit my purpose.
Sub save()
ActiveWorkbook.SaveAS Filename:="C:\-docs\cmat\Desktop\New folder\ck.xls", FileFormat:= _
xlNormal, Password:="", WriteResPas..
I'm puzzled with dependencies. I want to be able to replace some function calls with mock ones. Here's a snippet of my code:
func get_page(url string) string {
get_dl_slot(url)
defer free_dl_s..
I'm trying to convert an array of products into a CSV file, but it doesn't seem to be going to plan. The CSV file is one long line, here is my code:
for($i=0;$i<count($prods);$i++) {
$sql = "SELE..
Why do all script files start with
#!/bin/sh
or with
#!/bin/csh
Is that required? What's the purpose of this? And what's the difference between the two?..
After cloning from remote git repository (at bettercodes)
I made some changes, commited
and tried to push:
git push origin master
Errors with:
error: cannot lock existing info/refs
fatal: g..
I am trying to use a custom class as key for an unordered_map, like the following:
#include <iostream>
#include <algorithm>
#include <unordered_map>
using namespace std;
class nod..
Which command is used to find tomcat is running or not in windows?
How do we know if JVM crashes suddenly?
After googling I posted it, I am not able to find expected result...
Qt5 has a new JSON parser and I want to use it. The problem is that it isn't too clear about what the functions do in layman's terms and how to write code with it. That or I could be reading it wrong...
I'm trying to figure out why my app's TCP/IP connection keeps hiccuping every 10 minutes (exactly, within 1-2 seconds). I ran Wireshark and discovered that after 10 minutes of inactivity the other en..
I have a Tab-delimited String (representing a table) that is passed to my method. When I print it to the command line, it appears like a table with rows:
http://i.stack.imgur.com/2fAyq.gif
The comma..
I am using Windows Server 2008 with IIS7. I need to redirect the users who come to www.mysite.com to wwww.mysite.com/menu_1/MainScreen.aspx. Here is the file structure I have for the projects:
-Sites..
My Android device isn't recognized by eclipse nor adb anymore.
My OS is Windows 7 64-bit, and I'm using a Nexus 4 with Stock Android 4.4.2.
Here are some details on the problem:
Yesterday I could r..
I love Twitter Bootstrap 2.0 - I love how it's such a complete library... but I want to make a global modification for a very boxy-not-round site, which is to get rid of all the rounded corners in Boo..
When I edit code in the middle of statements, it replaces the current code around it. I cannot find a way to replace this with a normal cursor that only inserts data instead of replacing it. Is that f..
How can I replace all line breaks from a string in Java in such a way that will work on Windows and Linux (ie no OS specific problems of carriage return/line feed/new line etc.)?
I've tried (note rea..
I'm new to multithreading, and was trying to understand how mutexes work. Did a lot of Googling but it still left some doubts of how it works because I created my own program in which locking didn't w..
How would I round the result from two divided numbers, e.g.
3/2
As when I do
testOne=$((3/2))
$testOne contains "1" when it should have rounded up to "2" as the answer from 3/2=1.5..
Is it possible to implement mailto: function on submit button like <input type="submit" />? I use ASP.NET MVC. Maybe there is some tricky controller action result to achieve this. Could you plea..
Is it possible to send an email from my Java application using a GMail account? I have configured my company mail server with Java app to send email, but that's not going to cut it when I distribute ..
I am following this link to integrate Google sign-in in my android app.https://developers.google.com/identity/sign-in/android/start-integrating
As given in last step on the above given page we have t..
I'm trying to get a background image of a HTML element (body, div, etc.) to stretch its entire width and height.
Not having much luck. Is it even possible or do I have to do it some other way besides..
I want to to use the browser inside the Android emulator, and I want to use the proxy settings on my machine. How can I set this up?
Reading the very good Android manuals, they tell me that I should ..
I use python 2.7, 3.5.2 and 3.6. Normally pip3 is installed with python3.x. But ...
The code:
where pip3
gives me:
INFO: Could not find files for the given pattern(s).
How can I fix this?..
I have a windows account with users group and trying to exec sp_send_dbmail but getting an error:
profile name is not valid.
However, when I logged in as administrator and execute the sp_send_dbmail..
What's all this fuss about Python and CPython (Jython,IronPython), I don't get it:
python.org mentions that CPython is:
The "traditional" implementation of Python (nicknamed CPython)
yet anothe..
I'm trying to setup a Dockerfile for my LAMP project, but i'm having a few problems when starting MySQL. I have the folowing lines on my Dockerfile:
VOLUME ["/etc/mysql", "/var/lib/mysql"]
ADD dump.s..
I have a login-screen in my iOS app.
The username and password will be saved in the NSUserDefaults and be loaded into the login-screen again when you enter the app again (of course, NSUserDefaults are..
I have map Map<Type, Long> countByType and I want to have a list which has sorted (min to max) keys by their corresponding values. My try is:
countByType.entrySet().stream().sorted().collect(Co..
What are the benefits of having a member variable declared as read only? Is it just protecting against someone changing its value during the lifecycle of the class or does using this keyword result i..
I have a list of links that all go to a google maps api.
the links already have the daddr (destination) parameter in them as static. I am using Geo-Location to find the users position and I want to a..
I am working on a project, but I cannot use any existing java data structures (ie, ArraysList, trees, etc)
I can only use arrays. Therefore, I need to dynamically update an array with new memory.
I ..
I have downloaded and installed SQL Server 2014 Express
(from this site: http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx#Installation_Options).
The pr..
Where is it acceptable to put css folders and image file folders? I was thinking inside the view folder? However the controller always reroutes the path to the base url so I have to specify the path i..
I'm trying to make a retirement calculator right now on Python. There's nothing wrong with the syntax but when I run the following program:
def main():
print("Let me Retire Financial Calculator")..
I'm working on a slightly new project. I wanted to know how many files are in a certain directory.
<div id="header">
<?php
$dir = opendir('uploads/'); # This is the directory it will co..
I'm looking through the Holo.Light theme, and I can't seem to find the magic style to override to get rid of the title text that briefly shows up when my app first launches.
How can I do that?..
I am using Git on Windows 7 and access my repositories through Git Bash. How can I change the default location that Git Bash opens in a convenient folder when I start it?
It's somewhat time consuming..
Using boto3, I can access my AWS S3 bucket:
s3 = boto3.resource('s3')
bucket = s3.Bucket('my-bucket-name')
Now, the bucket contains folder first-level, which itself contains several sub-folders nam..
I had made connection to the remote oracle database through sqldeveloper on my system. Suddenly the power went down and I had to restart the system.
Now, when I am trying to connect to the remote ora..
Second update: Looks like one of my functions (resetFigures) was preventing the event handler, so moving that to the end of the bind function sorted it out.
Update: I realized after some basic testin..
I use STS(spring tool suite) + maven plugin.
Every time when I run my application using maven-clean I see following error:
[INFO] Scanning for projects...
[INFO] ..
I've a form which I'm submitting (through GET as it is required this way) to a crm (ViciDial). I can successfully submit the form however if I do that the processing file at crm will just echo a succe..
I created a 4D scatter plot graph to represent different temperatures in a specific area. When I create the legend, the legend shows the correct symbol and color but adds a line through it. The code I..
I am writing a nightly build script in bash.
Everything is fine and dandy except for one little snag:
#!/bin/bash
for file in "$PATH_TO_SOMEWHERE"; do
if [ -d $file ]
then
..
I'm moving a repository from sourcesafe to subversion and I need to ensure that vital points are equal. Is it any existing command / tool for windows that allows me to compare two folder trees that th..
I have a form that is iframed into a web page. Upon completion of the form, a YouTube video is displayed from using iframe embed.
When I enter full screen mode of the YouTube video, nothing really ha..
I have a time difference
import time
import datetime
time1 = datetime.datetime.fromtimestamp(time.mktime(time.gmtime()))
...
time2 = datetime.datetime.fromtimestamp(time.mktime(time.gmtime()))
diff =..
I'd like to take data of the form
before = data.frame(attr = c(1,30,4,6), type=c('foo_and_bar','foo_and_bar_2'))
attr type
1 1 foo_and_bar
2 30 foo_and_bar_2
3 4 foo_and_bar
4 ..
I just want to get the files from the current dir and only output .mp4 .mp3 .exe files nothing else.
So I thought I could just do this:
ls | grep \.mp4$ | grep \.mp3$ | grep \.exe$
But no, as the f..
I have a function which return a type int. However, I only have a value of the TAX enumeration.
How can I cast the TAX enumeration value to an int?
public enum TAX {
NOTAX(0),SALESTAX(10),IMPORT..
It's failed when I used Git command "git pull" to update my repository, messages as below:
fatal: unable to access '...': Empty reply from server.
And the I tried to use the GitHub App, but alert th..
How to check if variable contains valid UUID/GUID identifier?
I'm currently interested only in validating types 1 and 4, but it should not be a limitation to your answers...
I am trying to pull the data from my api, and populate it in my ionic app, but it is crashing when I enter the page the data should be populated on. Below are my two .ts files:
import { Component } ..
This seems trivial but after all the research and coding I can't get it to work. Conditions are:
The browser window size is unknown. So please don't propose a solution involving absolute pixel sizes..
I have two dates let´s say 14.01.2013 and 26.03.2014.
I would like to get the difference between those two dates in terms of weeks(?), months(in the example 14), quarters(4) and years(1).
Do you kn..
I want to do a Response.Redirect("MyPage.aspx") but have it open in a new browser window. I've done this before without using the JavaScript register script method. I just can't remember how?..
So how can I only allow a user to select only one checkbox?
I know radio buttons are "ideal", but for my purpose...it's not.
I have a field where users need to select either or of the two options, b..
I'm trying to write a function that does the following:
takes an array of integers as an argument (e.g. [1,2,3,4])
creates an array of all the possible permutations of [1,2,3,4], with each permutati..
I am trying to build a shared library using a C extension file but first I have to generate the output file using the command below:
gcc -Wall utilsmodule.c -o Utilc
After executing the command, I ge..
I'd like to know if the POST method on HTTP sends data as a QueryString, or if it use a special structure to pass the data to the server.
In fact, when I analyze the communication with POST method f..
I am hoping someone can help me with a problem I am struggling with.
When I try to build my project from the terminal I get this error:
Failed to read artifact descriptor for com.morrislgn.merchandi..
I have a dataframe with values like
A B
1 4
2 6
3 9
I need to add a new column by adding values from column A and B, like
A B C
1 4 5
2 6 8
3 9 12
I believe this can be done using lambda functi..
If I use "top" I can see what CPU is busy and what process is using all of my CPU.
If I use "iostat -x" I can see what drive is busy.
But how do I see what process is using all of the drive's throug..
I'm writing some code to create an unsorted list but whenever I try to insert a list using the insert method I get the 'method' object is not subscriptable error. Not sure how to fix it. Thanks.
clas..
I have code:
var r = require('request');
r({
method: 'POST',
url: 'https://api.dropbox.com'},
function() { console.log(arguments) } )
When I run it on desktop with Node 0.9.4, I get this in ..
I would like to create a data.frame in R with m (a variable) number of columns (for example 30), and 2 rows and fill all the values in the data.frame initially with 0's. It seems as though data.frame ..
I have JavaScript code and below line has problem.
if ((hr==20)) document.write("Good Night"); document.getElementById('Night).style.display=''
ERROR
Uncaught TypeError: Cannot read property 'styl..
Apparently, the following is the valid syntax:
my_string = b'The string'
I would like to know:
What does this b character in front of the string mean?
What are the effects of using it?
What are a..
I am trying to create a Local IIS Website using ASP.NET.
When I click on New -----> Website and select the type as HTTP and from the dialog box if I select the option as LOCAL IIS WEBSITE I am get..
I have an ArrayList and I want to copy it exactly. I use utility classes when possible on the assumption that someone spent some time making it correct. So naturally, I end up with the Collections cla..
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>
&..
Is it possible to read the name of an UIImageView's UIImage
that's presently stored in the UIImageView?
I was hoping you could do something kind of like this, but haven't figured it out.
NSString *c..
I am trying to create a program that will open a port on the local machine and let others connect into it via netcat. My current code is.
s = socket.socket()
host = '127.0.0.1'
port = 12345
s.bind((h..
I have a question about searching the JSON for the specific information. For example, I have this JSON file:
{
"people": {
"person": [
{
"name": "Peter",
..
Is there a way to check strings for nil and "" in Swift? In Rails, I can use blank() to check.
I currently have this, but it seems overkill:
if stringA? != nil {
if !stringA!.isEmpty {
..
I want to count the number of distinct items in a column subject to a certain condition, for example if the table is like this:
tag | entryID
----+---------
foo | 0
foo | 0
bar | 3
If I want to cou..
I have some code like this:
class Foo {
public double x;
}
void test() {
Foo foo = new Foo();
// Is this a valid way to test for zero? 'x' hasn't been set to anything yet.
if (foo.x..
I am a newbie to Java. I am trying to dynamically choose the file location to save the outcome of my project (to be initiated at the very start of my project). I worked around with a few FileDialog ex..
I have the following struct:
typedef struct _chess {
int **array;
int size;
struct _chess *parent;
} chess;
and I have:
typedef struct _chess *Chess;
Now, I want to create an array of d..
I am using Maven 3.0.5 and Spring Tool Source 3.2 with Maven plugin installed. When I try to do 'Run As---> Maven install', I am getting the following error:
[INFO] Scanning for projects...
[INFO] ..
First of all, what is it exactly? I guess it is a pointer (LPC means long pointer constant), but what does "W" mean? Is it a specific pointer to a string or a pointer to a specific string?
For exampl..
How can I receive the node names from a JSON tree using Jackson?
The JSON-File looks something like this:
{
node1:"value1",
node2:"value2",
node3:{
node3.1:"value3.1",
..
Is it possible to get the start time of an old running process? It seems that ps will report the date (not the time) if it wasn't started today, and only the year if it wasn't started this year. Is th..
Now that it's clear what a metaclass is, there is an associated concept that I use all the time without knowing what it really means.
I suppose everybody made once a mistake with parenthesis, result..
I need to pass in a text file in the terminal and then read the data from it, how can I do this?
node server.js file.txt
How do I pass in the path from the terminal, how do I read that on the other..
I'm trying to embrace jQuery 100% with it's simple and elegant API but I've run into an inconsistency between the API and straight-up HTML that I can't quite figure out.
I have an AJAX file uploader ..
I'm new at Go programming, and I'm wondering: what is the preferred way to handle configuration parameters for a Go program (the kind of stuff one might use properties files or ini files for, in other..
I want to be able to preview a file (image) before it is uploaded. The preview action should be executed all in the browser without using Ajax to upload the image.
How can I do this?..
this question is not the same as Does the shell support sets?
i know lots of script language support list structure, such as python, python, ruby, and javascript, so what about linux shell?
does she..
How do I open PDF document in new browser window?
The window should be full and withouth menu.
Just a PDF document in a clean full window with native Javascript or jQuery...
In Angular Material Design 6, the (change) method was removed.
I cant find how to replace the change method to execute code in the component when the user change selection
Thanks!..
I am trying to write a Java program which takes in as input a string and counts the number of occurrences of characters in a string and then prints a new string having the character followed by the no..
A friend sent me along this great tutorial on webscraping NYtimes with R. I would really love to try it. However, the first step is to installed a package called RJSONIO from source.
I know R reasona..
Is it possible to search every field of every table for a particular value in Oracle?
There are hundreds of tables with thousands of rows in some tables so I know this could take a very long time to ..
I'm adding an existing site to SVN.
The files already exist on the webserver, and now identical copies (- configuration files) exist in the repository.
I want to convert the webserver directory into..
Is it possible to use gradle to produce a tree of what depends on what?
I have a project and would like to find out all the dependencies so I may be able to prune it a little with forward declaration..
On Ice Cream Sandwich, an option in the Developer Options is "Show CPU Usage", which adds an overlay on the screen (see screenshot below).
My question is, how do I read the data ? I guessed that the..
I am trying to produce an all-in-one delete/insert/update trigger. I get two "incorrect syntax near AFTER at the second and third AFTERS and a syntax error near the last END.
CREATE TRIGGER trig_all..
As part of a web app, once images have been downloaded and rendered on a web page, I need to determine an image's file size (kb) and resolution within the browser context (so I could, for example, dis..
I'd like to be able to transition to a state and a pass an arbitrary object using ui-router.
I'm aware that usually $stateParams is used, but I believe this value is inserted into the URL, and I don'..
I have a table with many rows on my page. I would like to set table's height, say for 500px, such that if the height of the table is bigger than that, a vertical scroll bar will appear. I tried to use..
I want to make a list row layout. This layout has a imageview in the most left, a textview right next to the imageview, and a imageview in the most right. I want all of them are center vertical.
<..
So I have a text input, im using html5, on chrome, and I want to change the look of a text input, I've removed the outline on focus (orange on chrome), I set the background to a light color #f1f1f1 bu..
I am trying to figure out how to check if a field is NULL or empty. I have this:
SELECT IFNULL(field1, 'empty') as field1 from tablename
I need to add an additional check field1 != "" somet..
I want to do some domain validation
in my object I am having one integer,
now my question is: if I write
@Min(SEQ_MIN_VALUE)
@Max(SEQ_MAX_VALUE)
private Integer sequence;
and
@Size(min = 1, max = NA..
Trying to figure out how to write an if cycle to check if a line is empty.
The file has many strings, and one of these is a blank line to separate from the other statements (not a ""; is a carriage r..
This is probably a trivial question, but how do I parallelize the following loop in python?
# setup output lists
output1 = list()
output2 = list()
output3 = list()
for j in range(0, 10):
# calc ..
When I try to run a2enmod php7.0 - I got message "Considering conflict php5 for php7.0".
After restarting apache - apache can't start.
How to solve this?
Maybe some already enabled modules links t..
I have a script that does various things and the end result is one large table. I was wondering how I could export this final table to a new Excel file (with column headers as well).
I would need to ..
I am using android design library's TextinputLayout. But couldn't customize the hint color, label color and the underline color of EditText inside TextinputLayout. Please help...
I'm confused about what it means to cast objects in Java.
Say you have...
Superclass variable = new Subclass object();
(Superclass variable).method();
What is happening here? Does the variable typ..
I have quite a large list of words in a txt file and I'm trying to do a regex find and replace in Notepad++. I need to add a string before each line and after each line.. So that:
wordone
wordtwo
wo..
I recently included a line similar to this in a .cmd file:
for /f %%f in ('dir /b .\directory\*.sql') DO sqlcmd -b -o ".\directory\output\%%f.txt" -i ".\directory\%%f"
Originally I had only used %f..
Let's suppose I have just used a BufferedInputStream to read the bytes of a UTF-8 encoded text file into a byte array. I know that I can use the following routine to convert the bytes to a string, but..
suppose I've a 3 options in a drop down box say red , blue, others.
If a user select option as an others then below a text box should be visible to wrtie his own favourite color.
I can populat..
I want to prevent maven from displaying INFO messages, I want to see only WARNINGS and ERRORS (if any).
How can I achieve this, preferably by changing the command line that calls maven?..
Is it possible to generate (highly probable) unique Integer from GUIDs?
int i = Guid.NewGuid().GetHashCode();
int j = BitConverter.ToInt32(Guid.NewGuid().ToByteArray(), 0);
Which one is better?..
I've want to achieve the following:
The following images are what I can do right now, but that's NOT what I want.
Sample of code I have right now:
renderA() {
return (
<View style..
Is it possible to specify the JVM to use when you call "java jar jar_name.jar" . I have two JVM installed on my machine. I can not change JAVA_HOME as it may break code that is all ready running.
Kin..
In PHP you can do if(isset($array['foo'])) { ... }. In JavaScript you often use if(array.foo) { ... } to do the same, but this is not exactly the same statement. The condition will also evaluate to fa..
I have forgotten my Oracle username and password and hence not able to use it. My Oracle version is 11.2.0.1.0(11g). I consulted Internet. They asked me to execute commands like ‘SYSDBA’ but I was..
I get this error when I try to connect to the mysql database using php mysqli class. Using following code:
$db = new MySQLi("localhost","kamil","*****");
if (mysqli_connect_errno())
{
echo "An er..
I need to develop some html pages for iphone/android phones, but what is the difference between max-device-width and max-width? I need to use different css for different screen size.
@media all and (..
Is it possible to have two background images? For instance, I'd like to have one image repeat across the top (repeat-x), and another repeat across the entire page (repeat), where the one across the e..
This is probably a very trivial question, but I haven't been able to find the answer neither through web search engines, nor on php.net. Please just direct me to where I can read about this, if you ha..
Such as margins, orientations and such...
dev.off() does not work for me. I am often using RStudio, with its inbuilt graphics device. I then have plotting functions, which I want to plot either in th..
I would like to run a cmdlet and store the result's value in a variable.
For example
C:\PS>Get-WSManInstance -enumerate wmicimv2/win32_process | select Priority
It lists priorities with a heade..
So if I have a directory stored in a variable, say:
$scriptPath = (Get-ScriptDirectory);
Now I would like to find the directory two parent levels up.
I need a nice way of doing:
$parentPath = Spl..
This should be simple but I am having a tough time.. I want to copy the cells A3 through E3, and paste them into the next empty row on a different worksheet. I have used this code before in longer str..
First I'll show you both the bash and python script (both are in the /bin directory on my mac): The bash script (esh_1): #! /bin/bash echo -n "Enter bash or natural-language command: " read INPUT e..
I'm writing an application that takes user data and stores it locally for use later. The application will be started and stopped fairly often, and I'd like to make it save/load the data on application..
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'm trying to find out if a row exists in a table. Using MySQL, is it better to do a query like this:
SELECT COUNT(*) AS total FROM table1 WHERE ...
and check to see if the total is non-zero or is ..
I have one activity which is the main activity used throughout the app and it has a number of variables. I have two other activities which I would like to be able to use the data from the first activi..
In the Arduino GUI on windows, if I click on Sketch --> Import Library, at the bottom of the menu there is a section called "Contributed".
Unfortunately, I had misclicked and added a library I did no..
How can I verify a Google authentication access token?
I need to somehow query Google and ask: Is [given access token] valid for the [[email protected]] Google account?
Short version:
It's clear h..
I can see that Ctrl+left/right jumps to the beginning/end of line. How to change this to Cmd+left/right arrow?
In order to get Alt+left/right arrow working correctly for word jumping follow this arti..
What is the basic difference between the following CSS:
display:inline
and this:
display:block
Using these separately on an element, I get the same result...
Possible Duplicate:
Emulating SQL LIKE in JavaScript
Is there an operator in JavaScript which is similar to the like operator in SQL? Explanations and examples are appreciated...
I'd like a very simple XML configuration file with a console and a file appender using log4j2.
(The Apache Website is killing me with much Information.)..
What is the best way to convert the following JSON returned value from a 24-hour format to 12-hour format w/ AM & PM? The date should stay the same - the time is the only thing that needs formatti..
I have a simple Python script that I want to stop executing if a condition is met.
For example:
done = True
if done:
# quit/stop/exit
else:
# do other stuff
Essentially, I am looking for s..
I am trying to install a Notepad++ plugin from Plugins -> Plugin Manager, but my office firewall is restricting its download.
Is there any alternate way to download plugin offline?..
I have a problem with the transfer of variable 'insurance_mode' by the decorator. I would do it by the following decorator statement:
@execute_complete_reservation(True)
def test_booking_gta_object(se..
I'm trying to understand what makes the lock in concurrency so important if one can use synchronized (this). In the dummy code below, I can do either:
synchronized the entire method or synchronize t..
I'm using zsh and I'm trying to add a new entry (/home/david/pear/bin) to the PATH variable but I don't know how.
The thing that confuses me the most is that there's not a single
reference to a PATH ..
I'm generating an HTML report by C# to print pairs of files in a table which has 3 columns: the first two columns used for the filenames and the 3rd column is a hyperlink Compare - I want this link to..
I have a form where users can add input fields with jQuery.
<input type="text" id="task" name="task[]" />
After submitting the form I get an array in PHP.
I want to handle this with the $.aj..
Jasmine's spyOn is good to change a method's behavior, but is there any way to change a value property (rather than a method) for an object? the code could be like below:
spyOn(myObj, 'valueA').andRe..
Is there a way to control browser scrolling with JavaScript/jQuery?
When I scroll my page half way down, then trigger a reload, I want the page to go pack to the top, but instead it tries to find the..
Does a jQuery plug-in exist for replacing select/combo box?
I tried SexyCombo, and it is as close to what I want, but it doesn't complete if you are writing from middle, only from beginning.
I have ..
I'm trying to catch exceptions from a set of tests I'm running on an API I'm developing and I'm using Guzzle to consume the API methods. I've got the tests wrapped in a try/catch block but it is still..