Id int64 34.6M 60.5M | Title stringlengths 15 150 | Body stringlengths 33 36.7k | Tags stringlengths 3 112 | CreationDate stringdate 2016-01-01 00:21:59 2020-02-29 17:55:56 | Y stringclasses 3 values |
|---|---|---|---|---|---|
38,098,121 | in my case,i use aiomysql for my httpserver,but it raised a error,more details as fallow: | <p><a href="http://i.stack.imgur.com/LGt1O.png" rel="nofollow">enter image description here</a></p>
<p>i am searching for a long time on net. But not use. I have tried multiple variations of this, but none of them seem to work. Can anyone help? </p>
| <python> | 2016-06-29 11:22:30 | LQ_CLOSE |
38,098,665 | How to make a document a HTML doctype | <p>I really do not know how to make a document HTML. It really confuses me. Does anyone know how to help me?
I have already tried just saving it, but as I use atom it doesn't really work.</p>
| <html> | 2016-06-29 11:49:04 | LQ_CLOSE |
38,098,916 | Should I learn Actionscript 3 along with Javascript to make web games? | <p>Hello(my first post on stack overflow)
I wanted to ask that should I learn Actionscript 3 or not, Am Already learning Javascript on Codecademy (20% completed). Someone suggested me to learn AC 3 and get the Flixel tuotorials on new grounds,Should I learn AS3 along or just focus on JS. Purpose for learning a language is to make 2d scroller web games,that works on smart phones and tablets.</p>
| <javascript><actionscript-3><flash><actionscript> | 2016-06-29 12:00:11 | LQ_CLOSE |
38,099,725 | How to access Sql server online database with my C# windows application | <p>I have windows application using C#, i want to store the data in local SQL SERVER database and as well as online SQL SERVER Database. </p>
| <c#><sql-server><windows-applications> | 2016-06-29 12:35:13 | LQ_CLOSE |
38,100,063 | Python - extract the 3rd item from a list? | <p>I have a list as per below, it is currently returning the first and the 3rd item in the list, but i only want the 3rd item not the 3rd, how can i achieve this?</p>
<pre><code>>>>list = ['1', '2', '3', '45']
>>>print list[::2]
['1', '3']
</code></pre>
<p>Thanks</p>
| <python> | 2016-06-29 12:49:01 | LQ_CLOSE |
38,102,890 | Class inheritance Ruby |
Obviously my parameters for Getemploy.new make no sense, but I jsut did it randomly. That being said. Why is number being returned as an array?
I.e the output is `The employee number is : ["1", "2", "3", "4"] with id : 2 with phone 3 with adress: 4`
class Employee
def initialize(n,i,ph,ad)
@number = n, @id = i , @phone = ph, @adress =ad
end
def getInfo
return @number,@id,@phone,@ad
end
end
class Getemploy < Employee
def get_data
return "The employee number is : #{@number} with id : #{@id} with phone #{@phone} with adress: #{@adress}"
end
end
employ = Getemploy.new("1","2","3","4")
puts employ.get_data() | <ruby> | 2016-06-29 14:41:15 | LQ_EDIT |
38,104,284 | Android keyboard language matching person | Since I am living abroad I often find myself writing to people in different languages. Every time I have to switch to the correct language to avoid false autocorrection. However the language only depends on the person I am talking to, that is I will always talk in italian to `a`, `b` and `c`; in english to `l` and `m`; in french with `x`. Is there a keyboard that keeps track of that? | <android><keyboard><contacts><autocorrect> | 2016-06-29 15:40:38 | LQ_EDIT |
38,106,076 | Create indicator from two groups | <p>I have this data frame:</p>
<pre><code>df<- data.frame(j = c("a", "a", "b", "b", "c", "c"),
t = c(2000,2010,2000,2010,2000,2010))
> df
j t
1 a 2000
2 a 2010
3 b 2000
4 b 2010
5 c 2000
6 c 2010
</code></pre>
<p>I am trying to create an indicator <code>jt</code> to identify the country/year:</p>
<pre><code> j t jt
1 a 2000 1
2 a 2010 2
3 b 2000 3
4 b 2010 4
5 c 2000 5
6 c 2010 6
7 c 2010 6
8 c 2010 6
</code></pre>
<p>The last two observations signal that I can have multiple occurrences.</p>
| <r><categories> | 2016-06-29 17:09:39 | LQ_CLOSE |
38,106,674 | How to lunch 100 and more servers in Chef | i am new to chef
i have successfully configured chef workstation and server
so by using this below command i can be able to launch only one instance
knife ec2 server create –image ami-cc5af9a5 -i ram.pem –flavor m1.small -x root –groups chef-client -Z us-east-1a -r “role[webserver]”
By this command i can bootstrap only one node
knife ec2 server create –image ami-a4827dc9 -i NVirginia.pem –flavor t2.micro -x root –groups RC-Corporation -Z us-east-1a -r “role[learn_chef_httpd]”
So hear i want to launch&Bootstrap 100 and more instance so where i have to customize these commands | <amazon-ec2><chef-infra><bootstrapping><chef-recipe><cookbook> | 2016-06-29 17:43:08 | LQ_EDIT |
38,107,778 | Retrieving exact string from file using powershell script | I used the below steps to retrieve a string from file
$variable = 'abc@yahoo.com'
$test = $variable.split('@')[0];
$file = Get-Content C:\Temp\file1.txt | Where-Object { $_.Contains($test) }
This results in all lines that contain substring $test. I just want the result to contain only the lines that has exact word $test.
For example, If a line contains abc_def@yahoo.com and abc@yahoo.com I just want the result to be abc@yahoo.com
Can anyone help? | <powershell><powershell-2.0> | 2016-06-29 18:46:17 | LQ_EDIT |
38,108,618 | private messaging (Android) | <p>I am developing an android app, it is a social media app with many features. One of the features is a private messaging between users. What is the best way to do it.
Note: I'm using PHP for the backend of the app.</p>
| <php><android><android-fragments><android-studio><private-messaging> | 2016-06-29 19:35:57 | LQ_CLOSE |
38,110,113 | What is a good way to transfer complex objects with drag and drop in a UWP app? | <p>I have two lists on my c# app, where list1 is listing all objects and list2 is a selection of these objects. I want to enable drag and drop to select objects. But I cannot put these objects in the DataView. How can I solve this?</p>
| <c#><uwp> | 2016-06-29 21:11:25 | LQ_CLOSE |
38,110,480 | which web services use develop the Real time application in Organization? | I know implements of web services into different ways but few are Open source & few are non-open source.
Which side develop the web service Consumer side OR Provider side?
| <java><swing><jtextcomponent> | 2016-06-29 21:38:13 | LQ_EDIT |
38,112,481 | Visual Studio C++ Build Errors | >I have compilation errors to just simply output a cout message. E.g., cout << "Letter: " << letter <<endl; My errors are in "Letter: ", the second '<<', and 'endl' also. Why is this happening? Not even resintalling visual studio helped. | <c++> | 2016-06-30 01:18:34 | LQ_EDIT |
38,113,301 | What is += mean in python and why should i use it? | <p>I was wondering what the += operator does in python. What is it used for and why would i use it?</p>
| <python><operators> | 2016-06-30 03:03:59 | LQ_CLOSE |
38,113,526 | swift func execute lazy like haskell | hope to understand if swift compile chain calling func like haskell
let x = [1, 2, 3, 4, 5]
func doubleMe(x: Int) -> Int {
return x * 2
}
x.map(doubleMe)
.map(doubleMe)
.map(doubleMe) | <swift><haskell><lazy-evaluation> | 2016-06-30 03:33:00 | LQ_EDIT |
38,116,187 | I do have many batch files but i need to cal them in vb script one after the other?please help me out? | I do have many batch files and i have a vb scrip.But i need to call all the batch files in vb script one after the other?can anyone please help me out? | <batch-file><vbscript> | 2016-06-30 07:10:20 | LQ_EDIT |
38,116,411 | strip out non standard charicters from a defind string output in SQL | I am trying to strip out non standard charicters from a defind string output in SQL, there will be quite a few so i would like to use case rather than replace however i cant get it to work. any sugestions? (first post sorry about the formatting :(
select distinct( CASE (SORT_CODE
+ cast(replicate('0',8-len(ACCOUNT_NUMBER))
+ ACCOUNT_NUMBER as char(8))
+ '0'
+ '17' --to be replaced by a check for a specific type
+ cast (replicate('0',11-len(replace(CURRENT_CHARGE_INCL,'.',''))) + replace(CURRENT_CHARGE_INCL,'.','') as char(11))
+ cast(left(LAST_NAME, 10) + replicate(' ',18) as char(18)) + upper(cast(TRADING_NAME + replicate(' ',18) as char( 18))) )
WHEN '.' THEN ' '
WHEN '&' THEN ' '
WHEN ',' THEN ' '
else DD_line
END)
as DD_LINE | <sql-server> | 2016-06-30 07:22:02 | LQ_EDIT |
38,116,580 | Most efficient of using 'if' | <p>Code 1 :</p>
<pre><code>if( !(varOfsomeClass->isValid($imParams)) ){
//some function i need to run
}
</code></pre>
<ul>
<li>run function isValid</li>
<li>reverse value with not (!)</li>
<li>check value with if</li>
</ul>
<p>Code 2 :</p>
<pre><code>if( (varOfsomeClass->isValid($imParams)) ){
} else {
//some function i need to run
}
</code></pre>
<ul>
<li>run function isValid</li>
<li>check value with if</li>
<li>enter else part(maybe, or do nothing because isValid is true)</li>
</ul>
<p>which is more efficient? which is better to use?</p>
<p>nb: Code 1 is indeed more 'human'</p>
| <php><algorithm> | 2016-06-30 07:29:48 | LQ_CLOSE |
38,116,607 | Linq string filed range based selection | i want do range based filtration on linq query but property type is string even though it stored numerical data is there way to do this
VOUCHERNO property type is string but now new request came to do range base selection from to it stores numbers | <c#><sql-server><linq><entity-framework-4> | 2016-06-30 07:31:13 | LQ_EDIT |
38,117,286 | conditional formatting excell 2010,, as per attached sheet how i can apply conditional formatting in coloum b |
10 9
20 10
30 25
40 18
50 27
60 50
70 55
80 40
90 30
100 150
I want conditional formatting in b Colosseum less the a column[enter image description here][1]
[1]: http://i.stack.imgur.com/rY4Ei.jpg | <excel><conditional-formatting><excellibrary> | 2016-06-30 08:02:59 | LQ_EDIT |
38,117,572 | C++ regex matching a single character | I'm trying to match a single character '=' in a line of code with regex.
Example
if(y == 5 || x = 1) {
Do something ...
}
I want to match to the single '=', and not the "==". I've tried alot of combination of regex strings but I still can't get a match on the correct position. | <regex> | 2016-06-30 08:18:03 | LQ_EDIT |
38,118,336 | Forcing operator_ (underscore) | <p>This question is <em>for fun</em>, I know that I cannot define <code>operator_</code>.</p>
<p>However, I'd <strong>really</strong> like to "bend" this rule, having something like the following as valid (with <em>valid</em> being loosely defined!).</p>
<pre><code>T result = somevar _ someother;
</code></pre>
<p>I didn't come with a possible solution, but maybe you can, possibly using some preprocessor übertricks. (Of course just <code>#define _ SOMETHING</code> is quite a bit dangerous)</p>
<p>Any help is greatly appreciated!</p>
| <c++><c++11><operator-overloading><c++14> | 2016-06-30 08:56:05 | LQ_CLOSE |
38,120,557 | Display new line in mail body | <p>I want to insert new line in mail body paragraphs .I have searched all the other same questions but none of them seems to work </p>
<pre><code>$body = "Dear $surname $name \r\n
Thank you for your Pre-registration for Global .\r\n
Please print the attached e-ticket with your personal barcode and bring it to the reception of the exhibition.\r\n
This barcode includes data about you which is required during registration. Having this barcode will considerably speed up the registration process
Organizing committee.\r\n".
$body = "Print e-ticket
($imageurl) .\r\n".
</code></pre>
<p>This method displays all in one line
How to change it to display it properly ?
Thank you</p>
| <php><html><email> | 2016-06-30 10:31:50 | LQ_CLOSE |
38,120,572 | Trying to connect with a databse but it sais that i do not have the draiver,any tips? thanks in advance | here my code, if you want to see it.
// TODO Auto-generated method stub
Connection connection = null;
try {
// String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
String serverName = "serverName";
String databaseName = "databaseName";
String portNumber = "portNumber";
String myDatabase = serverName + ":" + portNumber;
String domainName = "domain name";
String url = "jdbc:jtds:sqlserver://" + myDatabase + ";Database=" + databaseName + ";domain=" + domainName; // a JDBC url
String username = "username";
String password = "password";
// Load the JDBC driver
Class.forName(driverName);
// Create a connection to the database
connection = DriverManager.getConnection(url, username, password);
// Execute a query
Statement stmt = connection.createStatement();
String sql;
sql="SELECT CODFISC, SURNAME FROM tbPersonale order by SURNAME;";
ResultSet rs = stmt.executeQuery(sql);
// Estrazione Dati
while(rs.next() ) {
// Legge i valori
String CODFISC = rs.getString("CODFISC"); //CODFISC is the fiscal code
String SURNAMENAME = rs.getString("SURNAME");
// Visualizza i dati
System.out.print("Codice Fiscale: " + CODFISC );
System.out.println("SURNAME and NAME: " + SURNAMENAME );
}
} catch (ClassNotFoundException e) {
System.out.println("Could not find the database driver");//here is where i always end up :(
} catch (SQLException e) {
System.out.println("Could not connect to the database");
} | <java><database><jdbc><jtds> | 2016-06-30 10:32:20 | LQ_EDIT |
38,123,100 | What is better to certain values in a certain manner in C | <p>I want to know which is the suitable way to store some generated values values?
the values will be computed like so:</p>
<pre><code>0
0 N/4 2N/4 3N/4
0 N/4² .. .. .. .. (4²-1)N/4²
.
.
.
0 N/4^p .. .. .. .. (4^p-1)N/4^p
</code></pre>
<p>Is a table a suitable way? (I don't think so). A hashtable (how it will be accessed) or a structure??</p>
| <c><optimization> | 2016-06-30 12:28:17 | LQ_CLOSE |
38,123,975 | What is does (0 & 1) do in JavaScript? | <p>I am looking through the source of a library I'm working with, and I found something I haven't seen before.</p>
<pre><code>$(item).each(function(child) {
oddEven = (i & 1);
targetNode.append(jasper_build_product(this,oddEven));
i++;
});
</code></pre>
<p>Notice the <code>oddEven = (i & 1);</code>. What does the <code>(i & 1)</code> part do? I'm particularly curious about the ampersand.</p>
| <javascript> | 2016-06-30 13:03:49 | LQ_CLOSE |
38,124,464 | Convert Map<List> to List<NewType> with new java 9 streams | I need help using the java 8 streams API to convert
Map<String, List<Entry<Parameter, String>>> inputData
to
List<TestSession> testList
with the following test session
private static class TestSession {
final String mServiceName;
final String mData;
public TestSession(
final String aServiceName,
final String aData) {
mServiceName = aServiceName;
mData= aData;
}
}
and
enum Parameter {
Foo,
Bar,
Baz
}
Lets say that input data contains the following
{"ABC", {{Parameter.Foo, "hello"},{Parameter.Bar, "bye"} }
{"DEF", {{Parameter.Baz, "hello1"},{Parameter.Foo, "bye1"} }
I would like the testList to contain
{
TestSession("ABC", Parameter.Foo, "hello"),
TestSession("ABC", Parameter.Bar, "bye"),
TestSession("DEF", Parameter.Baz, "hello1"),
TestSession("DEF", Parameter.Foo, "bye1")
}
The idea is that each `TestSession` is constructed using the Key from the `inputData` and | <collections><java-8><java-stream> | 2016-06-30 13:23:12 | LQ_EDIT |
38,125,403 | CraftCMS vs WordPress vs other CMSs | <p>We're considering a new CMS for our huge 10-20,000 page site. We are not currently using any CMS, but have individual html pages with the content embedded(!). </p>
<p>Our site is mostly 'regular' content types, with a few discussion boards and some document handling. We also have a number of news sections/blogs and some profile directories. </p>
<p>We have few developers with limited coding skills and even fewer coders on the team. We've considered WordPress (which we're already using for a few sites) and also CraftCMS. CraftCMS seems more fitting to our needs because it's flexible and lean; we're impressed with what we've seen so far but are concerned that it's not open-source and that it's so new. WordPress seems cumbersome to the coding developers as much of the system is 'out of the box' and requires loading lots of plugins and things that you don't 'need' for a page.</p>
<p>Are there other similar CMSs that people can recommend for us to consider? Please don't tell me about your favorite CMS; please DO tell me about a CMS that you know of that may fit our needs. Comments on the CMSs mentioned above in the context of our needs are welcomed as well.</p>
<p>Thank you. </p>
| <wordpress><content-management-system> | 2016-06-30 13:59:46 | LQ_CLOSE |
38,125,669 | Connecting sql server database using IP address in different networks | As well, we can connect SQL server database using up address in Same network.but How do I connect SQL server database using IP Address in different network ? | <sql-server><sql-server-2014> | 2016-06-30 14:10:15 | LQ_EDIT |
38,128,555 | href to style html only works in Chrome | <p>I am building a webpage from a template found online, and all my htmls in the webpage refer to my styles page. It works just as I hoped it would in Chrome (and I assume also in Safari and Firefox but have not checked) but in Internet Explorer the index.html seems to not want to access the styles page at all and the default_controls.html only partially. I am not using much of the template's styles page, making a lot of the styles page obsolete. It could also be that the webpage is not published yet.I am quite new to HTML (I'm more of a Java guy) but if possible please help!</p>
<p>My styles page:</p>
<pre><code><!--/*-------------------------------------------------
GLOBALS CLASSES
-------------------------------------------------*/-->
*{padding:0; margin:0;}
body{ font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#1491c1; background:url(../images/bg.jpg) repeat;}
img{border:none;}
h1{ font-family: 'Droid Serif', serif; font-weight:normal; color:#fff;}
h2{ font-family: 'Droid Serif', serif; font-weight:normal; color:#1491c1; font-size:18px;}
P{ line-height:20px;}
a{text-decoration:none; color:#1491c1;}
a:hover{color:#fff;}
<!--/*-------------------------------------------------
GENERAL CLASSES
-------------------------------------------------*/-->
.mar-top{ margin-top:40px;}
.mar-top30{ margin-top:30px;}
.mar-bottom{ margin-bottom:40px;}
.mar-Right{ margin-right:40px;}
.mar-right115{ margin-right:115px;}
.float-left{ float:left;}
.float-right{ float:right;}
.clearing { clear:both;}
.bor-bottm-non{border-bottom:none!important;}
.panel{}
.title{}
.content{}
.wrap{width:960px; margin:0 auto;overflow:hidden; background:url(../images/page-bg.jpg);}
.page{ width:580px; margin:0 auto;overflow:hidden; padding-bottom:50px;}
.page-content{ width:580px; margin:0 auto;overflow:hidden; padding-bottom:30px; padding-top:30px;}
.block{padding:20px 20px 20px 20px; margin:0 auto;}
.block2{padding:20px 20px 20px 20px; margin:0 auto;}
.button a{text-decoration:none; display:block; width:70px; height:30px; background:#1491c1; color:#ffffff; font-family:Arial, Helvetica, sans-serif; line-height:30px; text-align:center;}
.button a:hover{ background:#0e5295;}
<!--/*-------------------------------------------------
CONTENT CLASSES
-------------------------------------------------*/-->
.page-content{ width:580px; margin:0 auto;overflow:hidden; padding-bottom:30px; padding-top:30px;}
.page-content .content h3{ padding-bottom:20px;font-family: 'Droid Serif', serif; font-weight:normal; color:#fff; font-size:16px;}
.page-content .content p{ padding-bottom:15px;}
<!--/*-------------------------------------------------
HEADER CLASSES
-------------------------------------------------*/-->
.header-wrap{ background:#083266; height:162px;}
.header{ width:1860px; margin:0 auto;}
.logo{ float:left; background:#1491c1; width:300px; float:left;}
.logo h1{font-size:52px; text-align:center; padding:52px 0px 50px 0px;}
.menu{ float:left;}
.menu ul li{ list-style:none; float:left; border-right:#093e76 solid 1px; padding:115px 20px 30px 20px;}
.menu ul li a{ text-decoration:none; color:#80d2f8; font-size:14px; text-align:center;}
.menu ul li a:hover{ color:#1491c1;}
.menu ul li a.active{ color:#1491c1;}
<!--/*-------------------------------------------------
LEFTCOL CLASSES
-------------------------------------------------*/-->
.leftcol{ float:left; width:300px; overflow:hidden;}
.leftcol .title{ margin-bottom:25px;}
.leftcol .content ul li{ list-style:none; border-bottom:#0c4680 solid 1px; line-height:40px;}
.leftcol .content ul li a{ text-decoration:none; color:#1491c1;}
.leftcol .content ul li a:hover{color:#80d2f8;}
.leftcol .panel img{ float:left; border:#fff solid 4px; margin:9px 20px 0px 0px;}
.leftcol .panel .content{ color:#1491c1; overflow:hidden;}
.leftcol .panel .content .button a{ width:53px; height:24px; line-height:24px; float:left; margin:15px 0px 20px 0px;}
.block2 .panel{border-bottom:#0c4680 solid 1px; margin-bottom:18px;}
<!--/*-------------------------------------------------
RIGHT CLASSES
-------------------------------------------------*/-->
.rightcol{ float:left; width:660px; overflow:hidden;}
.rightcol .title{ margin-bottom:25px;}
.rightcol .button{ margin-top:0px;}
.rightcol img{ float:left; margin-right:40px;}
.rightcol .content p{ padding-bottom:30px;}
.button2 a{text-decoration:none; display:block; width:70px; height:30px;
background:#1491c1; color:#ffffff; font-family:Arial, Helvetica, sans-serif; line-height:30px; text-align:center; float:left;}
.button2 a:hover{ background:#0e5295;}
<!--/*-------------------------------------------------
BOX CLASSES
-------------------------------------------------*/-->
.box{ width:230px; background:#083266; padding:20px 20px 35px 20px; float:left;}
.box img{ margin-bottom:25px;}
.box .title{margin-bottom:20px;}
.box .title h1{ font-size:20px; font-weight:normal;}
<!--/*-------------------------------------------------
CONTACT FORM CLASSS
-------------------------------------------------*/-->
.contact-form { background:#0d3d78; padding:30px; width:440px; float:left;}
.contact-form label {display: block; padding:10px 0 10px 0;}
.contact-form label span {display: block; color:#fff;font-size:14px; float:left; width:80px; text-align:left; padding:5px 20px 0 0; font-family: 'Droid Serif', serif;}
.contact-form .input_text {padding:10px 10px;width:318px;background:#07366b; border:none; color:#fff; outline:none;}
.contact-form .message{padding:10px 10px;width:318px; background:#07366b; border:none; overflow:hidden;height:150px; color:#fff; font-size:14px; outline:none;}
.contact-form .button{padding:8px;background:#1491c1; color:#ffffff; text-transform:uppercase; font-family:'Oswald', sans-serif;border:0px solid;margin-left:100px;margin-top:20px;}
.address { float:left; width:250px; margin-left:30px; margin-top:50px;}
.address .panel { border:none; color:#fff;}
.address .panel .title h1 { color:#1491c1; padding-bottom:10px;}
.address .panel .content p span { color:#fff;}
.address .panel .content p .number{ font-size:15px;}
<!--/*-------------------------------------------------
FOOTER CLASSES
-------------------------------------------------*/-->
.footer-wrap{ background:#1491c1; overflow:hidden;}
.footer{ width:960px; margin:0 auto; padding:40px 0px 50px 0px; overflow:hidden;}
.footer .bolg{ width:598px; float:left;}
.footer .panel{ float:left; width:230px;}
.footer .title{ border-bottom:#107eb4 solid 1px; padding-bottom:20px; margin-bottom:30px;}
.footer .title h1{ font-size:20px;}
.footer .panel .content ul li{ float:left; list-style:none; color:#062c5b; font-weight:bold;}
.footer .panel .content p{ color:#fff; font-size:12px; line-height:inherit; padding-top:20px; clear:both;}
.footer .panel .content p a{color:#062c5b; text-decoration:none;}
.footer .panel .content p a:hover{ color:#fff;}
.footer .panel .content p span{ color:#062c5b; font-weight:bold; font-size:12px;}
.footer .quickcontact{ width:270px; float:right;}
</code></pre>
<p>My index.html:</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>EMS WebGIS Help Center: Home</title>
<link href="http://fonts.googleapis.com/css?family=Droid+Serif" rel="stylesheet" type="text/css">
<link href="Styles.html" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="header-wrap">
<div class="header">
<div class="logo"><h1>Help Center</h1></div>
<div class="menu">
<ul>
<li><a href="index.html" >Home</a></li>
<li><a href="default_controls.html">Default & Controls</a></li>
<li><a href="webmaps_toc.html">Table of Contents</a></li>
<li><a href="identify.html">Identify</a></li>
<li><a href="draw.html">Draw</a></li>
<li><a href="measure.html">Measure</a></li>
<li><a href="add_file.html">Add File to Map</a></li>
<li><a href="print.html">Print</a></li>
<li><a href="bookmarks.html">Bookmarks</a></li>
<li><a href="overview_basemaps.html">Overview & Basemaps</a></li>
<li><a href="users_login.html">Users & Login</a></li>
<li><a href="app_launcher.html">App Launcher</a></li>
</ul>
</div>
</div>
</div><!---header-wrap--->
<div class="wrap">
<div class="leftcol">
<!-- <div class="block">
<div class="panel">
<div class="title">
<h1></h1>
</div>
<div class="content">
<ul>
<li><a href="#">Sed do eiusmod tempor incididunt ut </a></li>
<li><a href="#">Praesent sit amet purus ac ligula tem </a></li>
<li><a href="#">Nam convallis mauris id eros condiment</a></li>
<li><a href="#">Donec a sem sit amet neque iaculis p</a></li>
<li><a href="#">Duis sit amet augue ut urna auctor rut</a></li>
<li><a href="#">Ut fringilla scelerisque enim, nec he</a></li>
<li class="bor-bottm-non"><a href="#">Donec vitae magna in turpis congue</a></li>
</ul>
</div>
</div>
</div> -->
<div class="block2">
<div class="panel">
<img src="images/Calleguas-logo-80px.png" alt="image" />
<div class="content">
<p>Go to the WebGIS program</p>
<div class="button"><a href="http://cloud.emswebmap.com/webgis/src/index.html?agency=callegaus#/homemap">Go</a></div>
</div>
</div>
</div>
<div class="block2">
<div class="panel">
<img src="images/EMSLogoo.gif" alt="image" />
<div class="content">
<p>Visit the EMS Website</p>
<div class="button"><a href="http://www.emsol.com/emsol/index.shtml">Go</a></div>
</div>
</div>
</div>
</div><!---leftcol--->
<div class="rightcol">
<!--<div class="banner"><img src="images/bannerInsert.png" alt="banner" /></div> -->
<div class="page">
<div class="panel mar-bottom">
<div class="title">
<h1></h1>
<h2></h2>
</div>
<div class="content">
<p> <h2>Welcome to the Help Center for the EMS WebGIS program for the Calleguas Municipal Water District. </h2> <br>
<h4>This Help Center provides walkthroughs and information to help users find their way in and out of the WebGIS program.
This page provides the basics to navigation along the map, identification of objects, and much more.
With the help of the EMS WebGIS Help Center, you can become comfortable with the program and its resources.</h4>
<p> <h4>The EMS WebGIS Help Center provides assistance in the following subjects of the program:</h4>
</div>
</div>
<!--Index boxes-->
<div class="box mar-Right">
<div class="panel">
<img src="images/mouse.png" alt="image" />
<div class="title">
<h1>Default & Controls</h1>
</div>
<div class="content">
<p>Familiarize yourself with the program's basics in the map's layout and location of tools, zoom, pan, setting to default and other controls.</p>
<div class="button" align="center"><a href="default_controls.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box">
<div class="panel">
<img src="images/table_of_contents.png" alt="image" />
<div class="title">
<h1>Table of Contents</h1>
</div>
<div class="content">
<p>Learn to access the map's sliders that change appearances in bases and water lines along with toggling items' appearance on the map.</p>
<div class="button" align="center"><a href="webmaps_toc.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box mar-Right">
<div class="panel">
<img src="images/identify.png" alt="image" />
<div class="title">
<h1>Identify</h1>
</div>
<div class="content">
<p>Master selection, identification, and access of specific information.</p>
<div class="button" align="center"><a href="identify.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box">
<div class="panel">
<img src="images/draw.png" alt="image" />
<div class="title">
<h1>Draw</h1>
</div>
<div class="content">
<p>Discover addition of graphics such as lines, circles, rectangles, and text.</p>
<div class="button" align="center"><a href="draw.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box mar-Right">
<div class="panel">
<img src="images/measure.png" alt="image" />
<div class="title">
<h1>Measure</h1>
</div>
<div class="content">
<p>Learn the controls to ascerain length, area, perimeter and more of any selected polygon, line, or circle.</p>
<div class="button" align="center"><a href="measure.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box">
<div class="panel">
<img src="images/add_file.png" alt="image" />
<div class="title">
<h1>Add File to Map</h1>
</div>
<div class="content">
<p>Become an expert at knowing which files to add to the map and browsing your computer for a file to be added to the map.</p>
<div class="button" align="center"><a href="add_file.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box mar-Right">
<div class="panel">
<img src="images/print.png" alt="image" />
<div class="title">
<h1>Print</h1>
</div>
<div class="content">
<p>Learn customization of a capture of the map, saving the page as a pdf, and printing it. </p>
<div class="button" align="center"><a href="print.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box">
<div class="panel">
<img src="images/bookmarks.png" alt="image" />
<div class="title">
<h1>Bookmarks</h1>
</div>
<div class="content">
<p>Figure out how to create, edit, and delete custom presets of specific areas of the map.</p>
<div class="button" align="center"><a href="bookmarks.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box mar-Right">
<div class="panel">
<img src="images/overview_basemaps.png" alt="image" />
<div class="title">
<h1>Overview & Basemaps</h1>
</div>
<div class="content">
<p>Discover the overview window and learn to toggle it, and customize your map to your satisfaction using basemaps.</p>
<div class="button" align="center"><a href="overview_basemaps.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box">
<div class="panel">
<img src="images/users_login.png" alt="image" />
<div class="title">
<h1>Users & Login</h1>
</div>
<div class="content">
<p>Create an account or log in, customize your account, and configure account user settings.</p>
<div class="button" align="center"><a href="users_login.html">Go</a></div> <p />
</div>
</div>
</div>
<div class="box mar-Right">
<div class="panel">
<img src="images/app_launcher.png" alt="image" />
<div class="title">
<h1>App Launcher</h1>
</div>
<div class="content">
<p>Utilize the potential of the program's applications such as Screen Capture and Spreadsheet.</p>
<div class="button" align="center"><a href="app_launcher.html">Go</a></div> <p />
</div>
</div>
</div>
<!--End index boxes-->
<!-- <div class="clearing"></div> ---Image6 clearing below boxes, commented out---
<div class="panel mar-top">
<img src="images/image6Insert.png" alt="image" />
<div class="content">
<p>Donec eros lectus, elementum quis commodo a, lobortis ut mauris. Duis leo risus, fermentum facilisis auctor tempus, elementum ut enim. Maecenas ornare tincidunt semper. Nulla facilisi. </p>
<p>In tristique tellus vel nisi sagittis id bibe ndum tellus varius auris conva</p>
<div class="button2"><a href="#">More Info</a></div>
</div>
</div>-->
</div> <!---page--->
</div><!---Rightcol--->
</div>
<div class="footer-wrap">
<div class="footer">
</div>
</div><!---footer--->
</body>
</html>
</code></pre>
<p>Thanks in advance.</p>
| <html><google-chrome> | 2016-06-30 16:19:14 | LQ_CLOSE |
38,130,046 | Need help writing first VBA code | New to VBA and am in over my head.
I have a table. I would like to write a code that loops through and if the active cell contains a 1, then, in a cell outside of the table, the column heading is returned and put into a comma separated list.
I am looking for that loop to continue all the way across the first row cell by cell, and comma separated list to build with each TRUE return.
Once the loop hits the end of the row I need it to drop down to the next row and continue the same process (but creating its own comma separated list for those that returned true in row 2).
Any help would be greatly appreciated.
I know I need to somehow loop and if statement but just can't figure it out right now.
Thanks | <excel><vba><loops><if-statement> | 2016-06-30 17:46:33 | LQ_EDIT |
38,130,494 | How to implement firebase cloud messaging in webapp? | <p>If anyone have any example app for implementation firebase cloud messaging in a webapp that would be highly helpful. I can't seem to figure out how to do this. </p>
| <web-applications><push-notification><firebase><firebase-cloud-messaging> | 2016-06-30 18:13:20 | LQ_CLOSE |
38,131,439 | How do I connect to an sql database server that IS NOT on localhost? | The database I'm trying to connect to is on an AWS server and I'm trying to write a C# script that will pull data from the database. The only tutorials I can find are using localhost. | <c#><sql-server><database><visual-studio><amazon-web-services> | 2016-06-30 19:09:47 | LQ_EDIT |
38,134,150 | Security with laravel | <p>I have been building a site with Laravel 5.2 and now i'm trying to make my forms more secure, i have used laravel's built in validation to only allow so many characters and required certain field.
Should i be using trim or other forms of validation to make my forms more secure i been looking at the below or does laravel have a lot more security built into it to help.</p>
<pre><code>$data = trim($id); //security
$data1 = stripslashes($id); //security
$data1 = htmlspecialchars($id);
</code></pre>
| <php><laravel><laravel-5.2> | 2016-06-30 22:18:19 | LQ_CLOSE |
38,135,214 | why is my textbox not populating? | I have removed all other code trying to find my error. The code below will echo the passed value/variable in the php portion of the code only in line 2 which verifies that the variable is being passed. The textbox in the html portion renmains blank and does not populate. Probably something simple that I am missing, but going crazy trying to find the error. Please tell me what I have done wrong?
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-html -->
<?php
echo $new_customer . $_POST[search];
?>
<!doctype html>
<html lang="en">
<body>
<input type="text" name="customer_name" value="<?php echo $new_customer; ?>" id="customer_name">
</body>
</html>
<!-- end snippet -->
| <php><html> | 2016-07-01 00:20:19 | LQ_EDIT |
38,135,280 | Unexpected end tag (HTML ERROR) | <p>I've just started working with html and javascript, and in my index.html file I'm getting an error for the closing head tag and opening body tag. The error says "Unexpected end/start tag (ignored)". As far as I can tell, everything in the html file is opened and closed correctly, and in the right order. Below is a picture of my code for reference.
<a href="http://i.stack.imgur.com/HuJhF.png" rel="nofollow">html code</a></p>
| <html> | 2016-07-01 00:30:07 | LQ_CLOSE |
38,135,873 | Return XML from Sql Server Stored Proc | I want to generate XML from SQL Query in the below format..
<Reports>
<Header>
<PrintedBy>XYZ </PrintedBy>
<PrintedDate>22/01/2015</PrintedDate>
<Image>C:/Img/a.png</Image>
<Title>Title</Title>
</Header>
<Report>
<Name>123</Name>
<UserName></UserName>
<Remarks></Remarks>
<IPAddress>0.0.0.0</IPAddress>
<DateCreated>2016-02-24T18:32:11.803</DateCreated>
<AppID>BOS</AppID>
<AppVersion>0.0.3.0</AppVersion>
<LastLoggedin>2016-06-23T16:04:07.167</LastLoggedin>
</Report>
<Report>
<Name>123</Name>
<UserName></UserName>
<Remarks></Remarks>
<IPAddress>0.0.0.0</IPAddress>
<DateCreated>2016-02-25T10:22:34.623</DateCreated>
<AppID>BOS</AppID>
<AppVersion>0.0.3.0</AppVersion>
<LastLoggedin>2016-06-23T16:04:07.167</LastLoggedin>
</Report>
</Reports>
Header row should be printed only once, should not repeat with each report row.
| <sql-server><xml><tsql><nested><for-xml-path> | 2016-07-01 01:59:09 | LQ_EDIT |
38,138,569 | jquery not waiting the confirm messge, it is running all functions | I have a multi select Gridview , If a user for example selected 3 rows in the grid : name 1, name2, name3. i should show the user a popup confirm message, are you sure ?.
the problem in jquery , it doesnt wait the confirm message, it calls all the functions. **what I want is the know the result of the message first then call the functions**
function clickon()
{
var $current = $("#click_on_confirm");
var gridId = $("#Grid_id");
var confirmedArr = new Array;
confirmedArr = gridId.jqGrid('getGridParam','selarrrow');
var n=0;
var i = 0;
var arrayLength = confirmedArr .length;
var user_id;
if($current.is(":checked"))
{
var confirmMsg = "Are you sure "+ confirmedArr [i]
console.log(user_id);
// my problem is here , its not waiting till i click the confirm message
_showConfirmMsg(confirmMsg, ""Are you sure ?", function(confirmChoice, theArgs)
{
user_id = confirmedArr[i];
i++;
}
confirm(confirmedArr);
}
function confirm(confirmedArr)
{
var gridId = $("#Grid_id");
var actionSrc = jQuery.contextPath+"..............";
_showProgressBar(true);
var param="arUser="+confirmedArr;
$.ajax({
url: actionSrc,
type:"post",
dataType:"json",
data: param,
success: function(data)
{
if(typeof data["_error"] == "undefined" || data["_error"] == null)
{
// something to do
}
_showProgressBar(false);
}
});
} | <jquery> | 2016-07-01 06:33:29 | LQ_EDIT |
38,139,407 | Android design like shown in images below? | <p>I want home page like <a href="http://i.stack.imgur.com/PUYfB.png" rel="nofollow">this</a> and after selecting the category <a href="http://i.stack.imgur.com/VYqj7.png" rel="nofollow">this</a> view should overlap the homepage with slide in from right animation & slide out from left on back pressed</p>
| <android> | 2016-07-01 07:22:36 | LQ_CLOSE |
38,139,873 | one of our colleagues executed rm -rf /* command to one of our development servers | HELP!!! one of our colleagues executed `rm -rf /*` command to one of our development servers via SSH and most of our development sites were there.
Is there any way to recover or rescue all those files? Please help. this is very very urgent. our head still doesn't know it happened. | <linux><rm><undelete> | 2016-07-01 07:48:07 | LQ_EDIT |
38,141,918 | Bootstrap mobile nav not toggling | <p>Website in question</p>
<p><a href="https://steve-morris.co.uk/" rel="nofollow">https://steve-morris.co.uk/</a></p>
<p>Menu works fine in normal view but when trying to view via a mobile device the nav bar toggle button does nothing with no errors reported either.</p>
<p>Any ideas?</p>
| <twitter-bootstrap><mobile><nav> | 2016-07-01 09:32:23 | LQ_CLOSE |
38,142,911 | Using element + element with after pseudo element | Trying to achieve a simple effect in a chat app, where if a user messages, after his username should always appear a `:` but if a bot messages, his message will have a class of .bot and i would like to override that `user:after` to have different after content
.user:after {
content: ": ";
}
.user:after + .bot {
content: "=> ";
}
Is this possible at all? Or should i pursue a different approach.
Codepen for reference: http://codepen.io/knuxus/pen/zBwWBr?editors=1100 | <html><css><pseudo-element> | 2016-07-01 10:19:38 | LQ_EDIT |
38,143,508 | random array without repeat failed | <p>how to generate unique array item using fisher yate shuffle method? I found below code but doesn't worked.</p>
<pre><code>function shuffle(array) {
var i = array.length,
j = 0,
temp;
while (i--) {
j = Math.floor(Math.random() * (i+1));
// swap randomly chosen element with current element
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
}
var ranNums = shuffle([1,2,3,4,5,6,7,8,9,10]);
console.log(ranNums)
</code></pre>
| <javascript><arrays> | 2016-07-01 10:49:04 | LQ_CLOSE |
38,144,772 | Find command and semi-path | <pre><code>/volume1/Folder/0000/AAA/one
/volume1/Folder/0001/AAA/two
/volume1/Folder/0001/BBB/three
/volume1/Folder/0002/CCC/four
...
</code></pre>
<p>I want to get a .txt file, with all not-empty folders directories. But I want this file to write without the <code>/volume1/Folder/</code>, ie, I want to print it like this :</p>
<pre><code>0000/AAA/one
0001/AAA/two
0001/BBB/three
0002/CCC/four
...
</code></pre>
<p>This is the code that I'm using, but this is writing the full path (and I know that by adding -printf '%f\n' it writes only the last folder, but I don't want that!)</p>
<pre><code> find /volume1/Folder/* -mtime -1 -type d -maxdepth 2 -not -empty > /volume1/Folder/NotEmptyFolders.txt
</code></pre>
<p>Can someone help me?</p>
| <bash> | 2016-07-01 11:52:43 | LQ_CLOSE |
38,144,985 | jQuery .css not working at all | the following code is not working correctly
$("p").css("background-color", "yellow");
alert( $("p").css("background-color"));
the alert is "undefined".
I tried on both google chrome and firefox. I have extracted this from the w3c website and in their example it works (I am even using the same jQuery version)
| <javascript><jquery><html><css> | 2016-07-01 12:04:33 | LQ_EDIT |
38,146,391 | Importing Date to R? | <p>I have a dataset including a date column in the format of " yyyy-mm-dd", however, when I import it to R, some random numbers come up. How can I solve this issue?</p>
<p>Many thanks. </p>
| <r><date> | 2016-07-01 13:13:35 | LQ_CLOSE |
38,147,012 | Build a site wordpress or ftp | <p>I want to build a website but I don't have a domain (I will get one soon) and a host so I'm confussed how can a website be built because I don't want it to make it wrong from the beginning. I can make it static (notepad++) and then publish it into my domain using ftp or create it using wordpress locally (make a server on my computer) and then publish on my domain. So if I want to update my site made in notepad++ can I use wordpress? And if I use wordpress do I need to use ftp anymore? My website will be like a blog with different articles so I will update it regularly. I know enough HTML and CSS for building my site and never published a website before so i don't know the correct steps.
I accept any advice thanks.</p>
| <html><wordpress><ftp> | 2016-07-01 13:42:14 | LQ_CLOSE |
38,149,268 | How to pass each id from JSP to javascript? | In our JSP application, we are creating a html buttons in for loop. Say, for example,
<%for(int i=0;i<5;i++){%>
<input type="button" class="btn-success btn-rounded" id ="?????" value="abcd" onclick="changeButton()">
Now i want pass each button's id to javascript method , but it doesnt works.
Currently, the first button's id is passed.How to pass each button's id to javascript ? | <javascript><jsp><servlets> | 2016-07-01 15:39:37 | LQ_EDIT |
38,149,647 | insert .css into html on omeka | Hi I am working on building a webpage using omeka. I am working in a simple page that automatically creates HTML code. It generates this code based on the theme you select. The site has the ability to edit the css through an extension of the site. However, with the theme that was desided for the site you cannot use the css editor to format the page. You have the ability to add html short codes. I would really like to reformat the text and the background for this page in particular without changing the settings for the rest of the site. A way to do that is by inserting css code into the html. The problem is I am not sure where to insert the code at.
Here is an example:
[click to see][1]
(sorry if images are poor quality)
Where would I insert the suggested css
When I do this it changes either the alignment or text color but it will not do both. What am I doing wrong and how can I fix this? I am fairly new to coding and most of my expierence is working with css not html.
[1]: http://i.stack.imgur.com/Eg4Yf.jpg | <html><css><omeka> | 2016-07-01 16:00:08 | LQ_EDIT |
38,151,651 | How can I build a PROPER constructor and destructor? | Question #1: How can I build a constructor set the value for (R,PoF,PoR)? I am trying to understand how constructor works......but I guess I don't quite get it......
Question #2: Can I build destructor in this way, instead of the way I used in my program.
Circle::~Circle()
{
std::cout << "The fence would cost " << SwimmingPool.PerimeterP(r) << std::endl;
std::cout << "The road would cost " << SwimmingPool.AreaP(r) << std::endl;
std::cout << "Present by FF" << std::endl;
}
I just want the cost to come out by itself, but I don't know how should I create destructor to do so.
Here is my full code:
#include "stdafx.h"
#include "iostream"
const double PI = 3.1415926;
class Circle
{
public:
Circle();
double AreaP(int r);
double PerimeterP(int r);
~Circle();
private:
int R;
int PoF;
int PoR;
};
double Circle::AreaP(int r)
{
return ((r + R)*(r + R) - r*r)*PI*PoR;
}
double Circle::PerimeterP(int r)
{
return (r + R) * 2 * PI*PoF;
}
Circle::Circle()
{
int R = 3;
int PoF = 35;
int PoR = 20;
}
Circle::~Circle()
{
std::cout << "Present by FF" << std::endl;
}
int main()
{
int r;
Circle SwimmingPool;
std::cout << "Please input the radius of the Swimming Pool." << std::endl;
std::cin >> r;
std::cout << "The fence would cost " << SwimmingPool.PerimeterP(r) << std::endl;
std::cout << "The road would cost " << SwimmingPool.AreaP(r) << std::endl;
return 0;
}
Thanks for viewing and answering questions. | <c++><constructor><destructor> | 2016-07-01 18:14:12 | LQ_EDIT |
38,152,082 | Code Blocks Error 1073741819 | I am new to programming. I typed this simple code and I keep getting this error message. Does anyone know the reason why the compiler stops working? I have checked the compiler settings and clicked auto detect. It still does not work though.
Any suggestion is appreciated. Btw I am new to programming so break it down if explaining something.
Thanks
[enter image description here][1]
[1]: http://i.stack.imgur.com/8KYUk.png | <c><string><scanf> | 2016-07-01 18:41:55 | LQ_EDIT |
38,153,471 | fasted way to read file in python | I made a python script to analyze logs. I have one observation to share, and two questions to ask.
When I use gzip.open to open each file and go through every line, it takes around 200 seconds just to going through all the lines and files.
with gzip.open(file) as fp:
for line in fp:
If using `zcat` and `grep` to do the work, it takes about 50 seconds.
temp = commands.getstatusoutput("zcat file* | grep pattern")
The performance difference is too huge to ignore. Is there a better way to reduce the gap?
I also noticed that the `commands` module is made obsolete by the `subprocess` module, which seems always create a temporary file. But it wouldn't be convenient, what if it is not possible to create a temporary file from where the python script is running? Any suggestion?
| <python><grep> | 2016-07-01 20:29:00 | LQ_EDIT |
38,157,163 | safari is not play video, how to play aal browser play video | safari browser is not play video, my code below youtuve video is not play, mp4 not play my site http://creativecartels.biz/demo/forget-reg/index.html
http://creativecartels.biz/demo/forget-reg/index.html
<div class="col-lg-5 col-md-6 col-sm-8 col-xs-12 pad-left">
<div class="videoWrapper">
<div class="bggg" id="uni_bggg"><img src="images/video-mage.png" alt=""></div>
<div class="video-paly-button" id="uni_video_paly_button">
<button onclick="document.getElementById('video-bg').play();document.getElementById('uni_video_paly_button').remove();document.getElementById('uni_bggg').remove();"><i class="fa fa-play"></i></button>
</div>
<video controls id="video-bg">
<source src="images/Forget reg Tv Ad long.mp4" type="video/mp4"></source>
Your broswer does not support the video tag </video>
</div>
</div>
please Send your code and css .....` | <css><html><video><web> | 2016-07-02 06:20:51 | LQ_EDIT |
38,163,783 | Can't get My Data Inserted in Database | i am new here. I am working on a school Project and can't get registration page done right. It just don't insert the data in table.[Here is a screenshot for database and table][1]
<?php
$con=mysqli_connect('localhost','root','123456789','eedb');
if ($con)
{
if (isset($_POST['sub']))
{
$n= $_POST['name'];
$un=$_POST['username'];
$p=$_POST['password'];
$cp=$_POST['confirm-pass'];
$e=$_POST['email'];
$pn=$_POST['phone-no'];
$g=$_POST['gender'];
$s=$_POST['state'];
mysqli_query($con,"SELECT * FORM `register` ");
$insert= mysqli_query($con,"INSERT INTO `register`(`name`, `username`, `password`, `confirm-pass`, `email`, `phone-no`, `gender`, `state`) VALUES ('$n','$un','$p','$cp','$e','$pn','$g','$s'))");
if ($insert)
{
echo "<center>Data Successfully Submitted</center>";
}
else
{
echo "<center>Data Not Submitted</center>";
}
}
}
else
{
echo "connection error";
}
[1]: http://i.stack.imgur.com/jJhZv.png | <php><mysql><mysqli> | 2016-07-02 19:34:31 | LQ_EDIT |
38,164,361 | Html Post Chopping Input | Hey all i am writing a website where i need a sql query passed around to bring the user back to a page i had it working fine until i added to it
its input is being chopped where here ....eventStatus =
(i know it needs to be post, running as get to debug)
(row internal id is gotten from a sql query)
(the sql normally is also a variable passed in)
Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.6
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id:241ae00989d1995ffcbbf63d579943635faf9972 $
PHP extension: mysqli Documentation
PHP version: 7.0.6
Server Windows 7 64 (Its a school project)
am i doing something wrong with the hidden input?
<form action='' method='get'>
<textarea name ='comment' rows='4' cols = '50' value =''></textarea>
<button type='createcomment' name='createcomment' value='createcomment'>
Comment
<input type = 'hidden' name = 'internal_id' value ={$row["internal_id"]}</>
<input type = 'hidden' name = 'sql' value ='"SELECT * FROM `create_event` WHERE `eventStatus` = 'Happening' and 'approved' = 'Approved'"'</>
</button>
</form> | <php><html><post><get> | 2016-07-02 20:49:18 | LQ_EDIT |
38,164,622 | Read parameters from text file in CGI | I have a text file in below `url` :
www.website1.com/text1.txt
I use basic authentication to access this `text1.txt`
text1.txt contain :
username1
password1
How can i read this parameters from URL `www.website1.com/text1.txt` in my `.cgi` script?
I use this code :
$f = open('http://user:pass@www.website1.com/text1.txt', "r")
$u1 = f.readline()
$p1 = f.readline()
$MAIN_AUTH = '$u1:$p1' ;
Not work
| <perl><cgi> | 2016-07-02 21:27:11 | LQ_EDIT |
38,164,698 | loop for multiple database and user creation in sql, need to assign the user to the database. anyone please help me with that code |
> ***after creating login using windows authentication ,
need to assign user to the database
and provide permissions to that user.
Could anyone please help me with that.
Thanks in advance.***
-- BULK INSERT tempNames.dbo.tempNames
-- FROM 'C:\Users\Videos\file.txt'
-- WITH
-- (
-- ROWTERMINATOR ='\n'--
-- )
USE [master]
GO
DECLARE @NameCursor as CURSOR;
DECLARE @NAME AS NVARCHAR(50);
DECLARE @NAME2 AS NVARCHAR(50);
DECLARE @NIUNT AS NVARCHAR(50);
SET @NIUNT ='niunt';
SET @NameCursor = CURSOR FOR
SELECT id
FROM test.dbo.Sheet1$
OPEN @NameCursor;
FETCH NEXT FROM @NameCursor INTO @Name;
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @Name
## Creating database using @name ##
set @name2 ='create database '+@Name + ';'
exec (@name2)
BEGIN
SET NOCOUNT ON
DECLARE @SQL NVARCHAR(4000);
## Creating login using @name ##
SET @SQL = 'CREATE LOGIN [' +@NIUNT +'\'+ @NAME + '] from windows';
exec(@SQL);
-END;
FETCH NEXT FROM @NameCursor INTO @Name;
END
GO
| <sql><sql-server> | 2016-07-02 21:38:26 | LQ_EDIT |
38,164,831 | Dynamic allocation and Arrays to find average | Alright did i implement `float overallavg(float* matrix, int rows, int cols)`correctly? I think i didn't. I'm trying to Return the average value of the elements of the array pointed to by matrix. Should I call the other two functions into the overall one and then divide by the total number elements in the array?
float *readMatrix(int rows, int cols)
{
int i=0;
int j=0;
int elements=0;
float *m=malloc(rows*cols*sizeof(float));
if (m==NULL)
{
printf("error\n");
return NULL;
}
printf("Enter values for the matrix: ");
for (i=0;i<rows;i++)
{
for (j=0;j<cols;j++)
{
elements = i*cols+j;
scanf("%f", &m[elements]);
}
}
return m;
}
float *rowavg(float *matrix, int rows, int cols)
{
if (matrix==NULL)
{
return NULL;
}
int i=0;
int j=0;
float mean=0;
float *Average_array=malloc(rows*sizeof(float));
if (Average_array==NULL)
{
return NULL;
}
for (i=0;i<rows;i++)
{
for (j=0;j<cols;j++)
{
mean+=matrix[i*cols+j];
}
Average_array[i]=(float)(mean/cols);
}
return Average_array;
}
float *colavg(float *matrix, int rows, int cols)
{
if (matrix==NULL)
{
return NULL;
}
int i=0;
int j=0;
float mean=0;
float *Average_array=malloc(cols*sizeof(float));
if (Average_array==NULL)
{
return NULL;
}
for (i=0;i<cols;i++)
{
for (j=0;j<rows;j++)
{
mean+=matrix[j*cols+i];
}
Average_array[i]=(float)(mean/rows);
}
return Average_array;
}
float overallavg(float* matrix, int rows, int cols)
{
if (matrix==NULL)
{
return NULL;
}
int i=0;
int j=0;
float mean_1=0;
float mean_2=0;
float avg=0;
float elements=0;
float sum=0;
elements=rows*cols;
for (i=0;i<rows;i++)
{
for (j=0;j<cols;j++)
{
mean_1+=matrix[i*rows+j];
}
}
for (i=0;i<cols;i++)
{
for (j=0;j<rows;j++)
{
mean_2+=matrix[j*cols+i];
}
}
sum=mean_1+mean_2;
avg=sum/elements-1;
} | <c><arrays><dynamic-memory-allocation> | 2016-07-02 22:01:11 | LQ_EDIT |
38,166,002 | Simple PHP for most programers but im new to it | foreach( $users as $u ) {
echo '<tr><td>' . $u->nome . '</td><td>' . $u->username . '</td><td>' . $u->email . '</td><td>' . ( $u->acesso == 1 ? '<b>Administrador</b>' : 'Aluno' ) . '</td><td><a href="/website/admineditar.php?id=' . $u->id . '">Alterar</a> <a href="/website/adminremover.php?id=' . $u->id . '" onclick="return confirm(\'Deseja mesmo remover este utilizador?\');">Remover</a></td></tr>';
}
so my problem is on this part
( $u->acesso == 1 ? '<b>Administrador</b>' : 'Aluno' )
i would like it to be doing something like this
( $u->acesso == 1 ? '<b>Administrador</b>' : $u->acesso == 0 ? 'Aluno' : 'Enc. educação' )
but dont know how to do it :S
tryed to use if and elseif but gives me an error :S | <php><html><sql> | 2016-07-03 01:44:55 | LQ_EDIT |
38,167,225 | How we can dynamically show names on labels by entering into the text field on the click of the button using Javascript? | Can anyone give me the code for this ?
Firstly i want to enter names using input field and then show those names dynamically on the click of button. | <javascript><jquery> | 2016-07-03 06:10:50 | LQ_EDIT |
38,167,810 | C++ Copy Constructor error: Assignment of member 'Fraction::numerator' in read-only object | I am having a problem with this error.
My Header file:
#include <iostream>
using namespace std;
class Fraction
{
private:
double numerator;
double denominator;
public:
Fraction();
~Fraction();
Fraction(const Fraction& c);
Fraction(double,double);
//setter
void setNumerator(double newnumerator);
void setDenominator(double newdenominator);
//getter
double getNumerator();
double getDenominator();
//friend overlaoding operators
friend ostream& operator<<(ostream& os, Fraction f);
};
My CPP file:
#include <iostream>
#include "Fraction.h"
using namespace std;
Fraction::Fraction()
{
cout<<"Empty constructor called"<<endl;
}
Fraction::~Fraction()
{
cout<<"Deconstructor called"<<endl;
}
Fraction::Fraction(const Fraction& c)
{
c.numerator = numerator;
c.denominator = denominator;
}
Fraction::Fraction(double newnumerator, double newdenominator)
{
numerator = newnumerator;
denominator = newdenominator;
}
void Fraction::setNumerator(double newnumerator)
{
numerator = newnumerator;
}
void Fraction::setDenominator(double newdenominator)
{
denominator = newdenominator;
}
double Fraction::getNumerator()
{
return numerator;
}
double Fraction::getDenominator()
{
return denominator;
}
ostream& operator<<(ostream& os, Fraction f)
{
os<<f.numerator<<"/"<<f.denominator<<endl;
return os;
}
My testcpp.file:
#include <iostream>
#include "Fraction.h"
using namespace std;
int main()
{
Fraction f1;
cout<<f1;
return 0;
}
When I run this code I get this error message:
Fraction.cpp: In copy constructor ‘Fraction::Fraction(const Fraction&)’:
Fraction.cpp:20:17: error: assignment of member ‘Fraction::numerator’ in read-only object
c.numerator = numerator;
^
Fraction.cpp:21:19: error: assignment of member ‘Fraction::denominator’ in read-only object
c.denominator = denominator;
^
PS: Once I left out the copy copy constructor and tried if the rest really works, but I get the same error message for the overloading operator(cin>>).
Thank you very much. | <c++><copy-constructor> | 2016-07-03 07:47:29 | LQ_EDIT |
38,169,348 | install latest java version on linux | I am trying to install latest version of java in my linux machine,but I am unable to do so.
steps I followed
1. downloded latest java tar ball
2. copied into /usr/lib/jvm and untar it.
3. adding in to environment variable (export JAVA_HOME=/usr/lib/javm/jdk1.7.0_80 , export PATH=$PATH:$JAVA_HOME/bin)
4. when I try to change the default java version, the installed one is not coming ( $ update-alternatives –-config java )
Could anyone help me to resolve this . I have followed many links, but nothing helps
| <java><linux> | 2016-07-03 11:10:20 | LQ_EDIT |
38,172,060 | how we Create label in the back ground of dynamic string in swift | [Picture1] [Picture2][1]
it is possible to design put label in the back of the dynamic string in swift 2 as pic mentioned in above
[1]: http://i.stack.imgur.com/eyrYF.png | <swift><uikit> | 2016-07-03 16:37:26 | LQ_EDIT |
38,173,734 | User Control Won't Return Value | I am writing a user control. I want it to return a customer number when the user double clicks on the customer. I can't seem to get it to work. The user control is displayed and, on the double click, the data shows in the messagebox but I can't seem to get it to update the value on the main form. Anytime I try to add a return value into FindCustomerControl_ItemHasBeenSelected, I get an error. So far, this is what I have:
In my main window:
public partial class TestForm : Form
{
public TestForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// one close button on the form
Close();
}
private void ShowSelectFromListWidget()
{
// show the user control
var uc = new FindCustomerControl();
uc.ItemHasBeenSelected += uc_ItemHasBeenSelected;
MakeUserControlPrimaryWindow(uc);
}
void uc_ItemHasBeenSelected(object sender,
FindCustomerControl.SelectedItemEventArgs e)
{
// once it has been selected, change a label on the screen to show the customer number
var value = e.SelectedChoice;
lblCustomer.Text = value;
}
}
In my user control:
public partial class FindCustomerControl : UserControl
{
public class SelectedItemEventArgs : EventArgs
{
public string SelectedChoice { get; set; }
}
public event EventHandler<SelectedItemEventArgs> ItemHasBeenSelected;
public FindCustomerControl()
{
InitializeComponent();
}
DataTable dt = new DataTable();
public void btnFind_Click(object sender, EventArgs e)
{
var dt = GetData();
dataGridView1.DataSource = dt;
}
//Query database
public DataTable GetData()
{
UtilitiesClass ru = new UtilitiesClass();
string connectionString = ru.getConnectionString();
DataTable dt = new DataTable();
SqlConnection myConnection = new SqlConnection(connectionString);
try
{
myConnection.Open();
SqlCommand cmd = new SqlCommand("FindCustomer", myConnection);
cmd.Parameters.AddWithValue("@customer", txtCustomer.Text.Trim());
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter ta = new SqlDataAdapter(cmd);
ta.Fill(dt);
myConnection.Close();
}
catch (Exception x)
{
MessageBox.Show(x.ToString());
}
return (dt);
}
private void dataGridView1_SelectionChanged(object sender, EventArgs e)
{
// this updates the search window text box
int Row = dataGridView1.CurrentRow.Index;
txtCustomer.Text = dataGridView1[0, Row].Value.ToString();
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
var handler = ItemHasBeenSelected;
string choice = dataGridView1[0, e.RowIndex].Value.ToString();
if (handler != null) handler(this, new SelectedItemEventArgs { SelectedChoice = choice });
}
private void FindCustomerControl_Load(object sender, EventArgs e)
{
ItemHasBeenSelected += FindCustomerControl_ItemHasBeenSelected;
}
private void FindCustomerControl_ItemHasBeenSelected(object sender, SelectedItemEventArgs e)
{
// this shows it but it doesn't return it
MessageBox.Show("Chosen: " + e.SelectedChoice);
}
}
| <c#><events><delegates> | 2016-07-03 19:45:02 | LQ_EDIT |
38,174,331 | C#, Windows Forms, DataGridView: Why am I Getting Null DataTable? | OK guys. It's been a LONG time since I worked with DataGridViews, so please help me understand what I am doing wrong. I created a very simple test to boil this issue down to common elements. I have an MS Access DB with 1 and only 1 table in it. 2 columns (ID, Name) and added 4 rows of data to the table. I added a datasource to my Winforms project and added a test form with 1 and only 1 control, a datagridview, and bound that grid to the table in the datasource. My Form_Load looks like this:
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'testDBDataSet.TestTable' table. You can move, or remove it, as needed.
this.testTableTableAdapter.Fill(this.testDBDataSet.TestTable);
// TODO: This line of code loads data into the 'testDBDataSet.TestTable' table. You can move, or remove it, as needed.
this.testTableTableAdapter.Fill(this.testDBDataSet.TestTable);
BindingSource bs = (BindingSource)dgvTestData.DataSource;
DataTable dt = (dgvTestData.DataSource) as DataTable;
}
When I step past the last line of code, dt is null. What am I missing? I know it is something simple and probably obvious, but I don't see it. If I just run the code back to the form, the datagrid has data in it. What am I doing wrong?
Happy 4th, btw! | <c#><winforms><datagridview> | 2016-07-03 21:05:28 | LQ_EDIT |
38,176,864 | DOS script to replace line feeds | Looking to remove the incorrect carriage returns "CRLF" in a file but retain the correct ones. I think I have some logic that will work but can't quite nail the script.
Where ^p represents a “carriage return”
Replace Yes^p with yestemp
Replace No^p with notemp
Replace Inactive^p with inactivetemp
Replace ^p with “” (ie null)
Replace Yestemp with Yes^p
Replace notempwith No^p
Replace inactivetemp with Inactive^p
| <batch-file> | 2016-07-04 04:14:19 | LQ_EDIT |
38,177,216 | Build Release Proguard failed task | I try generate signed APK but not work......................................................................................................................
My proguard-rules.pro
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
# ================ Google Play Services ================
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
# ======================================================
# ============ Corrige erros de compilação =============
-dontwarn android.support.**
-keeppackagenames org.jsoup.nodes
-dontwarn okio.**
# ======================================================
# ==== crashlytics ====
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
# =====================
My dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-ads:9.2.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
compile 'com.android.support:design:23.4.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
compile 'org.jsoup:jsoup:1.9.2'
compile 'com.github.hotchemi:android-rate:1.0.1'
compile 'com.github.curioustechizen.android-ago:library:1.3.2'
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
compile 'com.amitshekhar.android:android-networking:0.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
}
Error build:
Error:Execution failed for task ':mobile:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.
:mobile:transformClassesAndResourcesWithProguardForRelease FAILED
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. | <android><proguard><obfuscation><android-proguard> | 2016-07-04 04:59:04 | LQ_EDIT |
38,178,072 | Method within a method java | <p>I am reading some java code and I came across the following unfamiliar syntax:</p>
<pre><code>controler.addOverridingModule( new AbstractModule() {
@Override
public void install() {
this.addPlanStrategyBinding("RandomTripToCarsharingStrategy").to( RandomTripToCarsharingStrategy.class ) ;
this.addPlanStrategyBinding("CarsharingSubtourModeChoiceStrategy").to( CarsharingSubtourModeChoiceStrategy.class ) ;
}
});
</code></pre>
<p>I am confused because the developer created a new method ("install") within the call to addOverridingModule. Could someone please tell me what is going on here?</p>
<p>Thanks!</p>
| <java><overriding> | 2016-07-04 06:25:21 | LQ_CLOSE |
38,179,212 | Custom describe or aggregate without groupby | <p>I want to use <code>groupby.agg</code> where my group is the entire dataframe. Put another way, I want to use the <code>agg</code> functionality, without the groupby. I've looked for an example of this, but can not find it.</p>
<p>Here's what I've done:</p>
<pre><code>import pandas as pd
import numpy as np
np.random.seed([3,1415])
df = pd.DataFrame(np.random.rand(6, 4), columns=list('ABCD'))
df
</code></pre>
<p><a href="https://i.stack.imgur.com/GLb3X.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GLb3X.png" alt="df"></a></p>
<pre><code>def describe(df):
funcs = dict(Kurt=lambda x: x.kurt(),
Skew='skew',
Mean='mean',
Std='std')
one_group = [True for _ in df.index]
funcs_for_all = {k: funcs for k in df.columns}
return df.groupby(one_group).agg(funcs_for_all).iloc[0].unstack().T
describe(df)
</code></pre>
<p><a href="https://i.stack.imgur.com/jC65x.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jC65x.png" alt="enter image description here"></a></p>
<h3>Question</h3>
<p>How was I supposed to have done this?</p>
| <python><pandas> | 2016-07-04 07:37:39 | HQ |
38,179,396 | Is there any way to debug chrome in any IOS device | <p>Is there any way to debug chrome browser on IOS device?</p>
<p>If there is no way, how i can approach to bug in chrome on ios?</p>
<p>Searched the web and didn't find sufficient answer.</p>
| <ios><google-chrome><google-chrome-devtools> | 2016-07-04 07:48:19 | HQ |
38,179,683 | How to update the mapping in Elasticsearch to change the field datatype and change the type of analyzers in string | <p>While trying to update the mapping I get the following error:</p>
<pre><code>{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [timestamp] of different type, current_type [string], merged_type [date]"}],"type":"illegal_argument_exception","reason":"
mapper [timestamp] of different type, current_type [string], merged_type [date]"},"status":400}
</code></pre>
<p>I m trying to run the following command on windows</p>
<pre><code> curl -XPUT localhost:9200/logstash-*/_mapping/log?update_all_types -d "{
"properties":
{
"timestamp":
{
"type": "date",
"format": "MM-dd-yyyy HH:mm:ss",
"fielddata":{"loading" : "lazy"} }
}
}";
</code></pre>
<p>How I can change the datatype of date field from string to date type with a particular format.</p>
<p>I tried to change the mapping of a string datatype to change it to <code>eager</code> loading and <code>not_analyzed</code> from analyzed, but it gives the following error:</p>
<pre><code>{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [AppName] conflicts with existing mapping in other types:\n[mapper [AppName] has different [index] values, mapper [App
different [doc_values] values, cannot change from disabled to enabled, mapper [AppName] has different [analyzer]]"}],"type":"illegal_argument_exception","reason":"Mapper for [AppName] conflict with
existing mapping in other types:\n[mapper [AppName] has different [index] values, mapper [AppName] has different [doc_values] values, cannot change from disabled to enabled, mapper [AppName]
rent [analyzer]]"},"status":400}
</code></pre>
<p>Here is my query for the same:</p>
<pre><code> curl -XPUT localhost:9200/logstash-*/_mapping/log?update_all_types -d "{
"properties":
{"AppName":
{
"type": "string",
"index" : "not_analyzed",
"fielddata":{"loading" : "eager"}
}
}
}"
</code></pre>
<p>However, if I change it from <code>not_analyzed</code> to <code>analyzed</code> it gives a <code>acknowledged=true</code> message. How can I change the analyzer. </p>
| <elasticsearch><mapping> | 2016-07-04 08:08:07 | HQ |
38,179,969 | how to fetch data using json and php | How to fetch json result using mysql connection
$conn = new mysqli("localhost", 'root', "", "laravel");
$query = mysqli_query($conn,"select * from customers");
while($result2=mysqli_fetch_assoc($query)) {
echo "Name: ".$result2['customerName'];
echo "<br/>";
}
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JSON</title>
</head>
<body>
<div id="demo"></div>
<script>
var xmlhttp = new XMLHttpRequest();
var url = "connection.php";
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
myFunction(xmlhttp.responseText);
}
}
xmlhttp.open("GET", url, true);
xmlhttp.send();
function myFunction(response) {
var arr = JSON.parse(response);
var out = $result2;
document.getElementById("demo").innerHTML = out;
}
</script>
</body>
</html>
how to fetch the result using json and php and i want to know ajax for json will work or not | <javascript><php><json><ajax> | 2016-07-04 08:24:29 | LQ_EDIT |
38,180,080 | When to use promise.all()? | <p>This is more of a conceptual question. I understand the Promise design pattern, but couldn't find a reliable source to answer my question about <code>promise.all()</code>:</p>
<h3>What is(are) the correct scenario(s) to use <code>promise.all()</code></h3>
<p>OR</p>
<h3>Are there any best practices to use <code>promise.all()</code>? Should it be ideally used only if all of the promise objects are of the same or similar types?</h3>
<p>The only one I could think of is:</p>
<ul>
<li>Use <code>promise.all()</code> if you want to resolve the promise <strong>only</strong> if <strong>all</strong> of the promise objects resolve and reject if even one rejects.</li>
</ul>
| <javascript><design-patterns><promise> | 2016-07-04 08:30:56 | HQ |
38,180,665 | Using AWS EFS with Docker | <p>I am using the new Elastic File System provided by amazon, on my single container EB deploy. I can't figure out why the mounted EFS cannot be mapped into the container. </p>
<p>The EFS mount is successfully performed on the host at /efs-mount-point. </p>
<p>Provided to the Dockerrun.aws.json is </p>
<pre><code>{
"AWSEBDockerrunVersion": "1"
"Volumes": [
{
"HostDirectory": "/efs-mount-point",
"ContainerDirectory": "/efs-mount-point"
}
]
}
</code></pre>
<p>The volume is then created in the container once it starts running. However it has mapped the hosts directory /efs-mount-point, not the actual EFS mount point. I can't figure out how to get Docker to map in the EFS volume mounted at /efs-mount-point instead of the host's directory. </p>
<p>Do NFS volumes play nice with Docker?</p>
| <amazon-web-services><docker><nfs> | 2016-07-04 09:01:44 | HQ |
38,181,004 | Can I build UWP with .NET Core? | <p>As I know that the .net-core can run UWP, can we build or write UWP with Core?
I've read the <a href="https://msdn.microsoft.com/en-us/magazine/mt694084.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/magazine/mt694084.aspx</a></p>
| <.net><.net-core> | 2016-07-04 09:17:56 | HQ |
38,181,744 | R Shiny input slider range values | <p>I have a slider input type of 'range' in my Shiny app and I would like to get the minimum and maximum values selected by the user in my server.R</p>
<p>in my ui.R I have </p>
<pre><code>sliderInput("range", "Age:",
min = 0, max = 100, value = c(0,100))
</code></pre>
<p>and I would like to get the selected values not min and max that I have defined</p>
| <r><input><slider><shiny> | 2016-07-04 09:54:43 | HQ |
38,181,954 | How to remove specific element from Observable<Array<any>> | <p>There is an Observable of the array of places:</p>
<pre><code>places: Observable<Array<any>>;
</code></pre>
<p>In template it used with the async pipe:</p>
<pre><code><tr *ngFor="let place of places | async">
...
</tr>
</code></pre>
<p>After some user actions I need to remove the place with specific id from this array. I have something like this in my code, but it doesn't work:</p>
<pre><code>deletePlace(placeId: number): void {
this.apiService.deletePlace(placeId)
.subscribe(
(res: any) => {
this.places
.flatMap((places) => places)
.filter((place) => place.id != placeId);
},
(err: any) => console.log(err)
);
}
</code></pre>
<p>Can you help me with this?</p>
| <javascript><typescript><angular><rxjs> | 2016-07-04 10:04:45 | HQ |
38,182,461 | Adding Text to Text if Condition is Cet | How can I in jQuery or plan Javascript add text if condition is met.
For example:
<input type="checkbox" id="foo">
<label for="foo">Foo Text</label>
<input type="checkbox" id="bar">
<label for="bar">Bar Text</label>
<p class="success" style="display: none;">Thank you for </p>
<button type="submit" id="submit-form" class="btn btn-success pull-left">SUBSCRIBE</button>
Not I need a logic that will place a "Bar Text" or "Foot Text" depending which checkbox is checked, after the submit is clicked.
I know I have to use `.is(:checked)` but I do not know how to place a text dynamically after the static "Thank you " text.
Also, I would like a jQuery and Javascript solution, if possible, for learning purposes only.
Thanks.
| <javascript><jquery><html><css><checkbox> | 2016-07-04 10:28:11 | LQ_EDIT |
38,182,501 | How to get current datetime with format Y-m-d H:M:S using node-datetime library of nodejs? | <p>I'm using <a href="https://www.npmjs.com/package/node-datetime/" rel="noreferrer">node-datetime</a> library. I want to get current datetime with format such as Year-month-day hour-minute-second </p>
<p>ex : <em>2016-07-04 17:19:11</em></p>
<pre><code>var dateTime = require('node-datetime');
var dt = dateTime.create();
dt.format('m/d/Y H:M:S');
console.log(new Date(dt.now()));
</code></pre>
<p>But my result such as:</p>
<blockquote>
<p>Mon Jul 04 2016 17:19:11 GMT+0700 (SE Asia Standard Time)</p>
</blockquote>
| <node.js><datetime> | 2016-07-04 10:29:59 | HQ |
38,183,021 | How to automatically populate CreatedDate and ModifiedDate? | <p>I am learning ASP.NET Core MVC and my model is</p>
<pre><code>namespace Joukyuu.Models
{
public class Passage
{
public int PassageId { get; set; }
public string Contents { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime ModifiedDate { get; set; }
}
}
</code></pre>
<p>The <code>Passage</code> table is used to save passages I wrote.</p>
<h1>Scenario</h1>
<ul>
<li><p><code>Create</code> view just has one field <code>Contents</code> to input a passage. <code>CreatedDate</code> and <code>ModifiedDate</code> must be automatically set equal by the server (using UTC format).</p></li>
<li><p><code>Edit</code> view just has one field <code>Contents</code> to edit a passage. <code>ModifiedDate</code> must be automatically set by the server.</p></li>
</ul>
<h1>Question</h1>
<p>What attributes I have to attach to the <code>CreatedDate</code> and <code>ModifiedDate</code> properties to make them automatically populated by the server based on the above scenario?</p>
| <c#><entity-framework><asp.net-core-mvc> | 2016-07-04 10:57:09 | HQ |
38,183,106 | Java 8 - add property of object to list | <p>I have an empty list of integers:</p>
<pre><code>final List<Integer> reservedMarkers = new ArrayList<>();
</code></pre>
<p>and I will fill this list with the marker property of a list of objects, such like this:</p>
<pre><code>scheduleIntervalContainers.stream().forEach(s -> s.getMarker(), reservedMarkers.add(s));
</code></pre>
<p>My final target would be to get the highest marker number but actually I dont know a better way as getting all marker numbers, than sort it and than get the highest one.</p>
<p>this does not work for sure, is there a possibility to do this in this way?</p>
| <list><java-8> | 2016-07-04 11:01:12 | LQ_CLOSE |
38,183,350 | how to understand initialization of 3d arrays? | <p>Been googling but can´t understand how this array is a 1,8,3 array? How can you see that X is 1, Y is 8, and Z is 3 from this array?</p>
<pre><code> double[,,] points =
{
{ {-1, 0, 3}, {-1, -1, -1}, {4, 1, 1 },
{2, 0.5, 9}, {3.5, 2, -1}, {3, 1.5, 3},
{-1.5, 4, 2}, { 5.5, 4, -0.5}}
};
</code></pre>
| <c#><multidimensional-array> | 2016-07-04 11:14:19 | LQ_CLOSE |
38,183,649 | .net core 1.0 visual studio referencing external dll | <p>with the release of the .net core i have been trying to build a simple project, however whenever i try and add a dll reference in my project i get the following message </p>
<p>"<em>.Net Core Projects only support Referencing .Net Framework assemblies in this release To Reference other assemblies they need to be included in nuget package and reference that package</em>"</p>
<p>i was getting this message in RC2 but not in RC1, is anyone else having this issue and does anyone know how to resolve it? i have not been able to find anything relating to this other than a git issue ticket <a href="https://github.com/aspnet/Home/issues/1612">https://github.com/aspnet/Home/issues/1612</a></p>
| <c#><asp.net><.net> | 2016-07-04 11:29:16 | HQ |
38,183,708 | Hide element for mobile only - Semantic UI | <p>I have problem with hiding image for mobile devices. I'm using Semantic UI framework. In documentation I found some classes: </p>
<ol>
<li>mobile only - will only display below 768px</li>
<li>tablet only - will only display between 768px - 991px</li>
<li>computer only - will always display 992px and above</li>
</ol>
<p>Just for example, I'm using "computer only" classes to hide image on tablets and mobile, but the result confused me. </p>
<pre><code><div class="ui grid stackable">
<div class="row middle aligned">
<div class="nine wide column">
<h1 class="ui header blue">Default Header.</h1>
</div>
<div class="seven wide computer only column">
<img class="ui image" src="http://icons.veryicon.com/png/System/iNiZe/niZe%20%20%20IMG.png" alt="" title="">
</div>
</div>
</div>
</code></pre>
<p><a href="http://jsfiddle.net/3xkrx/318/" rel="noreferrer">http://jsfiddle.net/3xkrx/318/</a></p>
| <css><semantic-ui> | 2016-07-04 11:32:25 | HQ |
38,184,170 | jmeter aggregate report malfunctioning | Did anybody encounter an incorrect report? I set up a web test plan following the tutorial http://jmeter.apache.org/usermanual/build-web-test-plan.html, except that I added a CSV Data Set Config to read requst parameters from file. The test process finished without warning, but the data in the aggerate report is weird.
It gives something like this:
[![jmeter result][1]][1]
However according to the document http://jmeter.apache.org/usermanual/component_reference.html#Aggregate_Report,
Throughput = (number of requests) / (total time in secs)
= 1000 * (number of requests) / (total time in millionsec)
Average = (total time in millionsec) / (number of requests)
which means ``` Average * Throughput``` should almost be ```1000 ```.
What's wrong with my report?
ps: the formular above come from http://jmeter.apache.org/usermanual/glossary.html#Throughput
[1]: http://i.stack.imgur.com/GvVyu.png | <testing><jmeter> | 2016-07-04 11:56:33 | LQ_EDIT |
38,184,232 | Find gradle path on Ubuntu | <p>I have gradle installed on my Ubuntu 15.10 System.I want to find the location where it is.<br>
I am following this (<a href="https://docs.gradle.org/current/userguide/tutorial_java_projects.html" rel="noreferrer">https://docs.gradle.org/current/userguide/tutorial_java_projects.html</a>)
article.Here it is given that sample program can be found at <code>samples/java/quickstart</code>.<br>
I want to open this sample program and for this I want to find location of gradle on my system.</p>
| <java><ubuntu><gradle> | 2016-07-04 11:59:58 | HQ |
38,184,457 | What should be approach to understand a new project | <p>If one joins a new project, how should that person approach it if
there is no documentation of the code and program is quite big to understand. Team members are also not that much informative.
Should the person debug the code line by line?But it can be highly time consuming and exhaustive.</p>
| <java> | 2016-07-04 12:10:41 | LQ_CLOSE |
38,184,686 | Get the current date and time in PHP with '2016-07-04 00:00:00.000' format | <p>I am using mssql db with php. Which PHP function can return the current datetime. (i.e.) I want the current date and time to be saved in the following format say for example,</p>
<pre><code>2016-07-04 11:10:05.000
</code></pre>
<p>Thanks!</p>
| <php><datetime> | 2016-07-04 12:22:55 | LQ_CLOSE |
38,184,734 | React Native for small size apk with low internet bandwidth | <p>I am planning to develop an app for emerging market with low internet bandwidth. The app heavily requires an internet connection to function. <br />
I need this app to have a small apk size (not more than <strong>10mb</strong>) and work on <strong>3G</strong> network. <br />
Based on my research if I remove <strong>x86</strong> JS binary files from React Native the apk size could be as small as 4mb. I suppose the 4mb does not include the JS files and images so client needs to download that first time when he/she opens the app, is that correct?<br />
Would it in general be a good idea for me to use React Native if I want an app with less than 10mb apk size that works on 3G and what are the best practices to make it efficient?</p>
| <performance><react-native><network-efficiency> | 2016-07-04 12:25:42 | HQ |
38,184,843 | Selecting parent item using css | <p>Is there a way that I can select parent item using css? I mean my structure is this</p>
<pre><code><label>
<input />
<label>
</code></pre>
<p>In my css I am trying to do something like this,</p>
<pre><code>input['_type_']:checked _parent_ label:after{
some css
}
</code></pre>
<p>I cannot use, attribute <em>for</em> in label.</p>
| <html><css> | 2016-07-04 12:31:46 | LQ_CLOSE |
38,184,920 | RNTN implementation in java | <p>I want to implement a Recursive neural tensor network(<strong>RNTN</strong>) in java.</p>
<p>I've used Deeplearning4j for word2vec pipeline to vectorize a corpus of words.</p>
<p>for NLP pipeline I've used Opennlp.( for tokenizing, POStaging and parsing)</p>
<p>Now, I figured out that I need an RNTN for my purpose and I didn't find much support, any references would be helpful. Many libraries are written in R or python or even in Scala and the NLP pipeline most of the people used is stanfordnlp. But I want to do this with Opennlp and java.</p>
<p>After that, I would like to combine the word vectors with neural net and then do the task I want to do something like sentiment analysis.</p>
<p>How can I proceed? Any input will be helpful.</p>
<p>Thanks.</p>
| <java><neural-network><opennlp><word2vec><deeplearning4j> | 2016-07-04 12:35:29 | HQ |
38,185,466 | Visual Studio 2015 Update 3 - Setup Blocked | <p>I am trying to install Visual Studio 2015 Update 3 from offline installer (iso file) and get this error:</p>
<p><a href="https://i.stack.imgur.com/9Mwsb.png"><img src="https://i.stack.imgur.com/9Mwsb.png" alt="enter image description here"></a></p>
<p>I am running on window seven an i do have Visual Studio 2013 Update 2013 on my system.</p>
<p>Here is some log:</p>
<pre><code> [0E68:1238][2016-07-05T17:24:07]i000: MUX: Detect Completed
[0E68:1238][2016-07-05T17:24:07]i000: MUX: Wait for View to be loaded
[0E68:1238][2016-07-05T17:24:07]i000: MUX: View loaded
[0E68:1238][2016-07-05T17:24:07]i000: MUX: Checking for update...
[0E68:1238][2016-07-05T17:24:07]i000: MUX: Setup update feature is enabled. Evaluating conditions to determine whether to run setup update.
[0E68:1238][2016-07-05T17:24:07]i000: MUX: Checking http://go.microsoft.com/fwlink/?LinkID=659005 for update.
[0E68:1238][2016-07-05T17:24:11]i000: MUX: Failed to download the update xml file from http://go.microsoft.com/fwlink/?LinkID=659005 Setup will not be updated.
[0E68:1238][2016-07-05T17:24:11]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i052: Condition 'NOT (CurrentOperation = "Uninstall")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i052: Condition '(CurrentOperation = "Install") OR (CurrentOperation = "Repair")' evaluates to true.
[0E68:1238][2016-07-05T17:24:11]i000: MUX: Configuring feed...
[0E68:1238][2016-07-05T17:24:11]i000: MUX: Stop Block: NoApplicableUpdates : Update 3 requires a member of the Visual Studio 2015 family to be present or is blocked by another condition on your computer.
[0E68:1238][2016-07-05T17:24:11]i000: MUX: Online feed url authoring not found
[0E68:1238][2016-07-05T17:24:11]i000: MUX: Stop Block: NoApplicableUpdates : Update 3 requires a member of the Visual Studio 2015 family to be present or is blocked by another condition on your computer.
[0E68:1238][2016-07-05T17:24:11]i000: MUX: Go to Blocker page.
[0E68:1238][2016-07-05T17:24:11]i199: Detect complete, result: 0x0
</code></pre>
| <visual-studio><visual-studio-2015> | 2016-07-04 13:03:11 | HQ |
38,185,516 | >How end-user know whether the page is developed using semantic elements in html5? | >How end-user know whether the page is developed using semantic elements in
HTML5? What differences end-user can get if we use HTML5 semantic tags? | <html> | 2016-07-04 13:06:26 | LQ_EDIT |
38,185,688 | Select rows containing certain values from pandas dataframe | <p>I have a pandas dataframe whose entries are all strings:</p>
<pre><code> A B C
1 apple banana pear
2 pear pear apple
3 banana pear pear
4 apple apple pear
</code></pre>
<p>etc. I want to select all the rows that contain a certain string, say, 'banana'. I don't know which column it will appear in each time. Of course, I can write a for loop and iterate over all rows. But is there an easier or faster way to do this?</p>
| <python><pandas> | 2016-07-04 13:14:31 | HQ |
38,185,902 | android BottomSheet how to collapse when clicked outside? | <p>I have implemented bottomsheet behavior with NestedScrollView. And was wondering if it is possible to hide the bottomsheet view when touched outside.</p>
| <android><bottom-sheet> | 2016-07-04 13:25:20 | HQ |
38,186,527 | When I put 'wet' into the code it can't find the notepad document. The notepad document is called notepad | The code is not finding the notepad document, please help
SEND_REPORT_TUPLE = ('wet', 'water', 'liquid')
#make a list from the input
input_list = answer.split(" ")
#And then the use any function with comprehension list
if any(e in SEND_REPORT_TUPLE for e in input_list):
file = open('Notepad', 'r')
print = file
| <python><file> | 2016-07-04 13:58:59 | LQ_EDIT |
38,187,279 | R : understanding simplified script with brackets or hooks? | <p>I would like to understand how really works this script :</p>
<p><code>y <- y[keep, , keep.lib.sizes=FALSE]</code></p>
<p>in :
<code>keep <- rowSums(cpm(y)>1) >= 3
y <- y[keep, , keep.lib.sizes=FALSE]</code></p>
<p>I do know <code>d.f[a,b]</code> but I can not find R-doc for <code>d.f[a, ,b]</code>.</p>
<p>I tried "brackets", "hooks", "commas"... :-(</p>
<p>(Sometimes I would prefer that one does not simplifie his R script !)</p>
<p>Thanks in advance.</p>
| <r><dataframe><hook><brackets> | 2016-07-04 14:38:16 | LQ_CLOSE |
38,187,698 | Variable assignment in Unix | <p>When I try following statements, it doesn't assign values properly to variables and loop goes infinite- </p>
<pre><code>while ( [ $nos -ne 0 ] )
do
rem = `expr $nos % 10`
sum = `expr $sum + $rem`
nos = `expr $nos / 10`
done
</code></pre>
<p>But when I remove spaces from left and right side of assignment operator, it works fine. Like this - </p>
<pre><code>while ( [ $nos -ne 0 ] )
do
rem=`expr $nos % 10`
sum=`expr $sum + $rem`
nos=`expr $nos / 10`
done
</code></pre>
<p>Why the Shell behaviour is like that?</p>
| <shell><unix><variable-assignment> | 2016-07-04 15:03:36 | LQ_CLOSE |
38,187,833 | How to combine ReactJs Router Link and material-ui components (like a button)? | <p>I need to find a solution to be able to combine together the functionality of react router with the material ui components.</p>
<p>For instance, I've this scenario: a router and a button. What I tried to do it is to mix them together, and restyle them.</p>
<p>So from a simple link</p>
<pre><code><Link className={this.getClass(this.props.type)} to={`${url}`} title={name}>{name}</Link>
</code></pre>
<p>I tried to create a material ui button as the following</p>
<pre><code><Link className={this.getClass(this.props.type)} to={`${url}`} title={name}>
<FlatButton label={name} />
</Link>
</code></pre>
<p>but I have the following error and Javascript breaks</p>
<blockquote>
<p>invariant.js?4599:38Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's <code>render</code> method, or you have multiple copies of React loaded (details: <a href="https://gist.github.com/jimfb/4faa6cbfb1ef476bd105" rel="noreferrer">https://gist.github.com/jimfb/4faa6cbfb1ef476bd105</a>).</p>
</blockquote>
<p>Do you have any idea how to manage this situation?
Thank you in advance and if you need more information let me know</p>
| <javascript><reactjs><react-router><client-side><material-ui> | 2016-07-04 15:10:22 | HQ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.