With this code I show node in block:
print check_markup(node_load(777, NULL, TRUE) -> body);
Problem: block displayed even node 777 is unpublished.
Thank you in advance!
There are a few different tools for Subversion that run in the background, pinging the central repository every few minutes, and will alert you if any changes are detected (I'm using Windows 7, but this is true for OS X and Linux as well).
Is there anything like that for Mercurial, that will watch a specific repository and alert me to any changes?
i am using Docmd.TransferText to import data from a text file into my access table.
i would like it to do the following:
if the record already exists, then update it
if the record does not exist then add it
how do i accomplish this?
currently i have this line:
DoCmd.TransferText acImportDelim, yesyes, "table3", "C:\requisition_data_dump.txt", True
I have this but I got an error:
-- test if a list containts exactly three characters
test :: [Char] -> Bool
test xs | [_ , _ , _] = True
| otherwise = False
I've heard that you need to get a mac if you want to develop iphone apps. Is it true? Is it possible to develop iPhone Apps using Linux. If yes what do I need and where to download the necessary tools such as sdk?
DoCmd.TransferText acImportDelim, Import-Accounts, "tableImport", _
"C:\Documents and Settings\accounts.txt", True
The second parameter: Import-Accounts is the actual name of the saved import specifications. supposedly it does NOT need to be in quotes; however in this case since there is a - there it is treating it as if i were doing an operation.
is there a way i can force it to treat it literally instead of as an operation?
I was told that putting too many files in a directory can cause performance problems in Linux, and Windows. Is this true? And if so, what's the best way to avoid this?
I looked at the MySql Connection Options and it doesnt seem to be there. Is there a way to create a read only connection/command for .NET? With SQLite i could specify read only=true to do this. What can i do with MySQL?
I have a struct Foo. In pseudocode:
def FindFoo:
foo = results of search
foundFoo = true if a valid foo has been found
return foo if foundFoo else someErrorCode
How can I accomplish this in C++?
Edited to remove numerous inaccuracies.
I have implemented a custom requestor interceptor for the purpose of authenticating requests, similar to below. I am trying to get the operation name in ProcessRequest and unable to.
Can anyone let me know how do I get the operation name here?
public class SampleInterceptor: Microsoft.ServiceModel.Web.RequestInterceptor
{
public SampleInterceptor() : base(true)
{
}
public override void ProcessRequest(ref System.ServiceModel.Channels.RequestContext requestContext)
{
//need the operation name here to authenticate
}
}
The game loop alone is using 50% of CPU Usage, I haven't done any rendering work yet. What i'm doing here?
while(true)
{
if(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
if(msg.message == WM_QUIT ||
msg.message == WM_CLOSE ||
msg.message == WM_DESTROY)
break;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
//Run game code, break out of loop when the game is over
}
}
Hi!
I'd like to know if there's a way to verify if an index exists before getting it.
So it'd be way to protect my code against:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (2) beyond bounds (0)'
Like in PHP you can do: isset($object[10]); and it'll return true if it exists.
Is there such a method in Objective-C/Cocoa?
Thanks!
In qt: I create a class based on QToolButton to display icon and text. How can I add 'mousePressEvent' to the class? Thank you.
bool IconLabel::event (QEvent* e ) {
if ( e->type() == QEvent::Paint) {
return QToolButton::event(e);
}
return true;
}
The class is:
class IconLabel : public QToolButton
{
Q_OBJECT
public:
explicit IconLabel(QWidget *parent = 0);
bool event (QEvent* e );
signals:
public slots:
};
I've seen occasional references that claimed a graphics card's video memory was part of Windows XP's memory address space - is that true? If you have 4GB on an XP system, and add a 1GB graphics card, does that mean Windows only has 3GB for programs?
I want to check if a word is in a list of words.
word = "with"
word_list = ["without", "bla", "foo", "bar"]
I tried if word in set(list), but it is not yielding the wanted result due to the fact in is matching string rather than item. That is to say, "with" is a match in any of the words in the word_list but still if "with" in set(list) will say True.
What is a simpler way for doing this check than manually iterate over the list?
If I have 4 different CheckBoxes and when the user selects one of them I want the other 3 to become disabled so you can't click on a checkbox while another one is already checked how would I go about doing this? I have this, but it doesnt work right now and I thought it would:
If NoDelayCheckMarkBox.Checked = True Then
timeBetweenIterationDelay = 0
SecondDelayCheckMarkBox.Enabled = False
HalfSecondDelayCheckMarkBox.Enabled = False
FiftyMSDelayCheckMarkBox.Enabled = False
I can still click as many check boxes as I want too. Thank you for any help.
I am getting options[text] is null or not an object error. What i am trying to do here is i am checking what all multi select lookup column values are selected , comparing them with the value in an array and then removing them
var responsibleselected = returntags("select","Responsibility selected values");
for(var i=0;i<responsibleselected.options.length;i++)
{
if(responsibleselected.options[i].selected == true)
{
for(var j=0;j< ResponsibleArray.length;j++)
{
if(responsibleselected.options[i].text == ResponsibleArray[j])//throws error here
{
GipRemoveSelectedItems(ctl00_m_g_6ad915a8_68ea_4c76_b67a_ad1215320288_ff391_ctl00_ctl00_MultiLookupPicker_m);
}
}
}
}
After decoding the special character with the html_entity_decode function, I get spaces in replace of entities. My problem is when I check if if ($decoded_str[5] == ' ') it isn't true, though in $decoded_str[5] there is a space that was before decoding. How to settle the matter? I need to be able to check it like this way: if ($decoded_str[5] == ' ')
I'm starting the script with ./file.py < pipe >> logfile
and the script is:
while True:
try:
I = raw_input().strip().split()
except EOFError:
continue
doSomething()
How could I better handle named pipe? This script always run at 100% CPU and it need to be real-time so I cannot use time.sleep.
In trying to add a cached section to a Mako template, I get the error listed in the above question. Adding () to the end gets rid of the error, but I see no content on my page. Any help is appreciated!
<%def name="test" cached="True" cache_timeout="60" cache_type="file">
Test
/%def>
I installed the wireless driver using this instruction How do I install BCM43142 wireless drivers for Dell Vostro 3460/3560 and I have WiFi working. No problems here.
But unfortunately the bluetooth doesn't work. The ubuntu bar shows the bluetooth sign and I can turn the bluetooth on/off but I can't discover any devices. And I can't find my laptop when I turn visibility On. So, obviously bluetooth doesn't work.
I couldn't find the reports that blutooth can actually work with this adapter in Ubuntu. So, my question is: Is there anyone with BCM43142 adapter that have bluetooth working?
Thank You in advance.
PS. Ubuntu 12.10 x64
Update:
After some fiddling around with different drivers from different sources I managed to get bluetooth working. Not flawlessly but at least I can pair a device.
Bluetooth started working after installation of this package bt-bcm43142-onereic_0.0+20111116somerville2_amd64.deb
Originally I found this package on the disk with Ubuntu which came with the Laptop.
What this package does, it installs a firmware loader and a firmware itself. This firmware needs to get bluetooth working.
Still bluetooth sometimes doesn't work even with this package. But manual loading the firmware helps.
brcm_patchram_plus_usb --patchram /lib/firmware/BCM43142A0_001.001.011.0028.0036.hcd hci0
Also I found it strange that this package writes all different ids into /sys/bus/usb/drivers/btusb/new_id because only one from the list matches my device ID
bcm43142.conf:
install btusb /sbin/modprobe --ignore-install btusb && echo '0a5c 21d3' > /sys/bus/usb/drivers/btusb/new_id && echo '0a5c 21d7' > /sys/bus/usb/drivers/btusb/new_id && echo '0a5c 21e1' > /sys/bus/usb/drivers/btusb/new_id && echo '0a5c 21e3' > /sys/bus/usb/drivers/btusb/new_id && hciconfig hci0 up && /usr/bin/brcm_patchram_plus_usb --patchram /lib/firmware/BCM43142A0_001.001.011.0028.0036.hcd hci0 &
My lsusb:
...
Bus 002 Device 003: ID 0a5c:21d7 Broadcom Corp.
In conclusion: bluetooth works not nearly as good as in windows :( once I even got a complete crash of the system because of the btusb module. Luckily WiFi works perfectly :)