Hello, I want to create own filetype to save objects in my app. Basically, I urgently do not need new filetype, but it will be better.
How to save my objects like files?
Instead of returning a List<Long> of ids when calling PersonDao.getAll() we wanted not to have an entire collection of ids in memory.
Seems like returning a org.springframework.jdbc.support.rowset.SqlRowSet and iterate over this rowset would not hold every object in memory.
The only problem here is i cannot cast this row to my entity.
Is there a better way for this?
Assume that we have a sequence S with n elements <x1,x2,...,xn>. A pair of elements xi,xj are considered neighbors if |xi-xj|<d, with d a given distance between two neighbors. So how can find out the element that has most neighbors in the sequence?
(A simply way is sorting the sequence and then calculating number of each element but it's time complexity is quite large):
O(nlogn)
May you please help me find a better way to reduce time complexity?
I have a project which can be compiled with Visual Studio, GCC and with some embedded compilers. Sources are shared, but each platform requires separate makefiles, project files, solutions etc. There are two ways I can organize them:
Intermixed in a single hierarchy of folders
With separate folders for platform-dependent files
The first solution creates some confusion about which file belongs to which platform, but the second causes some repetition of the folders structure (some compilers require each project to have a separate folder).
Which do you think is better?
Hi,
I am implementing the sound recording functionality in my iPad app.
I want to prompt the user to attach his headphone with microphone for better performance.For this I need to check that whether the user has connected the headphone with microphone or not.
In the AVAudioSession there is a method inputIsAvailable.But this method returns 'Yes' for the inbuilt mic of iPad also.So,please suggest how to detect that whether the headphone with mic is connected to the device or not??
I am a PHP developer that came from a pascal background long time ago. I was always fond of pascal and was looking at Delphi. Are Pascal/Delphi dead? Again i am not trying to be disrespectful, I just do not know any better.
Thank You
I'm learning CodeIgniter and I come from Microsoft Visual Studio so I'm used to the auto complete feature. I've been using notepad++ so far but I wonder if anyone knows an editor that works better with CodeIgniter.
I would love to see features like:
Right-click - Add new model
Right-click - Add new view
Autocomplete with CodeIgniter helpers and libraries
I have a long string for example it could be "aaaaaabbccc". Need to represent it as "a6b2c3". What's the best way to do this ? I could do this in linear time by comparing characters and incrementing counts and then replacing the counts in the array, using two indexes in one pass. Can you guys think of a better way than this? Are any of the encoding techniques going to work here ?
Hi, I have many controls in table and I want to disable all the controls using JavaScript upon clicking of some checkbox.
I have google and found that we can't disable table instead all controls through loop.
Please suggest me, what isbetter idea
Thanks
I really wish that Google was better at searching for syntax:
decades :: (RealFrac a) => a -> a -> [a] -> Array Int Int
decades a b = hist (0,9) . map decade
where decade x = floor ((x - a) * s)
s = 10 / (b - a)
In an age where experience seems to be paramount, does anyone still see great value in having a college (specifically Computer Science) degree? Would those three years be better spent working in a top-shelf software company?
When considering social web app architecture, is it a better approach to document user social patterns in a database or in logs? I thought for sure that behavior, actions, events would be strictly database stored but I noticed that some of the larger social sites out there also track a lot by logging what happens.
Is it good practice to store prominent data about users in a database and since thousands of user actions can be spawned easily, should they be simply logged?
If I have search that has a lot of different options, then url becomes very long and looks very bad. Is there anyway to make urls look better? Using POST to make search would keep urls clean, but people couldn't share search urls.
I have to implement MPI system in a cluster. If anyone here has any experience with MPI (MPICH/OpenMPI), I'd like to know which isbetter and how the performance can be boosted on a cluster of x86_64 boxes.
So my logic is flawed and I need a better and correct way to resize an image in my c# app
I need a function similar to this setup
public void ResizeImageForWeb(string OriginalFile, string NewFile, int MaxWidth, int MaxHeight, int Quality)
{
// Resize Code
}
Basically, I'm a web designer lost trying to programming a desktop app.
Hi guys:
I am a noivce at JQuery.
I'm curious about if there is any plug-in or libraries to help developers validate whether any input value over a set of form elements is not entered (empty string).
I can just think of using a function to achieve this feature. Any better idea?
Thanks.
How do I get elements that do not have any class names?
<td class="B A">A03<sub>reserved</sub></td>
<td class="B R">R70</td>
<td>105</td>
<td class="M C">L220</td>
Right now I'm doing this $('td').not('.A, .B, .C, .M, .R')
There's gotta be a better way!
Hi.
Why is it better to store data inside an appSettings element (or inside a custom section) of a web.config file than to store it in a class?
One argument would be that by using custom sections we don’t have to recompile code when we change data, but that’s a weak argument, especially if we’re using Web Sites, which get recompiled automatically whenever code changes!
Thank you
Hi guys. I'm choosing what to use: Eclipse or NetBeans. NetBeans has better vim plugin - jVi, but, as I see, it doesn't work with my own ~/.vimrc file. But in eclipse and VimPlugin for it everything is perfect. So are there any ways to use my vimrc settings for NetBeans with jVi?
Good day!
Despite the fact LINQ2SQL and ADO.NET Entity Framework exists there were situations when I need to revert to plain old DataSet (not typed) and friends.
While writing SQL for SqlCommand:
Is it needed to quote field and table names with []?
Is it good to prefix table names with [dbo]
I use to use this syntax:
SqlCommand command = new SqlCommand("SELECT [Field1], [Field2] FROM [dbo].[TableName]", connection);
May be there is a better way?
Thanks in advance!
At a certain time each day, I'd like my browser to pop open a tab to a certain URL.
My goals:
1. be able to set the URL from the scheduled task
2. use the default browser (rather than hard-coding it)
I can't seem to accomplish both of these goals at once. I'll post my partial solutions as answers, but I'm hoping someone will have something better.
I understand that it is a replacement for ActiveRecord and that it uses objects instead of queries.
But...
why is this better?
will objects/queries be "easier" to create?
will it lead to more efficient SQL queries?
will it be compatible with all major DB's? - I assume it will.
will it be easier/harder to use with stored procedures?
Does increasing the number of test cases in case of Precision Neural Networks may led to problems (like over-fitting for example)..?
Does it always good to increase test cases number? Will that always lead to conversion ?
If no, what are these cases.. an example would be better..
Thanks,