I have tried:
$var = false;
$var = FALSE;
$var = False;
None of these work. I get the error message
Bareword "false" not allowed while "strict subs" is in use.
I'm trying to unit test an observer in rails but none of its callbacks are being invoked. I'm sure I have something configured incorrectly but just to be sure I was wondering if this may be a Rails limitation during unit testing.
I've looked at the docs and they don't mention anything.
I'm cocking this up and it should be really simple but the value of sortdate is none (note im only doing this because converting a string to a date in Python is a bugger).
DateToPass = str(self.request.get('startdate'))
mybreak.startdate = DateToPass
faf = DateToPass.split('-')
sortdate = str(faf[2] + faf[1] + faf[0])
That should work? but its just being stored as null though the datetopass is being stored fine.
it looks like there used to be an export events button (to rss) but fb have removed it,
i've looked at fbCal but it only exports the event name and the link to the event, but none of the event details.
anyone got any ideas of how i can get multiple event details out of facebook?
Does executing javascript within a browser in 'strict mode' make it more performant, in general? Do any of the major browsers do additional optimisation or use any other techniques that will improve performance in strict mode?
Edit: Since none of the major engines actually implement strict mode, I'll rephrase slightly: Is strict mode intended, amongst its other goals, to allow browsers to introduce additional optimisations or other performance enhancements?
I'm getting the following line in the disassembly from objdump -d of an x86 linux program...
4000b0: ba 0e 00 00 00 mov $0xe,%edx
I'm trying to understand how the machine code "ba 0e 00 00 00" maps to "mov $0xe,%edx"
In the manual move immediate 32-bit is:
B8 + rd ... MOV r32, imm32
ie "B8" not "BA"
In fact none of the MOV opcodes are "BA".
If someone could break down "ba 0e 00 00 00" and explain bit-wise how to get to "mov $0xe,%edx" it would be most helpful.
I'm trying to match rc-update -s output in python.
m = re.match(r"^\s*(\w+)\s*\|{\s*(\w+)\s*}*$", " network | level1 level2 leveln ")
but m is always None
the hard part for me is getting the regex to match the n levels. I thought that using {}* would match the n levels, but as soon as I add the {} nothing matches.
thanks.
I have a lot of div boxes with nested div .titles, with a button inside. Is there a way in jQuery to select the parent of the button?
Something like:
$("#button").click(function(){
$("this.parent").css({'border-bottom' : 'none'});
});
Or am I going to have to rename all of my title classes to unique classes?
I'm getting lots of leaks in my code, but none of the leaks point to any of my code (they are all UIKit methods).
I'm running 3.0.
Could someone tell me how I go about figuring out where these leaks are coming from?
Hi,
I have created a user control ( custom data grid view control). I have used the code specified at MSDN [site][1]
[1]: http://support.microsoft.com/kb/316574 to set the border style .
I am able to see the selected border style in designer. Like None, FixedSingle or Fixed3D.
But when I set the border style to FixedSingle, the border does not appear at runtime. Do I need to draw it manually in the OnPaint method?
I have a mysql table of 3 integer fields. None of the fields have a unique value - but the three of them combined are unique.
When I query this table, I only search by the first field.
Which approach is recommended for indexing such table?
Having a multiple-field primary key on the 3 fields, or setting an index on the first field, which is not unique?
Thanks,
Doori Bar
I've got a view like the following:
from django.views.decorators.http import condition
def stream():
for i in range(0, 40):
yield " " * 1024
yield "%d" % i
time.sleep(1)
@condition(etag_func=None):
def view(request):
return HttpResponse(stream(), mimetype='text/html')
However, it definitely doesn't seem to be streaming at all. All the data is dumped at once, at the end, after about 40 seconds. How can I get it to flush correctly?
i have a table of php with while loop to show the records
i added a jquery hover to do that : if hovered it show a message in same row
but the problem is : if hover it show a message in all rows
here is css:
<style>
.tansa{
position: absolute;
margin-right: -60px;
margin-top:-25px;
background: #CBDFF3; border: 1px solid #4081C3; font-size: 0.88em;
padding: 2px 7px; display: inline-block;
border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px;
line-height: 1.2em;
text-shadow: 0 0 0em #FFF;
overflow: hidden;
text-align: center;
color:black;
display:none;
}
.arrow{
position: relative;
width: 0;
height: 0;
top: -25px;
border-top: 5px solid #000000;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
display:none;
}
</style>
here is my php :
<table><tr>row</tr>
<?php
$results = mysql_query("select * from MyTable");
while{$r = mysql_fetch_array($results)){
echo "<tr><td>Row : <img src='img/tans.png' width='24' height='24' class='tansef' /><span class='tansa' >the message</span><div class='arrow'></div></td></tr>";
}
?>
</table>
here is jquery
$(document).ready(function(){
$('.tansef').hover(function(){
var sh = $('.tansa');
var sharrow = $('.arrow');
sh.show();
sharrow.show();
},function(){
var shs = $('.tansa');
var sharrows = $('.arrow');
shs.hide();
sharrows.hide();
});
});
any solution to show the message in each row only
| random_code | varchar(200) | YES | UNI | NULL | |
MyTable.objects.filter(random_code = None)
Is this correct? Will this SELECT where there is no random code set? Above is my table.
I see so many solution , but none of them was matching my problem .
As i am new to iOS development .
I have a String
abc/_api/web/GetFolderByServerRelativeUrl('Documents/Root Folder/Level 1/Level 2/Level 1-1/Level 1/')/folders.
I want to remove Remove Substring after last "/"
for example my new string should look like this.
abc/_api/web/GetFolderByServerRelativeUrl('Documents/Root Folder/Level 1/Level 2/Level 1-1/Level 1/)
Can someone suggest me the best way to achieve this , thanks ,
I must have skipped a page or two by accident during my PDF Tutorials on Python commands and arguments, because I somehow cannot find a way to take user input and shove it into a file. Don't tell me to try and find solutions online, because I did. None made sense to me.
I have no idea about AJAX programming features. I just know that it is Asynchronous Javascript and XML.
Please help me in knowing about this language.
I have gone through many AJAX tutorials. But none of the programs are running. Why I don't know.
Do we save the file with .HTML extension?
I am trying to convert an int into a String so that I can put the String values into an SQLite Cursor. I've tried multiple syntax and methods but none seem to work for me.
The Error occurs in MangaItemDB() while trying to convert any Int types aswell as the boolean.
I've looked through several articles like this one but none works for me.
Here's my code:
public class MangaItem {
private int _id;
private String mangaName;
private String mangaLink;
private static String mangaAlpha;
private static int mangaCount;
private static int alphaCount;
private boolean mangaComplete = false;
public MangaItem MangaItemDB(int id, String mangaName, String mangaLink, String mangaAlpha, String mangaCount, String alphaCount, String mangaComplete) {
MangaItem MangaItemDB = new MangaItem();
MangaItemDB._id = id;
MangaItemDB.mangaName = mangaName;
MangaItemDB.mangaLink = mangaLink;
MangaItemDB.mangaAlpha = mangaAlpha;
MangaItemDB.mangaCount = String.valueOf(int mangaCount);
MangaItemDB.alphaCount = Integer.toString(getAlphaCount());
MangaItemDB.mangaComplete = String.valueOf(getMangaComplete());
return MangaItemDB;
}
public void incrementMangaCount() {
mangaCount++;
}
public int getMangaCount() {
return mangaCount;
}
public void incrementAlphaCount() {
alphaCount++;
}
public int getAlphaCount() {
return alphaCount;
}
public boolean setMangaComplete(boolean mangaComplete) {
return true;
}
public boolean getMangaComplete() {
return mangaComplete;
}
/**
* @return the mangaName
*/
public String getMangaName() {
return mangaName;
}
/**
* @param mangaName the mangaName to set
*/
public void setMangaName(String mangaName) {
this.mangaName = mangaName;
}
/**
* @return the mangaLink
*/
public String getMangaLink() {
return mangaLink;
}
/**
* @param mangaLink the mangaLink to set
*/
public void setMangaLink(String mangaLink) {
this.mangaLink = mangaLink;
}
/**
* @return the mangaAlpha
*/
public String getMangaAlpha() {
return mangaAlpha;
}
/**
* @param mangaAlpha the mangaAlpha to set
*/
public void setMangaAlpha(String mangaAlpha) {
this.mangaAlpha = mangaAlpha;
}
/**
* @return the _id
*/
public int get_id() {
return _id;
}
/**
* @param _id the _id to set
*/
public void set_id(int _id) {
this._id = _id;
}
}
The lines :
MangaItemDB.mangaCount = String.valueOf(mangaCount);
MangaItemDB.alphaCount = Integer.toString(getAlphaCount());
MangaItemDB.mangaComplete = String.valueOf(getMangaComplete());
all give "Type mismatch: cannot convert from String to Int"
how to delete the div using java script?
for details,
I have question div one by one, each question have up and down arrows, it have multiple div, and also have a save button, once i checked some question and press save button, the checked question are display blocked, others are none, In that time i click up and down arrows, it will moved included hided div also, so please help the same,
Thnks
I need help to call a function(Struct C) that detects the devices, so I'm calling the function this way:
from ctypes import *
fp = CDLL('./libfprint.so.0')
fp.fp_discover_devs.argtypes = None
fp.fp_discover_devs.restype = c_char_p
ret = fp.fp_discover_devs()
print ret # is "0"
That is not detected any device, because the return is "0".
See the documentation of the function:
I'm using Ubuntu and I downloaded the "fprint_demo" and works perfectly. Did you install any package missing?
Thanks.
I am trying to fetch records based on two dates from sql server...
Select * from table where CreatedDate between @StartDate and @EndDate and i pass 5/12/2010 and 5/12/2010 (ie) fetching records for today... I have 17 records dated 5/12/2010 but none seems to get selected....
EDIT:
I use this but when i debug my value it shows 5/12/2010 12:00:00AM
DateTime baseDate = DateTime.Today;
var today = baseDate;
GetBookingReportByDate(today,today);
I'm iterating through a variable called content, it contains several HTMLLIElement objects.
How can i use jQuery's or JavaScript's functions with this object?, what I'm trying to do is the kind of validation written in the commented code.
$.each(content, function(index, value){
//if(!value.is(':hidden')){
console.log(index + ' : ' + value);
//}
});
What I'm getting is
Uncaught TypeError: Object # has no method 'is'
If I do value.getAttribute('style'); I get 'display: none;'
I think the question title says it all, but, I connect to a running node with the -remsh flag, and I run my usual Common Test sanity tests, but none of the error_logger:info_msg messages appear in the shell. Why?