Are C++ enums signed or unsigned? And by extension is it safe to validate an input by checking that it is <= your max value, and leave out = your min value (assuming you started at 0 and incremented by 1)?
I have a session variable and it is set default time of 20 minutes... Is it possible to see the running time of that session variable (ie) say 14 min 35 sec..
Hi,
I have following case: I want to use uncompressed js/css files during development (to debug js for example) but on production I want to switch automatically to minified versions of that files.
some simple solution is to put in your template:
<script src="some_js.{% if not debug %}min.{% endif %}js"....
but this require manully providing that such file exist and to do minifaction manullay after original file change.
How do you accomplish this in your projects? Is there any tool for this?
I'm trying to create a very basic image gallery in jQuery. The goal is to have 3 images fade in and out in a sequential order. So image 1 is displayed, fades to image 2 etc. then the whole thing loops again.
My HTML code so far is as follows:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Slider</title>
<style type="text/css">
.slider{
width: 2848px;
height: 2136px;
overflow: hidden;
margin: 30px auto;
}
.slider img{
width:2848px;
height:2136px;
display:none;
}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="Slider2.js"></script>
</head>
<body onload="Slider2"();>
<div class="slider">
<img id="1" src="31.jpg" border="0" alt="city"/>
<img id="2" src="2vrtigo2.jpg" border="0" alt="roof"/>
<img id="3" src="3.jpg" border="0" alt="sea"/>
</div>
</body>
And the jQuery code looks like this:
function Slider2()
{
var total = $(".slider img").size();
for (i=1; i<=total; i+=1)
{
$(".slider #"+i).fadeIn(600);
$(".slider #"+i).delay(2000).hide;
}}
A quick syntactical note, I've also tried using i++ in the last argument of the For Loop. The result of this code is a blank, white page. I know some of the HTML is being compiled because the enormous 2848x2136 div creates scroll bars on the browser.
If anyone could help me out, that would be greatly appreciated. Obviously I'm relatively new to web programming and would love some insight into why this isn't working. Thanks!
I have this code:
<html>
<head>
</head>
<body>
<form method='post'>
<link type="text/css" href="css/themename/jquery-ui-1.8.14.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
<style>
#feedback { font-size: 1.4em; }
#selectable .ui-selecting { background: #FECA40; }
#selectable .ui-selected { background: #F39814; color: white; }
#selectable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
</style>
<script>
$(function() {
$( "#selectable" ).selectable();
});
</script>
<div class="demo">
<ol id="selectable">
<li class="ui-widget-content">Item 1</li>
<li class="ui-widget-content">Item 2</li>
<li class="ui-widget-content">Item 3</li>
</ol>
</div><!-- End demo -->
<div class="demo-description" style="display: none; ">
<p>Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections. </p>
</div><!-- End demo-description -->
</form>
</body>
</html>
I downloaded the jquery but it has no result
I used this site:
http://jqueryui.com/demos/selectable/#event-create
what is wrong here?
Hi,
small calculation make me cry
plzzzz help me
the issue is.....
I had a geometry line and
at min point(5) i had a value 50
at max point(25) i had a value 10
now i need to calculate a pt for any value between 10 and 50...
I need this dynamic... please help me....
My database consists of some entries which are NULL (so they don't affect max, min, etc..). When I pull all of the data from the database, I need to repopulate form fields with the values. Using .val(value) where value = NULL seems to work without any problems, but I'm not sure if this is a valid way to go about this. It doesn't say anything in the jQuery documentation (that I can find) about using NULL as parameters to functions.
Design an algorithm with min time and space
here is my solution -
assume a array of N elements with 32 bit integers
use a bit array to set the appropriate bits
the array is sorted now
assign even numbers to the first half of the array in ascending order
assign odd numbers to the second half of the array in descending order
any better solution ?
Do anyone know how to construct these two SQL statement in HQL;
SELECT MIN(id) FROM Books WHERE mid < ? OR mid =?
SELECT SUM(noOfBooks) FROM Bookcount WHERE mId=128
When an external JavaScript file is referenced,
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
is the JavaScript source (lines of code before interpretation) available from the DOM or window context in the current HTML page? I mean by using only standard JavaScript without any installed components or tools.
I know tools like Firebug trace into external source but it's installed on the platform and likely has special ability outside the context of the browser sandbox.
I would like to do validation which depends on other input value in same form.
$( "#step1" ).validate({
rules: {
weight: {
required: true,
max: $('#maxweight'),
min: 1
},
...
I was reading all documentation: http://jqueryvalidation.org/, but I can not find anything about using other values from form to validate maximum value of other #id.
Thank you in advance for help.
I'm wondering if it's possible to have the plugin add different classes to different elements.
For example, rules are specified as
rules: {
input1: { required: true, maxlength: 5 },
input2: { digits: true, min: 100 }
}
But I can't do this
errorClass: {
input1: "class_A",
input2: "class_B"
}
How do I make the plugin add different classes?
I am trying to make a ranking manager for a small project.The totals are stored in the database.I can easily get the max and min using mysql and also arrange the records descending.The problem comes in when there is a tie.I need to show a tie in the form:1,2,3,3,4,5,6,7,7,7,7, etc.The repeated numbers will show the ties.I have been thinking of ways of achieving the above but i need more ideas;mine is seems long and complicated.
Can anybody share his/her idea of doing the ties.
All I want to do is on .click() is .animate #slip, essentially Im changing the css at the moment from top: 10px to top: 0px
Instead of it being quite clunky i'd like to animate the movement on the change of CSS.
Currently use .toggleClass to achieve this:
$("#div1").click(function() {
$("#div2t").toggleClass('min');
});
For time profiler for XYZ, I can just run 'time XYZ', or if I have the source code in C/C++, I even can use gprof to get profiled results.
Is there any similar tool for memory usage?
Is there any tool I can use something like 'memory XYZ', to get info such as min/max/median memory usage?
What tool do you use for memory profile with C++/Objective C/C#/Java?
Not quite sure what I'm missing, but my SQL statement is only returning one row.
SELECT
tl.*,
(tl.topic_total_rating/tl.topic_rates) as topic_rating,
COUNT(pl.post_id) - 1 as reply_count,
MIN(pl.post_time) AS topic_time,
MAX(pl.post_time) AS topic_bump
FROM topic_list tl
JOIN post_list pl
ON tl.topic_id=pl.post_parent
WHERE
tl.topic_board_link = %i
AND topic_hidden != 1
ORDER BY %s
I have two tables (post_list and topic_list), and post_list's post_parent links to a topic_list's topic_id.
Instead of returning all the topics (where their board's topic_board_link is n), it only returns one topic.
I am trying to pass some data from one page to another page by using jquery but it dose not working, below is the code which I want to click the text in source page and the destination page will hide the current text.
Source page:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("a.pass").bind("click", function () {
var url = "Destination.html?name=" + encodeURIComponent($("a.pass").text());
window.location.href = url;
});
});
</script>
</head>
<body>
<a class="pass">a</a><br />
<a class="pass">b</a><br />
<a class="pass">c</a><br />
<a class="pass">d</a>
</body>
</html>
Destination page:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
var queryString = new Array();
$(function () {
if (queryString.length == 0) {
if (window.location.search.split('?').length > 1) {
var params = window.location.search.split('?')[1].split('&');
for (var i = 0; i < params.length; i++) {
var key = params[i].split('=')[0];
var value = decodeURIComponent(params[i].split('=')[1]);
queryString[key] = value;
}
}
}
if (queryString["name"] != null) {
var data = queryString["name"]
$("p.+'data'").hide();
}
});
</script>
</head>
<body>
<p class="a">a</p>
<p class="b">b</p>
<p class="c">c</p>
<p class="d">d</p>
</body>
</html>
Please Help.
I use
connect(socketfd, (struct sockaddr*)&remoteAddr, sizeof(remoteAddr))
to connect my iPhone to a computer (over WIFI) and it works fine so far.
However if the computer is out of reach, my iPhone tries to establish a connection for more than a min.
Is there a posibility to set the time manually out to a new value, e.g. 15 sec?
Hello,
R offers max and min, but I do not see a really fast way to find the another value in the order apart from sorting the whole vector and than picking value x from this vector.
Is there a faster way to get the second highest value (e.g.)?
Thanks
hi,
i am using php,mysql,jquery.
When a user clicks on save i go to back end and save data and show the response. once show the success i need to disable the save button for say 1 min. how do i do it.?
Is there an easy way to round a Time down to the nearest 15 minutes?
This is what I'm currently doing. Is there an easier way to do it?
t = Time.new
rounded_t = Time.local(t.year, t.month, t.day, t.hour, t.min/15*15)
Hi all, is there a method (maybe with Google Collections) to obtain the min value of a Map(Key, Double)
In traditional way, I would have to sort the map according to the values, and take the first/last one.
thanks
I have the following query:
select MIN(q.a), * FROM
(
sub-query1
) as q
UNION
sub-query2
How can I return the number of elements in query1 as a row of master-query?
If i use count (*) i´ve only the count
CountElementSub-Query1
i need some like that
rowA, rowB, rowC, CountElementSub-Query1
rowA, rowB, rowC, CountElementSub-Query1
rowA, rowB, rowC, CountElementSub-Query1
rowA, rowB, rowC, CountElementSub-Query1
We are looking for Web Designers & Developers. Urgent Opening.
Profile:-
a) Have exp. in Designing websites in wordpress
b) Have Creativity in work
c) Send us your work – [email protected]
d) Min Exp. required: 2 + years
e) Can Integrate the Facebook, Twitter & other social networking websites.
To review our profile – please check – www.dicorporation.com & www.ismoip.com
All other links are working of this page but this not
this link not working http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
is it working for you?