Whenever I try to present a UISplitViewController modally the application crashes. Thus it must allways be the root view controller. Can anyone confirm that?
I'm debugging a program with GDB.
unsigned int example = ~0;
gives me:
(gdb) x/4bt example
0xffd99788: 10101000 10010111 11011001 11111111
why is this not all 1's? i defined it as ~0... then the next line of code is:
example>>=(31);
and GDB gives me this when I try to examine the memory at bits:
(gdb) x/4bt example
0xffffffff: Cannot access memory at address 0xffffffff
what is going on???
In python 2.7, I have this function
from slacker import Slacker
def post_message(token, channel, message):
channel = '#{}'.format(channel)
slack = Slacker(token)
slack.chat.post_message(channel, message)
with mock and patch, I can check that the token is used in Slacker class
import unittest
from mock import patch
from slacker_cli import post_message
class TestMessage(unittest.TestCase):
@patch('slacker_cli.Slacker')
def test_post_message_use_token(self, mock_slacker):
token = 'aaa'
channel = 'channel_name'
message = 'message string'
post_message(token, channel, message)
mock_slacker.assert_called_with(token)
how I can check the string use in post_message ?
I try with
mock_slacker.chat.post_message.assert_called_with('#channel')
but I get
AssertionError: Expected call: post_message('#channel')
Not called
I using this code to connect to facebook chat. When I try to retrieve list of online users instead of user name I get negative number for example: [email protected]
How can I get the original (Letters) user name?
when I try and run the "rake db:seed" command the rails console outputs "NoMethodError: undefined method `db' for #" not quite sure what going on. I'm using netbeans to build my rails project which is using the built-in JRuby 1.2 would that have anything to do with it?
Hi
How Can I Import Data From a Table in Sql Server CE To Excel?
I Try This From Excel But I Can Not Find an Item for This In Excel
Please Help Me To This
Hi,
I've made a library in flex with different components and my CSS I want to use in different projects (the goal of a library....).
BUT even if I can use my components, I can't use my CSS file which is in the library.
When I try <mx:Style source="assets/style.css" />, it wasn't found :(
So, how I should do to have a CSS file in my library which can be use in a project ??
Thanks for all your help
I try to test SharpArch frame, directly in the provided example code to write some code to add test data, but unsuccessful, do not have any information to me!
ICustomerRepository customerRepository = new CustomerRepository();
Customer customer = new Customer("Jack Chen");
customer.SetAssignedIdTo("JACKK");
customerRepository.Save(customer);
I just had an instance of CustomerRepository operation, do not understand why there is no new data on the data table
I have stored tamil content something as à..........
But for some content it is stored as #2220.......
So while retrieving there arise a problem with it when I try to decode it as original tamil content.
How to convert the values from #2220........to &grave.......
I'd try to explain what I mean, but there is an easier way: click here for jsfiddle example.
Basically I want the border color of the div rfrsh_btn to change when productOptionsMenu is hovered over.
I'm using jQuery with the .noConflict var because this site also uses Prototype.
jQuery:
var $j = jQuery.noConflict();
$j(".productOptionsMenu").hover(
function () {
$j(#rfrsh_btn).css({"border-color":"#85c222"});
};
);
Thanks :)
I installed the vim plugin on many different ways. I try to start it with Ctrl-T but what I get is always that error:
E492: Not an editor command: FuzzyFinderTextMate
FileMerge.app fails with an odd message:
This file type cannot be merged.
when I try to save successfully merged text files, which definitely can be merged.
(I invoke FileMerge from git using opendiff tool on OS X 10.6.3)
Why is it happening? How can I avoid this problem?
I have written a java application which is a RMI server. I need to start rmiregistry to run this application and i also want my apllication to start automatically when the system starts.
I have converted my application into a windows servise. When i try to start my service it shows this error
Error 1067: The process terminated unexpectedly
Is it because my program throws an exception when my application is started before the rmiregistry is started.
Hello,
I load data with function:
gssize g_input_stream_read (GInputStream *stream,
void *buffer, gsize count,
GCancellable *cancellable,
GError **error);
What is ma value of buffer parameter. How can I know what should be equal to buffer?
I make:
#define LOAD_BUFFER_SIZE 65536
But when i try to load image, only visible part of the image.
Thank you.
I have used MFMailComposeViewController class in my iPhone app for email functionality.When I try to fill email body keypad comes.Here How can I use resignFirstResponder for that email body textfiled in MFMailComposeViewController class.
Just like using the many twitter or facebook widgets out there that pull the feed and display it in a nice widget, I want to create a "widget" that pulls a feed from a wordpress blog that I have, and displays it on a static, non-wordpress page. Before I try getting my hands dirty with jquery, do you know if there is any pre-existing code or plugins out there that I can use?
Look at this ruby example:
puts ["Dog","Cat","Gates"].1
This will output Cat as ruby allows me to directly access the "anonymous" array created.
If I try this in PHP, however:
echo array("Dog","Cat,"Gates")[1]
This won't work.
What is this called, not only concerning arrays but all functions?
Where else is it possible?
Feel free to change the question title when you know how this "feature" is called.
hi . i try to use NSUserDefault or something like this , to save a specific view after quit from application and when user lunch application again load from that view ... but i dont know how!
So I've been reading through the book PHP Solutions, Dynamic Web Design Made Easy by David Powers. I read through the short section on Object Oriented PHP, and I am having a hard time grasping the idea of the - operator. Can anyone try to give me a solid explanation on the - operator in OOP PHP?
Example:
$westcost = new DateTimeZone('America/Los_Angeles');
$now->setTimezone($westcoast);
Also,a more general example:
$someObject->propertyName
Thanks
I have the following query (all tables are innoDB)
INSERT INTO busy_machines(machine)
SELECT machine FROM all_machines
WHERE machine NOT IN (SELECT machine FROM busy_machines)
and machine_name!='Main'
LIMIT 1
Which causes a deadlock when I run it in threads, obviously because of the inner select, right?
The error I get is:
(1213, 'Deadlock found when trying to get lock; try restarting transaction')
How can I avoid the deadlock? Is there a way to change to query to make it work, or do I need to do something else?
When I try to inspect DataSet by standard DataSet visualizer I see this error "could not load this custom viewer".
I wrote simple dataset visualizer, but error throws anyway too.
On other computers with the same configuration visualizer show without any errors.
OS: Windows 7 x86 (Release)
VS: Visual Studio 2010 RC
has somebody any ideas?
I reinstall VS with no effect.
Based on my understanding SerializableAttribute provides no compile time checks, as its all done at runtime, then why is it required for classes to be marked as serializable?
Couldn't sterilizer just try to serialize an object and just fail? isn't it what it does right-now when something is marked, it tries and fails. wouldn't it be better if you had to mark things as unserializable rather than serializable? that way you wouldn't have the problem of libraries not marking things as serializable?
hi
I have a jtable and I want the user to fill its cells then i get what he wrote!
the problem is when i try getValueAt(row index,col index ) the programe give me null , and i am sure that the cell i choose has a value .
I have a method that will either return an object or None if the lookup fails. Which style of the following is better?
def get_foo(needle):
haystack = object_dict()
if needle not in haystack: return None
return haystack[needle]
or,
def get_foo(needle):
haystack = object_dict()
try:
return haystack[needle]
except KeyError:
# Needle not found
return None
I'm undecided as to which is more more desirable myself. Another choice would be return haystack[needle] if needle in haystack else None, but I'm not sure that's any better.
Hi there,
I have two items that I am floating right in my XHTML page. Unfortunately, when I try to get the offset of the right most item... it comes back as the position the element would be in if it were not floated.