I am just learning Core Data on iPhone and the tutorial I am following says to create a new file and select NSManagedObject as the template. However, in Xcode 3.2.2 it seems to be gone. Is there any way to get it back or some kind of workaround?
Thanks in advance!
First of all, to clarify my goal: There exist two programs written in C in our laboratory. I am working on a Proxy Server (bidirectional) for them (which will also mainpulate the data). And I want to write that proxy server in Python. It is important to know that I know close to nothing about these two programs, I only know the definition file of the packets.
Now: assuming a packet definition in one of the C++ programs reads like this:
unsigned char Packet[0x32]; // Packet[Length]
int z=0;
Packet[0]=0x00; // Spare
Packet[1]=0x32; // Length
Packet[2]=0x01; // Source
Packet[3]=0x02; // Destination
Packet[4]=0x01; // ID
Packet[5]=0x00; // Spare
for(z=0;z<=24;z+=8)
{
Packet[9-z/8]=((int)(720000+armcontrolpacket->dof0_rot*1000)/(int)pow((double)2,(double)z));
Packet[13-z/8]=((int)(720000+armcontrolpacket->dof0_speed*1000)/(int)pow((double)2,(double)z));
Packet[17-z/8]=((int)(720000+armcontrolpacket->dof1_rot*1000)/(int)pow((double)2,(double)z));
Packet[21-z/8]=((int)(720000+armcontrolpacket->dof1_speed*1000)/(int)pow((double)2,(double)z));
Packet[25-z/8]=((int)(720000+armcontrolpacket->dof2_rot*1000)/(int)pow((double)2,(double)z));
Packet[29-z/8]=((int)(720000+armcontrolpacket->dof2_speed*1000)/(int)pow((double)2,(double)z));
Packet[33-z/8]=((int)(720000+armcontrolpacket->dof3_rot*1000)/(int)pow((double)2,(double)z));
Packet[37-z/8]=((int)(720000+armcontrolpacket->dof3_speed*1000)/(int)pow((double)2,(double)z));
Packet[41-z/8]=((int)(720000+armcontrolpacket->dof4_rot*1000)/(int)pow((double)2,(double)z));
Packet[45-z/8]=((int)(720000+armcontrolpacket->dof4_speed*1000)/(int)pow((double)2,(double)z));
Packet[49-z/8]=((int)armcontrolpacket->timestamp/(int)pow(2.0,(double)z));
}
if(SendPacket(sock,(char*)&Packet,sizeof(Packet)))
return 1;
return 0;
What would be the easiest way to receive that data, convert it into a readable python format, manipulate them and send them forward to the receiver?
NSXMLTypeStore is used when starting Core Data backed application by default because it's good for debugging purposes. But practice dictates that developer should use either NSBinaryStoreType, NSInMemoryStoreType or NSSQLiteStoreType store types in release builds.
How do you manage changes between debug and release builds? I believe that changing store type from NSXMLTypeStore to, say, NSBinaryStoreType in code on each release is kinda cumbersome.
Is there a common method to encode and decode arbitrary data so the encoded end result consists of numbers only - like base64_encode but without the letters?
Fictitious example:
$encoded = numbers_encode("Mary had a little lamb");
echo $encoded; // outputs e.g. 122384337422394237423 (fictitious result)
$decoded = numbers_decode("122384337422394237423");
echo $decoded; // outputs "Mary had a little lamb"
If I need to append data (not insert) into a particular super column, what should I do?
For eg:
Consider a existing record described below
Kespace : test
columFamily: testColum
SuperColumn : testSuper
column_name : email
value : [email protected]
Here if I want to add my phone number to the super column "testSuper". What should I do?
What are your favorite ways to encapsulate LINQ to SQL entity classes and data-context classes into business objects?
What have you found to work in a given situation?
Have you invented or taken to any specific patterns?
Has anybody managed to get the ".NET Data Provider for SqlServer" to actually work within perfmon.exe.
I have a .NET app that uses nhibernate to interact with sql server 2005 db. All I want to do is to view the NumberOfActiveConnectionPools, NumberOfActiveConnections and the NumberOfFreeConnections within perfmon.exe
Can somebody explain to me how exactly I get this to work?
Regards,
David
Hi,
I want to extract some kind of bmp/rgb data from jpeg files.
I had a look at libjpeg, but there seemed not to be any good documentation available.
So my questions are:
Where is documentation on libjpeg?
Can you suggest other c-based jpeg-decompression libraries?
thanks in regard
ps: I am using GNU/Linux, and c/c++
i searched a little for the size of file in salesforce . i found this link
http://help.salesforce.com/HTViewHelpDoc?id=collab_files_size_limits.htm&language=en_US
its showing that file size can be upto 2 GB.i have to store IDs in a text file and want to make it scalable for for nearly about 1 Million record .file size will be equal to 15 MB .can any one please provide some good tutorial how to create such kind of files and using it in apex for retrieving and updating data
My ibdata1 file for MySQL database grew to about 32GB over time. Recently I deleted about 10GB of data from my databases (and restarted mysql for good measure), but the file won't shrink. Is there any way to reduce the size of this file
I am trying to write data to an RTF file and set certain characters to a different color. I found out how to do it in a box but I can't figure out how to write it to a file.
Hi,
I'm writing a widget where i first have a configure screen where the user makes a selection. Then I want to pass that data on to the actual widget. This must be really simple but I just can find out how to do it.
Create table testxml
(xmldata xml)
declare @var nvarchar(max)
set @var = N'?????? ?????? ????'
insert into testxml
select @var
After inserting , i am getting data from table like
select * from testxml
---------------------
????????
Can you provide me the solution?
For a normal index constraint, you can find the columns it is on by querying the all_ind_columns sysview using the index name in all_constraints. But if the constraint is disabled, no index exists, and there doesn't seem to be anywhere else that has constraint column information. How can I get the columns of a disabled index constraint from the data dictionary (without re-enabling the constraint)?
I'm trying to decide the best way to include an image that is required for a script I've written.
I discovered this site and it made me think about trying this method to include the image as a data URI since it was so small - it's a 1x1 pixel 50% opacity png file (used for a background) - it ends up at 2,792 bytes as an image versus 3,746 bytes as text in the CSS.
So would this be considered good practice, or would it just clutter up the CSS unnecessarily?
Hello,
I am just studying the code of Sacha Barbers MVVM framework Chinch and I saw this in the xxxViewModel.cs file:
DataService.FetchAllOrders(CurrentCustomer.CustomerId.DataValue);
DataService is a Static class. Being a junior dev I am only used to Interfaces with Data services. Why is that class static?
Or do you think he made it just for the example?
So is that a good approach?
i think i know the answer to this question, but just want to make sure before i dismiss the possibility.
is it possible with user permission for my web app to access pim data like the address book on a iphone, similar to how a web app can access the location service?
I'm currently making a widget to take and display items from a feed. I have this working for the most part, but for some reason the data within the tag within the item comes back as empty, but I get the data in the and tags no problem.
feed is and xmlhttp.responseXML object.
var items = feed.getElementsByTagName("item");
for (var i=0; i<10; i++){
container = document.getElementById('list');
new_element = document.createElement('li');
title = items[i].getElementsByTagName("title")[0].firstChild.nodeValue;
link = items[i].getElementsByTagName("link")[0].firstChild.nodeValue;
alert(items[i].getElementsByTagName("description")[0].firstChild.nodeValue);
new_element.innerHTML = "<a href=\""+link+"\">"+title+"</a> ";
container.insertBefore(new_element, container.firstChild);
}
I have no idea why it wouldn't be working for the tag and would be for the other tags.
Here is an example of the rss feed its trying to parse:
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>A title</title>
<link>http://linksomehwere</link>
<description>The title of the feed</description>
<language>en-us</language>
<item>
<pubDate>Fri, 10 Jul 2009 11:34:49 -0500</pubDate>
<title>Awesome Title</title>
<link>http://link/to/thing</link>
<guid>http://link/to/thing</guid>
<description>
<![CDATA[
<p>some html crap</p>
blah blah balh
]]> </description>
</item>
</channel>
</rss>
I'm trying to make a page using data from the discogs.com (XML)-API. i've been parsing it with simpleXML and it's working pretty well but there is some things i'm not sure how to do.
Here is part of the XML:
<releases>
<release id="1468764" status="Accepted" type="Main">
<title>Versions</title>
<format>12", EP</format>
<label>Not On Label</label>
<year>1999</year>
</release>
<release id="72246" status="Accepted" type="Main">
<title>The M.O.F Blend</title>
<format>LP</format>
<label>Blenda Records</label>
<year>2002</year>
</release>
<release id="890064" status="Accepted" type="Main">
<title>The M.O.F Blend</title>
<format>CD</format>
<label>Blenda Records</label>
<year>2002</year>
</release>
<release id="1563561" status="Accepted" type="TrackAppearance">
<title>Ännu En Gång Vol. 3</title>
<trackinfo>Backtrack</trackinfo>
<format>Cass, Comp, Mix</format>
<label>Hemmalaget</label>
<year>2001</year>
</release>
</releases>
What i want to achieve is something similair to how discogs presents the releases: http://www.discogs.com/artist/Mics+Of+Fury where diferent versions of the same release are sorted together. (see. The M.O.F Blend in my link) This is done on discogs with having a master release that features the other releases. unfortunately this information isn't present in the API data, so i want to do the same thing by grouping the <release>-nodes with the same <title>-tags, or add a flag to the <releases> that don't have a unique <title>? any good ideas on the best way of doing this?
i also like to know if it's possible to count the <release>-nodes (child of releases) that have the same type-attribute? like in this example count the releases with the type "Main"?
maybe it's better to do this things with XMLReader or XPath?
I am sending push notifications from php job application to iphone. I am sending push notifications regarding new jobs. Is this possible that when user click on the view of push notification pop up , then user redirect to the particular job in the device.
I mean I wanted to know can I send any custom data with push notification like jobId,something else....so that Iphone end Can retrieve and show the particular job ?
Thanks.
I'm currently using the BO API for .NET to connect to our reports database. In .NET, I'm getting the following error:
Your security profile does not include permission to refresh Web Intelligence documents. (WIS 30253)
Interestingly enough, I can log into BO, and I can refresh the data and grab prompts as I'm logged in. From .NET, with the same username and password, I can't seem to do so. Anybody have any thoughts on this?
Hi, I just want to delete cached data, but I have many keys, for example:
user_54_books
user_54_movies
user_54_comments
user_54_foobar
I can write $cache-delete('user_54_books'); but I have to do it with all "user_ID_objects", can I say to memcache, something like delete-('user_54_*'); ? how? thanks :)
is it possible to have an html form organized/named in such a way that $foo-fromArray($_POST) would actually save relational data as well?
example:
html_form_fields:
user_name
country_name
db_table_users:
id
user_name
db_table_countries:
id
country_name
update:
forgot to say i'm trying to make this with zend framework forms
I have one class that controls one window, and another class that controls a different window in the same xib, however, the second window never displays what it should.
In the first class I alloc and init the second class, then pass some information to it. In the second class it displays that data in the table view.
Yes, in the .xib I have all the connections set up correctly, I've quadruple checked. Also the code is correct, same with the connections, I've quadruple checked.