I have write a small helloworld program that needs cocoa framework. I'd like to know how to add framework in cmake. All the information I have found is out-of-date. I have cmake 2.8.1 on snow leopard.
I'm currently using the fb package to write a Yesod app that takes data from Facebook. In my Handler, I've managed to get the first step of the authentication to work, but I need to redirect to the url that getUserAccessTokenStep1 returns, which I've defined as fbRedirUrl. I'm having trouble with all the monad wrapping and type checking to make sure I can redirect to this url.
getAccessTokenR :: Handler RepHtml
getAccessTokenR = do
withManager $ \manager -> do
FB.runFacebookT creds manager $ do
fbRedirUrl <- FB.getUserAccessTokenStep1 redirUrl []
liftIO $ print fbRedirUrl
I'm looking for a way to create a tree of test files to unit test a packaging tool. Basically, I want to create some common file system structures -- directories, nested directories, symlinks within the selected tree, symlinks outside the tree, &c.
Ideally I want to do this with as little boilerplate as possible. Of course, I could hand-write the set of files I want to see, but I'm thinking that somebody has to have automated this for a test suite somewhere. Any suggestions?
Hi
I have to write an object in to binary file.My struct looks like this.
Struct Company
{
int numberofemployees
list of Struct Employee.
}
Struct Employee
{
string EmployeeName;
string Designation;
}
What is the best way to do the above operation?
Regards
Raju
While I love PHP I find its biggest weakness is that it allows and even almost encourages programmers to write bad code.
Is there a language that encourages good programming practices? Or, more specifically, a web-related language that encourages good practices.
I'm interested in languages who have either a stated goal of encouraging good programming or are designed in such a way as to encourage good programming.
Hi,
I wanna know how to Lookup For many number in a column A corresponding to a name in Column B
By coding in VBA..And Write it in column C??? Thanks in advance..Im new in this...
Exemple A B C
200-333 Jack
200-345 Lea
200-346 Fresh
200-347 Tide
Jack
200-323 Tide
Lea
Fresh
200-344 Tide
Hello guys,
Using NetStream, I can create progressive video player. But can I save the downloaded chunk to my local disk in AIR??
My first idea is that, download part of file into local disk, let NetStream pointing to that file, and then appends the chunks to that file (FileMode.APPEND) periodically. But it does not work and seems that NetStream would 'lock' the file preventing write operation.
Any ideas?
Using MS SQL 2008 Reporting services:
I'm trying to write a report that displays some correlated data so I thought to use a @table variable like so
DECLARE @Results TABLE (Number int, Name nvarchar(250), Total1 money, Total2 money)
insert into @Results(Number, Name, Total1)
select number, name, sum(total)
from table1
group by number, name
update @Results
set total2 = total
from
(select number, sum(total) from table2) s
where s.number = number
select from @results
However, Report Builder keeps asking to enter a value for the variable @Results. It this at all possible?
I would like for someone to explain this to me:
function myFunction(array){
array = $.grep(array, function(n,i){return n > 1 });
}
var mainArray = [1,2,3];
myFunction(mainArray);
document.write(mainArray) // 1,2,3, but i'm expecting 2,3
but if i do something like
array[3] = 4;
in place of the $.grep line, i get 1,2,3,4. Shouldn't mainArray become the new array created by $.grep?
Searchfield with autocomplete
I would like to make a searchfield with autocomplete, so when you write like 2 or 3 letters it will show a dropdownlist with results that match a column from a table in the database.
I have been reading all over the internet, and i have found out that it can be done with jQuery and AJAX Control Toolkit.
But i don't know how to make it compare the search textbox and the database and show results that match?
Is there a utility similar to OllyDbg / SoftICE for java? I.e. execute class (from jar / with class path) and, without source code, show the disassembly of the intermediate code with ability to step through / step over / search for references / edit specific intermediate code in memory / apply edit to file...
If not, is it even possible to write something like this (assuming we're willing to live without hotspot for the debug duration)?
Are there any Intel AVX intrinsics library out? I'm looking for something similar as 'sse2mmx.h' header which fall-backs to MMX intrinsics if SSE2 integer intrinsics are not available on compile time. Thus if I had similar library for AVX I could write optimized code for new hardware which would have almost optimal speed in case AVX extension isn't available. Googling didn't help much so far :(
Write software for a bank. The program should be menu driven with the facility for bank employees to perform various operations. It should be written using all concepts of Object Oriented programming. You should be able to save your data in a file and read it back (because the bank people will shut down their computers when they go home :p )
Guidelines: The program may select to implement classes like Bank, Account, Savings Account, Fixed Deposit account, Customer, Depositor, Borrower, Transaction, etc.
I need to write a single function which will take multiple eml files ( may be from a single filesystem folder ) and convert them to a single PST file.
Is it possible? if yes can someone provide a sample code?
I assume its possible because there are many commercial eml to pst converters out there doing this
I'm wanting to order Wordpress posts by the most recent comment. To the best of my knowledge this isn't possible using the WP_Query object, and would require a custom $wpdb query, which I can easily write. However, I then don't know how to setup the loop to run off this object.
Can anyone help?
Hi,
is it possible to return the sizeof a derived class already from base class/struct?
imho the size of a class is a kind of property of itself, like the weight of a human being. But I don't want to write the same function in every class.
many thanks in advance
Oops
One way of thinking about this is: if we care about the Design of the code then Easymock is the better choice as it gives feedback to you by its concept of expectations
If we care about the maintainability of tests( easier to read,write and having less brittle tests which are not affected much by change), then Mockito seems a better choice.
My question is:
- If you have used Easymock in large scale projects, do you find that your tests are harder to maintain?
- What are the limitations of Mockito( other than endo testing)
Ok, now I finished developing on the emulator and when I installed on my test device, I got the error
attempt to write a readonly database
What are the settings to control the DB access? Is this going to be difficult to manage when deployed?
Are there any servers written that can be setup to take video transcode jobs? I am looking to set one up to work just like the service Zencoder. Something that I could send my transcoding jobs to maybe via web-services. If not are there any c# wrappers to the common open source transcoders such that I could write one.
Hi all,
currently I'm assigning a TextWriter to the Log property of my Linq to Sql data context (per request instancing) and write this to my logging when an exception is thrown while executing a stored procedure (is strongly typed mapped in the context, so not executing a custom command)
however when using ADO.NET we normally inspect the SqlCommand upon unhandled exception to read out the parameters and log them
is it possible to access the SqlCommand that was used for executing a Stored Procedure in L2S so we can reuse that existing logging component? This would be far nicer than the current Log TextWriter solution....
greetings,
Tim
Hi, I've been using XPath with Selenium quite happily and even using getEval with a but of Javascript, but a colleague said wouldn't it be great to be able to use JQuery selectors in Selenium.
I've googled it, but can't find any articles that seem to work for me. Could anyone provide a comprehensive guide on how to use JQuery syntax to extract doc elements and their respective values out of selenium.
I'm using C# to write my selenium tests, so if any examples could be from a C# perspective that'd be great.
Thanks
Challenge:
Without using the modulus divide operator provided already by your language, write a program that will take two integer inputs from a user and then displays the result of the first number modulus divided number by the second number.
Example:
Input of first number:2
Input of second number:2
Result:0
Who wins:
In case you don't know how Code Golf the winner is the person who writes this program in the least amount of characters.
I've managed to configure Log4Net with a RollingFileAppender in order to generate Xml files.
However, the generated files are not valid XML files until a "roll" is performed - the XML doesn't have a closing XML tag.
Basically, this prevents to files from being read until that are "closed"/"rolled".
Anyone else encountered this issue?
I my previous (custom) solution I had to write the closing tag after writing each entry, and overwrite it with the next entry... :(
i want to make sure all table's immediate child is tbody....
how can i write this with xpath or nokogiri ?
doc.search("//table/").each do |j|
new_parent = Nokogiri::XML::Node.new('tbody',doc)
j.replace new_parent
new_parent << j
end