An operating System (OS) is a basic software whose role is to be an abstract layer between software requisitions for resources and the hardware available, manage input/output, memory allocation/deallocation, file systems, among other basic tasks a device (not necessarily a computer) should do.
I am often confused with the concept of virtualization in operating systems. Considering RAM as the physical memory, why do we need the virtual memory for executing a process?
Where does this virtual..
I have 6 processes as follows:
-- P0 --
arrival time = 0
burst time = 10
-- P1 --
arrival time = 110
burst time = 210
-- P2 --
arrival time = 130
burst time = 70
-- P3 --
ar..
Whats the difference between multitasking, multiprogramming & multiprocessing
This comes regularly for my university OS exams and I can't find a good answer.
I know quite a bit about multitasking..
I want to run regasm.exe from cmd. which is available in c:\windows\Microsoft.net\framework\2.057
I do like this c:\ regasm.exe
It gives regasm is not recognized as internal or external command.
So..
On Linux, the "top" command shows a detailed but high level overview of your memory usage, showing:
Total Memory, Used Memory, Free Memory, Buffer Usage, Cache Usage, Swap size and Swap Usage.
My qu..
Ok...I dont know where module x is, but I know that I need to get the path to the directory two levels up.
So, is there a more elegant way to do:
import os
two_up = os.path.dirname(os.path.dirname(_..
I am using Service Class on the Android O OS.
I plan to use the Service in the background.
The Android documentation states that
If your app targets API level 26 or higher, the system imposes..
What is the technical difference between a process and a thread?
I get the feeling a word like 'process' is overused and there are also hardware and software threads. How about light-weight processes..
I am trying to use the perfmon windows utility to debug memory leaks in a process.
This is how perfmon explains the terms:
Working Set is the current size, in bytes, of the Working Set of this proce..
I need to find the OS name and version on Unix/Linux platform. For this I tried following:
lsb_release utility
/etc/redhat-release or specific file
But it does not seem to be best solution as LSB_..
I am not able to understand the difference between a kernel and an operating system. I do not see any difference between them. Is the kernel an operating system?..
I am confused about DNS caching. I am writing a small forward proxy server and want to use OS DNS cache on a Linux system.
If I understand correctly, then there is DNS caching at the browser level. T..
I have tried using the code below but it only display results in Chrome and Mozilla not working in IE6.
<div id="example"></div>
<script type="text/javascript">
txt = "<p>B..
Sorry about the length, it's kinda necessary.
Introduction
I'm developing a remote desktop software (just for fun) in C# 4.0 for Windows Vista/7. I've gotten through basic obstacles: I have a robust..
How do you run a program all by itself without an operating system running?
Can you create assembly programs that the computer can load and run at startup, e.g. boot the computer from a flash drive an..
I recently started wondering about sites like http://thismachine.info/ that get the user's operating system info. I have not been able to find out how to do that with PHP, and wanted to try to figure ..
What is the difference between the kernel space and the user space? Do kernel space, kernel threads, kernel processes and kernel stack mean the same thing? Also, why do we need this differentiation?..
I need to get the OS version with a batch file. I 've seen a lot of examples online, many uses something like this code:
@echo off
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto ver_xp
if not e..
My current project involves deploying an upgraded .exe file that runs as a Windows Service. In order to overwrite the existing .exe with the new version, I currently need to:
Stop the service
Unins..
Recently, I have been asked a question in an interview what's the difference between a process and a thread. Really, I did not know the answer. I thought for a minute and gave a very weird answer.
T..
I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI compon..
Below is an example of the Fork function in action. Below is also the output. My main question has to to do with the a fork is called how values are changed. So pid1,2 and 3 start off at 0 and get cha..
What is the most elegant way to check if the directory a file is going to be written to exists, and if not, create the directory using Python? Here is what I tried:
import os
file_path = "/my/direct..
What would be a more simplified description of file descriptors compared to Wikipedia's? Why are they required? Say, take shell processes as an example and how does it apply for it?
Does a process ta..
I would like to determine the operating system of the host that my Java program is running programmatically (for example: I would like to be able to load different properties based on whether I am on ..
I want to check the operating system (on the computer where the script runs).
I know I can use os.system('uname -o') in Linux, but it gives me a message in the console, and I want to write to a varia..
I'm hoping someone could shed some light on how to make the parent wait for ALL child processes to finish before continuing after the fork. I have cleanup code which I want to run but the child proces..
I need my code to do different things based on the operating system on which it gets compiled. I'm looking for something like this:
#ifdef OSisWindows
// do Windows-specific stuff
#else
// do Unix-sp..
What is the difference between user variables such as PATH, TMP, etc. and system variables?
I accidentally deleted the user variable PATH. What am I supposed to do?..
I want to display EXCEL sheet embedded in IE with plain HTML. I have gone through other questions on stackoverflow but could not find any useful one.
Here is my html file
<html>
<body>
&..
I would like to have a optional argument that will default to a value if only the flag is present with no value specified, but store a user-specified value instead of the default if the user specifies..
I'm running a simple ng-repeat over a JSON file and want to get category names. There are about 100 objects, each belonging to a category - but there are only about 6 categories.
My current code is ..
Is there a way to include another shell script in a shell script to be able to access its functions?
Like how in PHP you can use the include directive with other PHP files in order to run the functio..
I have been trying to disable the Enter key on my form. The code that I have is shown below. For some reason the enter key is still triggering the submit. The code is in my head section and seems to b..
I know that embedding CSS styles directly into the HTML tags they affect defeats much of the purpose of CSS, but sometimes it's useful for debugging purposes, as in:
<p style="font-size: 24px">..
We use the code below to inject Spring beans with properties from a properties file.
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name=..
How to remove spaces from a string object in C++.
For example, how to remove leading and trailing spaces from the below string object.
//Original string: " This is a sample string ..
I'm trying to convert text to columns using a macro but I'm not able to do it, I have tried to record a macro to achieve this, however I'm running into some issues since the text to columns VBA functi..
I am a novice at JavaScript and jQuery. I want to show one combobox-A, which is an HTML <select> with its selected id and contents at the other place on onChange().
How can I pass the complete..
This is the JSON string I have:
{"attributes":[{"nm":"ACCOUNT","lv":[{"v":{"Id":null,"State":null},"vt":"java.util.Map","cn":1}],"vt":"java.util.Map","status":"SUCCESS","lmd":13585},{"nm":"PROFILE","..
I am using TensorFlow to train a neural network. This is how I am initializing the GradientDescentOptimizer:
init = tf.initialize_all_variables()
sess = tf.Session()
sess.run(init)
mse = tf.r..
I am using Apache POI API to getting values from an Excel file.
Everything is working great except with cells containing formulas. In fact, the cell.getStringCellValue() is returning the formula used..
Using the async CTP from Microsoft for .NET,
is it possible to catch an exception thrown by an async method in the calling method?
public async void Foo()
{
var x = await DoSomethingAsync();
..
I want to add a custom height to the dropdown of a Spinner, say 30dp, and I want to hide the dividers of the dropdown list of Spinner.
So far I tried to implement following style to the Spinner:
<..
I'm using kafka 0.10 without zookeeper. I want to get kafka topics list. This command is not working since we're not using zookeeper:
bin/kafka-topics.sh --list --zookeeper localhost:2181. How can I ..
I've downloaded, unzipped and setup Eclipse 3.4.2 with some plugins (noteable, EPIC, Clearcase, QuantumDB, MisterQ).
Now I find when I'm editing Java projects the code completion is not working. If..
What is the preferred syntax for defining enums in JavaScript? Something like:
my.namespace.ColorEnum = {
RED : 0,
GREEN : 1,
BLUE : 2
}
// later on
if(currentColor == my.namespace.Colo..
I'm using this JS code to know what browser is user using for.
<script>
document.write(navigator.appName);
</script>
And I want to get this navigator.appName to php code to use it li..
Really having an annoying time with connection strings.
I have two projects together in a single solution. A Web forms application acting as the presentation layer, and a class library supporting it ..
How to get a jqGrid cell value when in-line editing (getcell and getRowData returns the cell content and not the actuall value of the input element)...
I have a TextEditingController where if a user clicks a button it fills in with information. I can't seem to figure out how to change the text inside of a Textfield or TextFormField. Is there a soluti..
Our work laptops are configured to use proxy to access external sites and I don't have access to see the proxy information. All our applications like IDEs are configured to use system proxy. Is there ..
After update Cordova 5.0 in my system, I create new applications. When I tested my application on a device that time I get an error in the console log:
No Content-Security-Policy meta tag found.
Plea..
In my Main FragmentActivity, I setup my custom ActionBar title like this:
LayoutInflater inflator = (LayoutInflater) this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View ..
I have been reading a lot of Javascript lately and I have been noticing that the whole file is wrapped like the following in the .js files to be imported.
(function() {
...
code
...
})()..
I have a column of the TIMESTAMP WITHOUT TIME ZONE type and would like to have that default to the current time in UTC. Getting the current time in UTC is easy:
postgres=# select now() at time zone '..
I have the following code:
SN.get_Chars(5)
SN is a string so this should give the 5th Char. Ok!
Now I have another code but: SN.get_Chars(0x10)
I wonder what 0x10 is? Is it a number? If it's so, ..
How can I get the number of the row in a dataframe that contains a certain value in a certain column using Pandas? For example, I have the following dataframe:
ClientID LastName
0 34 ..
Using the Datepicker the year drop down by default shows only 10 years. The user has to click the last year in order to get more years added.
How can we set the initial range to be 100 years so that ..
I have the following:
<script type="text/javascript">
function CancelFormButton(button) {
$(button.form).submit();
}
</script>
<form onsubmit="alert('here');">
<input type="..
I am getting a 'Module not specified' error in my run config. I have no module showing in the drop down yet I can see my module no probs. The issue came about when I refactored my module name, changed..
I have several JUnit run configurations in Eclipse that I need to replicate on the command-line in order to use a third-party analysis tool. So far I've just been writing the command-line manually by..
I have a development environment I'm dockerizing and I would like the ability to livereload my changes without having to rebuild docker images. I'm using docker compose because redis is one of my app'..
I have a shell script in which I need to check whether two files contain the same data or not. I do this a for a lot of files, and in my script the diff command seems to be the performance bottleneck...
I am working on the letter distribution problem from HP code wars 2012. I keep getting an error message that says "invalid character in identifier". What does this mean and how can it be fix..
I'm trying to write a simple media player that plays streaming audio using RTSP. I have a GUI-activity and a service that performs the playback. My question is how to best communicate between the acti..
Can anyone show me how to do a php curl with an HTTP POST?
I want to send data like this:
username=user1, password=passuser1, gender=1
To www.domain.com
I expect the curl to return a response lik..
I'm creating my first framework in Objective-C that wraps the facebook SDK in a more intuitive way. There are several points in my framework where I'd like to reference the AppDelegate, but there is n..
The question is simple: How do you load custom UITableViewCell from Xib files? Doing so allows you to use Interface Builder to design your cells. The answer apparently is not simple due to memory mana..
I am installing a website in a droplet (Digital Ocean). I have a issue for install NGINX with PHP properly. I did a tutorial https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx..
May I know what is the difference between:-
Spring
Struts
Struts 2
Hibernate
JavaServer Faces
JavaServer Pages
Tapestry
Are these technologies/framework complementary to each other? Or they are al..
I have String array with some components, this array has 5 components and it vary some times. What I would like to do is to iterate through that array and get the first component and the component nex..
I have an int array which has no elements and I'm trying to check whether it's empty.
For example, why is the condition of the if-statement in the code below never true?
int[] k = new int[3];
if (k..
I have a problem, how can i get value from cell of datagridview
----------------------------------
id | p/w | post |
----------------------------------
1 | 1234 | A ..
Does urllib2 fetch the whole page when a urlopen call is made?
I'd like to just read the HTTP response header without getting the page. It looks like urllib2 opens the HTTP connection and then subs..
I'm just wondering why we usually use logical OR || between two booleans not bitwise OR |, though they are both working well.
I mean, look at the following:
if(true | true) // pass
if(true | fals..
Why does
ZonedDateTime now = ZonedDateTime.now();
System.out.println(now.withZoneSameInstant(ZoneOffset.UTC)
.equals(now.withZoneSameInstant(ZoneId.of("UTC"))));
print out false?
I would e..
I am getting the above error:
error opening trace file: No such file or directory (2)
when I run my android application on the emulator. Can someone tell me what could be the possible reason f..
How can I get GLIBCXX_3.4.15 in Ubuntu? I can't run some programs that I'm compiling.
When I do:
strings /usr/lib/libstdc++.so.6 | grep GLIBC
I get:
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCX..
I want to access Google Spreadsheets using JavaScript only (no .NET, C#, Java, etc.)
I came here and was shocked to know that there is NO API for JavaScript to access Google Sheets.
Please tell me h..
What's the simplest way to convert a java.sql.Date object to a java.util.Date while retaining the timestamp?
I tried:
java.util.Date newDate = new Date(result.getDate("VALUEDATE").getTime());
with..
I am developing a security software and want to obfuscate my java code so it will become impossible to reverse engineer. What is the most reliable java obfuscator ?..
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 created a button and added an action for it, but as soon as it invoked, I got this error:
-[NSCFDictionary numberButtonClick:]: unrecognized selector sent to instance
0x3d03ac0 2010-03-16 22:23:58..
I was just wondering who knows what programming languages Windows, Mac OS X and Linux are made up from and what languages are used for each part of the OS (ie: Kernel, plug-in architecture, GUI compon..
I'm trying to get MySQL installed to the latest version due to some installation going wrong somewhere along the line. I run the command gem install mysql and I receive the following:
Building na..
So I've got a big text file which looks like the following:
<option value value='1' >A
<option value value='2' >B
<option value value='3' >C
<option value value='4' >D
It's ..
Where can I view Tomcat log files in Eclipse?
For some reason my Tomcat installation/log folder is always empty.
BTW, does Tomcat dump to the log file after a while or is it immediate?..
I know that Python does not support method overloading, but I've run into a problem that I can't seem to solve in a nice Pythonic way.
I am making a game where a character needs to shoot a variety of..
What is the purpose of Node.js module.exports and how do you use it?
I can't seem to find any information on this, but it appears to be a rather important part of Node.js as I often see it in source c..
I have added a custom font file to my assets/fonts folder. How do I use it from my XML?
I can use it from code as follows:
TextView text = (TextView) findViewById(R.id.textview03);
Typeface tf = ..
I've built a web app that uses the HTML5 tag and JavaScript code that renders other content synchronized with the running video. It works great in desktop browsers: Firefox, Chrome, and Safari. On an..
I'm working in VB project with VS 2012 and after finish I try to add setup project.
I didn't find it (because the Setup Project was discontinued after VS2010) so I switched to VS2010 but the problem..
How do I clear a browsers cache with JavaScript?
We deployed the latest JavaScript code but we are unable to get the latest JavaScript code.
Editorial Note: This question is semi-duplicated in the f..
I have a question about Javascript's dictionary. I have a dictionary in which key-value pairs are added dynamically like this:
var Dict = []
var addpair = function (mykey , myvalue) [
Dict.push({
..
I've started using webpack2 (to be precise, v2.3.2) and after re-creating my config I keep running into an issue I can't seem to solve I get (sorry in advance for ugly dump):
ERROR in ./src/main.js
M..
I am using a scope method in an angular ng-click directive like so:
<a ng-click="$navigate.go('#/path/obj.val1/obj.val2')">{{obj.val1}}, {{obj.val2}}</a>
The trouble here is that obj.va..
I've created an RSA public key and I want to add that to authorized_keys file, but there is no such file in my Ubuntu 11.10 machine.
How can I add the key to authorized_keys?..
I have found documentation about subprocess.check_output() but I cannot find one with arguments and the documentation is not very in depth. I am using Python 3 (but am trying to run a Python 2 file t..
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 want to implement a HashMap in Python. I want to ask a user for an input. depending on his input I am retrieving some information from the HashMap. If the user enters a key of the HashMap, I would..
On Windows 7 I downloaded the 'netbeans-8.0.1-javaee-windows.exe' installer from this site https://netbeans.org/downloads/. The installer installs GlassFish 4.1, Java 1.8.0_20 and NetBeans 8.01. After..
When trying to check the current version of Java in which I am running, I received the error "java is not recognized as an internal or external command, operable program or batch file.".
I a..
I am trying the following lines to set the background image.but it not works. what are the way set background image in constantly in my application.
app.component.html
<div [ngStyle]="{'backgroun..
I am fairly new to SQL and VBA. I have written a SQL query that I would like to be able to call and run from a VBA sub in an excel workbook and then bring the query results into the workbook. I have f..
I am having trouble trying to pass an extra variable in the url to my WordPress installation.
For example /news?c=123
For some reason, it works only on the website root www.example.com?c=123 but it..
What's the preferred method to use to change the location of the current web page using JavaScript? I've seen both window.navigate and document.location used. Are there any differences in behavior? Ar..
I need to copy std::set to std::vector:
std::set <double> input;
input.insert(5);
input.insert(6);
std::vector <double> output;
std::copy(input.begin(), input.end(), output.begin()); //E..
I would like to write an automated testing suite for a REST API. As we complete new services, we'd like to check to make sure all the previously created services are working as expected. Any suggestio..
I am not able to clone or push to a git repository at Bitbucket in Eclipse:
It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error ke..
Is there a simple way to change the default error values in the jQuery validation plugin?
I just want to rewrite the error messages to be more personal to my app--I have a lot of fields, so I don't w..
I am trying to understand the real purpose of session configuration in Web.xml for session timeout.
<!-- Session Configuration -->
<session-config>
<session-timeout>60</s..
Is there a way to specify, for example 4 distinct values for a varchar column in MS SQL Server 2008?
For example, I need a column called Frequency (varchar) that only accepts 'Daily', 'Weekly', 'Mont..
I am having issues with committing a transaction within my @Transactional method:
methodA() {
methodB()
}
@Transactional
methodB() {
...
em.persist();
...
em.flush();
log("OK..
I am wondering how to convert an edittext input to an int, I have the user input a number, it than divides it by 8.
MainActivity.java
@SuppressWarnings("unused")
public void calcSpeed(View view)
{ ..
What is the difference between IQueryable<T> and IEnumerable<T>?
See also What's the difference between IQueryable and IEnumerable that overlaps with this question...
It is a really simple thing but I cannot get my head around it. I have looked at plenty of StackOverFlow post and as well as on internet.
My goal is to create a .bat which will open cmd and execute m..
ddl2 populates based on ddl1 selected value successfully.
My issue is the data that is already present in ddl2 does not clear before appending the new data so ddl2 content just continues to grow ever..
How can I find the row for which the value of a specific column is maximal?
df.max() will give me the maximal value for each column, I don't know how to get the corresponding row...
I am trying to create and save a file to the root directory of my site, but I don't know where its creating the file as I cannot see any. And, I need the file to be overwritten every time, if possible..
I installed Ubuntu 14.04 (Trusty Tahr) yesterday. Everything seems OK. But when I tried to compile some C code, I encounter the following error. The error seems to be due to the OS lacking the 32-bit ..
ngChange is firing while the value is changing (ngChange are not similiar to the classic onChange event). How can i bind the classic onChange event with angularjs, that will only fire when the content..
For example:
public class Person
{
public Person()
{
}
~Person()
{
}
}
When should I manually create a destructor?
When have you needed to create a destructor? ..
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..
I want to bring up a spinner dialog when the user taps a menu item to allow the user to select an item.
Do I need a separate dialog for this or can I use Spinner directly? I see this link, mentions a..
I need to access a JavaScript variable with PHP. Here's a stripped-down version of the code I'm currently trying, which isn't working:
<script type="text/javascript" charset="utf-8">
var te..
How to set the default value of an attribute on a Laravel model?
Should I set the default when creating a migration or should I set it in the model class?..
I know this is a basic question, but I can't seem to find an answer and I apologize, if this question is way too stupid, but here we go:
I am supposed to work with SQL Server (no problem so far) and ..
I have a class A as mentioned below:-
class A{
int iData;
};
I neither want to create member function nor inherit the above class A nor change the specifier of iData.
My doubts:-
How to acc..
I am trying to write in a file stored in c:\ drive named vin1.txt
and getting this error .Please suggest!
> ERROR at line 1: ORA-29280: invalid
> directory path ORA-06512: at
> "SYS.UTL_FILE..
I am new to java programming. My question is this I have a String array but when I am trying to convert it to an int array I keep getting
java.lang.NumberFormatException
My code is
private void p..
I want to simulate mouse movement every x seconds. For that, I'll use a timer (x seconds) and when the timer ticks I'll make the mouse movement.
But, how can I make the mouse cursor move using C#?..
I'm trying to load an image from a given link
var imgPath = $(imgLink).attr('href');
and append it to the page, so I can insert it into a given element for an image viewer.
Even though I searched ..
Possible Duplicate:
How can I determine a web user's time zone?
Which is the best way to do this ? php or javascript.Can someone provide me with some snippets ? thanks...
Gradle is a bit confusing to me, and also for any new Android developer. Can anyone explain what Gradle in Android Studio is and what its purpose is? Why is it included in Android Studio?..
I recently come across a file with the extension .pid and explored inside it but didn't find much. The documentation says:
A Pid-File is a file containing the process identification number (pid) t..
I just downloaded Maven and was trying to run the simple command found on the "Maven in Five Minutes" page (http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html). This is the comm..
I'm trying to run a query that has a few columns that are a CLOB datatype. If i run the query like normal, all of those fields just have (CLOB) as the value.
I tried using DBMS_LOB.substr(column) and..
I have a library (jar) on build path of my project. The project accesses the MainActivity in the jar, using the following intent:
final Intent it = new Intent();
it.setClassName("com.example.lib", "c..
First of all, where is the documentation for Ajax.* methods in asp.net mvc?
Can Ajax.ActionLink be used to call an action, get a partial view, open a modal window and put the content in it?..
I have an external resource similar to https://www.googleapis.com/freebase/v1/text/en/bob_dylan which returns a JSON. I want to display the value of result key in a div in html (lets say the name of t..
I am seeking an example of something that can be done with an IntentService that cannot be done with a Service (and vice-versa)?
I also believe that an IntentService runs in a different thread and a ..
I would like to install Visual Studio 2013 on Windows 7 64-bit.
For some reason, the installer says "Setup Blocked" with an error "This version of Visual Studio requires a computer with a newer versi..
I used regular expressions to get a string from a web page and part of the string may contain something I would like to replace with something else. How would it be possible to do this? My code is thi..
I have a pod test-1495806908-xn5jn with 2 containers. I'd like to restart one of them called container-test. Is it possible to restart a single container within a pod and how? If not, how do I restart..
I downloaded and extracted Crypto++ in C:\cryptopp. I used Visual Studio Express 2012 to build all the projects inside (as instructed in readme), and everything was built successfully. Then I made a t..
I want to stop execution for 2 seconds. So is this, but now follows a code block:
<html>
<head>
<title> HW 10.12 </title>
<script type="text/javascript">
..
I can't get my refresh token with my code. I can only get my access token, token type etc.,
I have followed some tutorials like putting access_type=offline on my login URL:
echo "<a href='https://..
Is it possible to set up files/folders to ignore on a per-project basis in TFS source control?
For example, I've a website with an assets folder that I do not want to go in to source control. These a..
I need the fastest way to get the first day of the week. For example: today is the 11th of November, and a Thursday; and I want the first day of this week, which is the 8th of November, and a Monday. ..
We are building a new REST API.
I was arguing that error code 500 (Internal Server Error) should never be returned.
Now, of course if you know the client's params are wrong or something you have eve..
My little brother is just getting into programming, and for his Science Fair project, he's doing a simulation of a flock of birds in the sky. He's gotten most of his code written, and it works nicely,..
I want to use CSS to show div id='b' when I hover over div id='a', but I cannot figure out how to do it because the div 'a' is inside another div that div 'b' is not in.
<div id='content'>
..
I'm trying to set an initial value in my jquery ui datepicker. I've tried several different ways, but nothing seems to display the date, it's empty.
var idag = new Date();
$("#txtFrom").datepicker("s..
I am currently trying to learn JSP. My question is, at present I used to include the header and footer of the page using:
<%@include file="includes/header.jsp" %>
and
<%@include file="in..
I successfully complied this code:
#include <stdio.h>
#include <math.h>
int q;
int main()
{
srand( time(NULL) );
int n=3;
q=ceil(sqrt(n));
printf("%d\n %d\n", n,q);
..
I'm running into a common pattern in the code that I'm writing, where I need to wait for all threads in a group to complete, with a timeout. The timeout is supposed to be the time required for all thr..
Say you have a div, give it a definite width and put elements in it, in my case an img and another div.
The idea is that the content of the container div will cause the container div to stretch out,..
I am trying to merge 2 commits into 1, so I followed “squashing commits with rebase” from git ready.
I ran
git rebase --interactive HEAD~2
In the resulting editor, I change pick to squ..
How can I use properly the Intent flag FLAG_ACTIVITY_NO_ANIMATION in AndroidManifest file? I supose my problem is trivial, but I can't find good example or solution to it.
<intent-filter>
..
I've created an API in Go that, upon being called, performs a query, creates an instance of a struct, and then encodes that struct as JSON before sending back to the caller. I'd now like to allow the..
How can I get the difference between two times in a Batch file? Because I want to print it in an HTML file.
I thought this would be possible, but it isn't.
Set "tijd=%time%"
echo %tijd%
echo %time%-..
I am stuck with a problem in MySQL. I want to get the count of records between two date-time entries.
For example:
I have a column in my table named 'created' having the datetime data type.
I want to..
I am getting following error in my C# visual studio project:
The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
I also..
I'd like to take an HTML table and parse through it to get a list of dictionaries. Each list element would be a dictionary corresponding to a row in the table.
If, for example, I had an HTML table wi..
I have a web app that displays rows with go and delete buttons.
If a user clicks go, it should open new tab/window with url built from the row's data.
how can I do this in jquery? What I'm doing is ..
I have a JsonObject named "mapping" with the following content:
{
"client": "127.0.0.1",
"servers": [
"8.8.8.8",
"8.8.4.4",
"156.154.70.1",
"156.154.71.1"
..
I would like to launch a Fancybox (e.g. Fancybox's version of a modal or light box) on page load. I could bind it to a hidden anchor tag and fire the click event of that anchor tag via JavaScript, but..
I'm trying to install ngrok (which I've been using for a while on Windows with no issues) on my 1 week old yosemite and these are the steps I've followed so far.
Downloaded ngrok from here https://n..
I've got two numbers stored in varibles, a and b, and i'd like to see of the ratio of those two is an integer or not in python. However when I try
result = a./b
it gives me a
SyntaxError: invali..
When I create an app with a flutter create command, the flutter logo is used as an application icon for both platforms.
If I want to change the app icon, shall I go to both platforms directories and r..
In Onselect event I have script:
$("#vinanghinguyen_images_bbocde").val('');
$("#vinanghinguyen_images_bbocde").val(vinanghinguyen_final_bbcode);
I want clear text area id="vinanghinguyen_images_bb..
i use flask and i got this error when i call this url: /login
Here's my login method:
@app.route('/login')
def login():
if authenticateForPanel():
return redirect(url_for("panel"))
e..
The following is the simplest possible example, though any solution should be able to scale to however many n top results are needed:
Given a table like that below, with person, group, and age column..
I have several buttons on my page, but I'm not sure how to tell which one was clicked.
Here's the markup for my two buttons:
<input type="submit" id="btnSubmit" value="Save Changes" />
<inpu..
trying to run mysql in ubuntu
typing mysql in terminal
and getting error
ERROR 1045(28000): Access denied for user 'root'@'localhost' (using password: NO)
Can anybody please sort out this problem....
Not sure if this is possible and how, but I tried playing around with the z-index of the elements in my code with no success.
I have a div element that has a background image set in css. inside the ..
I am aware of the availability of Context.getApplicationContext() and View.getContext(), through which I can actually call Context.getPackageName() to retrieve the package name of an application.
The..
It seems there are different ways to do joins using linq. One is more straightforward and involves just joining tables like this:
var found = from c in s.categories
join cm in s.categorym..
So Im learning to develop in Rails, and have discovered the power of zsh. However, for some of my other tasks, I wish to use normal Bash. Although they are the same, I just feel comfortable with the l..
I'm trying to change a LinearLayout from another class, but when i run this code:
public class IRC extends PircBot {
ArrayList<String> channels;
ArrayList<Integer> userCount;
ArrayList&l..
I have used /proc/meminfo and parsed command response.however it result shows that :
MemTotal: 94348 kB
MemFree: 5784 kB
means. it shows there is only 5MB free memory. Is it possibl..
How can we select multiple columns using a vector of their numeric indices (position) in data.table?
This is how we would do with a data.frame:
df <- data.frame(a = 1, b = 2, c = 3)
df[ , 2:3]
# ..
is there any way that html element file
<input name="file1" type="file" style="width:300px">
only accept PDF files and when we browse its only show PDF files...
Thanks..
I am having trouble understanding how to pass in a struct (by reference) to a function so that the struct's member functions can be populated. So far I have written:
bool data(struct *sampleData)
{
}..
I'm trying to create a button that has an image in it and no border - just like the Firefox toolbar buttons before you hover over them and see the full button.
I've tried setting the BorderBrush to T..
I need some information regarding starting and stopping a timer in PHP. I need to measure the elapsed time from the start of my .exe program (I'm using exec() function in my php script) until it compl..
My HTML email template is displaying correctly without major problems in Gmail, Apple Mail and iOS Mail. Outlook however is a horrifying mess and I can't for the life of me figure out what I've done w..
I'm trying to grab a string within a string using regex.
I've looked and looked but I can't seem to get any of the examples I have to work.
I need to grab the html tags <code> and </code> and ..
I'm trying to add a snackBar in order to display a message whenever a user signIn or not.
SnackBar.jsx:
import React from "react";
import PropTypes from "prop-types";
import classNames from "classnam..
The Android emulator is a bit sluggish. For some devices, like the Motorola Droid and the Nexus One, the app runs faster in the actual device than the emulator. This is a problem when testing games an..
How do i simply write out a file including real tabs inside? tab means real tab which is not the spaces. How to write the tab or what is the character for real tab?
For example here:
$chunk = "a,b,c..
I am developing a payment processing app for Android, and I want to prevent a hacker from accessing any resources, assets or source code from the APK file.
If someone changes the .apk extension to .z..
Are there any good libraries for streaming live video using Java? Ideally both ends of the pipe should be written in Java but I am mostly concerned about the video player. What software would you reco..
I have both Python 2.7 and 3.4 installed on my Ubuntu 14.04 machine. I want to install the 'requests' module so it is accessible from Py3.4.
When I issued pip install requests on my terminal cmd lin..
I'm working on a project with dependency X. X, in turn, depends on Y.
I used to explicitly include Y in my project's pom. However, it was not used and to make things cleaner, I instead added it to X'..
Assuming I have a collection in MongoDB with 5000 records, each containing something similar to:
{
"occupation":"Doctor",
"name": {
"first":"Jimmy",
"additional":"Smith"
}
Is there an easy wa..
I got a situation where I would like to read some data off a JSON format through PHP, however I am having some issues understanding how I should construct the Javascript object to create the JSON form..
I am trying to install BeautifulSoup using pip in Python 2.7. I keep getting an error message, and can't understand why.
I followed the instructions to install pip, which was installed to the followi..
I use the following bash script to copy only files of certain extension(in this case *.sh), however it still copies over all the files. what's wrong?
from=$1
to=$2
rsync -zarv --include="*.sh" $f..
I'm trying to set a sequence to a specific value.
SELECT setval('payments_id_seq'), 21, true
This gives an error:
ERROR: function setval(unknown) does not exist
Using ALTER SEQUENCE doesn't ..
Its kinda weird that the JavaScript Array class does not offer a last method to retrieve the last element of an array. I know the solution is simple (Ar[Ar.length-1] ), but, still, this is too frequen..
Code will explain more:
$var = 0;
if (!empty($var)){
echo "Its not empty";
} else {
echo "Its empty";
}
The result returns "Its empty". I thought empty() will check if I already set the variable a..
I'm stuck with this concept of 'Functions that return functions'. I'm referring the book 'Object Oriented Javascript' by Stoyan Stefanov.
Snippet One:
_x000D_
_x000D_
function a() {_x000D_
..
I have read NgStyle Documentation For Angular 2, and it is a little bit confusing for me. How do I use NgStyle with condition like (if...else) to set background image of any element? ..
What I want to do is open an .exe from another .exe. I really don't know how to do this, so I searched the internet. I tried some suggested methods from the internet, but it didn't work.
Here's my co..